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

Method of searching mid value of pixel Download PDF

Info

Publication number
CN101184158A
CN101184158A CNA2007102031875A CN200710203187A CN101184158A CN 101184158 A CN101184158 A CN 101184158A CN A2007102031875 A CNA2007102031875 A CN A2007102031875A CN 200710203187 A CN200710203187 A CN 200710203187A CN 101184158 A CN101184158 A CN 101184158A
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.)
Granted
Application number
CNA2007102031875A
Other languages
Chinese (zh)
Other versions
CN100481880C (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

Landscapes

  • Image Processing (AREA)
  • Picture Signal Circuits (AREA)

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. 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 ", does not have the iteration or the circulation of data, the output of previous step is the input of next procedure, so can adopt the method for designing of streamline to improve the operating frequency of system.
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. 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), must 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. 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 true CN101184158A (en) 2008-05-21
CN100481880C 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488990A (en) * 2013-09-29 2014-01-01 武汉虹识技术有限公司 Method and device for extracting eyelash image and locating pupil through cross neighborhood method
CN103793873A (en) * 2014-01-26 2014-05-14 大唐移动通信设备有限公司 Obtaining method and device for image pixel mid value
CN110660029A (en) * 2019-09-12 2020-01-07 深兰科技(上海)有限公司 Image processing method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4420294B2 (en) * 2005-06-28 2010-02-24 エルジー ディスプレイ カンパニー リミテッド Midian filtering method and apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488990A (en) * 2013-09-29 2014-01-01 武汉虹识技术有限公司 Method and device for extracting eyelash image and locating pupil through cross neighborhood method
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
CN103793873A (en) * 2014-01-26 2014-05-14 大唐移动通信设备有限公司 Obtaining method and device for image pixel mid value
CN110660029A (en) * 2019-09-12 2020-01-07 深兰科技(上海)有限公司 Image processing method, device, equipment and storage medium
CN110660029B (en) * 2019-09-12 2022-05-06 深兰科技(上海)有限公司 Image processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN100481880C (en) 2009-04-22

Similar Documents

Publication Publication Date Title
Wang et al. Deep parametric continuous convolutional neural networks
US6026217A (en) Method and apparatus for eliminating the transpose buffer during a decomposed forward or inverse 2-dimensional discrete cosine transform through operand decomposition storage and retrieval
US10581645B1 (en) Dual-rail transceiver with improved signal-to-noise ratio for differential high-speed links
US9984432B2 (en) Processor, system, and method for efficient, high-throughput processing of two-dimensional, interrelated data sets
CN101715047A (en) Apparatus and method for ultra-high resolution video processing
JPH03231383A (en) Image reduction/expansion method and apparatus
CN104685538A (en) Systems and methods for reducing noise in video streams
CN100481880C (en) Method of searching mid value of pixel
Huang et al. A novel interpolation chip for real-time multimedia applications
DE102020108526A1 (en) ADAPTIVE PIXEL SCAN ORDER FOR DENSE RENDERING
CN103312941B (en) Joint Video denoising based on convex optimum theory and super-resolution method and system
CN105072353A (en) Image decoding mosaic control algorism based on multiple GPUs
DE102013203600A1 (en) Image processing apparatus and image processing method
CN105160622B (en) The implementation method of image super-resolution based on FPGA
Zhang et al. Cross-cbam: A lightweight network for scene segmentation
Zhang et al. A hardware-oriented histogram of oriented gradients algorithm and its VLSI implementation
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
CN109672841A (en) A kind of low cost de-interlace processing method
Bailey History and evolution of single pass connected component analysis
Shen et al. A 64 cycles/mb, luma-chroma parallelized h. 264/avc deblocking filter for 4 k< cd0215f. gif> 2 k applications
CN112017112B (en) Image processing method, device and system and computer readable storage medium
CN113222831B (en) Feature memory forgetting unit, network and system for removing image stripe noise
Davalle et al. Hardware accelerator for fast image/video thinning
Hambrusch et al. Parallel algorithms for gray-scale image component labeling on a mesh-connected computer

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090422

Termination date: 20211218