[FPGA] 图像聚类与标记的FPGA实现——工业视觉应用

[复制链接]
 楼主| feihufuture 发表于 2021-9-6 15:57 | 显示全部楼层 |阅读模式
本帖最后由 feihufuture 于 2021-9-6 16:08 编辑

目前,在工业视觉中,产线图像帧流,经过图像预处理,经过图像分割后,再加上图像聚类与标记,则可进入后端处理,如神经网络分类等等。

目前,经过多年的技术升级与优化,图像聚类与标记的FPGA IP,鲁棒性更强,在效率上完虐PC机,优势除了算法优化好以外,还得益于FPGA的并行性和DDR访问通道数的并行性。

端口信号如下:
  1. cluster_top
  2.         (
  3.         input                                                        Clk,
  4.         input                                                        Rst,
  5.         
  6.         
  7.         input                [15                :        0]                BinaryImageWidth,
  8.         input                [15                :        0]                BinaryImageHeight,
  9.         input                [15                :        0]                RoiStartRow,//start from 0
  10.         input                [15                :        0]                RoiEndRow,//start from 0
  11.         input                [15                :        0]                RoiStartCol,//start from 0, must > 0, to insure StartpPos - 1'b1 >= 0
  12.         input                [15                :        0]                RoiEndCol,//start from 0        
  13.         input                [15                :        0]                ClusterDistance,
  14.         input                                                        DataModify,
  15.          
  16.         
  17.         //for saving time, the upper layer can get the next line ready, which will be used next time.
  18.         input                                                         ClusterStart,
  19.         output                                                        LineDataFetch,
  20.         input                                                        LineDataRdy,
  21.         output                [15                :        0]                LinePos,          //the line position in the image, which is to be read from ddr by upper layer.        
  22.         output                [15                :        0]                LineRdAddr,  //upper layer only read [RoiStartRow,RoiEndRow], this layer only read [RoiStartCol,RoiEndCol]
  23.         input                [7                :        0]                LineRddata,
  24.         output                                                        LineDone,//line done        
  25.         input                [8                :        0]                LineWrAddr,//wait until the upper layer read this blockram line data.
  26.         output                [127        :        0]                LineWrData,//data is valid for one clock period delay to LineWrAddr.        
  27.         
  28.         
  29.         
  30.         
  31.         
  32.         
  33.         //1) read RAM data to modify, and write modified data to outer RAM, both use the same RAM.
  34.         //2) DmLineRdAddr and DmLineWrAddr will deal with the data [RoiStartCol,RoiEndCol]
  35.         //3) DmLineRdAddr/DmLineRddata/DmLineWrEn/DmLineWrAddr/DmLineWrData are operate the RAM.
  36.         //4) RAM data : 8'hff is the default value, others are the real class.
  37.         output                                                        DmLineDataFetch,
  38.         input                                                        DmLineDataRdy,
  39.         output                [15                :        0]                DmLinePos,//the line position in the image, which is to be read from ddr by upper layer.
  40.         output                [9                :        0]                DmLineRdAddr,//8192 bytes/16 = 512, so 10 bit width is enough.
  41.         input                [127        :        0]                DmLineRddata,
  42.         output                                                        DmLineWrEn,
  43.         output                [9                :        0]                DmLineWrAddr,//modify result write into outer RAM address.
  44.         output                [127        :        0]                DmLineWrData,
  45.         output                                                        DmLineDone,//modify line data done, the upper layer use this signal to write line data into ddr.
  46.         output                                                        DmDone,
  47.         
  48.         
  49.         

  50.         output                                                        ClusterFinish,//all line finish
  51.         output                [15                :        0]                ClusterNum,
  52.         input                [15                :        0]                ClusterRamAddr,        
  53.         output                [111        :        0]                ClusterDoutb


效果方面,举个简单的图案把:








本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
KiddyFY 发表于 2021-12-6 14:35 | 显示全部楼层
学习一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:WX:feihu612 免费合作开发ECAT主从站

171

主题

1029

帖子

101

粉丝
快速回复 在线客服 返回列表 返回顶部