Forum

Author Topic: Validate invalid matches  (Read 10597 times)

JesperChristensen

  • Newbie
  • *
  • Posts: 5
    • View Profile
Validate invalid matches
« on: September 01, 2020, 07:11:42 PM »
I have got a bunch of underwater sequential photographies, which basically just needs stiching based on sequential reference. However out of 550 images, only 11 are aligned. When I look at the matches for an image, many many features are matched correctly, see attached image.

This holds true for my entire dataset, but I cannot in any possible way get Metashape to do a good job.

Is there any way that I can manually validate the matches that are found, but not used?

JesperChristensen

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Validate invalid matches
« Reply #1 on: September 04, 2020, 11:24:00 AM »
Could I try bumping this up? Is there really no way to go about this? So sad the matches look solid, but are not used due to some threshold somewhere. It must be possible to change this?

James

  • Hero Member
  • *****
  • Posts: 769
    • View Profile
Re: Validate invalid matches
« Reply #2 on: September 04, 2020, 12:39:53 PM »
I think the terms 'valid' and 'invalid' might be misleading. I think they more likely should be named 'used' and 'unused'.

A set of key points can only be 'used' to align an image if they are matched in two other aligned images.

Your screenshot shows that the selected image has 120 matches with one other image, and just 20 and 15 with another two images.

Assuming the 20 and 15 are garbage, or not sufficient to do much aligning, the 120 'good' matches are no use as they only link this image to one other. And if that image isn't able to be aligned for similar reasons then they're no use anyway.

What i would probably do would be copy the chunk, resetting alignment for all images, then selecting the two images you have shown above (..913_419 & ..913_779) and aligning just those two selected images. They will probably align to each other, but if the overlap doesn't carry on to other images then you might not be able to align any other images to that small subset, but that would be one way to find out.

JesperChristensen

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Validate invalid matches
« Reply #3 on: September 04, 2020, 01:01:06 PM »
Thanks for the reply.

What I found this morning is similar to what you have described. I moved all unaligned images to new chunk, ran the aligment again, move unaligned to new chunk, align, and repeat. That way, I actually got all images aligned. But it seems that Agisoft, in a large chunk, only aligns one part, meaning that even though, say image 2-10 aligns well, and 50-60 aligns well, it will only do one coherent set instead of "spotty" alignment, which for my use case would also be ok.

So the work as is, to keep moving unligned cameras into new chunks, redo the alignment and repeat until all images are aligned. I guess then I manually have to "stitch" together the mosaics in the end or simply provide several chunks of mosaics. But that's much better than only having 10 images out of 550 aligned  ::) ::)

Felix_

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Validate invalid matches
« Reply #4 on: January 13, 2021, 11:41:01 AM »
Thanks to the explanation by James I found a dirty workaround, that gets me more valid matches.

A set of key points can only be 'used' to align an image if they are matched in two other aligned images.

I just duplicated the whole chunk, renamed some of the images and moved them back to the original chunk. So I now had some images twice in my original chunk. When I did the "Align Photos" step, I ended up with more matches validated.

This is my humble understanding of what is going on:
I have two images A and B and I copy image B and rename it to B'. In the alignment step, all(?) matches between image A and B can also be found between images A and B'. Therefore we pass this margin that James was talking about. Of course this would come at the price of having more false matches. But that's better than no matches at all, I guess.

Not sure if this is really what is happening, but  maybe it helps someone. What do you think?

Felix_

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Validate invalid matches
« Reply #5 on: January 13, 2021, 04:20:42 PM »
I just noticed something that seems to contradict the theory, that a match can only become valid if the key point is found in at least a third image.

See the attached screenshot, where I used "Gradual Selection" to filter the Tie Points by "Image Count". If I filter for 2 images, I have a bunch of Tie points selected. But shouldn't the number of tie points with just 2 projections be zero, if a match can only become valid if it's found in at least 3 images?




Paulo

  • Hero Member
  • *****
  • Posts: 1527
    • View Profile
Re: Validate invalid matches
« Reply #6 on: January 13, 2021, 05:25:30 PM »
In fact a  valid tie point is a point detected in at least 2 images and that satisfies various threshold criteria (farness, accuracy, visibility , weakness) during alignment phase....

Example of list of all matched points in a project with  their projections in each photo where they are detected... Points with True in valid column are tie points, others are invalid:

Code: [Select]
Id Valid No_proj
Cam_id X_pix Y_pix PtSize_pix
0 True 2
DJI_0002_N 354.77 33.31 1.888
DJI_0003_N 222.15 480.40 2.021
1 True 6
DJI_0041_O 3236.95 369.07 2.779
DJI_0042_O 3421.76 901.81 3.132
DJI_0002_N 516.28 48.20 3.328
DJI_0003_N 395.71 495.53 3.173
DJI_0004_N 353.09 1276.94 3.899
DJI_0005_N 279.99 2285.02 4.324
2 True 3
DJI_0042_O 3439.18 877.76 3.473
DJI_0002_N 495.64 33.91 2.902
DJI_0003_N 373.59 478.76 3.044
3 False 5
DJI_0042_O 3534.73 1016.64 2.570
DJI_0002_N 640.25 20.51 2.613
DJI_0003_N 529.29 440.47 2.303
DJI_0004_N 501.89 1161.52 2.533
DJI_0005_N 448.31 2079.31 2.747
4 True 3
DJI_0042_O 3531.84 1056.51 4.316
DJI_0002_N 677.44 40.84 4.177
DJI_0003_N 568.89 454.97 4.233
5 True 2
DJI_0002_N 772.57 32.28 2.903
DJI_0003_N 669.34 465.38 3.254
...
« Last Edit: January 13, 2021, 07:23:27 PM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor