Saturday, August 3, 2013

MATLAB Code to convert the Image to Bayer Format(BGGR)

Img = imread('Input.jpg');
ImgBayer = Img;

ImgBayer(:, 2 : 2 : end, 3) = 0;
ImgBayer(2 : 2 : end, :, 3) = 0;
ImgBayer(1 : 2 : end, :, 1) = 0;
ImgBayer(:, 1 : 2 : end, 1) = 0;
ImgBayer(1 : 2 : end, 1 : 2 : end, 2) = 0;
ImgBayer(2 : 2 : end, 2 : 2 : end, 2) = 0;
imshow(ImgBayer)
imwrite(ImgBayer, 'IMG_Bayer.jpg');

1 comment:

Unknown said...

You want to achieve in Embedded System and Technologies .We are providing industrial training with 100% Job Opportunities in Core Industries. Sessions will be practical on software as well as hardware. We are providing on microcontrollers such as 8051, PIC, AVR, ARM7, ARM9, ARM11 and RTOS with 100% Placement Assistance

Contact : +91-9940426826 / 044-26209369.

Website : www.bestembeddedsystemtraininginchennai.com