Prev: How to extract pixel values of a colored image into an array and then to convert the array into an image
Next: Appending Hourly Data Logs for Plotting
From: Walter Roberson on 10 Jun 2010 16:50 gavishna shah wrote: > 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 In alphabetical order: see dec2bin image imread ind2rgb typecast
From: Walter Roberson on 10 Jun 2010 17:52
gavishna shah wrote: > "gavishna shah" <gavishna(a)yahoo.co.in> wrote in message > <hurj40$p1v$1(a)fred.mathworks.com>... >> 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. > 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. Better? In what sense?? You indicate you are new to Matlab; you have to start learning how to read the documentation and putting things together for yourself. If we show you all the details, what you will learn is how to mooch off of other people rather than how to help yourself. Read through the documentation for the four commands I listed. One of them converts to binary. What kind of input does that command need? Does another of the commands allow you to convert from what you have already to what you need in order to convert to binary? If so, then experiment with putting the two commands together. |