CN100481880C - Method of searching mid value of pixel - Google Patents

Method of searching mid value of pixel Download PDF

Info

Publication number
CN100481880C
CN100481880C CNB2007102031875A CN200710203187A CN100481880C CN 100481880 C CN100481880 C CN 100481880C CN B2007102031875 A CNB2007102031875 A CN B2007102031875A CN 200710203187 A CN200710203187 A CN 200710203187A CN 100481880 C CN100481880 C CN 100481880C
Authority
CN
China
Prior art keywords
pixel
value
register
median
neighborhood
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
Application number
CNB2007102031875A
Other languages
Chinese (zh)
Other versions
CN101184158A (en
Inventor
李珣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CNB2007102031875A priority Critical patent/CN100481880C/en
Publication of CN101184158A publication Critical patent/CN101184158A/en
Application granted granted Critical
Publication of CN100481880C publication Critical patent/CN100481880C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to an image processing technology, in particular to a median filtering method of two-dimensional images. The invention discloses a median filtering method that identifies the pixel median position through pipelining based on the characteristics of the median value, aiming to overcome the disadvantages of slow speed and low efficiency existing in the prior art. The invention adopts the technical proposal that: the pipelining design is adopted; all pixels in the neighborhood are relatively compared at the same time through a plurality of median comparison registers and flag registers; the median position is identified through pipelining based on the characteristics of the median value. The invention has the advantages that: the frequency range of circuit working is effectively improved; the frequency requirements for pixel clock under all resolution formats of standardized definition and high definition in the current video image standards are met; the speed is fast and the efficiency is high.

Description

Seek the method for pixel median
Technical field
The present invention relates to image processing techniques, particularly the two dimensional image median filter method.
Background technology
One width of cloth digital picture is made up of the pixel of limited size, and pixel has reflected the color and the monochrome information of image specific location.In order to handle by hardware circuit (as computer etc.), the image heart must be expressed with the discrete data structure as matrix or sequence.We can represent a width of cloth digital picture with two-dimensional matrix, the important set of in picture element matrix or sequence, forming by some pixels that are adjacent to each other, and we are referred to as neighborhood.
The influence of hardware such as view data is obtained, storage, treatment circuit, and in the transmission course factor such as various signal interference influence and polluted, show on the image to be exactly to have occurred noise on the picture.In order to reduce the image variation that these destroy and cause thereupon, need handle view data with digital filter.
The method of Filtering Processing has multiple, and two dimension median filter is exactly wherein a kind of.So-called medium filtering is exactly that the pixel value in the image neighborhood of a slip is sorted, use the median of the pixel value of all pixels in this neighborhood then---(all pixels according to pixels are worth the size ordering to pixel median, the pixel value of the pixel that mediates) replaces the pixel value of centre of neighbourhood pixel, thereby reach the effect of filtering noise.Above-mentioned pixel value can be the Y channel data etc. of gray value, luminous value, brightness value or the yuv space of pixel.Above-mentioned pixel can be the pixel that constitutes rest image or the single picture frame of moving image.
Can the key of median filtering technology be find out accurately and real-time the median of each neighborhood of pixels.Will handle in real time single-definition or high definition video signal that pixel clock frequency reaches about 150MHz, how design the hardware circuit of an efficient high-speed, can realize the ordering of pixel fast in this frequency range, be exactly the key point of problem.
Existing median filter circuit, the common mechanism that realizes are the medians that the method for direct ordering of employing or bubble sort is found out sequence.Such as for 9 data in one 3 * 3 the pixel grey scale value matrix, be designated as Y[i], i=1~9.At first make Y[1] have an order region of one's own, remaining data are the region of disorder.Then from i=2 till i=9, successively with Y[i] by size order insert current order region Y[1 ..., i-1] in, thereby generate an order region that contains 9 records.Get the median Y[5 of order region at last] be the required substitution value of center pixel.
The shortcoming of said method is at first to need to finish the ordering of all pixels, and speed is slow, and efficient is low.Median from the input matrix data to this matrix of output needs time-delay 9 to clap altogether.If for 7 * 7 matrix neighborhood, find out median and then need delay time and 49 clap.So these class methods only are applicable to that territory is little, matrix size is little, the situation that image signal resolution is not high, pixel clock is lower.In case and picture signal reaches the high definition standard, this ordering is asked the method for intermediate value just can't satisfy sequential and has been required.
Summary of the invention
Technical problem to be solved by this invention is exactly slow at existing filtering method speed, and inefficient shortcoming provides a kind of feature according to median, determines the median filter method of its position in the mode of flowing water.
The present invention solve the technical problem, and the technical scheme of employing is that the method for searching pixel median is characterized in that, may further comprise the steps:
A. the size that compares interior fi of neighborhood and fj, if fi<fj, then register fi_large_fj reset, register fi_small_fj set; If fi〉fj, then register fi_large_fj set, register fi_small_fj reset; If fi=fj, then register fi_large_fj and register fi_small_fj keep initial value " 0 " constant; Wherein:
Fi is the pixel value of pixel i; Fj is the pixel value of pixel j; I, j=1,2 ..., n; I ≠ j; N is a sum of all pixels in the described neighborhood;
B. to each pixel i, with the value addition of each register fi_large_fj value as register fi_num_left;
With the value addition of each register fi_small_fj value as register fi_num_right;
C. the value of the value of comparand register fi_num_left and register fi_num_right and the size of digital m; If value≤m of register fi_num_left, value≤m of register fi_num_right, then the pixel value fi of pixel i is the pixel median of described neighborhood; Wherein: m=(n-1)/2.
The invention has the beneficial effects as follows, abandoned existing mode from minimum to maximum " intermediate value is asked in full ordering ", but employing The pipeline design, by comparand register in the middle of a plurality of and flag register, all pixels in the neighborhood are carried out relatively simultaneously, determine its position according to the feature of median in the mode of flowing water.No matter be matrix neighborhoods 3 * 3 or 7 * 7, perhaps the neighborhood of other type to the median of exporting this matrix, all only needs maximum 8 to clap and can finish from the input matrix data.Thereby effectively improve the frequency range of circuit working, satisfy the frequency requirement of the pixel clock under all single-definitions, the high definition resolution form in the present video image standard.Has the efficient height, fireballing characteristics.
Description of drawings
Fig. 1 is the schematic diagram of embodiment;
Fig. 2 is several neighbour structure schematic diagrames.
Embodiment
Below in conjunction with drawings and Examples, describe technical scheme of the present invention in detail.
The present invention has made full use of the The pipeline design method that can effectively improve the circuit speed of service.Because whole data processing is
" single current to ", there are not the iteration or the circulation of data, the output of previous step is the input of next procedure, so can
Improve the operating frequency of system with the method for designing that adopts streamline.
The processing procedure that at first will seek pixel median in the neighborhood is divided into parallel some steps, each step more corresponding Status Flag register or distributors, build a flowing structure that some beats are arranged thus, last real-time (promptly exporting) the medium filtering data output of realization behind total delay umber of beats by the image pixel clock frequency.
Technical scheme of the present invention is that the method for searching pixel median is characterized in that, may further comprise the steps:
A. the size that compares interior fi of neighborhood and fj, if fi<fj, then register fi_large_fj reset, register fi_small_fj set; If fi〉fj, then register fi_large_fj set, register fi_small_fj reset; If fi=fj, then register fi_large_fj and register fi_small_fj keep initial value " 0 " constant; Wherein:
Fi is the pixel value of pixel i; Fj is the pixel value of pixel j; I, j=1,2 ..., n; I ≠ j; N is a sum of all pixels in the described neighborhood;
B. to each pixel i, with the value addition of each register fi_large_fj value as register fi_num_left; That is: as if the value of representing register fi_large_fj with fi_large_fj, the value so that fi_num_left represents register fi_num_left then has:
fi_num_left=fi_large_f1+fi_large_f2+…+fi_large_fn;
With the value addition of each register fi_small_fj value as register fi_num_right; That is: as if the value of representing register fi_small_fj with fi_small_fj, represent the value of register fi_num_right then to have with fi_num_right:
fi_num_right=fi_small_f1+fi_small_f2+…+fi_small_fn;
C. the value of the value of comparand register fi_num_left and register fi_num_right and the size of digital m; If value≤m of register fi_num_left, value≤m of register fi_num_right, then the pixel value fi of pixel i is the pixel median of described neighborhood; Wherein: m=(n-1)/2.
Concrete, described pixel is the pixel of rest image or the single picture frame of moving image.
Concrete, described pixel value is the Y channel data of gray value, luminous value, brightness value or the yuv space of pixel.
Concrete, described neighborhood is for being the rectangular neighborhood of the p * q at center with pixel x, wherein p, q are the odd number more than or equal to 3.
Concrete, described neighborhood is for pixel x being the center, symmetrical cross, in-line or X-shaped neighborhood.
Embodiment
Fig. 1 is one 3 * 3 a picture element matrix, has 9 pixels, and its sequence number is respectively 1,2 ..., 9.The process of asking for pixel median in this neighborhood is as follows:
1) size of the pixel value fi of certain pixel i and the pixel value of other all pixels relatively draws the value (fi_large_fj and fi_small_fj) of the status register of correspondence.Each pixel be to should there being two size state comparand registers, and asking for to walk abreast and finishing of they all can draw by a clock delay of clapping.
For example:
If f1 is less than f2, then register f1_large_f2 reset, register f1_small_f2 set; If f1 is less than f3, then register f1_large_f3 reset, register f1_small_f3 set
If f5 is less than f1, then register f5_large_f1 reset, register f5_small_f1 set
If f5 is less than f2, then register f5_large_f2 reset, register f5_small_f2 set
…;
If f9 is less than f1, then register f9_large_f1 reset, register f9_small_f1 set
If f9 is less than f2, then register f9_large_f2 reset, register f9_small_f2 set ...
If the pixel value of two pixels equates that then the value of two of its correspondence status registers (fi_large_fj and fi_small_fj) keeps initial value " 0 " constant.
2) the value addition of each status register that will obtain above obtains the value (fi_num_left and fi_num_right) of sequence state register, as:
f1_num_left=f1_large_f2+f1_large_f3+…+f1_large_f9;
f1_num_right=f1_small_f2+f1_small_f3+…+f1_small_f9;
…。
3), can obtain pixel median in this neighborhood with the comparative result of digital m according to the value of above-mentioned sequence state register; If fi_num_left and fi_num_right all are less than or equal to m, then the pixel value fi of pixel i is the pixel median of this neighborhood; Here m=(9-1)/2=4.
For example:
If f1_num_left is less than or equal to 4, f1_num_right is less than or equal to 4, and then the pixel value f1 of pixel 1 is the pixel median of this neighborhood.
Owing between the pixel value in the neighborhood equal situation is arranged, so more than one of qualified median possibility of finding out, but so long as meet the pixel of " fi_num_left≤4; fi_num_right≤4 " this condition, their value must equate, so optional value as pixel 5 just can have been finished the processing of medium filtering.
4) repeat above-mentioned steps, all pixels in the intact picture element matrix of scan process.
Fig. 2 shows several neighborhood schematic diagrames.Different with above-mentioned text description is, if select one 5 * 5 cross but not rectangular neighborhood carries out the searching of median, corresponding neighborhood of pixels center pixel also is pixel 5 (filled circles among Fig. 2), and the value of digital m still is 4.Equally, also can select 5 * 5 and bigger rectangle or the neighborhood of other shape carry out medium filtering.If 5 * 5 rectangular neighborhood, then center pixel is pixel 13 (filled circles among Fig. 2), and the value of digital m is (25-1)/2=12.
Described above only is execution mode commonly used more of the present invention.All those skilled in the art under the prerequisite that does not depart from above-mentioned disclosed basic conception and step, can carry out some suitable adjustment and change, improvement or combination fully after having read above explanation.So protection range of the present invention is only limited by its claims, and is not subjected to the restriction of embodiment herein.

