Ask Your Question
2

How to solve lighting differences on stitching images?

asked 2013-05-03 16:44:59 -0600

Dirhem gravatar image

updated 2013-09-14 16:50:20 -0600

I am trying to copy a small image to a bigger image, both images are from the same scene and they are aligned very well. I am using laplacian blending which makes it look seamless. I have one problem that i couldn’t solve yet, which is Illumination problem. Both photos are from same scene and they have taken with very small time difference however there is still some color changes because of lightining differences. I have tried to solve this problem with using ExposureCompansation class from opencv stitching module, unfortunately i couldn’t make it to work and it is poorly documented and when i search for it i find similar problems asked on stackoverflow and none of them answered yet. So it seems i need to develop my own solution for this Illumination problem and i don’t know where to start. Please tell me where to start. Source Images Source Image

Destination Image Destination Image

Result Image with problem Result Image with problem

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
2

answered 2013-09-16 01:59:45 -0600

Michael Burdinov gravatar image

updated 2013-09-17 02:36:44 -0600

Laplacian blending will indeed make stitching seamless but it can't solve illumination problems. You will have to solve it yourself prior to stitching, i.e. you will have to multiply intensity of one of the images by some factor prior to stitching. The tricky part here is: how to determine this factor (while unknown parts of image are changed due to presence of new objects)? It can be solved in various ways. Personally I like the following one:

Step 0: Perform the registration between images. We are only interested in region that present in both images.

Step 1: Divide ROI into some reasonable amount of sub-region (10x10 for example).

Step 2: For each sub-region calculate intensity in both image, and calculate ratio between those intensities.

Step 3: Take median (M) of those ratios.

Step 4: Multiply relevant image by factor M.

Step 5: Perform stitching.

It works when most of the image area differs only because of illumination change, not because new objects are present.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2013-05-03 16:44:59 -0600

Seen: 1,567 times

Last updated: Sep 17 '13