前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >[快速阅读七] Halcon里emphasize函数相关资料.

[快速阅读七] Halcon里emphasize函数相关资料.

作者头像
用户1138785
发布2024-06-12 08:30:01
800
发布2024-06-12 08:30:01
举报

  时不时有人问我我的SSE优化Demo里emphasize(边缘强调)的原理是啥,有没有写博客,其实不是我不愿意写博客,而是那个东西太过于简单,我不想写博客。但是耐不住问的人多了,我就干脆复制点资料放在博客里吧,省的每次我还要去找点资料复制给人家。

   这个东西其实是Halcon里的一个算子,我也是直接借用了他的一个英文名字并翻译的,在Halcon的帮助文档里,其说法如下所示:

代码语言:javascript
复制
emphasize (Operator)
Name
emphasize — Enhance contrast of the image.
Signature
emphasize(Image : ImageEmphasize : MaskWidth, MaskHeight, Factor : )
Description
The operator emphasize emphasizes high frequency areas of the image (edges and corners). The resulting images appears sharper.
First the procedure carries out a filtering with the low pass (mean_image). The resulting gray values (res) are calculated from the obtained gray values (mean) and the original gray values (orig) as follows:

                res := round((orig - mean) * Factor) + orig
 
Factor serves as measurement of the increase in contrast. The division frequency is determined via the size of the filter matrix: The larger the matrix, the lower the disivion frequency.
As an edge treatment the gray values are mirrored at the edges of the image. Overflow and/or underflow of gray values is clipped.

  这东西就是一个最为简单的锐化算子,依赖于模糊,由模糊数据和原始数据的差值得到边缘信息,然后再根据用户输入的系数对边缘信息进行放大,加到原始信息中,从而起到增强边缘或者角点的作用。

  注意,溢出的值需要直接Clip。

  Halcon里是用的均值模糊,实际也可以用高斯模糊或者其他类型的模糊,这个东西的效果和半径以及增强的系数有关。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2024-06-11,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档