CN109919228A - A kind of rapid detection method and device of target - Google Patents
A kind of rapid detection method and device of target Download PDFInfo
- Publication number
- CN109919228A CN109919228A CN201910174066.5A CN201910174066A CN109919228A CN 109919228 A CN109919228 A CN 109919228A CN 201910174066 A CN201910174066 A CN 201910174066A CN 109919228 A CN109919228 A CN 109919228A
- Authority
- CN
- China
- Prior art keywords
- character subset
- feature weight
- character
- subset
- detected
- 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
Links
Landscapes
- Image Analysis (AREA)
Abstract
The invention discloses a kind of rapid detection method of target, 1) method includes:, obtains image to be detected, and for the detection block size of image to be detected, and detection block size is not more than the size of image to be detected;2), the feature weight of the feature weight of character subset other character subsets corresponding with ratio is merged;3) integrated value of each character subset, is calculated;4), judge whether the integrated value for detecting the character subset in frame region is greater than setting threshold value;5), if so, according to detection block glide direction, will test frame and slide the first step-length, and return to step 3), completed until the target in image to be detected is detected;6), if it is not, according to detection block glide direction, will test frame and slide and the second step-length and return to step 3), completed until the target in image to be detected is detected.The invention discloses a kind of device for fast detecting of target.Using the embodiment of the present invention, computational complexity can be reduced.
Description
Technical field
The present invention relates to a kind of object detection method and devices, are more particularly to the rapid detection method and dress of a kind of target
It sets.
Background technique
Multi-target detection technology needs detect the position of multiple targets in the picture in picture, identify in vision-based detection
Field is widely used, and process generally includes following steps: 1, obtaining Harr feature by training, Harr is special under normal conditions
Sign includes: for calculating the sum feature of variance, sqsum feature;And tilted feature three classes characteristic value.2, complete graph is calculated
The integrogram of picture, by taking matrix integrates sum feature as an example, since sum is matrix integral, what is taken is mode cumulative step by step, because
This, a complete image integrogram computational complexity are as follows: H*W*2 sub-addition.3, detection window region is re-defined, the area size is solid
It is set to wide detec_w, high detec_h, is slided in complete image with certain step-length, then calculates whether detection zone meets
Harr characteristic value, judges whether the Harr feature in the region is greater than predefined thresholding, method are as follows: a. calculates detection using formula
Window variance yields, detec_nf=detec_w*detec_h*valsqsum-valsum*valsum calculate detection window variance yields,
Middle valsum is the integral for detecting each point in window region, and valsqsum is each integrated square in detection window region.b.
Since Harr feature includes nstages set, each set respectively includes ntrees [i] a subset, wherein i=0 ...
Nstage-1, total characteristic are harr_num.Using formula,
FeatureValue=SUM
(weight [0] * featureEvaluator [0] ... weight [n-1] * featureEvaluator [n-1]),
Calculate separately the characteristic value in each tree subset of ntrees [i] height concentration, wherein featureEvaluator is characterized
The integral of window, weight are weighted value, and the weight and featureEvaluator of different subsets are independently.Fig. 1 is this hair
The Computing Principle schematic diagram for the sum feature in Harr feature that bright embodiment provides, as shown in Figure 1, being said by taking Fig. 1 of the present invention as an example
Bright (n=3), wherein P [m] [0]~P [m] [3] respectively corresponds 4 integrogram endpoints of sum feature, and m=0 ... 2 is as a result as follows
It is shown,
FeatureValue [0]=P [0] [0]+P [0] [3]-P [0] [1]-P [0] [2];
FeatureValue [1]=P [1] [0]+P [1] [3]-P [1] [1]-P [1] [2];
FeatureValue [2]=P [2] [0]+P [2] [3]-P [2] [1]-P [2] [2];
If Wight [0]=3, Wight [1]=2, Wight [2]=- 1, then substitute into formula for above-mentioned parameter,
FeatureValue=SUM
(weight[0]*featureEvaluator[0],…weight[n-1]*featureEvaluator[n-1])
In, calculate the characteristic value in each tree subset.
C. judge whether the Harr feature in tree subset is greater than predefined thresholding, i.e. if again
(featureValue [node]/detec_nf > th_node [node]), the position screening that will be greater than thresholding are used for subsequent processing,
Wherein node=0 ... ntrees [i], and the th_node thresholding in each tree subset is independent.By upper description it is found that each inspection
Survey the computational complexity in window region are as follows: addition: 12 times;Multiplication: 3 times;Floating-point division: 1 time (featureValue [node]/
Detec_nf guarantees that precision is not lost excessively, uses floating-point operation during usually realizing).It 4, should if it is greater than thresholding record
The position of region in the picture.The each detection zone for finally traversing image, calculates the region to all records, is believed by position
Breath is screened, and active position is filtered out.Always in conclusion since sliding detects the processing of window, the present embodiment kind sliding step
It is 1, then total detection window computational complexity are as follows: characteristic * pixel number * (12 multiplication+1 time of sub-addition+3 times floating-point division).Its
Middle pixel number is H*W.
Inventors have found that there are the higher technical problems of computational complexity for the prior art.
Summary of the invention
Technical problem to be solved by the present invention lies in the rapid detection method and device of a kind of target is provided, to solve
The higher technical problem of computational complexity existing in the prior art.
The present invention is to solve above-mentioned technical problem by the following technical programs:
The embodiment of the invention provides a kind of rapid detection methods of target, which comprises
1) image to be detected, is obtained, and for the detection block size of described image to be detected, and the detection block size
No more than the size of image to be detected;
2) it, is directed to each character subset, according to the feature weight of the character subset and other spies in addition to itself
The ratio between subset feature weight is levied, by the feature weight of the character subset other character subsets corresponding with the ratio
Feature weight merge, and by the feature of the feature weight of the character subset other character subsets corresponding with the ratio power
It is updated to the feature weight after merging again;
3) feature within the scope of correspondingly-sized, is obtained in described image to be detected according to the size of the detection block
Collection, and the integrated value for detecting each character subset in frame region is calculated according to the feature weight of each character subset;
4), judge whether the integrated value of the character subset in the detection frame region is greater than setting threshold value;
5), if so, according to detection block glide direction, the detection block is slided into the first step-length, and is returned described in execution
Step 3), until the target in described image to be detected is detected and completes;
6), if it is not, according to detection block glide direction, the detection block slided the second step-length and returned execute the step
It is rapid 3), until described image to be detected in target be detected complete.
Optionally, the step 2), comprising:
A: being directed to each character subset, when the species number of the characteristic value of character subset is greater than setting quantity, judges root
It is whether big according to the ratio between the feature weight of the character subset and the feature weight of other character subsets in addition to itself
In the first preset threshold;
B: if so, the feature weight of the character subset and the feature weight of other character subsets in addition to itself is equal
It is updated to, the average value of the feature weight of the character subset and the feature weight of other character subsets in addition to itself, and
Update the species number of the characteristic value of character subset;
C: if it is not, judge whether the species number of the characteristic value of updated character subset is greater than setting quantity, if so, according to
Setting step-length tunes up first preset threshold, obtains the second preset threshold, and first preset threshold is updated to second
Preset threshold returns and executes the step A, until the species number of the characteristic value of updated character subset is no more than setting number
Amount;If it is not, executing the step 3).
Optionally, the feature weight according to after merging calculates the integral of each character subset in detection frame region
Value, comprising:
The characteristic value of each of image to be detected character subset is updated in advance, the feature weight after merging with it is complete
The product of the integrated value of each pixel is as new integrated value in whole image;Further according to each character subset feature weight with
The product of the new integrated value of corresponding pixel calculates the integrated value of each character subset in detection frame region.
Optionally, whether the integrated value for judging the character subset in the detection frame region is greater than setting threshold value,
Include:
Using formula, if (featureValue [node] > th_node [node] * detec_nf) judges the detection block
Whether the integrated value of the character subset in region is greater than setting threshold value, wherein
If () is discriminant function;FeatureValue [node] is the integral of the character subset in the detection frame region
Value;Th_node [node] is setting threshold value;Detec_nf is the variance yields of detection block.
Optionally, whether the integrated value for judging the character subset in the detection frame region is greater than setting threshold value,
Include:
Using formula,Judge the feature in the detection frame region
Whether the integrated value of subset is greater than setting threshold value, wherein
If () is discriminant function;FeatureValue [node] is the integral of the character subset in the detection frame region
Value;B is integer;A is integer;Detec_nf is the variance yields of detection block, and node corresponds to the subscript of each character subset.
The embodiment of the invention also provides a kind of device for fast detecting of target, described device includes:
Module is obtained, for obtaining image to be detected, and for the detection block size of described image to be detected, and it is described
Detection block size is not more than the size of image to be detected;
Merging module, for being directed to each character subset, according to the feature weight of the character subset with except itself it
Ratio between other outer character subset feature weights, by the feature weight of the character subset it is corresponding with the ratio its
The feature weight of his character subset merges, and the feature weight of the character subset other features corresponding with the ratio are sub
The feature weight of collection is updated to the feature weight after merging;
Computing module obtains within the scope of correspondingly-sized in described image to be detected for the size according to the detection block
Character subset, and according to the feature weight of each character subset calculate detection frame region in each character subset product
Score value;
Judgment module, for judging whether the integrated value of the character subset in the detection frame region is greater than setting thresholding
Value;
First sliding block, for the judging result of the judgment module be in the case where, according to the cunning of detection block
The detection block is slided the first step-length, and triggers the computing module by dynamic direction, until the target in described image to be detected
It is detected and completes;
Second sliding block, for the judging result of the judgment module be it is no in the case where, according to the cunning of detection block
The detection block is slided the second step-length, and triggers the computing module by dynamic direction, until the target in described image to be detected
It is detected and completes.
Optionally, the merging module, is used for:
A: being directed to each character subset, when the species number of the characteristic value of character subset is greater than setting quantity, judges root
It is whether big according to the ratio between the feature weight of the character subset and the feature weight of other character subsets in addition to itself
In the first preset threshold;
B: if so, the feature weight of the character subset and the feature weight of other character subsets in addition to itself is equal
It is updated to, the average value of the feature weight of the character subset and the feature weight of other character subsets in addition to itself, and
Update the species number of the characteristic value of character subset;
C: if it is not, judge whether the species number of the characteristic value of updated character subset is greater than setting quantity, if so, according to
Setting step-length tunes up first preset threshold, obtains the second preset threshold, and first preset threshold is updated to second
Preset threshold returns and executes the step A, until the species number of the characteristic value of updated character subset is no more than setting number
Amount;If it is not, triggering computing module.
Optionally, the computing module, is used for:
The characteristic value of each of image to be detected character subset is updated in advance, the feature weight after merging with it is complete
The product of the integrated value of each pixel is as new integrated value in whole image;Further according to each character subset feature weight with
The product of the new integrated value of corresponding pixel calculates the integrated value of each character subset in detection frame region.
Optionally, the judgment module, is used for:
Using formula, if (featureValue [node] > th_node [node] * detec_nf) judges the detection block
Whether the integrated value of the pixel in region is greater than setting threshold value, wherein
If () is discriminant function;FeatureValue [node] is the integral of the character subset in the detection frame region
Value;Th_node [node] is setting threshold value;Detec_nf is the variance yields of detection block.
Optionally, the judgment module, is used for:
Using formula,Judge the feature in the detection frame region
Whether the integrated value of subset is greater than setting threshold value, wherein
If () is discriminant function;FeatureValue [node] is the integral of the character subset in the detection frame region
Value;B is integer;A is integer;Detec_nf is the variance yields of detection block, and node corresponds to the subscript of each character subset.
The present invention has the advantage that compared with prior art
Using the embodiment of the present invention, for each pixel, according to the feature weight of the pixel with except itself it
Ratio between other outer character subset feature weights, by the feature weight of the pixel it is corresponding with the ratio other
The feature weight of character subset merges, and by the feature weight of the pixel other character subsets corresponding with the ratio
Feature weight is updated to the feature weight after merging, and reduces the quantity of the feature weight for calculating, and then reduce integral
The quantity of figure, thereby reduces computational complexity.
Detailed description of the invention
Fig. 1 is the schematic diagram for the principle that a kind of characteristic value in the prior art calculates;
Fig. 2 is a kind of flow diagram of the rapid detection method of target provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic illustration of the calculation method of integrated value provided in an embodiment of the present invention;
Fig. 4 is the schematic illustration that a kind of integrogram provided in an embodiment of the present invention calculates;
Fig. 5 is a kind of effect picture of Harr feature detection provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of the device for fast detecting of target provided in an embodiment of the present invention.
Specific embodiment
It elaborates below to the embodiment of the present invention, the present embodiment carries out under the premise of the technical scheme of the present invention
Implement, the detailed implementation method and specific operation process are given, but protection scope of the present invention is not limited to following implementation
Example.
The embodiment of the invention provides a kind of rapid detection method of target and devices, first below with regard to the embodiment of the present invention
A kind of rapid detection method of the target provided is introduced.
Fig. 2 is a kind of flow diagram of the rapid detection method of target provided in an embodiment of the present invention, as shown in Fig. 2,
The described method includes:
S101: image to be detected is obtained, and for the detection block size of described image to be detected, and the detection block ruler
The very little size no more than image to be detected.
Illustratively, the image data of complete image to be detected is obtained, it is highly H that wherein width, which is W, the present embodiment
The value that the value of middle H is 640, W is 480.
Running integral figure is defined, the fixed width of integral graph region is complete integrogram width W, a height of detection window height.Definition
Detection window peak width is detect_w, is highly detect_h.
S102: for the character subset of each Lis Hartel sign, according to the feature weight of the character subset and itself is removed
Except other character subset feature weights between ratio, the feature weight of the character subset is corresponding with the ratio
The feature weights of other character subsets merges, and by the feature weight of the character subset other features corresponding with the ratio
The feature weight of subset is updated to the feature weight after merging.
Specifically, S102 step may include: A: each character subset is directed to, in the type of the characteristic value of character subset
When number is greater than setting quantity, the spy of the feature weight and other character subsets in addition to itself according to the character subset is judged
Whether the ratio between sign weight is greater than the first preset threshold;B: if so, by the feature weight of the character subset and removing itself
Except the feature weights of other character subsets be updated to, the feature weight of the character subset and other in addition to itself
The average value of the feature weight of character subset, and update the species number of the characteristic value of character subset;C: if it is not, judging updated
Whether the species number of the characteristic value of character subset is greater than setting quantity, if so, tuning up the described first default threshold according to setting step-length
Value obtains the second preset threshold, and first preset threshold is updated to the second preset threshold, returns and executes the step A,
Until the species number of the characteristic value of updated character subset is no more than setting quantity;If it is not, executing the step S103.
Illustratively, the type of the value of the corresponding weight of character subset (feature weight) of all Harr features is counted
Quantity.The number of species of feature weight remain as 3;That is, the quantity of the type of feature weight is, exist in feature weight value
Mutually different value quantity, for example, feature weight can be 0.1,0.2,0.3, then the quantity of the type of feature weight
It is 3;If feature weight can be 0.1,0.2,0.3,0.1.It is understood that the acquisition side of the character subset of Lis Hartel sign
Method is the prior art, and which is not described herein again.
In practical applications, the total weight_num value of weight can be defined, is merged with certain strategy, is limited
Weight number after fixed merging is no more than weight_num_max, and combination principle is as follows:
(1), it as weight_num < weight_num_max, does not need to merge;
(2), as weight_num > weight_num_max, it is merged into one as far as possible by the two ratio is closer
Group, such as:
Set initial proportion range a=1.1, as weight [m]/weight [n] < a, wherein m, n=0 ... weight_
num-1;Any satisfaction merges into one group with the characteristic value weight of upper inequality, and merging method is weight [m] and weight
The average value of [n];
When group number after merging is less than weight_num_max, then merge completion.Group number after merging is greater than
When weight_num_max, proportional region a=1.2 is tuned up, is further merged according to above-mentioned principle, until after merging
The quantity of characteristic value weight is not more than weight_num_max.
In practical applications, the weight number after merging can be com_weight_num, and value range can be
Com_weight [0] ..., com_weight [com_weight_num-1], and com_weight [0] is the 1st group all
The average value of weight, and so on.
For example, the value of the com_weight after merging is there is only the possibility of -1,2,3 this 3 kinds of values, then com_weight_
The value of num is 3.
S103: feature within the scope of correspondingly-sized is obtained in described image to be detected according to the size of the detection block
Collection, and the integrated value for detecting each character subset in frame region is calculated according to the feature weight of each character subset.
Illustratively, for the character subset in detection frame region 25*35 size, the integral of each character subset is calculated
Value.Under normal conditions, the integrated value of each character subset can be as shown in Figure 3:
In Fig. 3, sum [x] [y] indicates the integrated value of the pixel of respective coordinates, then the integrated value for increasing point newly is
The integrated value of the previous point of current line adds cumulative (the including current point) of all point values before forefront, wherein x is the seat
Mark or the corresponding line number of the pixel;Y is the coordinate or the corresponding row number of the pixel.
Fig. 3 is a kind of schematic illustration of the calculation method of integrated value provided in an embodiment of the present invention;As shown in figure 3, can
Feature weight and complete image to be in advance updated to the characteristic value of each of image to be detected character subset, after merging
In each pixel integrated value product as new integrated value;Further according to each character subset feature weight with it is corresponding
The product of the new integrated value of pixel calculates the integrated value of each character subset in detection frame region.
Image in the middle part of Fig. 3 indicates complete image, and deriving com_weight from the figure is respectively -1 (lower left corner), a 2 (left sides
Upper angle), 3 integrograms on 3 (right sides), the i.e. corresponding integrogram of each feature weight.
It is corresponding multiplied by complete image that each point in each integrogram being derived respectively indicates com_weight value
Integrated value, each integrogram be respectively defined as wight_tab [0], wight_tab [1], wight_tab [2].
Then, the integrated value for the pixel in the detection frame region in integrogram being derived further according to each and special
Sign weight product calculate each Lis Hartel sign characteristic value, then in character subset each Lis Hartel levy characteristic value into
Row is cumulative, obtains the characteristic value of the character subset in each detection frame region.
Com_weight integrogram computational complexity are as follows:
+ com_weight*W*H multiplication of com_weight*W*H*2 sub-addition
If the com_weight after merging is there is only [- 1,2,3] this 3 kinds of values, then com_weight_num=3.
S104: judge whether the integrated value of the character subset in the detection frame region is greater than setting threshold value;If so, holding
Row S105;If it is not, executing S106.
Fig. 4 is the schematic illustration that a kind of integrogram provided in an embodiment of the present invention calculates, as shown in figure 4, with sum feature
For illustrate the treatment process of integrogram, the integrogram of each weight, such as following figure are calculated separately as unit of detecting window:
Illustratively, the integrated value of the character subset in detection frame region is calculated using following formula,
FeatureValue=SUM
(weight_tab [weight_idx [0]] -> featureEvaluator [0] ... weight_tab [weight_
Idx [n-1]] -> featureEvaluator [n-1]), wherein
Weight_tab [] is that the different obtained integrograms of com_weight is directed to obtained in S103 step;
Weight_idx [i] be index of the updated feature weight in weight_tab, and i=0,1 ..., n-1;n
For the quantity of subset in Harr feature;
Weight_tab [weight_idx [0]] -> featureEvaluator [0] is assignment statement, i.e., is weighed according to feature
Focus on the integrated value of the obtained this feature subset of index in weight_tab.
For example, when com_weight=-1, weight_idx [i]=0;
When com_weight=2, weight_idx [i]=1;
When com_weight=3, weight_idx [i]=2;Wherein i=0 ... n-1.
As shown in figure 4, P [m] [0]~P [m] [3] respectively corresponds 4 integrogram endpoints of ith feature, m=0 ... n-1:
The prior art, will be according to feature when selecting pixel region using detection block each time when feature weight calculates
The product of weight and the integrated value of character subset calculates the integrated value of character subset all in detection frame region;Multiplication is caused to occupy
Biggish specific gravity, computation complexity corresponding to one-time detection frame are as follows:
Characteristic * pixel number * (displacement of 12 multiplication+1 time of multiplication+1 time of sub-addition+3 times).
And apply the above embodiment of the present invention, this programme by using the weight table of integrals mode, that is, previously according to spy
The product for levying the integrated value of weight and character subset calculates the integrated value of character subset all in image to be detected, then in S104
In step, the integrated value of the character subset in the part is called directly according to the region that detection block selects, compared with the existing technology
In each time frame choosing will recalculate, avoid the calculation amount computed repeatedly.Although newly-increased weight integrogram introduces
The operation of 2 sub-addition+com_weight_num* pixel of com_weight_num* pixel number * multiplication for several times, but save
State characteristic * pixel number 3 multiplication of *, computation complexity are as follows:
Com_weight integrogram computational complexity are as follows: com_weight*W*H*2 sub-addition+com_weight*W*
H multiplication, it is clear that be less than computation complexity in the prior art, therefore, it is complicated that the embodiment of the present invention generally reduces calculating
Degree.
From the foregoing, it will be observed that achieve the effect that operation optimizes, spy is not to be exceeded in maximum merging weight number weight_num_max
Levy number.Therefore, because the mode for merging weight effectively limits com_weight_num number, so that in Project Realization process
In reduce multiplying well, effectively reduce detection window computational complexity, can finally effectively reduce chip power-consumption.
Then, judge whether the integrated value for detecting the character subset in frame region is greater than setting threshold value, if so, will integrate
Value is greater than the set of the character subset of setting threshold value as target region.
Specifically, can use formula, if (featureValue [node] > th_node [node] * detec_nf) sentences
Whether the integrated value for detecting the character subset in frame region of breaking is greater than setting threshold value, wherein
If () is discriminant function;FeatureValue [node] is the integral of the character subset in the detection frame region
Value;Th_node [node] is setting threshold value;Detec_nf is the variance yields of detection block.
In practical applications, the division floating-point operation if that whether Harr feature can be greater than in predefined thresholding:
FeatureValue [node]/detec_nf > th_node [node],
If (featureValue [node] > th_node [node] * detec_nf) is converted to, then computational complexity are as follows:
Characteristic * H*W* (12 multiplication+1 time of sub-addition+3 times floating-point multiplication).
Using the above embodiment of the present invention, division floating-point operation is changed to floating-point multiplication, it is possible to reduce overall operational is opened
Pin.
Further, specifically, in order to guarantee its precision and reduce floating-point operation, which is switched into fixed-point representation by floating-point
Mode can use formula,Judge the feature in the detection frame region
Whether the integrated value of subset is greater than setting threshold value, wherein
If () is discriminant function;FeatureValue [node] is the integral of the character subset in the detection frame region
Value;B is integer;A is integer;Detec_nf is the variance yields of detection block, and node corresponds to the subscript of each character subset.
Illustratively, thresholding th_node [node] is converted into fixed point expression way,
That is:A, b are integer;
Then, th_node [node] * detec_nf is represented by
Due to (a*detec_nf) > > b, then total computational complexity of S103 step and S104 step are as follows:
Characteristic * H*W* (displacement of 12 multiplication+1 time of multiplication+1 time of sub-addition+3 times).
Using the above embodiment of the present invention, computing overhead can be further saved.
S105: according to the glide direction of detection block, the detection block is slided into the first step-length, and return and execute the step
S103, until the target in described image to be detected is detected and completes;
Illustratively, the Computing Principle in S105 step is identical as the Computing Principle in S104 step, and difference is only to slide
The difference of dynamic step-length.
S106: according to the glide direction of detection block, the detection block is slided into the second step-length and returns to the execution step
S103, until the target in described image to be detected is detected and completes.
Using the embodiment of the present invention, total computation complexity of S101 step to S104 step are as follows:
+ com_weight_num*W*H multiplication+characteristic * H*W* (12 times of com_weight_num*W*H*2 sub-addition
The displacement of the multiplication+1 time of addition+1 time) obviously, the computation complexity in the embodiment of the present invention is lower than the computation complexity of the prior art:
Characteristic * W*H* (12 multiplication+1 time of sub-addition+3 times floating-point division).
Using embodiment illustrated in fig. 1 of the present invention, for each character subset, according to the feature weight of the character subset
With the ratio between other character subset feature weights in addition to itself, by the feature weight of the character subset and the ratio
The feature weight for being worth other corresponding character subsets merges, and the feature weight of the character subset is corresponding with the ratio
The feature weight of other character subsets is updated to the feature weight after merging, and reduces the quantity of the feature weight for calculating,
And then reduce the quantity of integrogram, thereby reduce computational complexity.
In addition, the embodiment of the present invention, reduces computational complexity, thereby reduces target search procedure and memory is accounted for
With.
Corresponding with embodiment illustrated in fig. 1 of the present invention, the embodiment of the invention also provides one kind
Fig. 6 is a kind of structural schematic diagram of the device for fast detecting of target provided in an embodiment of the present invention, as shown in fig. 6,
Described device includes:
Module 601 is obtained, for obtaining image to be detected, and for the detection block size of described image to be detected, and
The detection block size is not more than the size of image to be detected;
Merging module 602 according to the feature weight of the character subset and removes itself for being directed to each character subset
Except other character subset feature weights between ratio, the feature weight of the character subset is corresponding with the ratio
The feature weights of other character subsets merges, and by the feature weight of the character subset other features corresponding with the ratio
The feature weight of subset is updated to the feature weight after merging;
Computing module 603 obtains correspondingly-sized model for the size according to the detection block in described image to be detected
Interior character subset is enclosed, and each character subset in detection frame region is calculated according to the feature weight of each character subset
Integrated value;
Judgment module 604, for judging whether the integrated value of the character subset in the detection frame region is greater than setting door
Limit value;
First sliding block 605, for the judging result of the judgment module be in the case where, according to detection block
The detection block is slided the first step-length, and triggers the computing module 603 by glide direction, until in described image to be detected
Target be detected complete;
Second sliding block 606, for the judging result of the judgment module be it is no in the case where, according to detection block
The detection block is slided the second step-length, and triggers the computing module 603 by glide direction, until in described image to be detected
Target be detected complete.
Using embodiment illustrated in fig. 6 of the present invention, for each character subset, according to the feature weight of the character subset
With the ratio between other character subset feature weights in addition to itself, by the feature weight of the character subset and the ratio
The feature weight for being worth other corresponding character subsets merges, and the feature weight of the character subset is corresponding with the ratio
The feature weight of other character subsets is updated to the feature weight after merging, and reduces the quantity of the feature weight for calculating,
And then reduce the quantity of integrogram, thereby reduce computational complexity.
In a kind of specific embodiment of the embodiment of the present invention, the merging module 602 is used for:
A: being directed to each character subset, when the species number of the characteristic value of character subset is greater than setting quantity, judges root
It is whether big according to the ratio between the feature weight of the character subset and the feature weight of other character subsets in addition to itself
In the first preset threshold;
B: if so, the feature weight of the character subset and the feature weight of other character subsets in addition to itself is equal
It is updated to, the average value of the feature weight of the character subset and the feature weight of other character subsets in addition to itself, and
Update the species number of the characteristic value of character subset;
C: if it is not, judge whether the species number of the characteristic value of updated character subset is greater than setting quantity, if so, according to
Setting step-length tunes up first preset threshold, obtains the second preset threshold, and first preset threshold is updated to second
Preset threshold returns and executes the step A, until the species number of the characteristic value of updated character subset is no more than setting number
Amount;If it is not, triggering computing module 603.
In a kind of specific embodiment of the embodiment of the present invention, the computing module 603 is used for: in advance will be to be detected
The characteristic value of each of image character subset is updated to, the product of each pixel in the feature weight and complete image after merging
The product of score value is as new integrated value;Further according to feature weight and the new product of corresponding pixel of each character subset
The product of score value calculates the integrated value of each character subset in detection frame region.
In a kind of specific embodiment of the embodiment of the present invention, the judgment module 604 is used for:
Using formula, if (featureValue [node] > th_node [node] * detec_nf) judges the detection block
Whether the integrated value of the character subset in region is greater than setting threshold value, wherein
If () is discriminant function;FeatureValue [node] is the integral of the character subset in the detection frame region
Value;Th_node [node] is setting threshold value;Detec_nf is the variance yields of detection block.
In a kind of specific embodiment of the embodiment of the present invention, the judgment module is used for:
Using formula,Judge the feature in the detection frame region
Whether the integrated value of subset is greater than setting threshold value, wherein
If () is discriminant function;FeatureValue [node] is the integral of the character subset in the detection frame region
Value;B is integer;A is integer;Detec_nf is the variance yields of detection block, and node corresponds to the subscript of each character subset.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.
Claims (10)
1. a kind of rapid detection method of target, which is characterized in that the described method includes:
1) image to be detected, is obtained, and for the detection block size of described image to be detected, and the detection block size is little
In the size of image to be detected;
2), for the character subset of each Lis Hartel sign, according to the feature weight of the character subset and in addition to itself
Ratio between other character subset feature weights, by the feature weight of the character subset other spies corresponding with the ratio
The feature weight for levying subset merges, and by the feature weight of the character subset other character subsets corresponding with the ratio
Feature weight is updated to the feature weight after merging;
3) character subset within the scope of correspondingly-sized, is obtained in described image to be detected according to the size of the detection block, and
The integrated value of each character subset in detection frame region is calculated according to the feature weight of each character subset;
4), judge whether the integrated value of the character subset in the detection frame region is greater than setting threshold value;
5), if so, according to detection block glide direction, the detection block is slided into the first step-length, and return and execute the step
3), until the target in described image to be detected is detected and completes;
6), if it is not, according to detection block glide direction, the detection block slided the second step-length and returned execute the step
3), until the target in described image to be detected is detected and completes.
2. a kind of rapid detection method of target according to claim 1, which is characterized in that the step 2), comprising:
A: being directed to each character subset, when the species number of the characteristic value of character subset is greater than setting quantity, judges according to institute
State whether the ratio between the feature weight of character subset and the feature weight of other character subsets in addition to itself is greater than
One preset threshold;
B: if so, the feature weight of the character subset and the feature weight of other character subsets in addition to itself are updated
For, the average value of the feature weight of the character subset and the feature weight of other character subsets in addition to itself, and update
The species number of the characteristic value of character subset;
C: if it is not, judging whether the species number of the characteristic value of updated character subset is greater than setting quantity, if so, according to setting
Step-length tunes up first preset threshold, obtains the second preset threshold, and first preset threshold is updated to second and is preset
Threshold value returns and executes the step A, until the species number of the characteristic value of updated character subset is no more than setting quantity;If
It is no, execute the step 3).
3. a kind of rapid detection method of target according to claim 1, which is characterized in that the spy according to after merging
Levy the integrated value of each character subset in weight calculation detection frame region, comprising:
The characteristic value of each of image to be detected character subset is updated in advance, feature weight and complete graph after merging
The product of the integrated value of each pixel is as new integrated value as in;Further according to each character subset feature weight with it is corresponding
Pixel new integrated value product, calculate detection frame region in each character subset integrated value.
4. a kind of rapid detection method of target according to claim 1, which is characterized in that the judgement detection block
Whether the integrated value of the character subset in region is greater than setting threshold value, comprising:
Using formula, if (featureValue [node] > th_node [node] * detec_nf) judges the detection frame region
Whether the integrated value of interior character subset is greater than setting threshold value, wherein
If () is discriminant function;FeatureValue [node] is the integrated value of the character subset in the detection frame region;th_
Node [node] is setting threshold value;Detec_nf is the variance yields of detection block, and node corresponds to the subscript of each character subset.
5. a kind of rapid detection method of target according to claim 4, which is characterized in that the judgement detection block
Whether the integrated value of the character subset in region is greater than setting threshold value, comprising:
Using formula,Judge the character subset in the detection frame region
Integrated value whether be greater than setting threshold value, wherein
If () is discriminant function;FeatureValue [node] is the integrated value of the character subset in the detection frame region;B is
Integer;A is integer;Detec_nf is the variance yields of detection block, and node corresponds to the subscript of each character subset.
6. a kind of device for fast detecting of target, which is characterized in that described device includes:
Module is obtained, for obtaining image to be detected, and for the detection block size of described image to be detected, and the detection
Frame size is not more than the size of image to be detected;
Merging module, for being directed to each character subset, according to the feature weight of the character subset and in addition to itself
Ratio between other character subset feature weights, by the feature weight of the character subset other spies corresponding with the ratio
The feature weight for levying subset merges, and by the feature weight of the character subset other character subsets corresponding with the ratio
Feature weight is updated to the feature weight after merging;
Computing module obtains the spy within the scope of correspondingly-sized for the size according to the detection block in described image to be detected
Subset is levied, and calculates the integral of each character subset in complete image-region according to the feature weight of each character subset
It is worth (i.e. the original integrated value of feature weight *);
Judgment module, for judging whether the integrated value of the character subset in the detection frame region is greater than setting threshold value;
First sliding block, for the judging result of the judgment module be in the case where, according to the sliding side of detection block
To the detection block is slided the first step-length, and triggers the computing module, until the target in described image to be detected is tested
It surveys and completes;
Second sliding block, for the judging result of the judgment module be it is no in the case where, according to the sliding side of detection block
To the detection block is slided the second step-length, and triggers the computing module, until the target in described image to be detected is tested
It surveys and completes.
7. a kind of device for fast detecting of target according to claim 6, which is characterized in that the merging module is used for:
A: being directed to each character subset, when the species number of the feature weight of character subset is greater than setting quantity, judges basis
Whether the ratio between the feature weight of the character subset and the feature weight of other character subsets in addition to itself is greater than
First preset threshold;
B: if so, the feature weight of the character subset and the feature weight of other character subsets in addition to itself are updated
For, the average value of the feature weight of the character subset and the feature weight of other character subsets in addition to itself, and update
The species number of the characteristic value of character subset;
C: if it is not, judging whether the species number of the characteristic value of updated character subset is greater than setting quantity, if so, according to setting
Step-length tunes up first preset threshold, obtains the second preset threshold, and first preset threshold is updated to second and is preset
Threshold value returns and executes the step A, until the species number of the characteristic value of updated character subset is no more than setting quantity;If
It is no, trigger computing module.
8. a kind of device for fast detecting of target according to claim 6, which is characterized in that the computing module is used for:
The characteristic value of each of image to be detected character subset is updated in advance, feature weight and complete graph after merging
The product of the integrated value of each pixel is as new integrated value as in;Further according to each character subset feature weight with it is corresponding
Pixel new integrated value product, calculate detection frame region in each character subset integrated value.
9. a kind of device for fast detecting of target according to claim 6, which is characterized in that the judgment module is used for:
Using formula, if (featureValue [node] > th_node [node] * detec_nf) judges the detection frame region
Whether the integrated value of interior character subset is greater than setting threshold value, wherein
If () is discriminant function;FeatureValue [node] is the integrated value of the character subset in the detection frame region;th_
Node [node] is setting threshold value;Detec_nf is the variance yields of detection block.
10. a kind of device for fast detecting of target according to claim 9, which is characterized in that the judgment module is used
In:
Using formula,Judge the character subset in the detection frame region
Integrated value whether be greater than setting threshold value, wherein
If () is discriminant function;FeatureValue [node] is the integrated value of the character subset in the detection frame region;B is
Integer;A is integer;Detec_nf is the variance yields of detection block, and node corresponds to the subscript of each character subset.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910174066.5A CN109919228B (en) | 2019-03-08 | 2019-03-08 | Target rapid detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910174066.5A CN109919228B (en) | 2019-03-08 | 2019-03-08 | Target rapid detection method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109919228A true CN109919228A (en) | 2019-06-21 |
CN109919228B CN109919228B (en) | 2023-04-11 |
Family
ID=66963847
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910174066.5A Active CN109919228B (en) | 2019-03-08 | 2019-03-08 | Target rapid detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109919228B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108205687A (en) * | 2018-02-01 | 2018-06-26 | 通号通信信息集团有限公司 | Based on focus mechanism positioning loss calculation method and system in object detection system |
CN108470194A (en) * | 2018-04-04 | 2018-08-31 | 北京环境特性研究所 | A kind of Feature Selection method and device |
CN109241969A (en) * | 2018-09-26 | 2019-01-18 | 旺微科技(上海)有限公司 | A kind of multi-target detection method and detection system |
CN109409360A (en) * | 2018-09-26 | 2019-03-01 | 旺微科技(上海)有限公司 | A kind of multiple dimensioned image object detection method and detection system |
-
2019
- 2019-03-08 CN CN201910174066.5A patent/CN109919228B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108205687A (en) * | 2018-02-01 | 2018-06-26 | 通号通信信息集团有限公司 | Based on focus mechanism positioning loss calculation method and system in object detection system |
CN108470194A (en) * | 2018-04-04 | 2018-08-31 | 北京环境特性研究所 | A kind of Feature Selection method and device |
CN109241969A (en) * | 2018-09-26 | 2019-01-18 | 旺微科技(上海)有限公司 | A kind of multi-target detection method and detection system |
CN109409360A (en) * | 2018-09-26 | 2019-03-01 | 旺微科技(上海)有限公司 | A kind of multiple dimensioned image object detection method and detection system |
Also Published As
Publication number | Publication date |
---|---|
CN109919228B (en) | 2023-04-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106412573B (en) | A kind of method and apparatus of detector lens stain | |
CN111475680A (en) | Method, device, equipment and storage medium for detecting abnormal high-density subgraph | |
CN109711332B (en) | Regression algorithm-based face tracking method and application | |
CN106846362A (en) | A kind of target detection tracking method and device | |
CN106780530B (en) | Body type prediction method and device | |
CN113536958B (en) | Navigation path extraction method, device, agricultural robot and storage medium | |
CN105894540A (en) | Method and system for counting vertical reciprocating movements based on mobile terminal | |
CN110008947A (en) | A kind of silo Grain Quantity monitoring method and device based on convolutional neural networks | |
CN111860568B (en) | Method and device for balanced distribution of data samples and storage medium | |
CN113920109A (en) | Medical image recognition model training method, recognition method, device and equipment | |
KR102461702B1 (en) | Processing method for electrocardiogram signal | |
CN108830204A (en) | The method for detecting abnormality in the monitor video of target | |
CN105913429A (en) | Calculating method for visual perception response time delay index of intelligent terminal user | |
CN111368596A (en) | Face recognition backlight compensation method and device, readable storage medium and equipment | |
CN109002758B (en) | Face feature point positioning method, device, equipment and storage medium | |
CN109919228A (en) | A kind of rapid detection method and device of target | |
CN111260681A (en) | Moving target tracking method and moving target tracking device | |
CN110009711B (en) | Heart beat combination characteristic scatter diagram generation method, terminal device and storage medium | |
CN107527022A (en) | Signal period computational methods | |
CN115098238B (en) | Application program task scheduling method and device | |
CN109376799A (en) | A kind of time series early stage classification method and equipment based on diversity shapelet | |
CN109948626A (en) | A kind of object detection method and device | |
GB2579634A (en) | Method and apparatus for determining temporal behaviour of an object | |
CN106326098A (en) | Method and device for testing page perceived performance | |
CN114387545A (en) | Intelligent corneal biomechanical characteristic detection method based on feedforward network |
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 |