reduce interest area for image stitching

asked 2019-10-27 14:57:03 -0500

virilo gravatar image

I’d like to do image stitching on hard samples, having repeated patterns. Let’s say, images of a wall like a chessboard with non informative background (sand).

image description

I’m using python cv2 image stitching, but it “compress” the output. The repeated pattern, must be misleading cv2 into thinking it is an image repetition:

image description

I’d like the image stitching algorigthm to give me the next output:

image description

I think it is reachable, by using a parameter to:

  • specify the image order sequence: [image_1.jpg, image_2.jpg, image_3.jpg]
  • specify the left and right image area to be taken into account for the pattern matching: [(0%, 18%),(18%,18%), (12%,0%)]

In my case, I could have this data:

image description

How could I solve it with opencv?

Thanks in advance

edit retag flag offensive close merge delete

Comments

Do you want oval or flat?

supra56 gravatar imagesupra56 ( 2019-10-27 21:31:30 -0500 )edit

you must use a mask in computeImageFeatures or in cv::Stitcher::stitch

LBerger gravatar imageLBerger ( 2019-10-28 02:33:18 -0500 )edit

funny, but the "current stitcher output" looks like the "minimal energy" solution

berak gravatar imageberak ( 2019-10-28 04:27:52 -0500 )edit

@supra56. I didn't understand what you were referring

virilo gravatar imagevirilo ( 2019-10-28 14:12:12 -0500 )edit

Thanks @LBerger! I could use the mask to specify the area

But I think I have to specify also the order of the images.

Otherwise It's going to get confused with all the images.

For example, the right image could perfectly match with the left one. And the image in the middle could be in the left.

Perhaps in this conceptual example, I could work with the mask, but I'm going to have a lot of images to stitch.

Is there any way to specify the order, on even better, to give restrictions about wich images can/can't be stitched?

virilo gravatar imagevirilo ( 2019-10-28 14:12:22 -0500 )edit

in stitching_detailed you can use range_width argument

LBerger gravatar imageLBerger ( 2019-10-28 15:30:23 -0500 )edit