Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

exec loader.

sce;

global IPD_PATH;

RGB = ReadImage(IPD_PATH + 'demos\jerukkunci1.png');

Image = RGB2Gray(RGB);

figure(); ShowColorImage(RGB, 'Color Image');

InvertedImage = uint8(255 * ones(size(Image, 1), size(Image, 2))) - Image;

figure(); plot(0 : 255, Histogram);

LogicalImage = SegmentByThreshold(InvertedImage, 99);

figure(); ShowImage(InvertedImage, 'Inverted Image');

ImageTool(Image);

Histogram = CreateHistogram(InvertedImage);

ObjectImage = SearchBlobs(LogicalImage);

figure(); ShowImage(LogicalImage, 'LogicalImage');

LogicalImage = SegmentByThreshold(InvertedImage, Threshold);

Threshold = 99;

NumberOfObjects = double(max(ObjectImage));

GradientImage = EdgeFilter(Image, EDGE_SOBEL);

EdgeImage = ~SegmentByThreshold(Gradient, 60);

global EDGE_SOBEL;

figure(); ShowImage(Image, 'Grey Level Image');

figure(); ShowImage(LogicalImage, 'Result of Threshold');

You might also like