No BSD License
11 Jun 2004
15 Jun 2004)
Reconstruction of an RGB image.
Watch this File
In digital photography the red, green and blue values are not sampled at the same position. We can use demosaicing to reconstruct a "regular" RGB image.
This program is using bilinear interpolation for the reconstruction.
this code really helped me a lot~~Thx~
its good enough for understanding
Thanks very much!
That will give me a great help to understand bilinear interpolation algorithm!
Thanks very much
Basic but efficient function! A similar function is part of the Image Acquisition Toolbox (which I haven't tried)
Just add a ";" to the line "R = R + R1 + R2"
or you'll end upp waiting forever. ;-)
Also, for larger images you might want to clear variables (im, B1, B2, R1, R2) along the function to avoid the omnipresent "Out of memory" errors.
Just add a ";" to the line "R = R + R1 + R2
" or you'll end upp waiting forever. ;-)
Bi-linear interpolation is the most primitive demosaicing algorithm. Educational use is fine, but it is not suitable for high-end image processing.