OpenCV Exposure Compensation Without The Need To Stitch Images
(This is a repost from StackOverflow)
I have a bunch of images that have different exposures and I want to stitch them together:
OpenCV has a Stitcher example but it relies on matching features between the images and they should overlap with each other.
My images are not overlapping BUT they are connected to each other contiguously (as if I partitioned a Panorama into multiple splits) and I want to connect them together and fix their exposures.
How can I do this in OpenCV Python? At the very least the Compensator class needs:
compensator.feed(corners=corners, images=images_warped, masks=masks_warped)
images_warped
could just be normal input images and masks_warped
could be a 2D array of Ones but I don't know how the corners
value should be given manually?
a simple example would suffice, Thanks.
cv::hconcat? Those appear to be range images, why do you want to change the range values?
Also, please link to the StackOverflow post.
They are predicted images from a neural network and I want to stitch them together BUT they don't have overlapping sections and the
stitcher_detailed.py
example of OpenCV doesn't work on them. I want to put them horizontally together and remove the vertical discontinuities that form because of their different exposure settings. The OpenCV Exposure Compensator class does this and I want to use it without feature matching (which requires overlapping sections). Thanks.I added the link to StackOverflow on top of the page.
You can just equalize histogram
I've done that, It's not as effective as Exposure Compensation algorithms and it makes the other parts of the image (usually far left and far right) to have overblown intensities...
If there are no simple way to do it, the hard way would be: get histograms for just narrow strips at the neighbouring images edges, compare them and figure out a global adjustment needed, and apply it to the next image to concatenate, perhaps pixel by pixel.
The other option is to process overlapping tiles and then blend/merge/average the overlapping regions.