Reprojection Creates a New Image

Re-projecting an image adds or deletes pixels, creating a new image: this topic illustrates why.


All images imported into Manifold are rectangular because all raster image formats by definition have pixels arranged in rows and columns. Image windows show images as rectangles in the coordinates implied by the row and column arrangement of pixels, as computed to match the coordinate system in use.





For example, images shot from oblique space vehicle trajectories and published as "north up" images will be shown in a rectangular format, usually with black pixels padding the extra regions needed to make the image a perfect rectangle. The image above is a Landsat 7 shot of the region surrounding San Francisco Bay.


Re-projecting an image invariably changes its shape and leads to interpolation that changes the data. Re-projecting an image is, in effect, creating a new image.


Consider an image in its original rectangular format. All pixels are in locations adjacent to each other.


If we now re-project the image into some new projection (such as tilted perspective) we can imagine that the implied pixel locations will be pushed together in some regions and pulled apart in others. When shown in a map window within some projection the image will thus no longer be rectangular in shape.


We should keep in mind this is only a thought experiment since images always consist of pixels adjacent to each other. Although we can imagine that pixel locations are pushed together or pulled apart in real life an image always consists of a rectangular array of evenly-spaced and evenly-sized pixels.



When re-projecting an image, Manifold must take the implied locations of the pixels in the new form and transfer them to a new rectangular array of pixels. The color for each pixel in the new array is determined by sampling those color values at the implied projected points within it.



When projecting images Manifold will infer what size the new image should be to approximate the size of the original image. Using fewer pixels in height and width will result in re-sampling that on average reduces the accuracy of the interpolated new image. Using a higher number of pixels in height and width will provide finer sampling. By default, Manifold tries to guess at a reasonable size setting that will preserve the approximate overall size of the image in cases when re-projection does not result in radically different shapes.


Increasing the number of pixels in height and width of the re-projected image can not increase detail or improve resolution beyond that in the original image. Increasing the number of pixels in height and width beyond the size of the original image simply re-samples the same "big" original pixel over and over within adjacent new pixels.


The result of re-projection is an image that has visible pixels in the appropriate locations and otherwise is padded with transparent or other distinctive color pixels, such as black pixels that fill in regions where the re-projected image does not match the rectangular shape all images must have.

Sub-pixel Reprojection

When reprojecting images, a forward, average option appears in the Method box of the Reproject Component dialog.  It enables computation of coordinate system transformations for images to conversion accuracy even more detailed than the size of a single pixel, producing better quality reprojected images than the inverse, bilinear method used by default to reproject images.   The better quality may be important in some use cases when a single original pixel during warping / georegistration expands to more than one pixel in the new image, or vice versa.


The forward, average reprojection method allows specifying the number of Pixel divisions, 2 being the default and enough for most cases. Increasing the number of subdivisions improves image quality (with diminishing returns) at the cost of additional processing time.   The division of pixels into smaller units for more accurate reprojection is discussed in the Sub-pixel Reprojection topic.


Vector Drawings are Different

Unlike re-projecting images, re-projecting vector drawings does not involve additions to or deletions from the data set. Even though re-projecting a vector drawing changes the shapes of objects it does not add or subtract objects from the drawing nor does it add or subtract from the number of coordinate pairs used to define each object. The shapes of all objects in drawings are defined by the coordinates used to draw those objects. Re-projecting a drawing simply changes the coordinates into different numbers but it neither adds to nor subtracts from the coordinate pairs used to draw objects.

Re-projecting for Speed in Maps

When an image is displayed in a map that uses a projection other than image's projection, the map window will automatically re-project the rendered view of the image into the projection used by the map, interpolating on the fly to add and delete pixels in the view as necessary.   Even though the map window is showing the image in a new projection, the map window's projection, it is not changing the actual image data. It is simply re-computing on the fly how the image would appear in the new projection.


Manifold is so fast that normally even images well over 100 GB will be reprojected on the fly so rapidly that all panning and zooming will be instantaneous.  However, for exceptionally large images, reprojection on the fly can be a time-consuming process and may slow down the display performance of the map.


If we notice a slower map window when exceptionally large images must be re-projected, we can either use Map Projection to change the projection of the map to that of the image, or we can use Reproject Component to re-project the image into the same projection used by the map window.  Map windows will be faster if the projection of the map is the same as the projection used by very large components shown as layers in the map.  


The images above are simulations and are not actual screen shots.  Manifold shows images in projected views too smoothly for a real screen shot to show the effects above.


See Also





Reproject Component


Sub-pixel Reprojection


Map Projection


Assign Initial Coordinate System


Reproject Component


Map Projection


Example: Assign Initial Coordinate System - Use the Info pane to manually assign an initial coordinate system when importing from a format that does not specify the coordinate system.


Example: Change Projection of an Image - Use the Reproject Component command to change the projection of an image, raster data showing terrain elevations in a region of Florida, from Latitude / Longitude to Orthographic centered on Florida.


About Coordinate Systems