how to refine or blur or smooth just the edges?
Asked Answered
J

1

4

Is it possible to refine or blur just the edges in an image with the white background ? I was thinking to get an edge mask of the image ( i already got it). After that use that mask to apply blur or smoothing function on the original image. So that only the edges will be blurred or refined. But i don't know how to achieve this.

Thanks

Jarib answered 18/6, 2013 at 5:22 Comment(1)
You are on the right track. You should have three images: SOURCE, EDGES(SOURCE) and BLURED(SOURCE). Then you need to blend SOURCE and BLURED(SOURCE) with a per pixel weight based on the edges. Like BLEND(SOURCE,BLURED(SOURCE),EDGES(SOURCE)). I don't know OpenCV, so no real answer. But maybe this helps. There are also better techniques to use the edges as actual factors in you blur convolution filter, but the first method is much easier.Broad
E
5

If you have an edge mask of the image, do that:

  1. Dilate(edgemask)
  2. Copy(source: original, destination: blurred)
  3. Smooth(blurred)
  4. Copy(source: blurred, destination: original, mask: edgemask)

And your "original" image will be blurred.

Explanatory answered 18/6, 2013 at 17:37 Comment(4)
hello, thanks alot for your reply... this is my input image (oi43.tinypic.com/dg2z5u.jpg).... and i got this edge mask (oi41.tinypic.com/5768i.jpg).... dilate function is returning me a blank white image... :(Jarib
you need to invert the mask, white on black.Explanatory
@BoykoPerfanov Hi I need help for one my question here #21796143Bregenz
@Jarib image link has been brokenDiplopod

© 2022 - 2024 — McMap. All rights reserved.