Forum

Author Topic: POI with image coordinates to georef coordinates?  (Read 1584 times)

JonasBohlin

  • Newbie
  • *
  • Posts: 3
    • View Profile
POI with image coordinates to georef coordinates?
« on: January 10, 2018, 04:40:12 PM »
Hi,
I use Photoscan pro for making 3d models from drone images.

I'm wondering if it is somehow possible to get geo-referenced coordinates from the final 3D model for a specific image coordinate from one of the images in the block model?

Basically I have a list of interesting points (POI) that i have marked in the raw images and I would like to get their geographic coordinate after bundle adjustment and referencing of the complete dataset (3d model).

Table looks like this:
POI_ID, Img_ID, img_x, img_y 

I would like to automatically get geo_x and geo_y (z value is of less importance) for all the points in that table.

/Jonas

 

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: POI with image coordinates to georef coordinates?
« Reply #1 on: January 10, 2018, 05:49:52 PM »
Hello Jonas,

I can suggest the following approach via Python scripting:

Code: [Select]
import PhotoScan
chunk = PhotoScan.app.document.chunk
surface = chunk.model

projection = PhotoScan.Vector(img_x, img_y)
camera = chunk.cameras[img_ID]

point_local = surface.pickPoint(camera.center, camera.transform.mulp(camera.sensor.calibration.unproject(projection)))
point_geo = chunk.crs.project(chunk.transform.matrix.mulp(point_local))

It should intersect the ray that goes through the camera center (with img_ID index) and the point on the image (with img_x, img_y coordinates) with the surface - in this example the surface is defined as mesh model.
Then the intersection point is converted from the internal coordinate system to geographic (defined for chunk).
Best regards,
Alexey Pasumansky,
Agisoft LLC

JonasBohlin

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: POI with image coordinates to georef coordinates?
« Reply #2 on: January 11, 2018, 07:05:51 PM »
Thank you!
I will try this soon.
/Jonas