Demosaicing imaging processing help

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)

I just tried it and I get the same images they get. Attach your mandi.tif and screenshots of what you get.

4 Comments

I may not be able to attach .tif file, it is strange that when I run the program, it says this image is not a two-dimension array. How can u download the .tif image from the website? Thank u
Then put it inside a zip file.
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
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.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Asked:

on 7 Jan 2016

Commented:

on 7 Jan 2016

Community Treasure Hunt

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

Start Hunting!