Combine Two Different Images With Different Gain Values

조회 수: 2 (최근 30일)
Zach Dischner
Zach Dischner 2012년 6월 11일
Say you are given two images, both taken at the same time from the same detector.
Both images have 11 bit resolution (yes, its odd but that is the case here). The difference between the two images is that one image as been amplified by a factor of 1 and the other has been amplified by a factor of 10.
How can I take these two 11 bit images, and combine their pixel values to get a single 16 bit image? Basically, this increases the dynamic range of the final image.
I am fairly new to image processing. I know there is a solution for this, since other systems do this on the fly pixel-by-pixel in an FPGA. I was just hoping to be able to do this in Matlab post processing instead of live. I know doing bitwise operations in Matlab can be kinda difficult, but we do have an educational license with every toolbox available.
Thanks for the help!

채택된 답변

Geoff
Geoff 2012년 6월 11일
Here's what I'd do...
Convert all your images to 16-bit. Then take the factor-1 image, multiply it by 10. Then take the factor-10 mod it by 10 and add it to the scaled factor-1 image. This is assuming that your amplification power translates directly to pixel intensity.
result = factor1 * 10 + mod( factor10, 10 );
Note that scaling by a 10 will increase your maximum signal from 11 bits to about 14 bits (15 for saturated signals).
I've assumed that your factor-1 image has the best signal-to-noise ratio so you keep that, ditch the high end of the gained signal, and just add in the lower bits of it to get the extra precision. You might want to do it the other way and only keep only a few of the most significant bits from your ungained image, or you may want to take half of each or even average the overlapping segments. Start simple, and see if that's good enough before you make your life difficult.
PS: If your amplification was a power of 2, you might consider using bitshifts, bitwise & and |, instead of multiplication and modulo... But it's arguable whether, even then, you would get a performance benefit in MatLab.
  댓글 수: 3
Geoff
Geoff 2012년 6월 13일
Did you have success?
Zach Dischner
Zach Dischner 2012년 6월 22일
Hi Geoff, yes your idea worked great. I'll be playing with it continually to tweak it just right.
Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by