FPGA ISP SmartBlur去噪

FPGA ISP SmartBlur去噪

这个算法对图像有一定的包边去噪效果,在FPGA上实现起来复杂度较低,下面先给出Matlab核心代码:

%% 浮点仿真

cent_x = ceil(Rad/2);
cent_y = ceil(Rad/2);
roi = zeros(Rad, Rad);
SimCnt = 0;
img_out = img_in;
for ch = 1:1:d
    for rows = 1:1:m-Rad
        for cols = 1:1:n-Rad
            SimCnt = 0;
            SimAcc = 0;
            roi = img_in(rows:rows+Rad-1,cols:cols+Rad-1, ch);
           %% 相似点匹配
            for ii=1:1:Rad
               for jj=1:1:Rad
                    if abs(roi(ii, jj)- roi(cent_x,cent_y)) < Th
                        SimCnt = SimCnt + 1;
                        SimAcc = SimAcc + roi(ii, jj);
                    else
                        SimCnt = SimCnt;
                        SimAcc = SimAcc;
                    end  
               end
            end
            %% 均衡
            img_out(rows, cols, ch) = SimAcc/SimCnt;
        end
    end
end

在FPGA实现的过程中,其思路如下:

  • 控制linebuffer形成矩阵N*N矩阵
  • 矩阵内所有元素减去中心元素,求绝对值
  • 统计绝对值小于门限的像素个数,同时将这些像素累加
  • 求均值

如果仿真觉得对效果,回来给个赞!!!

发布了19 篇原创文章 · 获赞 1 · 访问量 574

猜你喜欢

转载自blog.csdn.net/wuyanbei24/article/details/104864584