Monday, March 28, 2016

Bit Plane Slicing in MATLAB

       Read fractal.jpg file. Display individual bits as binary image. Display and comment on the result.  (Hint: use bitget built-in function)

CODE:

clc; clear;

A=imread('fractal.jpg');
[row,col]=size(A);
subplot(3,3,1), imshow(A), title('Original Image');
C=zeros(row,col,8);
for k=1:8
    for i=1:row
        for j=1:col
            C(i,j,k)=bitget(A(i,j),k);        %Bit slicing
        end
    end
    subplot(3,3,k+1), imshow(C(:,:,k)), title(['Bit Plane ',num2str(k-1)]);
end


OUTPUT RESULT :

We observe that the three higher order planes, especially the 8th bit plane, contain a significant amount of the visually significant data. The lower order planes contribute to more subtle intensity details in the image. Decomposing an image into its bit planes is useful for analyzing the relative importance of each bit in the image and is useful for image compression.

1 comment:

  1. Your Affiliate Money Making Machine is waiting -

    Plus, getting it running is as simple as 1---2---3!

    Here's how it all works...

    STEP 1. Input into the system what affiliate products the system will push
    STEP 2. Add push button traffic (it ONLY takes 2 minutes)
    STEP 3. Watch the system explode your list and upsell your affiliate products on it's own!

    Are you ready???

    Click here to launch the system

    ReplyDelete