Getting Accurate Scale

Mike TrulyMike Truly Global Mapper UserPosts: 42Trusted User
edited April 2010 in Technical Support
We've been over this before, but I continue to get irregular results... which makes confidence in the process difficult. The goal, as always, is to get 3D terrains in my animation program that are accurately scaled with texture maps that properly match the 3D model.

Let's say I go to Google Earth and I see a satellite image of some mountainous terrain. It looks good and I can use the measuring tools and measure various distances of the geometric features (such as a prominent mountaintop to another prominent mountaintop). This can be difficult depending on how prominent the geographic features are.

Then I go and download 1/3 arcsec data of the same area and bring into GM10. I set it to UTM projection and do some measurements of a square mile and it's square. I also redo the measurements of the geometric features and they seem to match what was displayed in Google Earth. I output a DEM from GM.

I pull the image from GE and the DEM into my 3D app. The imported DEM file seems to be the proper scale when I redo my measurements so I am careful to never scale or non-uniform scale in any way. Likewise, I am careful not to non-uniform scale (distort) the GE image as I apply it as a texture. I DO have to scale and move UVW mapping of the image to get the proper match with the 3D terrain but I NEVER non-uniform scale so that it stays proportional at all times.

But the end result is that frequently, the GE image does not exactly match the 3D imported terrain. If I were to start non-uniform scaling the UVW mapping... I could get it to match but I don't want to have to do that since I am trying to maintain the integrity of the process.

So the question is, which is correct?... the image of the terrain as presented in GE or the dataset downloaded, imported into GM and exported as a DEM?

Thanks for any ideas.

