Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: Yoann Courtois on January 25, 2022, 10:30:17 PM

Title: Images rematching in an aligned project
Post by: Yoann Courtois on January 25, 2022, 10:30:17 PM
Hello !

We encounter difficulties to rematch images that are part of a project that has been already aligned (with keep_keypoints=True).
Indeed, we would like to manually match precise image couples that have been first, during main process, ignored by pre-selections for example, in order to add tie points between images we know they could match.

We have been able to list all image couples that we would like to rematch, but :

- If both images of a couple already have saved key points (with keep_keypoints=True during main process), the matchPhotos(reset_matches=False) method ignore this couple, even if this couple has never been matched before.
- If both image key points are removed (with removeKeypoints method), the matchPhotos(reset_matches=False) method doesn't process the couple.

Then, we would like to be able to manually match a couple of images where both have saved key points.
Otherwise, we would like to be able to remove key points of selected images (not all of them as removeKeypoints do), so that we could have couples with an image with key points, and the other without.

Hope our problem is clearly enough described !

Regards
Title: Re: Images rematching in an aligned project
Post by: Alexey Pasumansky on January 29, 2022, 07:17:26 PM
Hello Yoann,

I think in the described case the only solution would be to remove the images, which should have newly detected key points, from the chunk, re-add them and run the image matching operation without resetting the tie points.
Title: Re: Images rematching in an aligned project
Post by: Yoann Courtois on January 29, 2022, 09:31:13 PM
Hi Alexey,

Thanks for your reply.

But doing that, we would lose previously detected tie points (and so process time). We would like to keep them, and add more based on manually define pairs.
Technically it would not be a problem, but we don't understand why matchPhotos method ignore image couples which already have tie points. As we give explicit list of pairs, we would like them to be match, no matter where do they come from.

Regards
Title: Re: Images rematching in an aligned project
Post by: Yoann Courtois on March 18, 2022, 05:40:47 PM
Up !

Is there any workaround in order to add manuel couples of images in a second matchPhotos process ?

We have been able to certify kind of wrong preselected groups while looking at "Components" tree of our chunks.

Regards
Title: Re: Images rematching in an aligned project
Post by: Yoann Courtois on April 20, 2022, 10:29:55 AM
Hello Agisoft Team !

Would it be possible to tell me if something is already possible, or if some API modification are planned, or if we need to find any workaround by ourselves ?

It would be perfect if "matchPhotos" method could have an option to force processing of explicit image coupes list.
As I previously said, we notice that an image couple will be ignored by the method if both images have previously and separately been match, even if this couple itself has never been...

Regards
Title: Re: Images rematching in an aligned project
Post by: Yoann Courtois on February 07, 2023, 08:09:56 PM
Hi everyone !

I'm back, a couple of months later, in order to now if any new possibilities opened in order to unlock our problem.

Recent investigations has confirmed that, without clear explanation, it is not possible to manually rematch couples of images that are part of a set of images that have been already matched before.
But, as we have certified that those couples have been ignored not because they have no match, but because of preselection, we would need to rematch them.

As a workaround, we have though about two possibilities :
- Manually remove key points of only a list of images (is it possible ?) --> So that those images will be taken into account when in rematch paires.
- Manually create tie points (is it possible ?) --> So that we could at first export existing tie points, then remove images, import them again, rematch and finally re-import previous set of tie points.

The proposed solution of Alexey (only remove and re-import images that we want to rematch) is clearly not an efficient solution as it force us to reprocess all the couples that have been firstly matched.
It force us to recalculate hundreds of couple of images to get back tie points that have been lost when we have removed the images.

Is it possible to help us please ?

Regards
Title: Re: Images rematching in an aligned project
Post by: ilia on August 06, 2023, 03:11:57 PM
I would like to bump this thread as I also looking how to enforse Metashape to try to match specific images.
For an example, all reference methods are not doing a good job when I try to mix aerial data collected with drone and ground data collected with mobile cameras.