Why doesn't my mask correctly divide DetectAndCompute into quadrants?

kra2008
Tue, 11 Jun 2024 05:02:46 +0000
Uncategorized

Ultimately I’m trying to align two photos for stereo viewing by humans. I’m NOT trying to rectify them to help a computer see in 3D. I have several decent methods of getting this done already but I’m trying to explore a couple other options. The one I’m looking at now is to use ORB to find feature points and in one way or another align the features that are common in the two images. I’ve got it finding points and matching them up and aligning reliably already, but I want to change the way the points are selected. I want to force ORB to choose points that are sort of more diverse and spread out than they naturally end up, because ORB frequently gets super fixated on one small, weird area in the photo, so my alignment ends up focusing too heavily on just one physical item in the photo and ends up with poorly aligned edges and corners. If anybody has any other ideas on how to do that I’d be happy to hear them.

The approach I’m thinking of doing now is doing 4 runs through of DetectAndCompute, while passing in masks that divide the images into quadrants. That way, when ORB gets fixated I at least end up with 4 different fixations, which allows my alignment logic later to work with more spread out points. However, I’m not getting points out as I expect. I’m attaching 4 photos that should show my quadrants, but they do not. Instead they show the points concentrating repeatedly in the top right and bottom right. I’ve double checked my masks by printing them out to a text file and they look good there.

There are innumerable questions and answers out there where people fail to use a mask that is a single channel of unsigned bytes, and then fail to use 0/255 as values, but that isn’t me. To the best of my knowledge the mask is formatted correctly, because after all it does do things and doesn’t throw an error, but it isn’t doing the right things.

Is there some reason ORB would not let me do this?

6 posts - 2 participants