Image getting stretched when creating MBTiles using TileMills to use as an Image on Whirly Globe Framework - iphone

I am struck with issue .
I want to use My personal Image as an image on whirly globe.I used a Jpeg file and changed into .tiff file and added to Tile Mills as a Layer (Following the rules specified in the crash course of tile mills).Now i am facing an issue while exporting the image as MbTiles .
I looked into this Link for taking reference on what should be 'Dimensions' of the image to be used on whirly globe.
Right now i have an image whose dimensions are 10184X7638. But this image is not able to wrap the complete Whirly Globe.
Please guide me on
what the dimensions should be there of the image to be used for whirly globe.
can i use this values while creating a frame for the image as the image gets strected when is added to the globe .Image1
.
This is the Image i am talking about it has a dimensions of 10184 X 7638 pixels and when i select these bounds as specified Image1 (-180,-85.11,180,85).then i get this Image2
. Here you can see the image is not able to cover the complete bounds and hence the globe also is not fully wrapped with this image.
Thanks!!

The image is less about dimensions and more about mapping it to geographic coordinates so that it can completely cover the globe. You need to make sure the image takes up your whole TileMill map if you want it to completely cover the globe in WhirlyGlobe.

Related

How can i crop a specific area of image using python

I wanted to crop a specific area of images, the images uploaded are of different dimensions but all have these areas so i want a python script that can crop actually that part and make a new image.
I am uploading the original pics too and the pics after cropping too, the output I want to achieve actually.
First original image
First cropped image
Sceond Original Image
Second cropped Image

How to see exact resized image is put into Vision framework?

I only found a way to see the initial image (non-resized one) and then this image got cropped somewhere inside Vision to match input resolution for my .mlmodel. How can I see that cropped version (I capture these images from my camera)?
I use this this crop option: VNImageCropAndScaleOptionCenterCrop = 0 (I believe it doesn't matter though).
You could create a model that doesn't do anything with the image, and then look at the output image that is generated by Vision.

ImageJ : Overlay 2 Images When One is Distorted

I am asking for a step-by-step process with the appropriate plugins (I have been attempting with multipoint and landmark correspondence). Please include images in answer if possible.
I want to overlay two scientific images
The images are not oriented the same due to distortion of the second image from collection at a 45o angle and the object was also at a different orientation (flipped horizontally and slightly rotated)
In Adobe Photoshop I transformed the distorted image to overlay with the
first image by eyeballing the match as you can see below but I am having
difficulty using ImageJ to perform this overlay. I have been told that my
eyeballing method in Adobe Photoshop will not be sufficient for my methods
section of my manuscript and that I must use a scientific program such as
ImageJ.
I tried to follow instructions from the ImageJ forum for Multipoint and Landmark Correspondence but it does not overlay the two images or transform the second image to match the first. Rather, it distorts a portion of the second image and appears to crop the rest out.

How to merge an image to fill in other image with shape?

I want to merge an image to another image in one shape. Example:
1- People image
2- Shape Image:
So how to do draw that. I already implement for merging but it's not fill to that shape.
It's possible to do this using the masking functions in the Quartz 2D framework. It's a little bit more involved than using the higher level image functions of UI Kit, but Quartz 2D gives you a lot more power to do cool graphics techniques.
The relevant Apple Developer guide to this can be found here: https://developer.apple.com/library/mac/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_images/dq_images.html
For this example, you'd want to create a mask shape for the inside part of the shape image. There are two ways you can do this. One way is to use image editing software to create a second mask image, with the same size as your shape image, with pure black in the area where you want the people image to appear, and white where you don't want to appear. In this example, that would be the area inside the blue shape. It is important to not crop this image, or else they won't match up exactly.
The other way to create the masking image would be to do that dynamically based on the shape image, and honestly, this is the way I would do it. This would mean that you're including fewer images in your app, and if you made any changes to the shape image, you wouldn't have to recreate the mask image as well. You could do this by making a small change to the way your shape image is formatted. You would need to use a format that allows transparency - png is preferred - so that there is alpha transparency in the part of the image outside of the shape, which is white in your JPEG image. Make sure the section in the center of the image is white (really, any color that is NOT USED in the wanted part of the shape image would work, but I'll say white for this example) and that you don't have parts of it that aren't pure white after image compression.
You will then use Quartz to select the area that's white, and create a mask from that. This technique is a bit more involved, but what you need can be found in the document I linked to above. Because of this, you might start with a static masking image, and then convert to the more involved technique after you've got the code to make the first technique work.
When you have your masking image, you would create the mask itself with the function CGImageMaskCreate(::::::::). You can then apply the mask to the people image using the function CGImageCreateWithMask(::), which will give you an image with the person's portrait, with the correct shape cropped from the center.
Finally, you would display this in your app by placing the masked people image on top of the shape image, and voila, you'll have what you're looking for.
Also, keep in mind, when using the Quartz 2D framework, you'll have to make sure you release images when they are no longer needed, or else you could have memory leaks.

Create Mosaic on image

In image app i have to blur the selected areas of image. Something like create mosaic at selected area of image. i have to get each pixel color of selected area and then increase the size of each pixel. here is the reference link that i am using http://soulwithmobiletechnology.blogspot.in/2011/05/create-mosaic-with-your-image-part-1.html . But not able to implement this practically for selected area. Can any one have some sample for the same.
There are two solutions for this
1. Get the screen shot of the area where you want the mosaic effect and apply effect to the same portion. Then add the image(with mosaic effect) to the original image.
2.Get the pixel of the area you want to be effected and then gave effect to those pixels.*