CN105389580B - Image rectangular neighborhood based on constant time complexity is very big or minimum value calculating method - Google Patents

Image rectangular neighborhood based on constant time complexity is very big or minimum value calculating method Download PDF

Info

Publication number
CN105389580B
CN105389580B CN201510662958.1A CN201510662958A CN105389580B CN 105389580 B CN105389580 B CN 105389580B CN 201510662958 A CN201510662958 A CN 201510662958A CN 105389580 B CN105389580 B CN 105389580B
Authority
CN
China
Prior art keywords
histogram
rectangular neighborhood
image
multilayer
value
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.)
Active
Application number
CN201510662958.1A
Other languages
Chinese (zh)
Other versions
CN105389580A (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.)
Wenzhou University
Original Assignee
Wenzhou University
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 Wenzhou University filed Critical Wenzhou University
Priority to CN201510662958.1A priority Critical patent/CN105389580B/en
Publication of CN105389580A publication Critical patent/CN105389580A/en
Application granted granted Critical
Publication of CN105389580B publication Critical patent/CN105389580B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • G06V10/507Summing image-intensity values; Histogram projection analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/758Involving statistics of pixels or of feature values, e.g. histogram matching

Abstract

The invention provides a kind of image rectangular neighborhood based on constant time complexity greatly (minimum) value calculating method.This method can briefly be summarised as following four step:User gives a width gray level image and is used as input picture;One three-dimensional multilayer histogram is constructed according to input picture;The histogrammic image rectangular neighborhood for calculating each layer in multilayer histogram respectively is summed, and obtains the multilayer histogram of a rectangular neighborhood summation;Rectangular neighborhood summing value according to corresponding to the multilayer histogram calculation that rectangular neighborhood is summed goes out the pixel of each in input picture is more than the level number of 0 maximum (minimum) layer, is image rectangular neighborhood greatly (minimum) value of required input picture.This method solves image rectangular neighborhood greatly (minimum) value using three-dimensional multilayer histogram and its local correlations, makes the calculating of image rectangular neighborhood greatly (minimum) value and has constant time complexity.

Description

