From: gavishna shah on
Hi all
I am pretty new in Matlab. Plz help me with the following issues
1. say i have the image lena_color.gif
2. i want to convert it into an array of pixels(16 bits) so that i can convert it into binary 1's and 0's fo further manipulation. A two dimension array wud be preferred as in C wherein first dimension contains each element of the array and second dimension specifies the length which in this case is 16 bits.

3. After doing some manipulation bit wise,i want to see how the image has turned up. Is this possible?

Any kind of suggestion will be appreciate
From: gavishna shah on
"gavishna shah" <gavishna(a)yahoo.co.in> wrote in message <hurj40$p1v$1(a)fred.mathworks.com>...
> Hi all
> I am pretty new in Matlab. Plz help me with the following issues
> 1. say i have the image lena_color.gif
> 2. i want to convert it into an array of pixels(16 bits) so that i can convert it into binary 1's and 0's fo further manipulation. A two dimension array wud be preferred as in C wherein first dimension contains each element of the array and second dimension specifies the length which in this case is 16 bits.
>
> 3. After doing some manipulation bit wise,i want to see how the image has turned up. Is this possible?
>
> Any kind of suggestion will be appreciate


Thank you. But it would be better if you can provide an example to show actually how i wud convert the image into an array of binary numbers after imread operation.
From: ImageAnalyst on
On Jun 10, 5:09 pm, "gavishna shah" <gavis...(a)yahoo.co.in> wrote:
> Thank you. But it would be better if you can provide an example to show actually how i wud convert the image into an array of binary numbers after imread operation.
-------------------------------------------------------------------------------------

Well that's debatable, but anyway......

% Construct the filename.
folder = 'C:\Documents and Settings\user\My Documents\My Pictures
\GIFs';
baseFileName = 'USFlag.gif';
fullFileName = fullfile(folder, baseFileName);

% Read in the image and the colormap.
[gifImage map] = imread(fullFileName);

% Display the image.
imshow(gifImage, map);

% Give it a caption.
caption = sprintf('GIF Image: %s', baseFileName);
title(caption, 'FontSize', 20);

% Maximize the figure.
set(gcf, 'Position', get(0,'Screensize')); % Enlarge figure to full
screen.


Maybe this will speed you along, but hopefully soon you'll learn to
figure this stuff out on your own (because this was about as simple
as it gets.)