Search code examples
opencvimage-processingedges

how to refine or blur or smooth just the edges?


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


Solution

  • 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.