Claims (5)

1. seek the method for pixel median, it is characterized in that, may further comprise the steps:
A. the size that compares interior fi of neighborhood and fj, if fi<fj, then register fi_large_fj reset, register fi_small_fj set; If fi〉fj, then register fi_large_fj set, register fi_small_fj reset; If fi=fj, then register fi_large_fj and register fi_small_fj keep initial value " 0 " constant; Wherein:
Fi is the pixel value of pixel i; Fj is the pixel value of pixel j; I, j=1,2 ..., n; I ≠ j; N is a sum of all pixels in the described neighborhood;
B. to each pixel i, with the value addition of each register fi_large_fj value as register fi_num_left;
With the value addition of each register fi_small_fj value as register fi_num_right;
C. the value of the value of comparand register fi_num_left and register fi_num_right and the size of digital m; If value≤m of register fi_num_left, value≤m of register fi_num_right, then the pixel value fi of pixel i is the pixel median of described neighborhood; Wherein: m=(n-1)/2.
2. the method for searching pixel median according to claim 1 is characterized in that, described pixel is the pixel of rest image or the single picture frame of moving image.
3. the method for searching pixel median according to claim 1 is characterized in that, described pixel value is the Y channel data of gray value, luminous value, brightness value or the yuv space of pixel.
4. the method for searching pixel median according to claim 1 is characterized in that, described neighborhood is for being the rectangular neighborhood of the p * q at center with pixel x, and wherein: p, q are the odd number more than or equal to 3.
5. the method for searching pixel median according to claim 1 is characterized in that, described neighborhood is for being the center with pixel x, symmetrical cross, in-line or X-shaped neighborhood.
CNB2007102031875A 2007-12-18 2007-12-18 Method of searching mid value of pixel Expired - Fee Related CN100481880C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007102031875A CN100481880C (en) 2007-12-18 2007-12-18 Method of searching mid value of pixel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007102031875A CN100481880C (en) 2007-12-18 2007-12-18 Method of searching mid value of pixel

