Finding GCP Pixel Locations

22 views
Skip to first unread message

Tricia Nelsen

unread,
Mar 22, 2022, 2:04:08 AM3/22/22
to Ames Stereo Pipeline Support
Hello -

I'm trying to add GCP's to my ASP process, however, I'm having a really difficult time determining the pixel locations of the GCPs in the image. I can't use the stereo_gui because I'm using a remote supercomputer to run ASP and just have access to the bash shell. 

Does anyone have a simple way of determining pixel location from lat/long coordinates? I've been messing around with GDAL, but I'm using Digital Globe images, which seem to have a GCP projection relationship rather than a geotransform, but because of that gdallocationinfo isn't returning anything. I know this isn't exactly within ASP, but I figure there must be someone in this group who uses a method to get their .gcp file made.

Thanks,
Tricia

Alexandrov, Oleg (ARC-TI)[KBR Wyle Services, LLC]

unread,
Mar 22, 2022, 11:38:13 AM3/22/22
to Tricia Nelsen, Ames Stereo Pipeline Support
In order to find the pixel location from GCP you need to be able to trace a ray from the ground to the camera and see where it intersects your image. That GDAL can't do, as it does not know anything about how the Digital Globe camera works. 

On the supercomputer if a GUI is needed I usually start vncserver (if yours has it) and then connect to it with vncviewer (via port ssh forwarding). Or, you can copy your images back from the supercomputer where you have a GUI, do the work there, and copy things back (but DG images are so huge). Maybe you can just make a little DEM crop, mapproject the DG image onto that crop, and copy the resulting little orthoimage over locally with rsync, then for each pixel you will have a lon-lat.

Overall, using GCP is not a sustainable way of using the ASP tools on the large scale, as it requires too much user interaction. It may be preferable to run bundle_adjust and stereo without GCP, then align the obtained DEM to a reference DEM with pc_align. That alignment transform can be then applied to the cameras too (https://stereopipeline.readthedocs.io/en/latest/tools/pc_align.html#applying-the-pc-align-transform-to-cameras).




From: ames-stereo-pi...@googlegroups.com <ames-stereo-pi...@googlegroups.com> on behalf of Tricia Nelsen <tene...@gmail.com>
Sent: Monday, March 21, 2022 11:04 PM
To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: [EXTERNAL] Finding GCP Pixel Locations
 
--
You received this message because you are subscribed to the Google Groups "Ames Stereo Pipeline Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ames-stereo-pipeline...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ames-stereo-pipeline-support/b0dce322-c75b-4458-89ef-b847b4c361edn%40googlegroups.com.

Tricia Nelsen

unread,
Mar 23, 2022, 12:22:42 PM3/23/22
to Alexandrov, Oleg (ARC-TI)[KBR Wyle Services, LLC], Ames Stereo Pipeline Support
Well I'm glad I can at least give up on GDAL. Thanks Oleg, as always, for your fast and helpful response!

Tricia
Reply all
Reply to author
Forward
0 new messages