Summary of the invention
It is a primary object of the present invention in view of the deficiencies of the prior art, provide contour extraction of objects in a kind of complex environment
Method.
To achieve the above object, the invention adopts the following technical scheme:
A kind of contour extraction of objects method in complex scene comprising the steps of:
S1. Gabor filtering is carried out to original image;
S2. maximum Gabor energy diagram and optimal direction figure are sought according to step S1 filter result;
S3. it according to maximum Gabor energy diagram and optimal direction figure in step S2, calculates non-classical receptive field lateral areas and inhibits
Amount;
S4. it according to maximum Gabor energy diagram and optimal direction figure in step S2, calculates non-classical receptive field petiolarea and easily changes
Amount;
S5. it according to maximum Gabor energy diagram and optimal direction figure in step S2, calculates non-classical receptive field petiolarea and inhibits
Amount;
S6. according to maximum Gabor energy diagram, optimal direction figure and the middle pleural area step S3 amount of suppression in step S2, end is calculated
Qu Yihua/inhibition weight;
S7. according to step S2~S6 acquired results, the inhibition of application lateral areas is calculated, petiolarea is easily changed, after petiolarea inhibition three
Contour images;
S8. binary conversion treatment is carried out to gained image in step S7, obtains final profile and extracts result.
Further:
In step S1, the Gabor filter of one group of different directions is constructed, and with this group of filter process original image, place
Reason mode is the convolution of filter and original image, thus obtains the testing result of one group of different directions.
In step S2, the detection maximum value of each position pixel in different directions is chosen, each position maximum value is corresponding
Direction be optimal direction, thus obtain maximum Gabor energy diagram and optimal direction figure.
In step S3, total amount of suppression from two lateral areas is that the sum of two lateral areas amount of suppression subtract the absolute of the difference between the two
Value.
In step S3, non-classical receptive field annular region is defined with the non-negative Gauss difference function of two dimension, two sides area is located at center
On the vertical line in classical receptive field direction, two lateral areas amount of suppression are the convolution of lateral areas filtering core and maximum Gabor energy diagram, wherein side
Area's filtering core is the non-negative Gauss difference function of definition in this region.
In step S4, total petiolarea easily change amount is the evolution of the two petiolareas easily product of change amount.
In step S4, the Yi Hualiang of a certain position is that the position filtering core easily changes intensity vector and image pair in each petiolarea
The dot product of position gray value vectors is answered, the Yi Hualiang of each petiolarea is the sum of all position Yi Hualiang in the petiolarea.
In step S5, total petiolarea amount of suppression is the sum of two petiolarea amount of suppression.
In step S6, comprehensively considers large scale Gabor ceiling capacity figure and small scale lateral areas amount of suppression carrys out automatic adjusument
Petiolarea easily changes or the intensity of depression effect, determines that calculating petiolarea easily changes/inhibit weight, wherein large scale is defined as the pre- of small scale
Determine multiple.
In step S8, the binary conversion treatment includes two processing steps of non-maximum restraining and hysteresis threshold method.
Beneficial effects of the present invention:
The present invention realizes in view of the shortcomings of the prior art, propose a kind of contour extraction method of view-based access control model system performance
The extraction of objective contour, adaptable to complex scene in complex scene.Its remarkable advantage is embodied in: 1) provide it is a set of more
Effective easyization model, and apply to non-classical receptive field petiolarea;2) easyization is considered simultaneously in non-classical receptive field petiolarea
And depression effect enhances weaker profile, to detect more efficiency frontiers while realizing wiping out background interference.This hair
Bright two requirements that can preferably meet complex scene contours extract, i.e., reservation effective contour as much as possible and wiping out background
Interference.
Specific embodiment
It elaborates below to embodiments of the present invention.It is emphasized that following the description is only exemplary,
The range and its application being not intended to be limiting of the invention.
Refering to fig. 1, in one embodiment, a kind of contour extraction of objects method in complex scene comprising the steps of:
S1. Gabor filtering is carried out to original image;
S2. maximum Gabor energy diagram and optimal direction figure are sought according to step S1 filter result;
S3. it according to maximum Gabor energy diagram and optimal direction figure in step S2, calculates non-classical receptive field lateral areas and inhibits
Amount;
S4. it according to maximum Gabor energy diagram and optimal direction figure in step S2, calculates non-classical receptive field petiolarea and easily changes
Amount;
S5. it according to maximum Gabor energy diagram and optimal direction figure in step S2, calculates non-classical receptive field petiolarea and inhibits
Amount;
S6. according to maximum Gabor energy diagram, optimal direction figure and the middle pleural area step S3 amount of suppression in step S2, end is calculated
Qu Yihua/inhibition weight;
S7. according to step S2~S6 acquired results, the inhibition of application lateral areas is calculated, petiolarea is easily changed, after petiolarea inhibition three
Contour images;
S8. binary conversion treatment is carried out to gained image in step S7, obtains final profile and extracts result.
In a preferred embodiment, in step S1, the Gabor filter of one group of different directions is constructed, and filtered with the group
Device handles original image, and processing mode is the convolution of filter and original image, thus obtains the detection knot of one group of different directions
Fruit.
In a further embodiment, in step S2, it is maximum to choose the detection of each position pixel in different directions
Value, the corresponding direction of each position maximum value are optimal direction, thus obtain maximum Gabor energy diagram and optimal direction figure.
In a preferred embodiment, in step S3, total amount of suppression from two lateral areas is that the sum of two lateral areas amount of suppression subtract
Remove the absolute value of the difference between the two.
In a further embodiment, in step S3, non-classical receptive field annular is defined with the non-negative Gauss difference function of two dimension
Region, two sides area are located on the vertical line in center classics receptive field direction, and two lateral areas amount of suppression are lateral areas filtering core and maximum Gabor
The convolution of energy diagram, middle pleural area filtering core are the non-negative Gauss difference function of definition in this region.
In a preferred embodiment, in step S4, total petiolarea easily change amount is the evolution of the two petiolareas easily product of change amount.
In a preferred embodiment, in step S4, the Yi Hualiang of a certain position is that the position filtering core is easy in each petiolarea
Change the dot product of intensity vector and image corresponding position gray value vectors, the Yi Hualiang of each petiolarea is that all positions are easy in the petiolarea
The sum of change amount.
In a preferred embodiment, in step S5, total petiolarea amount of suppression is the sum of two petiolarea amount of suppression.
In a preferred embodiment, in step S6, comprehensively consider large scale Gabor ceiling capacity figure and the suppression of small scale lateral areas
Amount processed carrys out the intensity of adaptive adjustable side Qu Yihua or depression effect, determines that calculating petiolarea easily changes/inhibit weight, wherein large scale
It is defined as the prearranged multiple of small scale.
In a preferred embodiment, in step S8, the binary conversion treatment includes non-maximum restraining and hysteresis threshold method two
A processing step.
Method of the invention is further described below by way of more specific embodiment.
In certain embodiments, contour extraction of objects method may comprise steps of in the complex scene:
S1.Gabor filtering: round classical receptive field characteristic is simulated using Gabor filter.Construct one group of NθA not Tongfang
To Gabor filter obtain the testing result of one group of different directions and with this group of filter process original image.Filter
Scale (size) is controlled by parametric Gaussian standard deviation sigma, and filter direction θ, (x, y) indicates two of any in filter and image
Tie up coordinate.Processing mode is filter GσThe convolution of (x, y, θ) and original image I (x, y):
Eσ(x, y, θ)=I (x, y) * Gσ(x,y,θ)
S2. Gabor ceiling capacity figure and optimal direction figure: the N obtained in S1 are calculatedθA different directions testing result
In, the detection maximum value of each position (pixel) in different directions is chosen as final testing result, and each position is maximum
Being worth corresponding direction is optimal direction, thus obtains Gabor ceiling capacity figureWith optimal direction figure
S3. lateral areas amount of suppression is calculated: with the non-negative Gauss difference function W of two dimensionσ(x, y) defines non-classical receptive field annulus
Domain, two lateral areas L (x, y, θ) and R (x, y, θ) are located on the vertical line in center classics receptive field (Gabor filter) direction.Two lateral areas
Inhibition strength ILAnd IRFor the convolution of lateral areas filtering core and maximum Gabor energy diagram:
Its middle pleural area filtering core is the non-negative Gauss difference function of two dimension of definition in this region, by taking lateral areas L as an example, filtering core
It is expressed as L (x, y, θ) Wσ(x,y).Total inhibition strength ISFor the integration of two lateral areas inhibition strengths:
IS(x, y, θ)=IL(x,y,θ)+IR(x,y,θ)-|IL(x,y,θ)-IR(x,y,θ)|
S4. it calculates petiolarea Yi Hualiang: two petiolarea T (x, y, θ) and B (x, y, θ) and is located at (the Gabor filter of center classics receptive field
Wave device) on the extended line of direction.Center is located at the non-classical receptive field petiolarea filtering core K (x, y, θ) of point z (x, y) are as follows:
Wherein, σθFor constant, easily change the easyization intensity of each point in filtering core for controlling petiolarea,
M and n is offset coordinates of the point z ' relative to center z in petiolarea, i.e., z ' coordinate is (x+m, y+n), this correspondence image gray scale
Value detection optimal direction is β.
Petiolarea easily change amount FT(x, y, θ) and FB(x, y, θ) is each petiolarea point to the sum of center facilitory effect, wherein filtering
Core easily changes intensity vector:Gray value of image vector:
Two petiolareas always easily change amount be both integration:
S5. calculate petiolarea amount of suppression: similar with lateral areas inhibition, petiolarea inhibits ITAnd IBBe defined as filtering core with most
The convolution of big Gabor energy diagram:
The total amount of suppression of two petiolareas are as follows:
IE(x, y, θ)=IT(x,y,θ)+IB(x,y,θ)
S6. calculate petiolarea easily change/inhibit weight: comprehensively consider more large scale σcUnder Gabor ceiling capacity figure and small ruler
The lateral areas amount of suppression spent under σ carrys out the intensity of adaptive adjustable side Qu Yihua or depression effect.For a bit in image, Gabor energy
Amount intensity is bigger, and lateral areas amount of suppression is smaller, then petiolarea facilitory effect is stronger, and depression effect is weaker;Conversely, Gabor energy intensity
Smaller, lateral areas amount of suppression is bigger, then petiolarea facilitory effect is weaker, and depression effect is stronger.Petiolarea easily changes WFWith inhibition weight WIIt calculates
It is as follows:
WF(x, y)=1+Wc(x,y,σc)-Wf(x,y,σ),WI(x, y)=2-WF(x,y)
F (t)=1/ (1+exp (- a (t- τ)))
Wherein, | | | |1Indicate L1 norm, a and τ are constant.The part is state of the art, referring specifically to text
It offers: Zeng C, Li Y, Li C.Center-surround interaction with adaptive inhibition:a
computational model for contour detection.NeuroImage.2011;55 (1): 49-66, herein not
It is described in detail.
S7. calculate the contour images after applying easyization and depression effect: comprehensive lateral areas depression effect and petiolarea are easily changed and are pressed down
Effect processed, the contour images after applying two kinds of non-classical receptive field characteristics are as follows:
Wherein, []+Indicate halfwave rectifier operator.α1, α2And α3For constant, the influence of petiolarea and lateral areas to center is controlled
Intensity.
Binary conversion treatment: being first normalized contour images in S7, then carries out standard binary conversion treatment, including non-
Greatly inhibit and two basic steps of hysteresis threshold method.
Example:
Using practical natural image as original image, original image and profile true value figure derive from RuG database, image size
For 512*512 pixel.Using following processing step:
S1.Gabor filtering: the Gabor filter of one group of totally 12 different directions of construction, this group of filter criteria difference σ=
2.4, filter totally 12 directions are uniformly distributed, as 0,1/12 π, 1/6 π ... ..., 11/12 π, wherein erecting within the scope of 180 °
Histogram is to for 0 ° of direction.This group of filter diameter is 25 pixels.Respectively with this 12 filter process original images, 12 are obtained
Processing result under direction.In the testing result in 12 directions, coordinate is that (origin is located at picture to (200,140) corresponding position
The upper left corner) gray value successively are as follows: 0.0028,0.0043,0.0036,0.0047,0.0031,0.0026,0.0007,
0.0027、0.0091、0.0155、0.0074、0.0018。
S2. Gabor ceiling capacity figure and optimal direction figure are calculated: being chosen in figure at each 12 directions of position (pixel)
Processing result of the maximum value of result as the position is managed, and selecting the corresponding direction of the maximum value is optimal direction.Then for
Coordinate is the position of (200,140), and maximum gradation value 0.0155, optimal direction is 3 π/4.Position each in figure is carried out
The operation then obtains Gabor ceiling capacity figure and optimal direction figure.
S3. it calculates lateral areas amount of suppression: for position a certain in figure, defining circular ring shape non-classical receptive field region.The region
Internal diameter is identical as Gabor filter, and outer diameter is its 4 times.Annular region middle pleural area position, lateral areas are determined according to its optimal direction
On the vertical line of the optimal direction, lateral areas subtended angle is 2 π/3.It is the position of (200,140), two lateral areas line sides for coordinate
To for π/4.The position lateral areas amount of suppression is 0.0037.
S4. it calculates petiolarea Yi Hualiang: determining annular region middle-end zone position, petiolarea also according to a certain position optimal direction
On optimal direction extended line, petiolarea subtended angle is π/3.It is the position of (200,140) for coordinate, two lateral areas line directions are
3π/4.Set σθ=π/6, then the position petiolarea Yi Hualiang calculated result is 0.0079.
S5. calculate petiolarea amount of suppression: similar with the calculating of lateral areas amount of suppression, coordinate is (200,140) position petiolarea amount of suppression
Calculated result is 0.0033.
S6. calculate petiolarea easily change/inhibit weight: comprehensively consider large scale Gabor ceiling capacity figure and small scale lateral areas suppression
Amount processed carrys out the intensity of adaptive adjustable side Qu Yihua or depression effect.Wherein large scale σcIt is defined as 5 times of small scale σ.Parameter alpha
=40, τ=0.25.Coordinate is that the petiolarea of (200,140) position is easily changed and weight calculation result is inhibited to be respectively as follows: 0.9994 He
1.0006。
S7. the contour images after applying easyization and depression effect: parameter definition are as follows: α are calculated1=2;α2=α3=1, then
(200,140) the profile calculated result of position is 0.0127.
S8. binary conversion treatment: the gray value of (200,140) position is 0.0489 after normalization.Non- very big suppression is utilized later
System and hysteresis threshold method carry out binary conversion treatment to S7 result.
Can be seen that the present invention from the processing result in Fig. 3 can preferably meet two of complex scene contours extract
It is required that reservation effective contour that is, as much as possible and wiping out background interference.To now there are three types of implementation method and methods of the invention
Quantitative assessment is carried out, this field is existing, and (parameter then shows that effect is got over closer to 1 there are three types of method final result evaluation index P
It is good) it is respectively as follows: 0.53 (result c), 0.40 (result d), 0.55 (the result e) in Fig. 3, present implementation in Fig. 3 in Fig. 3
Final result (result f) the evaluation index P in Fig. 3 is 0.62, relative to three kinds of existing methods, has been respectively increased 17%, 55%,
13%.
The above content is combine it is specific/further detailed description of the invention for preferred embodiment, cannot recognize
Fixed specific implementation of the invention is only limited to these instructions.For those of ordinary skill in the art to which the present invention belongs,
Without departing from the inventive concept of the premise, some replacements or modifications can also be made to the embodiment that these have been described,
And these substitutions or variant all shall be regarded as belonging to protection scope of the present invention.