Publications (2)

Publication Number Publication Date
CN101184158A CN101184158A (en) 2008-05-21
CN100481880C true CN100481880C (en) 2009-04-22

Family

ID=39449221

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007102031875A Expired - Fee Related CN100481880C (en) 2007-12-18 2007-12-18 Method of searching mid value of pixel

Country Status (1)

Country Link
CN (1) CN100481880C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488990B (en) * 2013-09-29 2016-05-18 武汉虹识技术有限公司 A kind of cross neighborhood method is extracted method and the device of eyelashes image and location pupil
CN103793873B (en) * 2014-01-26 2017-06-13 大唐移动通信设备有限公司 The acquisition methods and device of image pixel intermediate value
CN110660029B (en) * 2019-09-12 2022-05-06 深兰科技(上海)有限公司 Image processing method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1893551A (en) * 2005-06-28 2007-01-10 Lg.菲利浦Lcd株式会社 Method of median filtering and device thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1893551A (en) * 2005-06-28 2007-01-10 Lg.菲利浦Lcd株式会社 Method of median filtering and device thereof

Also Published As

Publication number Publication date
CN101184158A (en) 2008-05-21

Similar Documents

Publication Publication Date Title
Wang et al. Deep parametric continuous convolutional neural networks
KR101639852B1 (en) Pixel value compaction for graphics processing
US6101276A (en) Method and apparatus for performing two pass quality video compression through pipelining and buffer management
US5995080A (en) Method and apparatus for interleaving and de-interleaving YUV pixel data
JP2523222B2 (en) Image reduction / enlargement method and apparatus
JP6740141B2 (en) Data transfer method, data transfer module, associated display panel and driving method thereof, and associated display device
CN101715047A (en) Apparatus and method for ultra-high resolution video processing
US10581645B1 (en) Dual-rail transceiver with improved signal-to-noise ratio for differential high-speed links
CN100481880C (en) Method of searching mid value of pixel
CN109885407A (en) Data processing method and device, electronic equipment, storage medium
CN103312941B (en) Joint Video denoising based on convex optimum theory and super-resolution method and system
CN1877639A (en) Method for showing animation effect
Cadenas et al. Parallel pipelined array architectures for real-time histogram computation in consumer devices
DE102013203600A1 (en) Image processing apparatus and image processing method
CN105160622B (en) The implementation method of image super-resolution based on FPGA
DE102020108526A1 (en) ADAPTIVE PIXEL SCAN ORDER FOR DENSE RENDERING
CN102982509B (en) Image processing circuit
US7756363B2 (en) System and method for image processing
Johnston et al. Optimisation of a colour segmentation and tracking algorithm for real-time FPGA implementation
CN101399978A (en) Reference frame data reading method in hardware decoder and apparatus thereof
CN106204469A (en) A kind of low-light (level) image real time enhancing method
CN109672841A (en) A kind of low cost de-interlace processing method
Bailey History and evolution of single pass connected component analysis
Zhang et al. Cross-CBAM: A Lightweight network for Scene Segmentation
Shen et al. A 64 cycles/mb, luma-chroma parallelized h. 264/avc deblocking filter for 4 k< cd0215f. gif> 2 k applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090422

Termination date: 20211218

CF01 Termination of patent right due to non-payment of annual fee