Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

If you are grabbing images from different frames, what you want to do is to make sure they overlap somehow (depending on the speed of the aircraft, 1s may or may not be enough). Then, you need to find features from both images that match each other. There are several algorithms and libraries (like OpenCV) that help you do this.

similar features in both images enter image description here

Both image above shows you the popular SURF algorithm in action. Each redline is connecting the two features (pixels) that have been identified as the same.

What you can do, is arbitrarily pick one image as the reference one (say the left one) and treat it as a Ground Control Point. What you can do then is warp the right image to fit the left one based on those GCPs.

Lucky for you, I stole the second image from the blog of one of the participants of this year's Google Summer of Code for the GDAL project.

If you look at the GitHub of that project, you will find that there is a sample program that does the first part (run Surf on two images to find the matching features).

Now you can use that resulting point list as GCPs. To do that you can create a VRT dataset and gdalwarp to warp the images. Instead of describing the process for that, I would recommend you look at several of the answers in GIS.SE that describe how to use GCPshow to use GCPs and VRTsVRTs. Nevertheless, let me suggest you right of the bat to use the Thin Plate Spline Transformer option available in gdalwarp (the tps flag). I spent several hours one time myself trying to figure out why my warped images were not being forced to use the GCPs until I finally went to the GDAL IRC channel - which by the way is the best place to get GDAL support hands down.

If you are grabbing images from different frames, what you want to do is to make sure they overlap somehow (depending on the speed of the aircraft, 1s may or may not be enough). Then, you need to find features from both images that match each other. There are several algorithms and libraries (like OpenCV) that help you do this.

similar features in both images enter image description here

Both image above shows you the popular SURF algorithm in action. Each redline is connecting the two features (pixels) that have been identified as the same.

What you can do, is arbitrarily pick one image as the reference one (say the left one) and treat it as a Ground Control Point. What you can do then is warp the right image to fit the left one based on those GCPs.

Lucky for you, I stole the second image from the blog of one of the participants of this year's Google Summer of Code for the GDAL project.

If you look at the GitHub of that project, you will find that there is a sample program that does the first part (run Surf on two images to find the matching features).

Now you can use that resulting point list as GCPs. To do that you can create a VRT dataset and gdalwarp to warp the images. Instead of describing the process for that, I would recommend you look at several of the answers in GIS.SE that describe how to use GCPs and VRTs. Nevertheless, let me suggest you right of the bat to use the Thin Plate Spline Transformer option available in gdalwarp (the tps flag). I spent several hours one time myself trying to figure out why my warped images were not being forced to use the GCPs until I finally went to the GDAL IRC channel - which by the way is the best place to get GDAL support hands down.

If you are grabbing images from different frames, what you want to do is to make sure they overlap somehow (depending on the speed of the aircraft, 1s may or may not be enough). Then, you need to find features from both images that match each other. There are several algorithms and libraries (like OpenCV) that help you do this.

similar features in both images enter image description here

Both image above shows you the popular SURF algorithm in action. Each redline is connecting the two features (pixels) that have been identified as the same.

What you can do, is arbitrarily pick one image as the reference one (say the left one) and treat it as a Ground Control Point. What you can do then is warp the right image to fit the left one based on those GCPs.

Lucky for you, I stole the second image from the blog of one of the participants of this year's Google Summer of Code for the GDAL project.

If you look at the GitHub of that project, you will find that there is a sample program that does the first part (run Surf on two images to find the matching features).

Now you can use that resulting point list as GCPs. To do that you can create a VRT dataset and gdalwarp to warp the images. Instead of describing the process for that, I would recommend you look at several of the answers in GIS.SE that describe how to use GCPs and VRTs. Nevertheless, let me suggest you right of the bat to use the Thin Plate Spline Transformer option available in gdalwarp (the tps flag). I spent several hours one time myself trying to figure out why my warped images were not being forced to use the GCPs until I finally went to the GDAL IRC channel - which by the way is the best place to get GDAL support hands down.

Source Link
Ragi Yaser Burhum
  • 15.4k
  • 2
  • 60
  • 76

If you are grabbing images from different frames, what you want to do is to make sure they overlap somehow (depending on the speed of the aircraft, 1s may or may not be enough). Then, you need to find features from both images that match each other. There are several algorithms and libraries (like OpenCV) that help you do this.

similar features in both images enter image description here

Both image above shows you the popular SURF algorithm in action. Each redline is connecting the two features (pixels) that have been identified as the same.

What you can do, is arbitrarily pick one image as the reference one (say the left one) and treat it as a Ground Control Point. What you can do then is warp the right image to fit the left one based on those GCPs.

Lucky for you, I stole the second image from the blog of one of the participants of this year's Google Summer of Code for the GDAL project.

If you look at the GitHub of that project, you will find that there is a sample program that does the first part (run Surf on two images to find the matching features).

Now you can use that resulting point list as GCPs. To do that you can create a VRT dataset and gdalwarp to warp the images. Instead of describing the process for that, I would recommend you look at several of the answers in GIS.SE that describe how to use GCPs and VRTs. Nevertheless, let me suggest you right of the bat to use the Thin Plate Spline Transformer option available in gdalwarp (the tps flag). I spent several hours one time myself trying to figure out why my warped images were not being forced to use the GCPs until I finally went to the GDAL IRC channel - which by the way is the best place to get GDAL support hands down.