GetPixell

Get the pixel intensity from an image at a certain coordinate..

 

function call:

[col]=vsg('GetPixel',in_img1,p1);

 

Arguments:

in_img1 input image, can be 3 channel RGB, single channel greyscale, or binary image.

p1 – An (x,y) coordinate of the pixel to be examined, specified as a 2-vector, e.g. [100;150].

 

Description:

[col]=vsg('GetPixel',in_img1,p1) – col is an RGB triplet stored as a 3 vector.

 

Example:

img1 = openimage('lake.jpg');

[col] = vsg('GetPixel',img1,[10,10]);

 

Notes:

Returns the colour at the specified position in the image. If the image only has a single channel, a 3 vector is still returned, but only the first value will be set.
Home       Functions       Back