Demosaicing imaging processing help

8 views (last 30 days)
XIN HE
XIN HE on 7 Jan 2016
Commented: Image Analyst on 7 Jan 2016
I download the image from http://au.mathworks.com/help/images/ref/demosaic.html , and use the same program to run, why I can not get the same result as the second image shows? Does any one have tried to do the same thing?

Answers (1)

Image Analyst
Image Analyst on 7 Jan 2016
I just tried it and I get the same images they get. Attach your mandi.tif and screenshots of what you get.
  4 Comments
XIN HE
XIN HE on 7 Jan 2016
I found I rename the image as 'aaa' which is attached in the zip file, when I run it, it comes out error and says the first item in the demosaic function should be two dimension, but mine is three, but when I use the name as 'mandi' for the image, the image turns out as the same as the one in the website. So I am wondering if I could demosaic my own .tif file. Thanks a lot
Image Analyst
Image Analyst on 7 Jan 2016
You didn't attach any zip file.
You'd have to know how your image was made. It's not as simple as just demosaicing according to some book formula. If you have a raw image, the pixels may be written out in different ways, for example BGRBGR OR BGRG. You may not even have an image in RGB space. And that's just the pixel storage order. Different demosaicing algorithms have a different window sizes - the size and shape of neighboring pixels that they take into account when estimating the value of a missing color pixel.
I don't deal much in raw images - it's not worth my time. You might try Photoshop or DCRaw to demosaic your image to a standard format and then just start from there with the rest of your algorithm.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!