Hit-Or-Miss Transform using Custom Structuring Element | Digital Image Processing | MATLAB

preview_player
Показать описание
Note:
Only single line structuring element will not work as inour inout image , below the line there are white pixels , so you need to take [1 1 0;1 1 1;1 1 1] , not [1 0 0;0 1 0;0 0 1].
Code:
clc
clear all
close all
A=imbinarize(rgb2gray(imread('Capture.JPG')));
subplot(1,2,1);
imshow(A);
title('Original Image');
se1=[1 1 0;1 1 1;1 1 1];
se2=~se1;
bw=bwhitmiss(A,se1,se2);
subplot(1,2,2);
imshow(bw);
title('Output of Hit and Miss Transform');

Learn Image Processig using MATLAB:

#DigitalImageProcessing #MATLAB #ComputerVision
Рекомендации по теме