Image rectangular neighborhood based on constant time complexity is very big or minimum value calculating method
Technical field
The present invention relates to a kind of image rectangular neighborhood greatly (minimum) value calculating method, constant time is based especially on complicated The image rectangular neighborhood of degree greatly (minimum) value calculating method.
Background technology
The calculating of image rectangular neighborhood greatly (minimum) value, refers to seek each pixel in image by some specific algorithms Rectangular neighborhood in very big (minimum) value.Image rectangular neighborhood greatly (minimum) value, which is calculated, to have a very wide range of applications.Example Such as, it is accomplished by asking the maximum and minimum of image rectangular neighborhood when adjusting picture contrast.In area of pattern recognition, often need It is required that feature extreme value in image in the rectangular neighborhood of each pixel instructs target detection or classification.Therefore image rectangle is adjacent Domain greatly (minimum) value, which is calculated, important practical significance.
However, the method for traditional solution image rectangular neighborhood greatly (minimum) value, directly to all in rectangular neighborhood Pixel value carries out greatly (minimum) and compared, and handles the time complexity of each pixel extreme value and does not reach constant time complexity, But increase with the increase of rectangular neighborhood.When rectangular neighborhood than it is larger when, conventional method can consume more processing Time, which limits its application in some algorithms.Therefore, the present invention proposes a kind of based on constant time complexity Image rectangular neighborhood greatly (minimum) value calculating method.
The content of the invention
The purpose of the present invention:The present invention proposes a kind of image rectangular neighborhood based on constant time complexity greatly (pole It is small) value calculating method.This method seeks image rectangular neighborhood greatly (minimum) value using three-dimensional multilayer histogram, improves calculation The time complexity of method.
The present invention devises a kind of image rectangular neighborhood based on constant time complexity greatly (minimum) value calculating method. This method includes following four step:
(1) gray level image of width two dimension is given as input picture I, and its width is denoted as w and h picture respectively with height Pixel is denoted as (x, y) in element, I, then x ∈ { 0,1,2 ..., w-1 }, y ∈ { 0,1,2 ..., h-1 }.The pixel value of (x, y) is denoted as I (x, y), for the gray level image represented by 8 bits, be up to 28=256 gray values, therefore I (x, y) ∈ 0, 1,2,...,255}.The two-dimensional rectangle that a given size is (2r+1) × (2r+1) is used as the rectangular neighborhood Ω of pixel (x, y) (x, y) (wherein r is natural number).
(2) a three-dimensional multilayer histogram V is constructed according to input picture I in step (1).The V numbers of plies are equal to I value model Enclose, i.e., 256 layers, every layer of histogram width and height, i.e., respectively w and h identical with I.Level number in V is represented with z, then z ∈ 0, 1,2 ..., 255 }, z layers of histogram are denoted as Vz.The all pixels of input picture are traveled through, first to value all in V according to public affairs Formula Vz(x, y)=0 is initialized, then according to formula VI(x,y)(x, y)=1 pair V is configured.That is, for pixel (x, y), if pixel value I (x, y) and z layers of histogram VzLevel number it is unequal, then Vz(x, y)=0, conversely, being then set to Vz (x, y)=1.The building method only needs to constant time complexity can construction complete.
(3) the three-dimensional multilayer histogram V constructed in rectangular neighborhood Ω (x, y) in step (1) and step (2), The histogrammic image rectangular neighborhood for calculating each layer in V respectively using the integration nomography based on constant time complexity is asked With the multilayer histogram V' of one rectangular neighborhood summation of acquisition.
For z layers of histogram Vz, first to VzSeek the preamble of each row and be denoted as Sz.Initial value S is setz(x, -1)= 0, V is traveled through from small to largezIn per a line, according to equation below iterative calculation to VzThe preamble of each row and:
Sz(x, y)=Sz(x,y-1)+Vz(x,y)
Then, S is utilizedzIt is used as intermediate result construction histogram VzIntegrogram Az.Similarly, initial value A is setz(-1, Y)=0, S is traveled through from small to largezIn each row, according to equation below iterative calculation to SzPer a line preamble and:
Az(x, y)=Az(x-1,y)+Sz(x,y)
Next, for z layers of histogram Vz, corresponding rectangular neighborhood summation can be efficiently calculated according to equation below Histogram Vz':
Vz'=Az(x-r,y-r)+Az(x+r,y+r)-Az(x-r,y+r)-Az(x+r,y-r)
Integrogram method is to seek image by a kind of the quick of Paul Viola et al. constant time complexities proposed earliest The method of rectangular neighborhood sum.The time complexity of this method is only relevant with image size w, h and gradation of image scope, and and rectangle Neighborhood Ω (x, y) size is unrelated, i.e., the size with r is unrelated.Referring specifically to document P.Viola and M.Jones, " Rapid object detection using a boosted cascade of simple features,"in Proceedings of the 2001 IEEE Computer Society Conference on Computer Vision and Pattern Recognition(CVPR 2001),vol.1,pp.I-511-I-518,2001。
(4) the multilayer histogram V' of the rectangular neighborhood summation in step (3), is gone out based on constant time complicated dynamic behaviour Rectangular neighborhood summing value corresponding to the pixel of each in input picture is more than the level number of 0 maximum (minimum) layer, is required Input picture image rectangular neighborhood greatly (minimum) value.For each pixel (x, y), rectangular neighborhood is traveled through from big to small and is asked The multilayer histogram V' of sum each layer (even z is begun stepping through to 0 from 255), first meets V'z(x, y) > 0 level number z The image rectangular neighborhood maximum of as required input picture.Similarly, for each pixel (x, y), travel through from small to large The multilayer histogram V' of rectangular neighborhood summation each layer (even z is begun stepping through to 255 from 0), first meets V'z(x,y) > 0 level number z is the image rectangular neighborhood minimum of required input picture.The step computational methods at most only need to 256 The secondary rectangular neighborhood that can be found corresponding to some pixel greatly (minimum) value, therefore only need to constant time complexity and can count Calculate and complete, and it is unrelated with rectangular neighborhood Ω (x, y) size, i.e., and the size with r is unrelated.
So far we have just calculated very big (minimum) value of input picture rectangular neighborhood.
Traditional method for seeking image rectangular neighborhood greatly (minimum) value, handles the time complexity of each pixel extreme value simultaneously Do not reach constant time complexity, but increase with the increase of rectangular neighborhood size.Compared to conventional method, the present invention is related to And the greatly beneficial effect of (minimum) value calculating method of the image rectangular neighborhood based on constant time complexity be:Three-dimensional Multilayer histogram and its effective of spatial coherence use the operation time for causing to solve image rectangular neighborhood greatly (minimum) value It will not increase with the increase of r values in image rectangular neighborhood Ω (x, y) size (2r+1) × (2r+1).It is given for a width Gray level image, no matter image rectangular neighborhood is much, solves image rectangular neighborhood greatly (minimum) value of the width gray level image Time complexity remains constant, and then effectively improves processing speed.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of embodiment.
Specific implementation method
Below by embodiment combination schematic flow sheet, the present invention is further elaborated.
Below in conjunction with the accompanying drawings to the present invention:Image rectangular neighborhood based on constant time complexity greatly (minimum) value is calculated Method is described in detail;The present embodiment is premised on technical solution of the present invention, to be implemented, and combines detailed reality Mode and process are applied, but protection scope of the present invention is not limited to following embodiments.
As shown in figure 1, the image rectangular neighborhood based on constant time complexity described by the present embodiment is greatly (minimum) Value calculating method can be divided into following four step:
(1) gray level image of width two dimension is given as input picture I, and its width is denoted as w and h picture respectively with height Pixel is denoted as (x, y) in element, I, then x ∈ { 0,1,2 ..., w-1 }, y ∈ { 0,1,2 ..., h-1 }.The pixel value of (x, y) is denoted as I (x, y), for the gray level image represented by 8 bits, be up to 28=256 gray values, therefore I (x, y) ∈ 0, 1,2,...,255}.The two-dimensional rectangle that a given size is (2r+1) × (2r+1) is used as the rectangular neighborhood Ω of pixel (x, y) (x, y) (wherein r is natural number).
(2) a three-dimensional multilayer histogram V is constructed according to input picture I in step (1).The V numbers of plies are equal to I value model Enclose, i.e., 256 layers, every layer of histogram width and height, i.e., respectively w and h identical with I.Level number in V is represented with z, then z ∈ 0, 1,2 ..., 255 }, z layers of histogram are denoted as Vz.The all pixels of input picture are traveled through, first to value all in V according to public affairs Formula Vz(x, y)=0 is initialized, then according to formula VI(x,y)(x, y)=1 pair V is configured.That is, for pixel (x, y), if pixel value I (x, y) and z layers of histogram VzLevel number it is unequal, then Vz(x, y)=0, conversely, being then set to Vz (x, y)=1.
(3) the three-dimensional multilayer histogram V constructed in rectangular neighborhood Ω (x, y) in step (1) and step (2), The histogrammic image rectangular neighborhood for calculating each layer in V respectively using the integration nomography based on constant time complexity is asked With the multilayer histogram V' of one rectangular neighborhood summation of acquisition.
For z layers of histogram Vz, first to VzSeek the preamble of each row and be denoted as Sz.Initial value S is setz(x, -1)= 0, V is traveled through from small to largezIn per a line, according to equation below iterative calculation to VzThe preamble of each row and:
Sz(x, y)=Sz(x,y-1)+Vz(x,y)
Then, S is utilizedzIt is used as intermediate result construction histogram VzIntegrogram Az.Similarly, initial value A is setz(-1, Y)=0, S is traveled through from small to largezIn each row, according to equation below iterative calculation to SzPer a line preamble and:
Az(x, y)=Az(x-1,y)+Sz(x,y)
Next, for z layers of histogram Vz, corresponding rectangular neighborhood summation can be efficiently calculated according to equation below Histogram Vz':
Vz'=Az(x-r,y-r)+Az(x+r,y+r)-Az(x-r,y+r)-Az(x+r,y-r)
(4) the multilayer histogram V' of the rectangular neighborhood summation in step (3), is gone out based on constant time complicated dynamic behaviour Rectangular neighborhood summing value corresponding to the pixel of each in input picture is more than the level number of 0 maximum (minimum) layer, is required Input picture image rectangular neighborhood greatly (minimum) value.For each pixel (x, y), rectangular neighborhood is traveled through from big to small and is asked The multilayer histogram V' of sum each layer (even z is begun stepping through to 0 from 255), first meets V'z(x, y) > 0 level number z The image rectangular neighborhood maximum of as required input picture.Similarly, for each pixel (x, y), travel through from small to large The multilayer histogram V' of rectangular neighborhood summation each layer (even z is begun stepping through to 255 from 0), first meets V'z(x,y) > 0 level number z is the image rectangular neighborhood minimum of required input picture.
So far we have just calculated very big (minimum) value of input picture rectangular neighborhood.

