Convert WHITE pixels in a binary image to a given greyscale.
function call:
[out_img1]=vsg('BinGrey',in_img1,num1);
Arguments:
in_img1
input image, 3 channel
num1
– an integer or double specifying the output value of input white
regions.
Description:
Converts a binary
image to a user defined grey scale grey.
out_img1
– An image which has dimensions the same as the input image. The output
pixel values are set to num1 if the corresponding input pixels are
white.
Example:
img=openimage('lake.jpg');
h=figure;image(uint8(img));set(h,'Name','Input
image');
[out_img1] = vsg('Threshold',img,100);
h=figure; image(uint8(out_img1));set(h,'Name','Threshold
image');
[out_img1]=vsg('BinGrey',out_img1,200);
h=figure; image(uint8(out_img1));set(h,'Name','Grey
image');
Notes:
1. For DICOM images,
the function operates on all slices separately.
2. For