Forum

Author Topic: Own preselection pairs in matching  (Read 5888 times)

dcsa

  • Newbie
  • *
  • Posts: 11
    • View Profile
Own preselection pairs in matching
« on: August 16, 2017, 05:53:35 PM »
Hi,

Is it possible to fix the image pairs where PhotoScan will look for matches in the matching process? I mean, Can I give a list of image pairs where I want to find matches?

I have photos taken from an aircraft but their positions are very near between some of them, so i don't want to get matches between this images.

Can I do that?

How it works the parameter "pairs" for the matching process? How is the sintaxis of the list (pairs of images)? Or is it just to fix a list of images, not a image pairs?

Thank you for your time. Any idea will be welcome

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15320
    • View Profile
Re: Own preselection pairs in matching
« Reply #1 on: August 17, 2017, 05:25:35 PM »
Hello delcampoana,

Custom preselection can be defined using "pairs" argument in the matchPhotos() function. The variable should contain the list of camera pairs as tuples to be used for matching, for example:

Code: [Select]
c1 = chunk.cameras[0]
c2 = chunk.cameras[2]
c3 = chunk.cameras[5]

chunk.matchPhotos(pairs = [(c1, c2), (c2, c5)]

So it's not the list of paths to the images, but PhotoScan.Camera() instances should be used instead.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Yoann Courtois

  • Sr. Member
  • ****
  • Posts: 316
  • Engineer in Geodesy, Cartography and Surveying
    • View Profile
Re: Own preselection pairs in matching
« Reply #2 on: August 18, 2017, 11:34:59 AM »
Hi delcampoana !

If you only have problems about matching between very close images, I suggest you not to take care about pairs but post process the sparse cloud.
Indeed, with the gradual selection tools, using reconstruction uncertainty criterion, you will be able to delete tie points which have been created from a small base line.

Regards
--
Yoann COURTOIS
R&D Engineer in photogrammetric process and mobile application
Lyon, FRANCE
--

dcsa

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Own preselection pairs in matching
« Reply #3 on: September 28, 2017, 08:50:46 PM »
Hi again,

Thank you Yoann, but I need to avoid this image pairs before building the sparse point cloud.

I have been testing the matchPhotos() function and the results are the same when I use the parameter pairs() and when I don't use it. I explain:
To get the image pairs tuple list I do the matching process in a common project and I save the list of image pairs created. Then I edit the list removing the image pairs which I don't want to create. Finally I restart the entire project using my edited list in the matching process and I get image pairs which I don't want to create AGAIN. Why does it happen?

The edited list which I use in the pairs() parameter is like this:
[(<Camera 'IMG_170606_100743_0218_REG.TIF'>, <Camera 'IMG_170606_100748_0221_NIR.TIF'>),
(<Camera 'IMG_170606_100743_0218_REG.TIF'>, <Camera 'IMG_170606_100745_0219_REG.TIF'>),
(<Camera 'IMG_170606_100743_0218_REG.TIF'>, <Camera 'IMG_170606_100746_0220_REG.TIF'>),
(<Camera 'IMG_170606_100743_0218_REG.TIF'>, <Camera 'IMG_170606_100745_0219_GRE.TIF'>),...]

And the used code:
Code: [Select]
chu.matchPhotos(accuracy=PhotoScan.HighestAccuracy, preselection=PhotoScan.Preselection.NoPreselection, generic_preselection=False, reference_preselection=False, keypoint_limit=40000, tiepoint_limit=4000, pairs=matchesCam1List)I have tried with True for generic and reference preselection too, and not writing the parameter "preselection" because I supposed it is obselete truly (The API document say:
• preselection (PhotoScan.Preselection) – Image pair preselection method (obsolete)), but it dosen't work for anything.

Am I doing it correctly?

Any idea?

Thank's anyway  ;)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15320
    • View Profile
Re: Own preselection pairs in matching
« Reply #4 on: September 28, 2017, 09:36:59 PM »
Hello delcampoana,

If point A is the correspondence between Image1 and Image2 and also it is the correspondence between Image3 and Image2 - it will be the a correspondence with three projections, so Image3 and Image1 would have a correspondence as well, even though you haven't ask PhotoScan to find the matching points between them.
Best regards,
Alexey Pasumansky,
Agisoft LLC