5

fpga图像处理(均值滤波)

 1 year ago
source link: https://blog.csdn.net/feixiaoxing/article/details/128928930
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

fpga图像处理(均值滤波)

【声明:版权所有,欢迎转载,请勿用于商业用途。 联系信箱:feixiaoxing @163.com】

        均值滤波是图像处理中常用的一种方法。基本原理就是利用周围像素的平均值来代替当前点的像素值。方法主要有两种,一种是[010;101;010]这个算子;还有一种是[111;101;111]这个算子。如果是前面一个算子,那么像素之和直接除以4,即向右移动两位即可;如果是后面一种,则处理8,像素之和向右移动三位即可。我们以后一种为例,滤波后的效果应该是这样的,

22b87cc75f594f9d848d75dde3db7121.png

1、复用sobel算子的流程

        前面我们在使用fpga实现sobel算子的时候,谈到过linebuffer_Wapper的使用。也就是需要它每次吐3个数据出来,这样总共需要9个数据。这次图像滤波使用的也是3*3的算子,所以也需要linebuffer_Wrapper每次吐3个数据。

2、[010;101;010]算子

        采用这个算子,关联的像素分别是正上方、正下方、左侧、右侧四个像素。明白了这个道理,那么相关的verilog代码就知道怎么写了,


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK