CN101674473A - An image real-time histogram statistical device and its implementation method - Google Patents
An image real-time histogram statistical device and its implementation method Download PDFInfo
- Publication number
- CN101674473A CN101674473A CN 200810013188 CN200810013188A CN101674473A CN 101674473 A CN101674473 A CN 101674473A CN 200810013188 CN200810013188 CN 200810013188 CN 200810013188 A CN200810013188 A CN 200810013188A CN 101674473 A CN101674473 A CN 101674473A
- Authority
- CN
- China
- Prior art keywords
- data
- histogram
- signal
- image
- read
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 24
- 230000015654 memory Effects 0.000 claims abstract description 12
- 238000001914 filtration Methods 0.000 claims abstract description 9
- 230000003321 amplification Effects 0.000 claims description 6
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 6
- 230000001360 synchronised effect Effects 0.000 claims description 6
- 230000010354 integration Effects 0.000 abstract description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
Abstract
本发明涉及一种图像实时直方图统计装置及其实现方法,该装置包括视频解码单元,接收原始图像信号进行滤波、放大及数字化处理,生成视频数据;可编程逻辑门阵列,接收视频解码单元输出的视频数据,对视频数据进行直方图统计;程序存储器,用于存储可编程逻辑门阵列的应用程序;时钟管理单元,为可编程逻辑门阵列以及视频解码单元提供所需要的时钟;复位管理单元,为可编程逻辑门阵列提供复位信号;电源管理单元,为可编程逻辑门阵列及各单元提供所需电源;该方法包括由视频解码单元接收原始图像信号进行滤波、放大及数字化处理,生成视频数据;由可编程逻辑门阵列将视频数据进行直方图统计,得到结果。本发明具有快速性、集成度高、低成本等特点。
The present invention relates to a real-time histogram statistics device for images and its implementation method. The device comprises a video decoding unit, which receives an original image signal for filtering, amplifying and digital processing to generate video data; a programmable logic gate array, which receives the video data output by the video decoding unit and performs histogram statistics on the video data; a program memory, which is used to store application programs of the programmable logic gate array; a clock management unit, which provides the required clock for the programmable logic gate array and the video decoding unit; a reset management unit, which provides a reset signal for the programmable logic gate array; a power management unit, which provides the required power for the programmable logic gate array and each unit; the method comprises the following steps: the video decoding unit receives the original image signal for filtering, amplifying and digital processing to generate video data; and the programmable logic gate array performs histogram statistics on the video data to obtain the result. The present invention has the characteristics of rapidity, high integration, low cost, etc.
Description
技术领域 technical field
本发明涉及一种图像处理技术,具体地说是一种图像实时直方图统计装置及其实现方法。The invention relates to an image processing technology, in particular to an image real-time histogram statistics device and its realization method.
背景技术 Background technique
在实时图像处理中,直方图统计是图像预处理的一个重要环节,如何快速有效地进行直方图统计常常是后续图像处理的前提。对图像进行直方图统计是基于像素点的处理方法,目前来说大致有两种实现的方法:In real-time image processing, histogram statistics is an important part of image preprocessing, how to quickly and effectively perform histogram statistics is often the premise of subsequent image processing. The histogram statistics of images is based on the processing method of pixel points. At present, there are roughly two methods of implementation:
(1)由软件实现:遍历整个图像数据,统计属于各个灰度级的像素数存于数组C[i]中,其中i的范围为[0,2N-1],C[i]为灰度级为i的像素个数,N为原始视频信号数字化之后的位数。这种方法需要占用一定的片上寄存器资源,并且统计需要耗费时间,不利于实时图像处理。(1) Realized by software: traverse the entire image data, count the number of pixels belonging to each gray level and store them in the array C[i], where the range of i is [0, 2 N -1], and C[i] is gray The degree level is the number of pixels of i, and N is the number of digits of the original video signal after digitization. This method needs to occupy a certain amount of on-chip register resources, and it takes time to make statistics, which is not conducive to real-time image processing.
(2)由硬件实现:硬件电路一般由RAM、加法器、地址寄存器和时钟控制器等组成。这种方法通常由小规模集成电路实现。由于信号在各个芯片之间的传输延时,处理时间增加,可靠性降低,同时也为调试和后续电路的改进升级带来困难。(2) Realized by hardware: The hardware circuit is generally composed of RAM, adder, address register and clock controller. This method is usually realized by small-scale integrated circuits. Due to the delay of signal transmission between each chip, the processing time is increased, the reliability is reduced, and it also brings difficulties for debugging and subsequent circuit improvement and upgrading.
发明内容 Contents of the invention
针对现有图像处理技术存在的耗费时间长、可靠性降低,调试和后续电路的改进升级困难等不足之处,本发明要解决的技术问题是提供一耗时短、易于调试、改进升级的低成本、高灵活性的图像实时直方图统计装置及其实现方法。Aiming at the deficiencies of the existing image processing technology, such as long time-consuming, reduced reliability, difficulty in debugging and subsequent circuit improvement and upgrading, the technical problem to be solved by the present invention is to provide a low-cost A low-cost, high-flexibility image real-time histogram statistical device and a realization method thereof.
为解决上述技术问题,本发明采用的技术方案是:In order to solve the problems of the technologies described above, the technical solution adopted in the present invention is:
本发明图像实时直方图统计装置包括:视频解码单元,接收原始图像信号进行滤波、放大及数字化处理,生成视频数据;The image real-time histogram statistical device of the present invention includes: a video decoding unit, which receives the original image signal and performs filtering, amplification and digital processing to generate video data;
可编程逻辑门阵列,为控制核心,接收视频解码单元输出的视频数据,对视频数据进行直方图统计;The programmable logic gate array is the control core, receives the video data output by the video decoding unit, and performs histogram statistics on the video data;
程序存储器,用于存储可编程逻辑门阵列的应用程序;program memory for storing the application program of the programmable logic gate array;
时钟管理单元,为可编程逻辑门阵列以及视频解码单元提供所需要的时钟;The clock management unit provides the required clock for the programmable logic gate array and the video decoding unit;
复位管理单元,为可编程逻辑门阵列提供复位信号;The reset management unit provides a reset signal for the programmable logic gate array;
电源管理单元,为可编程逻辑门阵列及各单元提供所需电源。The power management unit provides the required power for the programmable logic gate array and each unit.
所述可编程逻辑门阵列内部包括:The programmable logic gate array includes:
片上锁相环模块,接收时钟管理单元的时钟信号及复位管理单元的复位信号,产生像素时钟做为直方图统计状态控制模块、图像处理区域选择模块及直方图统计数据清零控制模块的像素时钟;产生像素时钟的四倍频时钟做为三端口RAM的读写时钟及直方图统计状态控制模块的写时钟;The on-chip phase-locked loop module receives the clock signal of the clock management unit and the reset signal of the reset management unit, and generates a pixel clock as the pixel clock of the histogram statistical state control module, image processing area selection module and histogram statistical data clearing control module ; Generate the quadruple frequency clock of the pixel clock as the read and write clock of the three-port RAM and the write clock of the histogram statistical state control module;
图像处理区域选择模块,根据不同的图像输入格式接收视频解码单元的行、场同步信号及图像数据,选择需要处理区域内的图像数据及处理区域有效信号输出至直方图统计状态控制模块,选择需要处理区域内的图像像素坐标输出至直方图统计数据清零控制模块;The image processing area selection module receives the line and field synchronization signals and image data of the video decoding unit according to different image input formats, selects the image data in the area to be processed and the effective signal of the processing area and outputs them to the histogram statistics state control module, selects the required The image pixel coordinates in the processing area are output to the histogram statistical data zeroing control module;
直方图统计状态控制模块,接收视频解码单元的行、场同步信号、三端口RAM的A端口输出的临时统计数据、图像处理区域选择模块选择的图像数据及处理区域有效信号,根据图像处理区域选择模块选择的处理区域有效信号对图像数据及临时统计数据进行累加处理,将处理结果经第1直方图统计数据多路选择控制模块送至三端口RAM的写数据端;产生读地址数据及读使能信号送至三端口RAM的A端口的读地址端及读使能端;产生用于统计的写地址数据、写使能信号分别经第2、3直方图统计数据多路选择控制模块送至三端口RAM的A端口的写地址端和写使能端;The histogram statistical state control module receives the line and field synchronization signals of the video decoding unit, the temporary statistical data output by the A port of the three-port RAM, the image data selected by the image processing area selection module and the effective signal of the processing area, and selects according to the image processing area The effective signal of the processing area selected by the module performs cumulative processing on the image data and temporary statistical data, and sends the processing result to the write data terminal of the three-port RAM through the first histogram statistical data multiplexing control module; generates read address data and read use The enable signal is sent to the read address terminal and the read enable terminal of the A port of the three-port RAM; the write address data and write enable signal for statistics are generated and sent to the 2nd and 3rd histogram statistical data multiplex control modules respectively. The write address terminal and write enable terminal of the A port of the three-port RAM;
直方图统计数据清零控制模块,接收视频解码单元的行、场同步信号,根据图像处理区域选择模块输出的图像像素坐标产生用于清零的写地址数据、写使能信号分别经第2、3直方图统计数据多路选择控制模块送至三端口RAM的A端口的写地址端和写使能端;The histogram statistical data clearing control module receives the line and field synchronous signals of the video decoding unit, and generates write address data and write enabling signals for clearing according to the image pixel coordinates output by the image processing area selection module through the 2nd, 2nd, and 2nd, respectively. 3 The histogram statistical data multiplex selection control module is sent to the write address end and the write enable end of the A port of the three-port RAM;
第1~3直方图统计数据多路选择控制模块,其控制端信号来自视频解码单元的场同步信号。The first to third histogram statistical data multiplexing control modules, the control terminal signal comes from the field synchronization signal of the video decoding unit.
本发明装置还包括:The device of the present invention also includes:
数字信号处理单元,读取经可编程逻辑门阵列处理后的的直方图统计数据及程序存储器的应用程序,对该直方图统计数据做进一步处理;The digital signal processing unit reads the histogram statistical data processed by the programmable logic gate array and the application program of the program memory, and further processes the histogram statistical data;
数据存储器,用于存储数字信号处理单元在处理过程中生成的临时数据。The data memory is used to store the temporary data generated by the digital signal processing unit during processing.
数字信号处理单元产生读地址数据及读使能信号,通过三端口RAM的B端口读入直方图统计数据;产生数据读结束信号送至直方图统计数据清零控制模块。The digital signal processing unit generates the read address data and the read enable signal, and reads the histogram statistical data through the B port of the three-port RAM; generates a data read end signal and sends it to the histogram statistical data clearing control module.
本发明装置还具有视频编码单元,其将通过可编程逻辑门阵列处理之后的数字视频数据转化为模拟视频信号并输出显示。The device of the present invention also has a video encoding unit, which converts the digital video data processed by the programmable logic gate array into an analog video signal and outputs it for display.
本发明图像实时直方图统计装置的实现方法包括以下步骤:The realization method of image real-time histogram statistical device of the present invention comprises the following steps:
由视频解码单元接收原始图像信号进行滤波、放大及数字化处理,生成视频数据;The video decoding unit receives the original image signal for filtering, amplification and digital processing to generate video data;
由可编程逻辑门阵列将视频数据进行直方图统计,得到统计结果。The video data is subjected to histogram statistics by the programmable logic gate array to obtain statistical results.
所述对视频数据进行直方图统计包括以下步骤:Carrying out histogram statistics on video data comprises the following steps:
图像处理区域选择模块根据视频解码单元输出不同的图像输入格式接收视频数据,产生需要处理区域内的视频数据及像素坐标位置,并产生处理区域有效信号;The image processing area selection module receives video data according to different image input formats output by the video decoding unit, generates video data and pixel coordinate positions in the area to be processed, and generates an effective signal in the processing area;
直方图统计状态控制模块根据视频数据、像素坐标位置及处理区域有效信号产生三端口RAM的读/写地址数据及读/写使能信号;The histogram statistical state control module generates the read/write address data and read/write enable signal of the three-port RAM according to the video data, the pixel coordinate position and the effective signal of the processing area;
直方图统计状态控制模块利用上述读/写地址数据及读/写使能信号在一个像素时钟周期内从三端口RAM读入临时直方图统计数据;The histogram statistical state control module utilizes the above-mentioned read/write address data and the read/write enable signal to read in temporary histogram statistical data from the three-port RAM within one pixel clock cycle;
在直方图统计状态控制模块内对上述临时直方图统计数据进行加1操作;In the histogram statistical state control module, the above-mentioned temporary histogram statistical data is added to the operation;
直方图统计状态控制模块将加1后的数据写回三端口RAM。The histogram statistical state control module writes the data added by 1 back to the three-port RAM.
本发明方法还包括以下步骤:The inventive method also comprises the following steps:
数字信号处理单元将得到统计的结果由三端口RAM读入,并进行后续处理,同时产生读结束信号;The digital signal processing unit reads the statistical results from the three-port RAM, performs subsequent processing, and generates a read end signal at the same time;
直方图统计数据清零控制模块根据上述读结束信号对三端口RAM进行清零处理。The histogram statistical data clearing control module clears the three-port RAM according to the above read end signal.
本发明具有以下有益效果及优点:The present invention has the following beneficial effects and advantages:
1.快速性。本发明利用可编程逻辑门阵列中片上时钟锁相环将像素时钟的四倍频时钟作为同步有限状态机和三端口RAM的处理时钟,在一个像素时钟内完成像素的统计过程,实时地实现直方图统计,为后续其他图像处理算法提供良好基础。1. Rapidity. The invention uses the on-chip clock phase-locked loop in the programmable logic gate array to use the quadruple frequency clock of the pixel clock as the processing clock of the synchronous finite state machine and the three-port RAM, completes the statistical process of the pixels within one pixel clock, and realizes the histogram in real time. Graph statistics provide a good foundation for other subsequent image processing algorithms.
2.集成度高。本发明考虑到图像处理的实时性,采用高速的现场可编程逻辑门阵列作为硬件平台,其逻辑门数已经达到了上百万门,并且集成了大量的存储器,时钟管理模块以及各种电平的输入输出接口,减少了外围器件连接的复杂程度,具有高度集成的特点。2. High integration. Considering the real-time performance of image processing, the present invention adopts a high-speed field programmable logic gate array as the hardware platform. The input and output interface reduces the complexity of the connection of peripheral devices and has the characteristics of high integration.
3.降低成本。本发明方法占用了可编程逻辑门阵列内部的很少的逻辑单元和存储器,为在单片可编程逻辑门阵列上实现更加复杂的图像处理算法奠定了基础。3. Reduce costs. The method of the invention occupies few logic units and memories inside the programmable logic gate array, and lays a foundation for realizing more complex image processing algorithms on the single-chip programmable logic gate array.
附图说明 Description of drawings
图1为图像实时直方图统计装置的电路结构原理图;Fig. 1 is the schematic diagram of the circuit structure of the image real-time histogram statistical device;
图2为可编程逻辑门阵列内部实现直方图统计计算的硬件结构原理图。Fig. 2 is a schematic diagram of the hardware structure for realizing histogram statistical calculation inside the programmable logic gate array.
具体实施方式 Detailed ways
如图1所示,本发明图像实时直方图统计装置包括视频解码单元U4,其接收原始图像信号进行滤波、放大及数字化处理,生成视频数据送至可编程逻辑门阵列U6,可编程逻辑门阵列U6(本实施例采用EP1C12)为本发明装置的控制核心,其接收视频解码单元U4输出的视频数据进行直方图统计;程序存储器U7(FLASH)用于存储可编程逻辑门阵列U6的应用程序,可编程逻辑门阵列U6上电后,将其应用程序配置到可编程逻辑门阵列U6中;时钟管理单元U2,为可编程逻辑门阵列U6以及视频解码单元U4提供所需要的工作时钟;复位管理单元U3,为可编程逻辑门阵列U6提供复位信号;电源管理单元U1,为可编程逻辑门阵列U6及各单元提供所需工作电源。As shown in Figure 1, the image real-time histogram statistical device of the present invention includes a video decoding unit U4, which receives the original image signal for filtering, amplification and digital processing, generates video data and sends it to the programmable logic gate array U6, the programmable logic gate array U6 (the present embodiment adopts EP1C12) is the control core of the device of the present invention, and it receives the video data that video decoding unit U4 outputs and carries out histogram statistics; Program memory U7 (FLASH) is used for storing the application program of programmable logic gate array U6, After the programmable logic gate array U6 is powered on, its application program is configured in the programmable logic gate array U6; the clock management unit U2 provides the required working clock for the programmable logic gate array U6 and the video decoding unit U4; reset management The unit U3 provides reset signals for the programmable logic gate array U6; the power management unit U1 provides the required working power for the programmable logic gate array U6 and each unit.
本发明装置还具有数字信号处理单元U9(本实施例采用TMS320LF2407)及数据存储器U8(SRAM),其中数字信号处理单元U9经数据总线读取经可编程逻辑门阵列U6处理后的直方图统计数据及程序存储器U7的应用程序,对该直方图统计数据做进一步的后续处理;数据存储器U8用于存储数字信号处理单元U9在处理过程中生成的临时数据。The device of the present invention also has a digital signal processing unit U9 (the present embodiment adopts TMS320LF2407) and a data memory U8 (SRAM), wherein the digital signal processing unit U9 reads the histogram statistical data processed by the programmable logic gate array U6 through the data bus and the application program of the program memory U7 to perform further subsequent processing on the histogram statistical data; the data memory U8 is used to store the temporary data generated by the digital signal processing unit U9 during the processing.
所述可编程逻辑门阵列U6内部包括片上锁相环模块U10、图像处理区域选择模块U12、直方图统计状态控制模块U11、直方图统计数据清零控制模块U13、三端口RAM U14以及第1~3直方图统计数据多路选择控制模块U15~U17,其中:The programmable logic gate array U6 includes an on-chip phase-locked loop module U10, an image processing area selection module U12, a histogram statistical state control module U11, a histogram statistical data clearing control module U13, a three-port RAM U14 and the first to 3 Histogram statistical data multiplex selection control modules U15-U17, wherein:
片上锁相环模块U10用于接收时钟管理单元U2的时钟信号及复位管理单元U3的复位信号,产生像素时钟做为直方图统计状态控制模块U11、图像处理区域选择模块U12及直方图统计数据清零控制模块U13的像素时钟;产生像素时钟的四倍频时钟做为三端口RAM U14的读写时钟及直方图统计状态控制模块U11的写时钟;The on-chip phase-locked loop module U10 is used to receive the clock signal of the clock management unit U2 and the reset signal of the reset management unit U3, and generate a pixel clock as the histogram statistical state control module U11, the image processing area selection module U12 and the histogram statistical data clearing module U11. The pixel clock of the zero control module U13; the quadruple-frequency clock that generates the pixel clock is used as the read and write clock of the three-port RAM U14 and the write clock of the histogram statistical state control module U11;
图像处理区域选择模块U12根据不同的图像输入格式接收视频解码单元U4的行、场同步信号及图像数据,选择需要处理区域内的图像数据及处理区域有效信号输出至直方图统计状态控制模块U11,选择需要处理区域内的图像像素坐标输出至直方图统计数据清零控制模块U13;The image processing area selection module U12 receives the line and field synchronization signals and image data of the video decoding unit U4 according to different image input formats, selects the image data in the area to be processed and the effective signal of the processing area and outputs them to the histogram statistics state control module U11, Select the image pixel coordinates in the area to be processed and output to the histogram statistical data clearing control module U13;
直方图统计状态控制模块U11用于接收视频解码单元U4的行、场同步信号、三端口RAM U14的A端口输出的临时统计数据、图像处理区域选择模块U12选择的图像数据及处理区域有效信号,根据图像处理区域选择模块U12选择的处理区域有效信号对临时统计数据进行加1处理,将处理结果经第1直方图统计数据多路选择控制模块U15送至三端口RAMU 14的写数据端;产生读地址数据及读使能信号送至三端口RAMU14的A端口的读地址端及读使能端;产生用于统计的写地址数据、写使能信号分别经第2、3直方图统计数据多路选择控制模块U16、U17送至三端口RAMU14的A端口的写地址端和写使能端;The histogram statistical state control module U11 is used to receive the line of video decoding unit U4, the field synchronous signal, the temporary statistical data of the A port output of three-port RAM U14, the image data and the effective signal of the processing area selected by the image processing area selection module U12, According to the effective signal of the processing area selected by the image processing area selection module U12, the temporary statistical data is processed by adding 1, and the processing result is sent to the write data end of the three-port RAMU 14 through the first histogram statistical data multiplex selection control module U15; The read address data and the read enable signal are sent to the read address end and the read enable end of the A port of the three-port RAMU14; the write address data and write enable signal used for statistics are generated through the second and third histogram statistics data respectively. Road selection control modules U16, U17 are sent to the write address end and the write enable end of the A port of the three-port RAMU14;
直方图统计数据清零控制模块U13用于接收视频解码单元U4的行、场同步信号,根据图像处理区域选择模块U12输出的图像像素坐标产生用于清零的写地址数据、写使能信号分别经第2、3直方图统计数据多路选择控制模块U16、U17送至三端口RAMU14的A端口的写地址端和写使能端;The histogram statistical data clearing control module U13 is used to receive the line and field synchronous signals of the video decoding unit U4, and generates write address data and write enable signals for clearing according to the image pixel coordinates output by the image processing area selection module U12 The 2nd, 3rd histogram statistical data multiplex selection control modules U16, U17 are sent to the write address end and the write enable end of the A port of the three-port RAMU14;
三端口RAM(U14)具有一个写端口及两个读端口(A、B端口),其中写端口用于直方图统计过程中临时直方图数据的写入和清零过程中0值的写入,A端口用于直方图统计过程中临时直方图数据的读出,B端口用于由数字信号处理单元U9将最终的直方图数据读出。本发明装置将RAM配置成三端口,比起配置成双端口RAM减小了总线连接的复杂程度,并且可以通过调整三端口RAM的数据位宽来适应实际应用中所需处理图像的大小。The three-port RAM (U14) has a write port and two read ports (A, B ports), wherein the write port is used for writing temporary histogram data during the histogram statistics process and writing 0 values during the clearing process, The A port is used for reading out the temporary histogram data during the histogram statistics process, and the B port is used for reading out the final histogram data by the digital signal processing unit U9. The device of the present invention configures the RAM as a three-port RAM, which reduces the complexity of the bus connection compared with a dual-port RAM, and can adapt to the size of images to be processed in practical applications by adjusting the data bit width of the three-port RAM.
第1~3直方图统计数据多路选择控制模块U15~U17的控制端信号均来自视频解码单元U4的场同步信号。The control terminal signals of the first to third histogram statistical data multiplexing control modules U15 to U17 all come from the field synchronization signal of the video decoding unit U4.
数字信号处理单元U9是为直方图统计结果进行后续处理而设置的,其产生读地址数据及读使能信号,通过三端口RAMU 14的B端口读入直方图统计数据;产生数据读结束信号送至直方图统计数据清零控制模块U13。The digital signal processing unit U9 is set for the follow-up processing of the histogram statistical results, which generates read address data and read enabling signals, and reads the histogram statistical data through the B port of the three-port RAMU 14; generates data read end signals and sends them to To the histogram statistical data clearing control module U13.
本发明装置还设有视频编码单元U5,其将通过可编程逻辑门阵列U6处理之后的数字视频数据转化为模拟视频信号并输出显示,以方便观察。The device of the present invention is also provided with a video encoding unit U5, which converts the digital video data processed by the programmable logic gate array U6 into an analog video signal and outputs it for display, so as to facilitate observation.
本发明图像实时直方图统计装置的实现方法包括以下步骤:The realization method of image real-time histogram statistical device of the present invention comprises the following steps:
由视频解码单元U4接收原始图像信号进行滤波、放大及数字化处理,生成视频数据;The video decoding unit U4 receives the original image signal for filtering, amplification and digital processing to generate video data;
由可编程逻辑门阵列U6将视频数据进行直方图统计,得到统计结果。The histogram statistics of the video data is performed by the programmable logic gate array U6 to obtain statistical results.
所述对视频数据进行直方图统计包括以下步骤:Carrying out histogram statistics on video data comprises the following steps:
图像处理区域选择模块U12根据视频解码单元U4输出不同的图像输入格式接收视频数据,产生需要处理区域内的视频数据及像素坐标位置,并产生处理区域有效信号;The image processing area selection module U12 receives video data according to the different image input formats output by the video decoding unit U4, generates video data and pixel coordinate positions in the area to be processed, and generates an effective signal for the processing area;
直方图统计状态控制模块U11根据视频数据、像素坐标位置及处理区域有效信号产生三端口RAM U14的读/写地址数据及读/写使能信号;The histogram statistical state control module U11 generates the read/write address data and the read/write enable signal of the three-port RAM U14 according to the video data, the pixel coordinate position and the effective signal of the processing area;
直方图统计状态控制模块U11利用上述读/写地址数据及读/写使能信号在一个像素时钟周期内从三端口RAMU14读入临时直方图统计数据;The histogram statistical state control module U11 uses the above-mentioned read/write address data and read/write enable signal to read in temporary histogram statistical data from the three-port RAMU14 within one pixel clock cycle;
在直方图统计状态控制模块U11内对上述临时直方图统计数据进行加1操作;In the histogram statistical state control module U11, the above-mentioned temporary histogram statistical data is added to the operation;
直方图统计状态控制模块U11将加1后的数据写回三端口RAMU 14。The histogram statistical state control module U11 writes the data added by 1 back to the three-port RAMU 14.
本发明实现方法整个过程采用“独热”(one_hot)编码的同步有限状态机来完成,该同步有限状态机在直方图统计状态控制模块U11中实现,每完成一个像素的统计操作需要以下四个状态:The whole process of the realization method of the present invention is completed by a synchronous finite state machine of "one hot" (one_hot) encoding, which is implemented in the histogram statistical state control module U11, and the following four steps are required for each statistical operation of one pixel: state:
空闲状态IDLE:当处理区域有效信号到来时,建立写地址、写使能信号,清零读地址、读使能信号,同时状态转移到读状态;如处理区域有效信号未到来时,保持原来状态;Idle state IDLE: When the effective signal of the processing area arrives, the write address and write enable signal are established, the read address and read enable signal are cleared, and the state is transferred to the read state at the same time; if the effective signal of the processing area does not arrive, the original state is maintained ;
读状态READ:进行读操作,同时状态转移到累加状态;Read state READ: read operation, and the state transfers to the accumulative state at the same time;
累加状态SUM:进行数据加1操作,建立读地址、读使能信号,清零写地址、写使能信号,同时状态转移到写状态;Accumulation state SUM: perform data plus 1 operation, establish read address, read enable signal, clear write address, write enable signal, and state transfer to write state at the same time;
写状态WRITE:进行数据写回操作(即将临时统计数据写回到三端口RAMU14中),同时状态转移到空闲状态等待下个数据到来。Write state WRITE: perform a data write-back operation (that is, write temporary statistical data back into the three-port RAMU14), and at the same time, the state shifts to an idle state to wait for the next data to arrive.
本发明实现方法还包括以下步骤:The realization method of the present invention also comprises the following steps:
数字信号处理单元U9将得到统计的结果由三端口RAM U14读入,并进行后续处理(如图像灰度拉伸、图像对比度增强以及图像滤波等),同时产生读结束信号;The digital signal processing unit U9 reads the statistical results obtained by the three-port RAM U14, and performs subsequent processing (such as image grayscale stretching, image contrast enhancement, and image filtering, etc.), and simultaneously generates a read end signal;
直方图统计数据清零控制模块U13根据上述读结束信号对三端口RAMU 14进行清零处理。The histogram statistical data clearing control module U13 clears the three-port RAMU 14 according to the above-mentioned read end signal.
上述各步骤同样是为图像的后续处理而设置的。The above steps are also set for the subsequent processing of the image.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200810013188 CN101674473A (en) | 2008-09-12 | 2008-09-12 | An image real-time histogram statistical device and its implementation method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200810013188 CN101674473A (en) | 2008-09-12 | 2008-09-12 | An image real-time histogram statistical device and its implementation method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN101674473A true CN101674473A (en) | 2010-03-17 |
Family
ID=42021425
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 200810013188 Pending CN101674473A (en) | 2008-09-12 | 2008-09-12 | An image real-time histogram statistical device and its implementation method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN101674473A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106780415A (en) * | 2016-12-30 | 2017-05-31 | 华为技术有限公司 | A kind of statistics with histogram circuit and multimedia processing system |
| CN107248136A (en) * | 2017-05-12 | 2017-10-13 | 西安交通大学 | A kind of image histogram information acquisition method based on FPGA |
| CN114998135A (en) * | 2022-05-31 | 2022-09-02 | 北京义礼科技有限公司 | Image enhancement method and device, field programmable logic gate array and equipment |
-
2008
- 2008-09-12 CN CN 200810013188 patent/CN101674473A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106780415A (en) * | 2016-12-30 | 2017-05-31 | 华为技术有限公司 | A kind of statistics with histogram circuit and multimedia processing system |
| US10929965B2 (en) | 2016-12-30 | 2021-02-23 | Huawei Technologies Co., Ltd. | Histogram statistics circuit and multimedia processing system |
| CN107248136A (en) * | 2017-05-12 | 2017-10-13 | 西安交通大学 | A kind of image histogram information acquisition method based on FPGA |
| CN107248136B (en) * | 2017-05-12 | 2019-11-08 | 西安交通大学 | A Method of Acquiring Image Histogram Information Based on FPGA |
| CN114998135A (en) * | 2022-05-31 | 2022-09-02 | 北京义礼科技有限公司 | Image enhancement method and device, field programmable logic gate array and equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101882302B (en) | Motion blur image restoration system based on multi-core | |
| CN101441271B (en) | SAR real time imaging processing device based on GPU | |
| CN109658337B (en) | FPGA implementation method for real-time electronic despinning of images | |
| CN102547289B (en) | Fast motion estimation method realized based on GPU (Graphics Processing Unit) parallel | |
| CN106250103A (en) | A kind of convolutional neural networks cyclic convolution calculates the system of data reusing | |
| CN103971325A (en) | Dynamically reconfigurable pipelined pre-processor | |
| CN102131053A (en) | A data acquisition, encoding and storage method suitable for high-speed imaging systems | |
| CN102759530B (en) | A kind of surface quality image on-line measuring device | |
| CN107680028B (en) | Processor and method for scaling images | |
| CN103778086B (en) | Coarse-grained dynamic reconfigurable system based multi-mode data access device and method | |
| CN109451317A (en) | A kind of image compression system and method based on FPGA | |
| CN101674473A (en) | An image real-time histogram statistical device and its implementation method | |
| CN104469274A (en) | An Intelligent Video Surveillance System | |
| CN205385545U (en) | Real -time image information treater based on FPGA | |
| CN102446342A (en) | Reconfigurable binary arithmetical unit, reconfigurable binary image processing system and basic morphological algorithm implementation method thereof | |
| CN105225199B (en) | A kind of method and system of cylindrical surface projecting equidistant in real time | |
| CN101567078A (en) | Dual-bus visual processing chip architecture | |
| CN114897665A (en) | Configurable real-time parallax point cloud computing device and method | |
| CN201298901Y (en) | An image real-time histogram statistical device | |
| CN202679478U (en) | Digital image acquisition and processing platform | |
| CN110996005B (en) | Real-time digital image enhancement method and system | |
| CN101794276B (en) | DCT _ IDCT coprocessor suitable for SOC | |
| CN109040755A (en) | A kind of image pretreating device suitable for Video coding | |
| CN112153355B (en) | Digital image pixel conversion system and method based on FPGA | |
| CN103685961B (en) | Real-time processing system for achieving video data synchronization using single-chip SRAM |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20100317 |