开发者

wind filter in opencv

Could someone suggest me how to go abou开发者_如何学Got getting the wind filter effect in opencv similar to the one available in photoshop and gimp?

Here is an image of text with wind styled filter applied on it.

wind filter in opencv

Thanks


I suggest the following steps:

Use the original text image as a mask. White pixels are '1', blacks are '0'.

Smooth the image in X direction (like in the example image you added)

  • You can do the smoothing by
    horizontal vector filter
  • or use distance transform where distance is calculated only along x axis.
  • I think that distance transform will run faster

Multiply the result by (1-mask) so smoothing will occur only outside the text.

Multiply each row of the result by random number in range [0.1 ..1]. This will make smoothing uneven.

Add to the result the original image of the text to get the final image

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