필터 지우기
필터 지우기

How to smooth edges of an image with complex edges?

조회 수: 8 (최근 30일)
Harshan Desu
Harshan Desu 2020년 4월 8일
댓글: Harshan Desu 2020년 4월 30일
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
Mehmed Saad
Mehmed Saad 2020년 4월 16일
is this smooth enough for you
Harshan Desu
Harshan Desu 2020년 4월 16일
Wow that is exactly what I wanted sir, how did u do it?

댓글을 달려면 로그인하십시오.

채택된 답변

Mehmed Saad
Mehmed Saad 2020년 4월 16일
편집: Mehmed Saad 2020년 4월 16일
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
Harshan Desu
Harshan Desu 2020년 4월 30일
Is there a way to remove the unnecessary edges I want?Can u suggest me how to remove the edges I dont want?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by