CN113128141B - Median filtering system based on error-free random calculation - Google Patents
Median filtering system based on error-free random calculation Download PDFInfo
- Publication number
- CN113128141B CN113128141B CN202110416068.8A CN202110416068A CN113128141B CN 113128141 B CN113128141 B CN 113128141B CN 202110416068 A CN202110416068 A CN 202110416068A CN 113128141 B CN113128141 B CN 113128141B
- Authority
- CN
- China
- Prior art keywords
- random
- comparator
- output
- sequence
- module
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/32—Circuit design at the digital level
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03K—PULSE TECHNIQUE
- H03K5/00—Manipulating of pulses not covered by one of the other main groups of this subclass
- H03K5/22—Circuits having more than one input and one output for comparing pulses or pulse trains with each other according to input signal characteristics, e.g. slope, integral
- H03K5/24—Circuits having more than one input and one output for comparing pulses or pulse trains with each other according to input signal characteristics, e.g. slope, integral the characteristic being amplitude
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Nonlinear Science (AREA)
- Image Processing (AREA)
- Analogue/Digital Conversion (AREA)
Abstract
本发明公开一种基于无误差随机计算的中值滤波系统,应用于数字图像处理优化设计领域,针对现有技术存在的资源消耗较大的问题,本发明的中值滤波系统,包括:前向转换模块、随机比较器以及后向转换模块;前向转换模块包括集中序列生成单元与均匀序列生成单元,所述集中序列生成单元与均匀序列生成单元用于将二进制信号分别转换成均匀分布序列和集中分布序列;集中序列生成单元的输出端连接随机比较器的输入端,均匀序列生成单元的输出端连接随机比较器的选择端,随机比较器的输出端与后向转换模块相连;后向转换模块将随机比较器输出的随机序列转换为二进制数值;本发明的中值滤波器可以很好的应用于数字图像中值滤波降噪等领域。
The invention discloses a median filter system based on error-free random calculation, which is applied to the field of digital image processing optimization design. Aiming at the problem of large resource consumption in the prior art, the median filter system of the invention includes: forward Conversion module, random comparator and backward conversion module; The forward conversion module includes a concentrated sequence generation unit and a uniform sequence generation unit, and the concentrated sequence generation unit and the uniform sequence generation unit are used to convert the binary signal into a uniform distribution sequence and a uniform sequence generation unit respectively. Centralized distribution sequence; the output end of the concentrated sequence generation unit is connected to the input end of the random comparator, the output end of the uniform sequence generation unit is connected to the selection end of the random comparator, and the output end of the random comparator is connected to the backward conversion module; the backward conversion The module converts the random sequence output by the random comparator into a binary value; the median filter of the present invention can be well applied to fields such as digital image median filtering and noise reduction.
Description
技术领域technical field
本发明属于数字图像处理优化设计领域,特别涉及一种中值滤波系统的实现技术。The invention belongs to the field of digital image processing optimization design, in particular to a realization technology of a median filtering system.
背景技术Background technique
由于目前集成电路运算性能高、集成面积小、功耗低等要求。随着科学技术的不断发展,晶体管的尺寸不断缩小,单位面积上可集成的晶体管愈来愈多。然而,随着Dennard的缩放比例定律的失效,计算领域遭到了空前的挑战。由Moore定律可知,缩小晶体管的尺寸,漏电流会随之变大,进而增加集成电路的功耗,但是性能的提升却不理想,复杂精密芯片的可靠性成为现阶段设计者最关心的问题,这就推动了新计算技术的发展。Due to the current requirements of high computing performance, small integrated area, and low power consumption of integrated circuits. With the continuous development of science and technology, the size of transistors is continuously reduced, and more and more transistors can be integrated on a unit area. However, with the invalidation of Dennard's scaling law, the field of computing has been challenged unprecedentedly. According to Moore's law, shrinking the size of the transistor will increase the leakage current, which will increase the power consumption of the integrated circuit, but the performance improvement is not ideal. The reliability of complex and sophisticated chips has become the most concerned issue for designers at this stage. This drives the development of new computing technologies.
在随机计算的数字电路设计中,常用的前向转换单元使用线性反馈移位寄存器(LFSR),来生成随机数源,设置不同的线性反馈移位寄存器(LFSR)初始值,前向转换的输出序列则不同,不仅可以产生伪随机的比特流,而且能够很好的降低比特流序列自身的自相关性,但随机电路的每一路需要独立的初始随机数来驱动,这样一来会极大地增加前向转换单元的电路面积和资源占用。In the digital circuit design of random computing, the commonly used forward conversion unit uses a linear feedback shift register (LFSR) to generate a random number source, set different initial values of the linear feedback shift register (LFSR), and the output of the forward conversion The sequence is different, not only can generate a pseudo-random bit stream, but also can well reduce the autocorrelation of the bit stream sequence itself, but each path of the random circuit needs to be driven by an independent initial random number, which will greatly increase Circuit area and resource occupation of the forward conversion unit.
发明内容Contents of the invention
为解决上述技术问题,本发明提出一种基于无误差随机计算的中值滤波系统。In order to solve the above technical problems, the present invention proposes a median filter system based on error-free random calculation.
本发明采用的技术方案为:一种基于无误差随机计算的中值滤波系统,包括:前向转换模块、随机比较器模块以及后向转换模块;The technical solution adopted by the present invention is: a median filtering system based on error-free random calculation, including: a forward conversion module, a random comparator module and a backward conversion module;
所述前向转换模块包括集中序列生成单元与均匀序列生成单元,所述集中序列生成单元与均匀序列生成单元用于将二进制信号分别转换成集中分布序列和均匀分布序列;The forward conversion module includes a concentrated sequence generation unit and a uniform sequence generation unit, and the concentrated sequence generation unit and the uniform sequence generation unit are used to convert the binary signal into a concentrated distribution sequence and a uniform distribution sequence, respectively;
集中序列生成单元的输出端连接随机比较器的输入端,均匀序列生成单元的输出端连接随机比较器的选择端,随机比较器的输出端与后向转换模块相连;后向转换模块将随机比较器输出的随机序列转换为二进制数值。The output end of the concentrated sequence generation unit is connected to the input end of the random comparator, the output end of the uniform sequence generation unit is connected to the selection end of the random comparator, and the output end of the random comparator is connected to the backward conversion module; the backward conversion module will randomly compare The random sequence output by the converter is converted into a binary value.
还包括时钟周期模块,所述时钟周期模块与前向转换模块共用一个加计数器。A clock cycle module is also included, and the clock cycle module and the forward conversion module share an up counter.
所述集中分布序列的生成过程为:将加权二进制数与当前时钟周期的加计数器值进行比较,若大于当前时钟周期的加计数器值,则输出比特流为“1”;否则输出比特流为“0”,由于当前时钟周期等于上一时钟周期自加1,因此可输出“1”全在序列头部,其余位为“0”并在序列尾部的集中分布序列。The generation process of described centralized distribution sequence is: compare the weighted binary number with the up counter value of current clock cycle, if greater than the up counter value of current clock cycle, then output bit stream is " 1 "; Otherwise output bit stream is " 0", since the current clock cycle is equal to the self-increment of 1 in the previous clock cycle, it can output "1" all at the head of the sequence, and the rest of the bits are "0" and the concentrated distribution sequence at the end of the sequence.
均匀序列生成单元的生成过程为:将当前时钟周期的加计数器值与前一个时钟周期的加计数器的值的二进制反码相与,得到的每位输出分别与二进制加权数中的每一位相与,得到的各输出分别连接或门,最终得到加权二进制数的均匀分布序列。The generation process of the uniform sequence generation unit is as follows: the value of the up-counter in the current clock cycle and the binary complement of the value of the up-counter in the previous clock cycle are ANDed, and the output of each bit obtained is ANDed with each bit in the binary weighted number , the obtained outputs are respectively connected to OR gates, and finally a uniformly distributed sequence of weighted binary numbers is obtained.
包括三个二进制信号。Consists of three binary signals.
所述随机比较器模块为三个随机比较器级联的结构,对应的,三个随机比较器依次记为第一随机比较器、第二随机比较器、第三随机比较器,三个二进制信号经前向转换模块后的三个集中序列,其中两个集中序列作为第一随机比较器的输入,另一个集中序列与第一随机比较器的较大输出作为第二随机比较器的输入,第一随机比较器的较小输出与第二随机比较器的较小输出作为第三随机比较器的输入,第二随机比较器的较大输出作为该随机比较器模块的最大序列输出,第三随机比较器的较大输出作为该随机比较器模块的中值序列输出,第三随机比较器的较小输出作为该随机比较器模块的最小序列输出;均匀分布序列作为三个随机比较器选择端的输入。The random comparator module is a cascaded structure of three random comparators. Correspondingly, the three random comparators are sequentially recorded as the first random comparator, the second random comparator, and the third random comparator. The three binary signal The three concentrated sequences after the forward conversion module, two of which are used as the input of the first random comparator, and the larger output of the other concentrated sequence and the first random comparator is used as the input of the second random comparator. The smaller output of a random comparator and the smaller output of the second random comparator are used as the input of the third random comparator, the larger output of the second random comparator is used as the maximum sequence output of the random comparator module, and the third random comparator The larger output of the comparator is used as the median sequence output of the random comparator module, and the smaller output of the third random comparator is used as the minimum sequence output of the random comparator module; the uniform distribution sequence is used as the input of the selection terminal of the three random comparators .
单个随机比较器包括:第一随机比较模块、stanh模块、第二随机比较模块、第三随机比较模块;三个随机比较模块的两个输入端作为该随机比较器的两个输入端,该随机比较器的两个输入端的输入是反相的,第一随机比较模块的选择端作为该随机比较器的选择端;第一随机比较模块的输出端接stanh模块的输入端,stanh模块的输出端分别连接第二随机比较模块与第三随机比较模块各自的选择端;第二随机比较模块的输出作为该随机比较器的较大输出端,第三随机比较模块的输出作为该随机比较器的较小输出端。A single random comparator includes: a first random comparison module, a stanh module, a second random comparison module, and a third random comparison module; two input terminals of the three random comparison modules are used as two input terminals of the random comparator, and the random The input of the two input terminals of the comparator is inverting, and the selection terminal of the first random comparison module is used as the selection terminal of the random comparator; the output terminal of the first random comparison module is connected to the input terminal of the stanh module, and the output terminal of the stanh module Respectively connect the second random comparison module and the selection end of the third random comparison module; the output of the second random comparison module is used as the larger output terminal of the random comparator, and the output of the third random comparison module is used as the comparison of the random comparator small output.
所述stanh模块具体为基于有限状态机的stanh函数,具体的:The stanh module is specifically a stanh function based on a finite state machine, specifically:
状态转移图的转换原则为:N个状态,分别是S0、S1、…、Sn-1,X作为状态机的初始输入值,输出Y只与当前状态Si有关,0<i<N-1,若0<i≤N/2-1,则输出值Y=0;否则输出值Y=1。The conversion principle of the state transition diagram is: N states, namely S 0 , S 1 , ..., S n-1 , X is the initial input value of the state machine, and the output Y is only related to the current state S i , 0<i< N-1, if 0<i≤N/2-1, the output value Y=0; otherwise, the output value Y=1.
本发明的有益效果:随机计算是一种近似或不精确计算的表示形式,本发明可实现随机比较器的无误差输出结果,其结构包括前向转换模块,随机比较器,后向转换模块,所述随机比较器可以级联,所述前向转换模块、随机比较器和后向转换模块依次电路相连,输入二进制信号通过概率序列生成器生成均匀分布序列和集中分布序列,集中分布序列作为随机比较器的输入端,均匀分布序列作为随机比较器的选择端,随机比较器的输出端与后向转换模块相连,完成随机序列到传统二进制数值的转换,并且可以很好的应用于数字图像中值滤波降噪等领域;本发明的基于无误差随机计算的中值滤波系统包括以下优点:Beneficial effects of the present invention: random calculation is a representation of approximate or inaccurate calculation, the present invention can realize the error-free output result of the random comparator, and its structure includes a forward conversion module, a random comparator, a backward conversion module, The random comparator can be cascaded, the forward conversion module, the random comparator and the backward conversion module are sequentially connected in circuit, the input binary signal generates a uniform distribution sequence and a concentrated distribution sequence through a probability sequence generator, and the concentrated distribution sequence is used as a random The input terminal of the comparator, the uniform distribution sequence is used as the selection terminal of the random comparator, and the output terminal of the random comparator is connected to the backward conversion module to complete the conversion from random sequence to traditional binary value, and can be well applied to digital images Fields such as value filtering noise reduction; The median filtering system based on error-free random calculation of the present invention includes the following advantages:
1、基于加计数器的转换单元,通过固定概率分布来减少互相关性,改进的随机比较器模型实现无固有误差的随机计算结果。1. The conversion unit based on the adding counter reduces cross-correlation through fixed probability distribution, and the improved random comparator model realizes random calculation results without inherent errors.
2、时钟周期模块可以与前向转换模块共用一个加计数器,减少资源消耗。2. The clock cycle module can share an up counter with the forward conversion module to reduce resource consumption.
3、实现了随机计算可以很好的应用于中值滤波降噪等领域的功能。3. Realized the function that random calculation can be well applied in the fields of median filtering and noise reduction.
附图说明Description of drawings
图1为本发明中的中值滤波系统的结构框图;Fig. 1 is the structural block diagram of median filtering system among the present invention;
图2为本发明中的中值滤波3*3滑窗示意图;Fig. 2 is a schematic diagram of a median filter 3*3 sliding window in the present invention;
图3为本发明中的集中序列生成单元示意图;Fig. 3 is a schematic diagram of the centralized sequence generation unit in the present invention;
图4为本发明中的均匀序列生成单元示意图;Fig. 4 is a schematic diagram of a uniform sequence generation unit in the present invention;
图5为本发明中的基于有限状态机的转移图;Fig. 5 is the transfer diagram based on the finite state machine among the present invention;
图6为本发明中的随机比较器内部结构图;Fig. 6 is a random comparator internal structure diagram among the present invention;
图7为本发明中的随机比较器级联图;Fig. 7 is the random comparator cascade diagram among the present invention;
图8为本发明应用于图像中值滤波实验结果图;Fig. 8 is a diagram of the experimental results of the present invention applied to image median filtering;
其中,图8(a)为原始图像,图8(b)为传统方法实现的中值滤波结果,图8(c)为基于随机计算实现的中值滤波结果。Among them, Fig. 8(a) is the original image, Fig. 8(b) is the median filtering result realized by the traditional method, and Fig. 8(c) is the median filtering result realized based on random calculation.
具体实施方式Detailed ways
为便于本领域技术人员理解本发明的技术内容,下面结合附图对本发明内容进一步阐释。In order to facilitate those skilled in the art to understand the technical content of the present invention, the content of the present invention will be further explained below in conjunction with the accompanying drawings.
如图1所示,本发明的一种基于无误差随机计算的中值滤波系统包括:前向转换模块、随机比较器以及后向转换模块;所述前向转换模块包括集中序列生成单元与均匀序列生成单元,用于将二进制信号分别转换成集中分布序列和均匀分布序列;所述随机比较器用于输出最大集中分布序列和最小集中分布序列;所述后向转换模块用于将输出的随机序列转换回二进制数值。As shown in Fig. 1, a kind of median filtering system based on error-free random calculation of the present invention includes: a forward conversion module, a random comparator and a backward conversion module; The sequence generation unit is used to convert the binary signal into a centralized distribution sequence and a uniform distribution sequence respectively; the random comparator is used to output the maximum centralized distribution sequence and the minimum centralized distribution sequence; the backward conversion module is used to convert the output random sequence Convert back to a binary value.
本实施例中的前向转换单元使用线性反馈移位寄存器(LFSR),来生成随机数源,设置不同的线性反馈移位寄存器(LFSR)初始值,前向转换的输出序列则不同,不仅可以产生伪随机的比特流,而且能够很好的降低比特流序列自身的自相关性。The forward conversion unit in this embodiment uses a linear feedback shift register (LFSR) to generate a random number source, and different linear feedback shift register (LFSR) initial values are set, and the output sequence of the forward conversion is different, not only can A pseudo-random bit stream is generated, and the autocorrelation of the bit stream sequence itself can be well reduced.
如图2所示,中值滤波3*3滑窗输出值原理图,在使用软件实现时,首先比较每列(行)的像素值,按照最大值、中间值和最小值排序;然后比较最大值那一列(行)取其中的最小值,比较中间值那一列(行)取中间值,比较最小值那一列(行)取最大值;最后再比较前一步骤中的三个值,取中间值,这个中间值即为所需的窗口中的统计中值,作为窗口的输出,图2所示的具体示例比较过程如下:As shown in Figure 2, the schematic diagram of the median filter 3*3 sliding window output value, when using software to implement, first compare the pixel values of each column (row), sorted according to the maximum value, median value and minimum value; then compare the maximum Take the minimum value in the column (row) of the value, take the middle value in the column (row) that compares the middle value, and take the maximum value in the column (row) that compares the minimum value; finally compare the three values in the previous step and take the middle value Value, this intermediate value is the statistical median value in the required window, as the output of the window, the specific example comparison process shown in Figure 2 is as follows:
步骤1首先比较每列的像素值,按照最大值、中间值和最小值排序{{50,37,19},{98,36,24},{80,64,23}};
步骤2然后最大值那一行取其中的最小值,比较中间值那一行取中间值,最小值那一行取最大值{min{50,98,80},med{37,36,64},max{19,24,23}};
步骤3最后比较取出的三个值,取中间值,这个中间值即为所需的窗口中的统计中值med{50,37,24},即37位窗口的输出值。In step 3, compare the three values obtained at the end, and take the middle value, which is the statistical median med{50, 37, 24} in the desired window, that is, the output value of the 37-bit window.
如图3所示,集中分布序列生成单元,所述集中分布序列单元是将二进制加权数X[n-1:0]与当前时钟周期的加计数器值cnt进行比较,之所以使用基于加计数器的前向转换单元,是可以通过固定概率的分布来减小序列间的互相关性,不仅可以实现电路复用,也可以减少资源的消耗。且前向转换单元中的加计数器也可以与时钟周期模块中的加计数器共用,进一步提升电路的运行效率。其中加计数器可以由所有前向转换器共用,若X>cnt,则输出比特流为“1”;若X≤cnt,则输出比特流为“0”,由于每个时钟周期cnt=cnt+1,因此可输出“1”全在序列头部,其余位为“0”并在序列尾部的集中分布序列,例如待转换数5,经过集中转换单元生成的8-bit的集中分布序列11111000。As shown in Figure 3, the centralized distribution sequence generation unit, the centralized distribution sequence unit compares the binary weighted number X[n-1:0] with the up counter value cnt of the current clock cycle, the reason why the up counter based The forward conversion unit can reduce the cross-correlation between sequences through the distribution of fixed probability, which can not only realize circuit multiplexing, but also reduce resource consumption. Moreover, the up counter in the forward conversion unit can also be shared with the up counter in the clock cycle module, so as to further improve the operating efficiency of the circuit. Wherein the up counter can be shared by all forward converters, if X>cnt, then the output bit stream is "1"; if X≤cnt, then the output bit stream is "0", because each clock cycle cnt=cnt+1 , so it can output "1" all at the head of the sequence, and the remaining bits are "0" and the centralized distribution sequence at the end of the sequence, for example, the number 5 to be converted, the 8-bit centralized distribution sequence 11111000 generated by the centralized conversion unit.
X[n-1:0]表示待转换二进制序列,X表示n bit的二进制加权数。X[n-1:0] represents the binary sequence to be converted, and X represents the binary weighted number of n bits.
如图4所示,均匀分布序列生成单元,其中加计数器由所有前向转换器共用,当前时钟周期的加计数器值cnt,与前一个时钟周期的加计数器的值的二进制反码相与,其功能起一个上升沿检测器的作用,得到的每位输出分别与二进制加权数X[n-1:0]相与,输出分别连接或门,即得到加权二进制数X[n-1:0]的均匀分布序列。As shown in Figure 4, the uniformly distributed sequence generation unit, wherein the up counter is shared by all forward converters, the up counter value cnt of the current clock cycle, and the binary complement of the up counter value of the previous clock cycle, its The function acts as a rising edge detector, and the output of each bit obtained is respectively ANDed with the binary weighted number X[n-1:0], and the output is respectively connected to the OR gate, that is, the weighted binary number X[n-1:0] is obtained uniformly distributed series.
图4中X0、…、Xi、…、Xn-1分别表示X[n-1:0]中的n个bit位。In FIG. 4, X 0 , ..., Xi i , ..., X n-1 represent n bits in X[n-1:0] respectively.
如图5所示,基于有限状态机的状态转移图,由一组以线性形式排列的N个状态组成(饱和计数器)。通常,选择N=2K个状态,其中K是正整数,从第一个状态到最后一个状态的转换必须通过所有中间状态的逐次转换来实现。其中,所述状态转移图的转换原则为,N个状态,分别是S0、S1、…、Si、…、SN-1,X作为状态机的初始输入值,输出Y只与当前状态Si有(0<i<N-1)关,若0<i≤N/2-1,则输出值Y=0;否则输出值Y=1,由此构造出基于有限状态机的stanh函数,在已有模型的基础上,本发明通过输入集中分布的A、B和均匀分布的R,不仅实现了无误差计算结果,而且将原有的状态数减少为仅需要四个状态就能实现功能,极大地减少了电路面积和资源占用。As shown in Figure 5, the state transition diagram based on the finite state machine consists of a group of N states arranged in a linear form (saturation counter). Usually, N=2 K states are selected, where K is a positive integer, and the transition from the first state to the last state must be realized through successive transitions of all intermediate states. Wherein, the conversion principle of the state transition diagram is that N states are respectively S 0 , S 1 , ..., S i , ..., S N-1 , X is used as the initial input value of the state machine, and the output Y is only consistent with the current The state S i has (0<i<N-1) off, if 0<i≤N/2-1, the output value Y=0; otherwise the output value Y=1, thus constructing a stanh based on a finite state machine function, on the basis of the existing model, the present invention not only realizes error-free calculation results by inputting concentratedly distributed A, B and uniformly distributed R, but also reduces the original number of states to only four states. Functions are realized, and the circuit area and resource occupation are greatly reduced.
如图6所示,随机比较器的内部结构图,其中A、B为随机比较器输入端,为集中分布序列,R为数据选择器的选择端,为均匀分布序列,产生的随机比特流差值送入stanh模块,由stanh模块的配置可知,进而得到,0≤PX<0.5时,PY=0;PX=0.5时,PY=1/2;0.5<PX≤1时,PY=1。所以若A>B,则PX>0.5,S=1,stanh模块倾向于保持在高状态侧,最右边的数据器选择A;若A<B,则PX<0.5,S=0,stanh模块倾向于保持在低状态侧,最右边的数据选择器选择B,由此分别输出最大集中分布序列和最小集中分布序列。这里的S表示stanh模块的输出。As shown in Figure 6, the internal structure diagram of the random comparator, where A and B are the input terminals of the random comparator, which are concentrated distribution sequences, R is the selection terminal of the data selector, which is a uniform distribution sequence, and the generated random bit stream difference The value is sent to the stanh module, which can be seen from the configuration of the stanh module, Furthermore, when 0≤P X <0.5, P Y =0; when P X =0.5, P Y =1/2; when 0.5<P X ≤1, P Y =1. So if A>B, then P X >0.5, S=1, the stanh module tends to remain on the high state side, and the rightmost data device chooses A; if A<B, then P X <0.5, S=0, stanh The module tends to remain on the low state side, and the rightmost data selector selects B, thereby outputting the sequence of maximum concentration distribution and sequence of minimum concentration distribution, respectively. Here S represents the output of the stanh module.
PY表示输出比特流中的每个比特为1的概率;PX表示输入比特流中的每个比特位1的概率;表示在输入概率PX下,当前状态为i的概率;N表示总的状态数。P Y represents the probability that each bit in the output bit stream is 1; P X represents the probability that each bit in the input bit stream is 1; Indicates the probability that the current state is i under the input probability P X ; N represents the total number of states.
如图7所示,随机比较器级联图,由上述所提到的随机比较器级联而成,简单介绍下其工作原理:二进制信号分别a、b、c,经过前向转换单元转换成随机比特流,得到A、B、C三个序列;首先比较B、C两个序列的大小,较大序列存入MAX1,较小序列存入MIN1;然后比较MAX1、A两个序列的大小,较大序列存入MAX,较小序列存入MIN2;最后比较MINi、MIN2两个序列的大小,较大序列存入MID,较小序列存入MIN,由此分别输出最大序列MAX、中值序列MID、最小序列MIN。As shown in Figure 7, the random comparator cascade diagram is composed of the above-mentioned random comparator cascaded, and its working principle is briefly introduced: the binary signals are respectively a, b, and c, and are converted into Random bit stream to get three sequences A, B, and C; first compare the sizes of the two sequences B and C, store the larger sequence in MAX1, and store the smaller sequence in MIN1; then compare the sizes of the two sequences MAX1 and A, The larger sequence is stored in MAX, and the smaller sequence is stored in MIN2; finally, the size of the two sequences MINi and MIN2 is compared, the larger sequence is stored in MID, and the smaller sequence is stored in MIN, thereby outputting the largest sequence MAX and the median sequence respectively MID, minimum sequence MIN.
如图8所示,上述所述级联随机比较器可应用于中值滤波等数字图像处理领域,整个过程均采用随机比特流来实现,在测试的IEEE图库中,每个像素点的像素值都是由8比特加权二进制代表的灰度值表示,其中图8(a)为原始图像,图8(b)为传统方法实现的中值滤波结果,图8(c)为基于随机计算实现的中值滤波结果,可以发现本发明的基于随机计算的中值滤波器与加权二进制系统下的中值滤波器相比没有固有概率值误差。As shown in Figure 8, the above-mentioned cascaded random comparator can be applied to the field of digital image processing such as median filtering, and the whole process is realized by random bit stream. In the tested IEEE gallery, the pixel value of each pixel They are all represented by gray values represented by 8-bit weighted binary, where Fig. 8(a) is the original image, Fig. 8(b) is the median filtering result achieved by the traditional method, and Fig. 8(c) is the result based on random calculation From the results of median filtering, it can be found that the median filter based on random calculation of the present invention has no inherent probability value error compared with the median filter under the weighted binary system.
本领域的普通技术人员将会意识到,这里所述的实施例是为了帮助读者理解本发明的原理,应被理解为本发明的保护范围并不局限于这样的特别陈述和实施例。对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的权利要求范围之内。Those skilled in the art will appreciate that the embodiments described here are to help readers understand the principles of the present invention, and it should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Various modifications and variations of the present invention will occur to those skilled in the art. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of the claims of the present invention.
Claims (4)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110416068.8A CN113128141B (en) | 2021-04-19 | 2021-04-19 | Median filtering system based on error-free random calculation |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110416068.8A CN113128141B (en) | 2021-04-19 | 2021-04-19 | Median filtering system based on error-free random calculation |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113128141A CN113128141A (en) | 2021-07-16 |
| CN113128141B true CN113128141B (en) | 2023-03-24 |
Family
ID=76777377
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110416068.8A Expired - Fee Related CN113128141B (en) | 2021-04-19 | 2021-04-19 | Median filtering system based on error-free random calculation |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113128141B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117314730B (en) * | 2023-11-28 | 2024-03-15 | 进迭时空(杭州)科技有限公司 | Median filtering computing device and method for accelerating digital image processing |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104782116A (en) * | 2012-09-18 | 2015-07-15 | 菲力尔系统公司 | Row and column noise reduction in thermal images |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20060099123A (en) * | 2005-03-10 | 2006-09-19 | 엘지전자 주식회사 | Salt Noise Rejection Method for Tilt Adjustment Using TE and Improvement of Adjustment Deviation by Selection of Wide Curve Fitting Area |
| CN102740340B (en) * | 2012-07-19 | 2014-08-20 | 中南大学 | Data gathering method oriented to same configuration nodes in network cluster of wireless sensor |
| CN108446606A (en) * | 2018-03-01 | 2018-08-24 | 苏州纳智天地智能科技有限公司 | A kind of face critical point detection method based on acceleration binary features extraction |
| CN110677138B (en) * | 2019-09-25 | 2021-06-15 | 电子科技大学 | FIR filter based on error-free probability calculation |
| CN110620566B (en) * | 2019-09-25 | 2021-07-02 | 电子科技大学 | FIR Filtering System Based on Combination of Random Computation and Remainder System |
-
2021
- 2021-04-19 CN CN202110416068.8A patent/CN113128141B/en not_active Expired - Fee Related
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104782116A (en) * | 2012-09-18 | 2015-07-15 | 菲力尔系统公司 | Row and column noise reduction in thermal images |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113128141A (en) | 2021-07-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4322548B2 (en) | Data format conversion circuit | |
| CN112713894B (en) | Strong and weak mixed PUF circuit | |
| CN112698811B (en) | Neural network random number generator shared circuit, shared method, and processor chip | |
| CN111404550B (en) | Analog-to-digital converter and clock generation circuit thereof | |
| TW200915173A (en) | Data bus inversion detection mechanism | |
| CN113128141B (en) | Median filtering system based on error-free random calculation | |
| CN114374809A (en) | A kind of analog-to-digital conversion circuit of infrared focal plane readout circuit | |
| CN213934855U (en) | A Neural Network Random Number Generator Shared Circuit Based on Random Computing | |
| TWI521891B (en) | High speed serializer | |
| CN114421931B (en) | Pseudo-random frequency division signal generating circuit and method | |
| CN116522296A (en) | Strong PUF-oriented machine learning-resistant CRP confusion method | |
| WO2022048245A1 (en) | Random number generation circuit | |
| CN114969845A (en) | A Path-Sensitive Multi-Entropy Source SPUF | |
| CN110705196B (en) | Error-free adder based on random calculation | |
| US11475288B2 (en) | Sorting networks using unary processing | |
| CN114257248A (en) | A Shift Register Type Serial-Parallel Conversion Circuit with Low Toggle Rate | |
| CN115065343A (en) | True random number generator based on ring oscillator | |
| US10776079B2 (en) | True random number generation device and generation method thereof | |
| US6938172B2 (en) | Data transformation for the reduction of power and noise in CMOS structures | |
| CN113988279A (en) | Output current reading method and system of storage array supporting negative value excitation | |
| CN119690382B (en) | A high-throughput true random number generator based on MUX latch | |
| CN117170210B (en) | FPGA-based tap delay chain type TDC | |
| WO2022048231A1 (en) | Random number generating circuit | |
| CN115001480B (en) | A special sequential data selector, implementation method, electronic device and medium | |
| TWI718423B (en) | Stochastic computing divider |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20230324 |