Background technology
HOG:HistogramofOrientedGradient, histograms of oriented gradients, be a kind of in computer vision and image procossing for carrying out the feature description operator of object detection.
SIFT:Scale-invariantfeaturetransform, scale invariant feature is changed, and is a kind of algorithm detecting local feature.
HARR: be a kind of conventional feature description operator of computer vision field.
Adaboost: being a kind of iterative algorithm, its core concept is the grader (Weak Classifier) different for the training of same training set, then these weak classifier set is got up, constitutes a higher final grader (strong classifier).
SVM:SupportVectorMachines, support vector machine, is a kind of learning art based on structural risk minimization, is also a kind of new homing method with fine Generalization Capability.
Image recognition, refers to and utilizes computer that image is processed, analyze and understand, to identify the target of various different mode and the technology to picture.During general industry uses, adopting industrial camera shooting picture, then recycling software does further identifying processing according to picture ash jump.
Computer vision is the science how a research makes machine " seeing ", further, it is exactly refer to replace human eye that target is identified with camera and computer, follow the tracks of and the machine vision such as measurement, and do graphics process further, it is treated as with computer and is more suitable for eye-observation or sends the image of instrument detection to.
Target detection is an important component part of computer vision, has important application prospect in every field.At present, things is only carried out the consideration of local by main computer vision algorithms make, in the object detection and recognition technology of Most current, main what consider is exactly the independent characteristic of target, such as the color of target, texture, and have ignored target context-related information in the picture, such as target positional information in the picture, the size of target and the reference information of periphery things size, cause that the error rate detecting with identifying compares high, have impact on next step analysis to view data and process.
Summary of the invention
In order to solve above-mentioned technical problem, it is an object of the invention to provide one can effective exclusive PCR, the method improving the accuracy of object detection and recognition.
In order to solve above-mentioned technical problem, it is a further object to provide a kind of can effectively exclusive PCR, improve object detection and recognition accuracy, reduce rate of false alarm system.
The technical solution adopted in the present invention is:
A kind of method of object detection and recognition, it includes step: S1, obtains candidate target;S2, calculates positional information and the size information of candidate target;S3, calculates candidate target according to the positional information of candidate target and size information and belongs to the probability P x of corresponding classification;S4, compares probability P x and probability threshold values Pt set in advance, it is judged that whether candidate target belongs to corresponding classification.
Preferably, described step S1 specifically includes sub-step: S11, arranges target detection wicket in the picture;S12, calculates the eigenvalue in target detection wicket;S13, judges whether to be adopted as candidate target according to eigenvalue.
Preferably, the size of target detection wicket described in step S11 sets according to target type, or the size of described target detection wicket is the wicket of fixed size set in advance.
Preferably, described eigenvalue includes color of image and/or image texture and/or HOG and/or SIFT and/or HARR.
Preferably, described step S12 is particularly as follows: learn and judge whether to be adopted as candidate target by Adaboost algorithm, SVM algorithm or neural network algorithm.
Preferably, described step S3 specifically includes sub-step: S31, sets up the synopsis of target position information, size information and corresponding class probability according to priori result;According to the positional information of candidate target, size information and synopsis, S32, determines that candidate target belongs to the probability P x of corresponding classification.
Preferably, described step S4 is particularly as follows: compare probability P x and probability threshold values Pt set in advance, if Px > Pt, then judges that candidate target belongs to corresponding classification;If Px < Pt, then judge that candidate target is not belonging to corresponding classification.
The system of a kind of object detection and recognition, comprising: module of target detection, is used for obtaining candidate target;Computing module, for calculating positional information and the size information of candidate target, and the positional information and size information according to candidate target calculates candidate target and belongs to the probability P x of corresponding classification;Comparing module, for comparing probability P x and probability threshold values Pt set in advance, it is judged that whether candidate target belongs to corresponding classification.
The invention has the beneficial effects as follows:
Present invention utilizes the positional information in image context, and target classified by the probability occurred in this position according to target, determine whether possible target in order to assisting, distracter in effective rejection image, improve the accuracy of object detection and recognition, reduce rate of false alarm, be conducive to next step analysis and the process of view data.
The composite can be widely applied to various target identification system.
Detailed description of the invention
It should be noted that when not conflicting, the embodiment in the application and the feature in embodiment can be mutually combined.
A kind of method of object detection and recognition, it includes step: S1, obtains candidate target;S2, calculates positional information and the size information of candidate target;S3, calculates candidate target according to the positional information of candidate target and size information and belongs to the probability P x of corresponding classification;S4, compares probability P x and probability threshold values Pt set in advance, it is judged that whether candidate target belongs to corresponding classification.
Preferably, described step S1 specifically includes sub-step: S11, arranges target detection wicket in the picture;S12, calculates the eigenvalue in target detection wicket;S13, judges whether to be adopted as candidate target according to eigenvalue.
Preferably, the size of target detection wicket described in step S11 sets according to target type, or the size of described target detection wicket is the wicket of fixed size set in advance.
Preferably, described eigenvalue includes color of image and/or image texture and/or HOG and/or SIFT and/or HARR.
Preferably, described step S12 is particularly as follows: learn and judge whether to be adopted as candidate target by Adaboost algorithm, SVM algorithm or neural network algorithm.
Preferably, described step S3 specifically includes sub-step: S31, sets up the synopsis of target position information, size information and corresponding class probability according to priori result;According to the positional information of candidate target, size information and synopsis, S32, determines that candidate target belongs to the probability P x of corresponding classification.
Preferably, described step S4 is particularly as follows: compare probability P x and probability threshold values Pt set in advance, if Px > Pt, then judges that candidate target belongs to corresponding classification;If Px < Pt, then judge that candidate target is not belonging to corresponding classification.
By module of target detection, the candidate target being likely car plate detected.The probability that this target is correct target detection is judged by the positional information in the picture of candidate target and candidate target size in the picture.In the present embodiment, it would be desirable to judge whether target is to detect target by the probabilistic information of the brief 3D information of image and the positional information of video camera.The present embodiment can by the image information of 2D, the general 3D information calculating target, such as the positional information of target, the size information of target, and is completed the detection of target by the information of 3D.
Concrete scheme is as follows:
1, substantially judge the content of scene, cook up ground (horizontal plane), sky and other positions.
Scene is defined as the span of L, L by us three kinds, L={ sky, ground, other regions };P{l=Li} represents that I belongs to the probability of Li scene.P (c=A | 1c=Li) represent when the scene location of c is Li, c belongs to the probability of classification A.In general, we do a prior probability based on experience can to p (c=A | 1c=Li), and generate synopsis for.
2, scene projection/object height calculates
A), in there is no the video camera rotated, it is known that the height of camera and horizontal line position, it is possible to calculate the height of target.
Y=(v1-v2) * yc/v1
Wherein v1, v2 are target highs and lows in the picture, and yc is the height of video camera.
If b) not knowing camera height in advance, it is possible to calculate the height of video camera by measuring the actual height (height of such as people) of some objects in scene.
C), the height of target is defined as s.Each classification is had to the span of corresponding object height.As p (o ∈ 0 | a≤s≤b represents that, when the height of s is between a and b time, it belongs to the probability of target class O.Other classifications in like manner push away.
3, module of target detection
A), module of target detection adopt and be generally used for the wicket of target detection, determine whether corresponding target by calculating the eigenvalue in wicket.The size of wicket can be distinguished according to the classification of target, it is also possible to by unified wicket size, such as 16*16 pixel, 16*24 pixel etc..
B), module of target detection can be completed by the method for various machine learning, such as Adaboost algorithm, SVM algorithm or neural network algorithm etc..
C), the feature that adopts in the middle of machine learning can various graphic features, including being not limited to following characteristics: color of image and/or image texture and/or HOG and/or SIFT and/or HARR feature etc..
E), the target detected by module of target detection we can be referred to as candidate target.The target that detector detects generally can be expressed as:
Ci∈ { pedestrian, car, car plate, background },
Each target has a periphery to confine region, is expressed as:
Cbb={ ui, vi, wi, hi,
Four of Cbb values represent lower left corner position coordinates in the picture respectively, and the width of target and height.Candidate target is defined as C.P (Ci=A) and is expressed as being belonged to by the target Ci that module of target detection detects the probability of classification A by us.
4, by scene information, target location, the candidate target that object height and module of target detection detect finally judges whether target is the real target to detect.
A), by above step, we obtain target C and belong to the probability of target classification in scene Li situation and be:
P (c=A | 1c, Sc)=Π p (c=A | 1c=Li) p (c ∈ A | a≤Sc≤b) p (c=A)
B), by the step a) probit obtained with the initial threshold ratio set relatively, if greater than threshold value, then it is assumed that the target candidate people C that module of target detection detection obtains belongs to classification A, and otherwise assertive goal candidate C is not belonging to classification A.
As it is shown in figure 1, with the detection of car plate be identified as example, after input video frame, first prospect is detected, obtains and confine motion target area.When judging that driftlessness does not detect, leap to next frame of video, when judging to have target area not detect, use car plate detector (i.e. module of target detection) to obtain at motion target area and be likely to car plate target (candidate target).As without being likely to car plate target, then continued to determine whether that other does not detect region;Car plate target if possible, then according to being likely to car plate target, estimate Position Approximate and the size of car plate.Further according to possible target carriage mark car plate and position, size information, calculate the probability P x of this target license plate, probability P x and probability threshold values Pt is contrasted, if Px > Pt, then judges that this candidate target is car plate, car plate is carried out character recognition.
The system of a kind of object detection and recognition, comprising: module of target detection, is used for obtaining candidate target;Computing module, for calculating positional information and the size information of candidate target, and the positional information and size information according to candidate target calculates candidate target and belongs to the probability P x of corresponding classification;Comparing module, for comparing probability P x and probability threshold values Pt set in advance, it is judged that whether candidate target belongs to corresponding classification.
A kind of system of object detection and recognition realize principle corresponding to a kind of method of object detection and recognition, do not do tired stating at this.
Present invention utilizes the positional information in image context, and target classified by the probability occurred in this position according to target, determine whether possible target in order to assisting, distracter in effective rejection image, improve the accuracy of object detection and recognition, reduce rate of false alarm, be conducive to next step analysis and the process of view data.
The composite can be widely applied to various target identification system, can be applied not only to video, it is also possible to be applied to single picture.
It is above the preferably enforcement of the present invention has been illustrated, but the invention is not limited to described embodiment, those of ordinary skill in the art also can make all equivalent variations or replacement under the premise without prejudice to spirit of the present invention, and these equivalent deformation or replacement are all contained in the application claim limited range.