Ask Your Question
1

smooth edges

asked 2013-06-05 22:42:34 -0500

waqasp gravatar image

updated 2017-08-22 17:56:35 -0500

hello all,

is there any way to smooth or refine irregular edges in an image...for example the edges in the image below : C:\fakepath\wiqi.jpg

Thanks,

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-06-06 00:43:29 -0500

Mahdi gravatar image

updated 2013-06-06 00:45:25 -0500

Here a simple answer to this but not an exact one:

  1. first of all you should extract sharp edges. Like if you use Canny for edge detection set the thresholds somehow to that is responsive to sharp edges.
  2. Then you could simply use a smoothing filter(e.g Gaussian) where a sharp edges where detected.
edit flag offensive delete link more

Comments

but this will convert my image to grayscale.... i need it to b in RGB

waqasp gravatar imagewaqasp ( 2013-06-06 01:29:21 -0500 )edit

Thats not even a problem! Do the edge detection operation on the gray image. Once you found the locations do the blurring operation on every image channel! :)

Mahdi gravatar imageMahdi ( 2013-06-06 01:42:05 -0500 )edit

thanks i m trying to do so.... actually this is the first time i am using opencv ever in my life... so still in learning process... and my deadline to do the whole project is after 2 days.... and this edge refining/ smoothing is the last part where i m stuck

waqasp gravatar imagewaqasp ( 2013-06-06 01:51:00 -0500 )edit

I understand how it is hard when you deal with it first time! At last if you found my answer correct and helpful please select the tik mark on the left side. :)

Mahdi gravatar imageMahdi ( 2013-06-06 01:54:21 -0500 )edit

do u know any sample code to perform this ?

waqasp gravatar imagewaqasp ( 2013-06-06 02:06:57 -0500 )edit
Mahdi gravatar imageMahdi ( 2013-06-06 02:40:26 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-06-05 22:42:34 -0500

Seen: 2,551 times

Last updated: Jun 06 '13