Claims (1)

1. a kind of image rectangular neighborhood based on constant time complexity is very big or minimum value calculating method, it is characterised in that:Explain State as following four step:
(1) gives a width gray level image as input picture, gives a two-dimensional rectangle as the rectangular neighborhood of each pixel;
(2) input pictures of the in step (1) constructs in a three-dimensional multilayer histogram, multilayer histogram each layer Histogram size is identical with input picture, and its number of plies is equal to the span of pixel value in input picture, according to input picture Each pixel value, 0 or 1 is set to by each pixel value in multilayer histogram;
(3) the multilayer histogram in rectangular neighborhoods and step (2) of the in step (1), using based on constant time complexity Integration nomography calculate respectively each layer in multilayer histogram histogrammic image rectangular neighborhood summation, obtain a rectangle The multilayer histogram of neighborhood summation;
(4) the multilayer histogram of rectangular neighborhood summations of the in step (3), input figure is found based on constant time complexity Rectangular neighborhood summing value as in corresponding to each pixel is more than 0 maximum or the level number of smallest tier, is required input The image rectangular neighborhood of image is greatly or minimum.
CN201510662958.1A 2015-10-10 2015-10-10 Image rectangular neighborhood based on constant time complexity is very big or minimum value calculating method Active CN105389580B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510662958.1A CN105389580B (en) 2015-10-10 2015-10-10 Image rectangular neighborhood based on constant time complexity is very big or minimum value calculating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510662958.1A CN105389580B (en) 2015-10-10 2015-10-10 Image rectangular neighborhood based on constant time complexity is very big or minimum value calculating method