(Oh... and why can I never get this forum to email me when there is a reply to my posts?).

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited April 2010
    Mike,

    I don't think that either the GE image or the DEM is really incorrect, they are just in different projection systems and so will be portrayed in different ways with different types of distortion. Since GE is a 3D display environment, you are getting a an image from what is truly a 3D projected view of the earth's surface. This does not exactly match against a 2D projection, like UTM, that you would use when exported from Global Mapper. The DEM exported from Global Mapper from the NED data will be accurate in the UTM projection system, but without software that knows about projections and can reproject data, it won't necessarily match data in some other projected system.

    How exactly are you getting the image from GE? In general GE doesn't allow exporting the imagery within it as that would violate the terms of service of GE. There is a free GoogleOzi (http://www.zubak.sk/GoogleOzi/) application that allows you to get Google Maps imagery (if you don't care about violating the terms of service) in geo-positioned form that you could load into Global Mapper and export with the proper projection to match the DEM data.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Mike TrulyMike Truly Global Mapper User Posts: 42Trusted User
    edited April 2010
    Thanks for the info Mike. For these tests... I am simply doing a screen capture of the screen in GE Pro... but I do not have it set to the 3D terrain mode... just the straight down view. So you're saying that even in the straight down view, GE is projecting in a way that might be distorted?

    I guess that I should use the measurements done within GM10 (rather than GE) for more accuracy?

    Attached are a couple of images that show the problem. You need to view them in an image viewer and switch back and forth between them to start to see how the image doesn't line up with the 3D model. I will experiment with outputting images from GM10 to see if they line up better in the animation app.

    Any idea how I can get notified of new posts to this forum?

    Thanks again.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited April 2010
    Mike,

    You really aren't going to be able to get images done from a simple screenshot in GE to match up with data in a particular projected coordinate system in Global Mapper. You really need to get a geo-rectified image from your imagery in GE (which GE won't export for you) so that it can match up to a properly projected and rectified image from Global Mapper.

    The easiest way to do this is to load your screenshot from GE into Global Mapper and select to manually rectify it, then provide control points of known locations. You can then generate a properly geo-referenced image in a known projected system that you will then be able to overlay on other data sets. A bare screenshot simply doesn't have the coordinate and projection information needed to display it lined up with a properly geo-referenced map.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Mike TrulyMike Truly Global Mapper User Posts: 42Trusted User
    edited April 2010
    Thanks Mike... I'll experiment with those capabilities of GM.
  • Mike TrulyMike Truly Global Mapper User Posts: 42Trusted User
    edited April 2010
    Mike,

    OK, I've got somewhat of a handle on using the georectify tool. I am able to get a good alignment within GM10 and then go to export a bitmap to then pull into my animation app. The animation app does not understand mapping projection filetypes, etc. but the resulting image from GM10 can be planar mapped to the surface and lines up well when eyeballed.

    My question is, when I am exporting just the rectified image out as a JPG... what is the way to ensure I am getting maximum resolution for the output bitmap? I have the image quality set to the max, but should I let the sample spacing be what it defaults to to get the best resolution?

    Thanks again.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited April 2010
    Mike,

    Yes, the default export resolution will be the resolution needed to maintain the full resolution of the source data, so you shouldn't need to touch that to get the max resolution.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Mike TrulyMike Truly Global Mapper User Posts: 42Trusted User
    edited April 2010
    Mike,

    What is the rectifying actually doing in the background? Is it akin to planar mapping where the plane is scaled/rotated/positioned in 3D space or is it grid warping the pixels to distort the image to match or a combination of both?

    The reason I ask is that when comparing the original bitmap to the rectified exported result... the file sizes and resolutions are similar, but the exported result is softer in spots and seems to be distorted somewhat.

    Is it better to have lots of matchup points or few matchup points or points spread as wide as possible in order to get the best results?

    Thanks!
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited April 2010
    Mike,

    The rectification creates a mapping between pixel coordinates and some ground coordinate system based on your control points. The actual type of transformation done will depend on how many control points that you have, although by default your exact control points should be maintained. For example with 3 control points you will by default get an affine transformation generated that allows for scaling, offset, and rotation through a single set of equations. With 4 points you go to to a polynomial transformation that also allows for skew, beyond that piecewise-affine is used by forming triangles from the points.

    So whenever a particular ground location is needed, the equations are worked backwards to get the corresponding pixel location in the original image. If some kind of resampling (like bilinear interpolation) is enable for the image that will be used to get the color for that particular location.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Mike TrulyMike Truly Global Mapper User Posts: 42Trusted User
    edited April 2010
    Mike,

    Thanks very much for the explanation.

    When I have a terrain dataset that is being projected as UTM... should I also set the projection when georectifying an image to UTM? It defaults to geographic. I could also chose the state that the area is in.

    I have georectified 4 images and they all lined up very well in GM11. But on the 5th image, I am having a lot of difficulty getting a good match. The image is very straightforward (as are the others)... it it simply a rectangular, top down view of an area. But I have tried 3 points or many points and am not getting a good match like the others. I get very skewed, distorted overlay if I use more points. I feel I must be doing something wrong and have double checked my coordinates.

    Will keep trying.

    Thanks again.
  • Mike TrulyMike Truly Global Mapper User Posts: 42Trusted User
    edited April 2010
    OK, I finally got a good match on #5. I used the eyeball to the terrain features method and only 3 points and it matched. When I tried using 4 points, I got heavily distorted results. But 3 worked fine.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited April 2010
    Mike,

    I would rectify your image in UTM as that will be more true to scale and require less control points that one natively in Geographic, especially since your source image from Google Earth is likely near to scale. You can still enter your control points as lat/lon values and Global Mapper will automatically convert them to the selected UTM projection for you. Just make sure to choose the appropriate UTM zone for your image.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Mike TrulyMike Truly Global Mapper User Posts: 42Trusted User
    edited April 2010
    Thanks Mike.

    When I went to re-rectify the images in GM11, I setup the projection settings to UTM, etc. and went to save the projection so I could more easily load it again later. When I loaded later, the setting was changed from UTM to Transverse Mercator. Should it have done this or should it have kept UTM?

    Also, the dialog asks whether I want to re-project GCPs. I always say yes but I'm a bit confused as to what these choices mean. When I did say yes and watched the view and applied, the image overlays didn't seem to change so I guess the georectifys were about the same.

    Thanks again.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited April 2010
    Mike,

    A UTM projection is a Transverse Mercator projection with a particular set of parameters, although if you save a PRJ as UTM and reload it then you should get UTM back. Can you post the PRJ file that you generated as UTM and that comes in as Transverse Mercator when you load it?

    The prompt to reproject control points when changing the projection on the rectification dialog is asking you whether the coordinate values that you already entered should be transformed to the new projection or if they were already in the new projection and you are just selecting it a little late. Typically you will select yes to reproject if you were always entering the control points in whatever projection you are working with (or entering lat/lon and having Global Mapper convert for you).

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Mike TrulyMike Truly Global Mapper User Posts: 42Trusted User
    edited April 2010
    Mike,

    Thanks for the info. Attached is the UTM PRJ file that shows as Transverse Mercator when reloaded.

    Thanks again.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited April 2010
    Mike,

    Thanks for the file, I found the issue preventing the PRJ file from recognizing the projection as UTM (it was due to using feet for units) and fixed it. I have placed a new build at http://www.globalmapper.com/global_mapper11.zip with the change for you to try. Simply download that file and extract the contents into your existing v11.xx installation folder to give it a try. If you are using the 64-bit version, there is a new build available at http://www.globalmapper.com/global_mapper11_64bit.zip .

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • metallometallo Global Mapper User Posts: 23Trusted User
    edited April 2010
    mike (truly),

    i've done a LOT of what you are doing and i can tell you from experience that you always will need to tweak things to get them exact. imagery and the DEM never match 100%.

    the manual rectification you are attempting is certainly a solution but i would caution against assuming any one particular dataset is the "correct" one.

    keep in mind the difference between aerial photographs and true orthophotos (http://en.wikipedia.org/wiki/Orthophoto). especially when there is relief in the underlying terrain, it is difficult for every pixel in the image to correspond exactly. whatever photo you are using, someone has applied an adjustment algorithm in order to acheive the "best fit". the question is, how accurate is that adjustment and what factors is it considering.

    hope this perspective helps!
Sign In or Register to comment.