smoothing and Connected region
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
how can i smoothing image for done by filling up the small regions and dilating the boundary of the thresholded image and Connected region using the 8-neighbor pattern?
clear all;
close all;
clc
bitmap=uigetfile('*.*');
I = imread(bitmap);
imshow(I)
H = rgb2hsv(I)
R=I(:,:,1)
G=I(:,:,2)
B=I(:,:,3)
h=H(:,:,1)
s=H(:,:,2)
v=H(:,:,3)
VH=v-h
VHV=VH-v
VHVVH=VHV-VH
figure,
subplot(4,4,1),imshow(I); title('RGB IMAGE')
subplot(4,4,2),imshow(B); title('R ')
subplot(4,4,3),imshow(G); title('G ')
subplot(4,4,4),imshow(B); title('B ')
figure
subplot(3,3,1),imshow(H); title('hsv IMAGE')
subplot(3,3,2),imshow(h); title('h')
subplot(3,3,3),imshow(s); title('s ')
subplot(3,3,4),imshow(v); title('v ')
subplot(3,3,5),imshow(VH); title('vh ')
subplot(3,3,6),imshow(VHV); title('vhv ')
subplot(3,3,7),imshow(VHVVH); title('VHVVH ')
% Thresholding
j = rgb2gray(I)
figure,imshow(j)
level = 0.5
BW = imbinarize(j,level);
figure,imshow(BW)
figure,imshowpair(j,BW,'montage')
Antworten (0)
Siehe auch
Kategorien
Mehr zu Computer Vision with Simulink finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!