フィルターのクリア

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 Center および File ExchangeComputer Vision with Simulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by