Forum

Author Topic: Extract tie points projections using stereo multicameras  (Read 1338 times)

Veras

  • Newbie
  • *
  • Posts: 6
    • View Profile
Extract tie points projections using stereo multicameras
« on: November 17, 2021, 07:02:41 AM »
Hi, everyone

I've read this post https://www.agisoft.com/forum/index.php?topic=10730.0 to extract tie points projection using Python.

I calibrated my stereo camera system using multicameras system getting the slave offset and orientation omega phi kappa. See this link with stereo calibration result:
https://drive.google.com/drive/folders/1V3IY0rarvXW7piGHUC2K-JbzT96ow-H2?usp=sharing

I'm using the code in the first link to extract the matches points, I would like to save this coordinates in [u1,v1 u2,v2] format in txt file. How can i do that using Py?

u1,v1 are coordinates in the left image and u2,v2 are coordinates in the right image for each stereo frame.

I want to open this file in Matlab to calculate the fundamental matrix using an eight-point algorithm.
« Last Edit: November 17, 2021, 07:24:20 AM by Veras »

Paulo

  • Hero Member
  • *****
  • Posts: 1321
    • View Profile
Re: Extract tie points projections using stereo multicameras
« Reply #1 on: November 17, 2021, 11:05:51 AM »
Hi Veras,

using the referenced code you would get common_tiepoints a list of 2d vector pairs for each common tie pt between camera1 and camera2 (1st vector has tie point camera1 projected coordinates and 2nd vector has its camera2 projected coordinates)...
You can use following code to print out the 2d coordinates of each pair
Code: [Select]
for pair in common_tiepoints:
    print(pair[0].x,pair[0].y,pair[1].x,pair[1].y)
   
2021-11-17 01:59:00 1688.838134765625 373.2680358886719 1486.26904296875 62.46699523925781
2021-11-17 01:59:00 648.743896484375 560.5266723632812 372.5727844238281 274.1346130371094
2021-11-17 01:59:00 683.5775146484375 556.4561157226562 410.7026062011719 269.77020263671875
2021-11-17 01:59:00 616.3840942382812 516.4474487304688 323.61968994140625 221.83346557617188
2021-11-17 01:59:00 790.2546997070312 526.5020751953125 525.0875854492188 235.97068786621094
2021-11-17 01:59:00 789.1876831054688 556.7527465820312 531.5474243164062 271.24981689453125
.....
You can then edit this to use write to txt file with required format...
This should get you going...
« Last Edit: November 17, 2021, 02:53:17 PM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor

Veras

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Extract tie points projections using stereo multicameras
« Reply #2 on: November 18, 2021, 07:22:12 AM »
Hi, Paulo.

Thanks a lot for your answer and contribution.

This code worked very well for me.

Best Regards,
Veras.