RemovePixel

Remove a pixel at a certain coordinate from the image (removing a pixel sets that pixel to black).

 

function call:

[out_img1]=vsg('RemovePixel',in_img1,p1);

 

Arguments:

in_img1 input image, 3 channel RGB, 1 channel greyscale or binary image, or DICOM image.

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

 

Description:

[out_img1]=vsg('RemovePixel',in_img1,p1) – out_img1 is an image of the same dimensions and number of colour planes as the input image, with the pixel at the specified position set to black.

 

Example:

img1 = openimage('lake.jpg');

[out_img1]=vsg('RemovePixel',img1,[15,15]);

figure, image(uint8(out_img1));

 

Notes:

Regardless of the type of image data, integer, binary, or positive or negative double, the removed pixel on all planes will be sent to 0. Also, if this is used with DICOM images, the same pixel will be zeroed on each slice of the DICOM image.
Home       Functions       Back