Forum

Author Topic: Getting keypoints for a Camera/Photo  (Read 2604 times)

cw-ceres

  • Newbie
  • *
  • Posts: 1
    • View Profile
Getting keypoints for a Camera/Photo
« on: May 01, 2020, 05:13:17 PM »
I'd love to be able to get the array of keypoints that are detected for each photo/camera via Chunk.matchPhotos()/Chunk.alignCameras() after these functions are run. Is there a way to recover these from the Python API? I'd like the (x,y) values in either pixel or CRS space. Even the count of keypoints detected would be extremely useful. I'm still using 1.4.5 Pro, but would love to know how to do this in 1.6 as well.

Apologies if I missed this in another thread, but all I found was related to recovery of tiepoints, not the original keypoints. Thanks!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Getting keypoints for a Camera/Photo
« Reply #1 on: May 07, 2020, 06:17:22 PM »
Hello cw-ceres,

Key points are not currently accessible via Python API.

Which type of the information you would like to access, if the feature is available?
Best regards,
Alexey Pasumansky,
Agisoft LLC

eiscar

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Getting keypoints for a Camera/Photo
« Reply #2 on: May 11, 2020, 05:53:14 PM »
You could export the project cameras to bundler format and then obtain the keypoints from there.  The format is open source, human readable and documented here: https://www.cs.cornell.edu/~snavely/bundler/bundler-v0.4-manual.html

Paulo

  • Hero Member
  • *****
  • Posts: 1303
    • View Profile
Re: Getting keypoints for a Camera/Photo
« Reply #3 on: May 12, 2020, 03:02:25 AM »
Hi Eiscar,

actually the bundler format will give you information for each tie point in point cloud. Each tie pt would have a 3 line entry with:
    <position>          [a 3-vector describing the 3D position of the point]
    <color>               [a 3-vector describing the RGB color of the point]
    <camera list>     [a list of cameras with the pixel coordinates  the point is measured in]

as in:
Code: [Select]
6.3863331718e+00 -1.1468036016e+01 7.4827536788e+00 # 3d coords of tpt0
57 52 57    # color of tpt0
2 0 0 -1579.7280 1239.2141 1 0 -1279.4722 1113.8573   # tpt0 measured in 2 cameras (0 and 1) with keypt index and 2d pixel coordinates                             
1.1473254061e+00 3.6103886297e-01 5.1187924650e+00 # 3d coords of tpt1 
114 125 172  # color of tpt1
4 0 3 -4805.8945 1145.1368 1 3 -4344.9888 1310.0009 6 0 4734.3164 1140.5669 7 0 4902.0049 1141.1263 # tpt1 measured in 4 cameras (0, 1, 6 and 7) with keypt index and 2d pixel coordinates

So you would not get all the keypoints info, though for each camera projection, you do get the keypoint index....
« Last Edit: May 13, 2020, 12:33:47 AM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor

eiscar

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Getting keypoints for a Camera/Photo
« Reply #4 on: May 12, 2020, 11:55:17 AM »
Sure, you will not get the keypoint feature vector, but having the projection coordinates in each image and the associated 3D tiepoint can be very useful depending on the application.

Best,
Eduardo

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Getting keypoints for a Camera/Photo
« Reply #5 on: May 12, 2020, 08:11:49 PM »
I think that the original request is related to the key points themselves, which are detected even before the matching operation is applied.
Best regards,
Alexey Pasumansky,
Agisoft LLC

UAV_project

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Getting keypoints for a Camera/Photo
« Reply #6 on: May 19, 2020, 12:22:39 PM »
Wouldn't the tie points be just as good, if not better, than the key points? This is the assumption I have been working with in regards to using the tie point coordinates for homography estimation. Alexey, would you say that the tie points are of better quality than the key point pairs?