Asked by:
Brigthness Problems

Question
-
Hi there
i discovered a bug, when I try to make a panorama, the brigthness on the output picture gets from darker (left) to extreme bright (right side)
reinstalling didnt help.W10 x64
Can anyone help? ICE is AFAIK the best panorama software!!
Friday, June 3, 2016 8:44 AM
All replies
-
Hello,
I am having a very similar problem.
I am taking photographs with a microscope and combining them with the Microsoft Image Composite Editor. The individual photographs are coming out such that the bottom of the photograph is always slightly darker than the top of the photograph. My microscope sample is about fifteen photographs in size. I begin at the lower right size of the sample and end at the upper left. When combining all photographs in ICE, all photos successfully form one panorama, but the lower right is much darker than the upper left. The upper left is so bright that nothing can be seen in the upper third of the panorama.
I can't find any manual controls for white balance or general brightness controls in ICE and can not figure out how to solve this problem. It is not necessary for the panorama to have a uniform brightness, but it is necessary that the entirety of the panorama is actually visible and not washed out in brightness.
Any help for this issue is appreciated. Thank you very much!
Thursday, June 16, 2016 6:50 PM -
I've also recently observed this bug stitching microscope images. After some troubleshooting, I've determined the following:
1) It happens in both 1.4 and 2.x versions of ICE.
2) The bug is not triggered by global factors such as brightness or vignetting. For panoramas that trigger it, any image in the panorama will trigger it with the same gradient, no matter it's brightness. For example, if a 10x10 frame image has a diagonal gradient with the top left corner white and the bottom right black, a 1x10 strip will have the same gradient, even if taken from the middle of the frame, from a bright area, or from a dark area. In fact, it appears that once a frame contains whatever triggers the bug, anything else combined with that frame will still trigger the bug, even solid white or black frames.
3) Inverting the colors of the frames inverts the gradient, but adjusting the relative brightness of the sides of the frames does not seem to effect the gradient, again suggesting that it is triggered by something about individual frames rather than the overall mosaic.
After a lot of trial and error, I still have not found a way to remove the problem.
Friday, July 1, 2016 8:02 PM -
After some more investigation, I've determined that the bug is probably triggered by vignetting that does not have a maximum intensity somewhere inside the frame. What I did:
1) Sum all frames in my mosaic
2) Low pass filter
That resulted in an average illumination measurement for my frames that was slightly tilted such that the maximum brightness point touched a border (turns out that my illumination wasn't quite centered resulting in a mild diagonal illumination gradient). Correcting this coarsely resulted in a more mild brightness gradient in the stitched image. To exactly correct it:
3) Divide each frame pixel by pixel by the normalized average intensity.
This completely resolved the gradient. After some more testing, I've determined that ICE is surprisingly sensitive to any tilt in the illumination. I suspect that the underlying problem is that the vignette correction assumes that the brightness maximum will occur somewhere towards the middle of the frame. If it touches the border, when stitching the brightness correction from one frame to the next accumulates until eventually new frames are solid white or solid black.
- Proposed as answer by saratoga3 Sunday, July 3, 2016 1:39 AM
Sunday, July 3, 2016 1:39 AM -
Hi Saratoga3,
Thanks for troubleshooting the vignetting issue. I'm new to image processing, so would you mind elaborating on your workflow? Specifically, what software are you running to gather normalized average intensity, and how do you manipulate pixels in a frame?
Thank you,
Michael
Monday, March 6, 2017 5:41 PM -
Hi Michael,
I used matlab, although I don't think the choice of program matters. You simply have to sum each frame together, lowpass, and then divide each frame by the resultant estimate of the vignette. Many programs can probably do this if you do not use matlab.
Tuesday, March 7, 2017 12:59 AM -
Does this only work if you're working in Black and White or does this work for any image type? Also, would you mind stating your source or posting MATLAB code?
Thanks.
Wednesday, March 15, 2017 10:33 PM -
I haven't tried black and white images.
I don't have code that would be much use to you, I integrated the correction into a much more complex piece of software that does a lot of other steps. The basic code is something like:
for idx=1:layersize
frame =readframe(idx);
framesum = framesum+frame;
end
%lowpass filter
gaussianFilterMat = your_lowpass_kernel_of_choice;
correctionImage = imfilter(framesum, gaussianFilterMat, 'replicate');%normalize 0 to 1
correctionImage=correctionImage./max(max(correctionImage));
%then divide each frame by the correction image
for idx=1:layersize
frame =readframe(idx);
correctedFrame = frame./correctionImage
imwrite(correctedFrame, 'path/to/outputfile.png')
end
Hope that gives you something to work with. Shouldn't be too hard to adopt to whatever code you're using.
- Edited by saratoga3 Friday, March 17, 2017 2:41 AM
Friday, March 17, 2017 2:40 AM