필터 지우기
필터 지우기

HDR imagining with inverted local patterns

조회 수: 1 (최근 30일)
Fabio Corres
Fabio Corres 2017년 4월 29일
댓글: Walter Roberson 2017년 4월 30일
Hey there i want to make a HDR image from single image using that algorithm given below:
I coded almost whole schmeme except AGC block.Here is my code i attached:
So i have a problem.My color info is not good given below:
i could not use automatic gain control here because i dont know how to implement it(the other part of code is good i think you can see in attached files).In article "automatic gain control" part says:
_ The results are then processed using brightness enhancement and automatic gain control (AGC).Finally, we expand the luminance range from 0 to 255 using AGC and enhance the colour using RGB pixels processing_
In the internet i see automatic gain control in speech processing.but it includes dB parameters etc.How i can solve this problem.(article attached also)
Thank you
  댓글 수: 2
Image Analyst
Image Analyst 2017년 4월 29일
You added the tag Simulink? Are you trying to do this in Simulink instead of MATLAB?

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

답변 (1개)

Image Analyst
Image Analyst 2017년 4월 29일
I don't know what their AGC function does, but you might try histogram expansion with imadjust() or mat2gray().
  댓글 수: 3
Image Analyst
Image Analyst 2017년 4월 29일
편집: Image Analyst 2017년 4월 29일
Your image must be floating point. One way to expand the gray level range to 0-255 and make it a uint8 like most images is to use mat2gray():
uint8Image = uint8(255 * mat2gray(floatingPointImage));
It just makes the min 0 and the max 255, so if you have an outlier pixel with a drastically different value, it may not optimally expand the histogram like imadjust would. It doesn't scale to small percentages at the tails of the histogram like imadjust does. You could replace mata2gray with imadjust() in the above line of code. Note that imadjust gives you an option where you can specify the amount you want to come in at the tails of the histogram.
Walter Roberson
Walter Roberson 2017년 4월 30일
uint8Image = im2uint8(mat2gray(floatingPointImage));
is a bit better. 255 * version does not use equal density because uint8() rounds. Only the range [0, 1/2) after multiplication would be mapped to 0, [1/2, 3/2) maps to 1, [3/2, 5/2) maps to 2, and so on, each box after the first having effective width 1 but the first box only having effective width 1/2. At the high end, only [254.5, 255] would round to 255, again only effective width 1/2.

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

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by