Clear Filters
Clear Filters

How to smooth edges of an image with complex edges?

5 views (last 30 days)
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 Comments
Harshan Desu
Harshan Desu on 16 Apr 2020
Wow that is exactly what I wanted sir, how did u do it?

Sign in to comment.

Accepted Answer

Mehmed Saad
Mehmed Saad on 16 Apr 2020
Edited: Mehmed Saad on 16 Apr 2020
I just changed the threshold condition
red_comp = rbgtest(:,:,1)>rbgtest(:,:,2) & rbgtest(:,:,1)>rbgtest(:,:,3);
windowSize = 10;
kernel = ones(windowSize) / windowSize ^ 2;
blurryImage = conv2(single(red_comp), kernel, 'same');
binaryImage = blurryImage > 0.5; % Rethreshold
figure(2),imshow(binaryImage)
where rbgtest is your blendedoutput.png
  1 Comment
Harshan Desu
Harshan Desu on 30 Apr 2020
Is there a way to remove the unnecessary edges I want?Can u suggest me how to remove the edges I dont want?

Sign in to comment.

More Answers (0)

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!