What interpolation method does the demosaic function use?

10 ビュー (過去 30 日間)
Daniel
Daniel 2014 年 4 月 14 日
回答済み: Robert 2014 年 12 月 4 日
Hi,
RGB = demosaic(I, sensorAlignment);
MATLAB Help says:
"The demosaic function uses interpolation to convert the two-dimensional Bayer-encoded image into the truecolor image, RGB, which is an M-by-N-by-3 array."
What method does it use? There are many methods of interpolation, like nearest-neighbor, bilinear, gradient, etc... I have written a demosaicing script myself using bilinear interpolation. Results are a little bit better, but time effort to demosaic the image is very high in comparison to the built-in function (more than 10x higher).

回答 (3 件)

Robert
Robert 2014 年 12 月 4 日
Today, I had the same question and got the following response from Matlab Tech support... Hope this helps...
...
This algorithm is based on the following research paper.
Malvar, H.S., L. He, and R. Cutler, "High quality linear interpolation for demosaicing of Bayer-patterned color images", ICASPP, 2004.
This paper is available on the web and you can access it using the following link. http://research.microsoft.com/en-us/um/people/lhe/papers/icassp04.demosaicing.pdf
This paper explains the algorithm as well as shows different weights or filter coefficients used in the interpolation method (on page 2 and 3).

Mischa Kim
Mischa Kim 2014 年 4 月 14 日
編集済み: Mischa Kim 2014 年 4 月 14 日
Daniel, demosaic uses "...gradient-corrected linear interpolation..." (from the documentation). Check out ref. [1] on the corresponding Simulink documentation web page for more info.
  1 件のコメント
Daniel
Daniel 2014 年 4 月 14 日
編集済み: Daniel 2014 年 4 月 14 日
Hey,
Thanks for your immediate answer. You are referring to simulink directly. I was asking about the simple function 'demosaic' from the image processing toolbox (at least I guess its a function from IPT). In the reference to the simulink docoumentation you can choose between two methods. Can you choose using the function itself as well?
I am still surprised how fast the reconstruction actually is.

サインインしてコメントする。


Daniel
Daniel 2014 年 4 月 24 日
Hi, you havent answered so there again:
Thanks for your immediate answer. You are referring to simulink directly. I was asking about the simple function 'demosaic' from the image processing toolbox (at least I guess its a function from IPT). In the reference to the simulink docoumentation you can choose between two methods. Can you choose using the function itself as well?
I am still surprised how fast the reconstruction actually is.

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by