How to smooth edges of an image with complex edges?
Mostra commenti meno recenti
Hello all,
I am a beginner here. I have been given a project in my college to extract edges of a car door. The edges are to be smooth and accurate. I used edge detection savitky_golay_filter and got an image as follows.
The original image: (reduced the size during upload)

Applied savitky_golay_filter at three different thresholds 40,167,240 and blended all the images to get most of the edges of the above image. After this I took only the red edges and converted the entire image to grey scale.
The below is the resultant:

Now the edges are not smooth and continous. How to smooth the edges so that I get sleek and continous lines?
4 Commenti
KALYAN ACHARJYA
il 8 Apr 2020
Modificato: KALYAN ACHARJYA
il 8 Apr 2020
There is a very popular thread (by Image Analyst) related to the smoothing edges. I didnot get the link right now.
%% Smooth the boundary (by Image Analyst)
windowSize=2; % Change it as per requirements
kernel=ones(windowSize)/windowSize^2;
sm_image=conv2(single(bwImage),kernel,'same');
sm_image=sm_image>0.5; % Change the threshold also, which works for you
figure,imshow(sm_image)

Harshan Desu
il 8 Apr 2020
Mehmed Saad
il 16 Apr 2020
is this smooth enough for you

Harshan Desu
il 16 Apr 2020
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su MATLAB Support Package for USB Webcams in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!