How To Smooth The Image Edge

31 ビュー (過去 30 日間)
behnam emami
behnam emami 2015 年 5 月 27 日
コメント済み: Harshan Desu 2020 年 5 月 1 日
<<
>>i use : image=imread('hand.png'); e=edge(image,'canny'); imshow(e);

採用された回答

Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh 2015 年 5 月 27 日
編集済み: Salaheddin Hosseinzadeh 2015 年 5 月 27 日
Salam Behnam!
I guess by smoothing you mean getting rid of the jagged edges.
What do you think of performing a dilation with a huge radial element and then perform thining?
I just did this here is the result
I hope this is good enough. I did it with a disk of 10 pixels radious you maybe reduce/increase the disk size and get a better smoothing.
Good Luck!
  3 件のコメント
Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh 2015 年 5 月 27 日
編集済み: Salaheddin Hosseinzadeh 2015 年 5 月 27 日
Dear Behnam,
You can search MATLAB help for the keywords in my answer. Please also have a look at Image Analyst response, that is far more scientific.
dilatedImage = imdilate(image,strel('disk',10));
thinedImage = bwmorph(dilatedImage,'thin',inf);
Good luck!
behnam emami
behnam emami 2015 年 5 月 27 日
Thank You Mr Salaheddin Hosseinzadeh

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2015 年 5 月 27 日
編集済み: Image Analyst 2016 年 1 月 27 日
One way is to blur the image with imfilter() or conv2() before you do the edge detection. Another way is to smooth the outline coordinates with a Savitzky-Golay filter, sgolayfilt() in the Signal Processing Toolbox.
See demo and image in the comment below - tell it to show the older comments because it's collapsed now.
  19 件のコメント
Image Analyst
Image Analyst 2020 年 4 月 9 日
I don't know the resolution. Maybe those jaggies are just one pixel big? If so, you'd have to increase the number of pixels then blur and threshold.
Harshan Desu
Harshan Desu 2020 年 5 月 1 日
I have tired working on it for the past two weeks sir, I couldnt still get what I want. Let me explain my project clearly.. Please suggest me how I can work on it.
Project: Finding the edges of a door and used those edges as a trajectory for a sensor that checks edges for Gap/Flush.
Problem: I used Savitzky Golay, Edge Linking and Line Segment Fitting from your blog:
(https://www.peterkovesi.com/matlabfns/#step2line). After all this I am not able to get good edges, its either not smooth or has a lot of unnecessary edges.
Method I used: Image Analyst's Savitzky filter smoothening at three diffrent thresholds, obtain three images and blend them. The output is again processed to Edge linking and line segmenting program which I got from ur blog.
Questions:
  1. How to remove unnecessary edges out of the image.
  2. How to smoothening images so that i can use it for trajectory
I have attached the images of my last output.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSmoothing and Denoising についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by