Publications (2)

Publication Number Publication Date
CN105389580A CN105389580A (en) 2016-03-09
CN105389580B true CN105389580B (en) 2017-09-12

Family

ID=55421850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510662958.1A Active CN105389580B (en) 2015-10-10 2015-10-10 Image rectangular neighborhood based on constant time complexity is very big or minimum value calculating method

Country Status (1)

Country Link
CN (1) CN105389580B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105913384B (en) * 2016-03-21 2017-08-15 温州大学 Real-time Weighted median filtering method based on bilateral grid

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6463173B1 (en) * 1995-10-30 2002-10-08 Hewlett-Packard Company System and method for histogram-based image contrast enhancement
CN102005033A (en) * 2010-11-16 2011-04-06 中国科学院遥感应用研究所 Method for suppressing noise by image smoothing
CN103606137A (en) * 2013-11-13 2014-02-26 天津大学 Histogram equalization method for maintaining background and detail information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6463173B1 (en) * 1995-10-30 2002-10-08 Hewlett-Packard Company System and method for histogram-based image contrast enhancement
CN102005033A (en) * 2010-11-16 2011-04-06 中国科学院遥感应用研究所 Method for suppressing noise by image smoothing
CN103606137A (en) * 2013-11-13 2014-02-26 天津大学 Histogram equalization method for maintaining background and detail information

Also Published As

Publication number Publication date
CN105389580A (en) 2016-03-09

Similar Documents

Publication Publication Date Title
Tian et al. Image denoising using deep CNN with batch renormalization
Tian et al. Asymmetric CNN for image superresolution
US10803554B2 (en) Image processing method and device
Wang et al. AIPNet: Image-to-image single image dehazing with atmospheric illumination prior
WO2018082185A1 (en) Image processing method and device
JP2020514890A5 (en)
Li et al. Multi-scale single image dehazing using laplacian and gaussian pyramids
CN109964250A (en) For analyzing the method and system of the image in convolutional neural networks
Sun et al. Nir to rgb domain translation using asymmetric cycle generative adversarial networks
CN105469353B (en) The embedding grammar and device and extracting method and device of watermarking images
EP2863362B1 (en) Method and apparatus for scene segmentation from focal stack images
TWI689894B (en) Image segmentation method and apparatus
CN114004754B (en) Scene depth completion system and method based on deep learning
Grogan et al. L2 registration for colour transfer
CN114627034A (en) Image enhancement method, training method of image enhancement model and related equipment
Yap et al. A recursive soft-decision approach to blind image deconvolution
CN113034358A (en) Super-resolution image processing method and related device
Zhao et al. Restoration of motion blurred images based on rich edge region extraction using a gray-level co-occurrence matrix
Wang et al. No-reference stereoscopic image quality assessment using quaternion wavelet transform and heterogeneous ensemble learning
CN109003247B (en) Method for removing color image mixed noise
CN105389580B (en) Image rectangular neighborhood based on constant time complexity is very big or minimum value calculating method
Kumar et al. Dynamic stochastic resonance and image fusion based model for quality enhancement of dark and hazy images
CN114049491A (en) Fingerprint segmentation model training method, fingerprint segmentation device, fingerprint segmentation equipment and fingerprint segmentation medium
CN108550119B (en) Image denoising method combined with edge information
Dong et al. Shoot high-quality color images using dual-lens system with monochrome and color cameras

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant