help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to read the pixel from the image


From: Andy Buckle
Subject: Re: How to read the pixel from the image
Date: Fri, 9 Dec 2011 14:38:18 +0000

>> On 9 December 2011 11:53, Preeti Gaikwad <address@hidden> wrote:
>> > Hello,
>> >         I want to read the pixel from the gray scale image....does
>> > anybody
>> > have the code for reading the pixel ? thanks in advance
>>
>> Greyscale images are usually simply matrices. So you index them like a
>> matrix.
>>
>> image(y,x)
>>
>> We might need more info to help you.
>> --
>> /* andy buckle */
On 9 December 2011 13:48, Preeti Gaikwad <address@hidden> wrote:
> THANKS I got it it was already in matrix form.....
> could you please let me know if I have value on gray scale like 0 to 255
> then the value 255 represent the white color? or black ?
> --
> preeti gaikwad

You can have any colour map you choose. For example

>img=repmat(linspace(0,255,5),5,1);
>imagesc(img)
>cm=repmat(linspace(0,1,5)',3);
>colormap(cm)

(please don't top post: I have re-ordered this thread above).

-- 
/* andy buckle */


reply via email to

[Prev in Thread] Current Thread [Next in Thread]