Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of pedestrian detection method, system, being intended to solve because whether existing pedestrian detecting system can't be blocked according to the pedestrian takes adaptive detection mode to carry out pedestrian's detection, be subject to larger impact so that it detects performance, detect the poor problem of effect.
The embodiment of the invention is achieved in that a kind of pedestrian detection method, and described method comprises the steps:
Receive the view data of input, obtain the proper vector of view data;
According to formula
d(x)=lg((exp(a*f(x))+exp(a*g(x)))/a)
Calculate the eigenwert d (x) of the view data of input, f (x)=wx wherein, g (x)=ux, w and u are the dot product sign of operation for default vectorial constant, a for default constant 10, x is the proper vector of the view data obtained;
Whether the eigenwert of the view data that calculates and default threshold value, exporting described moving object is pedestrian's information if being compared;
Wherein, the value of described w and u arranges by following manner:
Head, shoulder and whole body to pedestrian in the view data that comprises the pedestrian that collects mark;
The background image data that collects and the view data that comprises the pedestrian are stored in the view data training set of setting up in advance;
Set in advance the initial value of vectorial constant w and u, take described training set as field of definition, obtain function lg ((1+exp (a* (1-y*d (x))))/a) value of w and u when obtaining minimum value by the optimal value computing module, wherein a is default constant, x is the proper vector of the view data of input, y equals 1 or-1, when y=1, and d (x)=lg ((exp (a*f (x
1))+exp (a*g (x
2)))/a), x
1Be the proper vector of the pedestrian's that marks among the x whole body, x
2For the pedestrian's that marks among the x head and the proper vector of shoulder, when y=-1, d (x)=lg ((exp (a*f (x))+exp (a*g (x)))/a);
The value of w and u is set to the function lg (value of (1+exp (a* (1-y*d (x))))/when a) obtaining minimum value w and u.
Another purpose of the embodiment of the invention is to provide a kind of pedestrian detecting system, and described system comprises:
The proper vector acquiring unit is used for receiving the view data of inputting, and obtains the proper vector of view data;
The eigenwert computing unit, be used for (the eigenwert d (x) of the view data of (exp (a*f (x))+exp (a*g (x)))/a) calculating input according to formula d (x)=lg, f (x)=wx wherein, g (x)=ux, w and u are default vectorial constant, a is the dot product sign of operation for default constant 10, and x is the proper vector of the view data obtained; And
Information output unit compares for the eigenwert of the view data that will calculate and default threshold value, and whether export described moving object is pedestrian's information;
Wherein, the value of described w and u arranges by following manner:
Head, shoulder and whole body to pedestrian in the view data that comprises the pedestrian that collects mark;
The background image data that collects and the view data that comprises the pedestrian are stored in the view data training set of setting up in advance;
Set in advance the initial value of vectorial constant w and u, take described training set as field of definition, obtain function lg ((1+exp (a* (1-y*d (x))))/a) value of w and u when obtaining minimum value by the optimal value computing module, wherein a is default constant, x is the proper vector of the view data of input, y equals 1 or-1, when y=1, and d (x)=lg ((exp (a*f (x
1))+exp (a*g (x
2)))/a), x
1Be the proper vector of the pedestrian's that marks among the x whole body, x
2For the pedestrian's that marks among the x head and the proper vector of shoulder, when y=-1, d (x)=lg ((exp (a*f (x))+exp (a*g (x)))/a);
The value of w and u is set to the function lg (value of (1+exp (a* (1-y*d (x))))/when a) obtaining minimum value w and u.
The embodiment of the invention is by receiving the proper vector of the view data of inputting, ((exp (a*f (x))+exp (a*g (x)))/a) calculates the eigenwert d (x) of the view data of input according to formula d (x)=lg, the eigenwert of the view data that calculates and default threshold value are compared, whether the output movement object is pedestrian's information, whether solved existing pedestrian detecting system can't be blocked according to the pedestrian and take adaptive detection mode to carry out pedestrian's detection, detect the poor problem of effect, thereby in the view data of input when having the pedestrian by selecting adaptively corresponding detection function to detect the pedestrian, for the user provides a kind of general, healthy and strong, accurate pedestrian detection method.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, is not intended to limit the present invention.
The embodiment of the invention is by receiving the proper vector of the view data of inputting, ((exp (a*f (x))+exp (a*g (x)))/a) calculates the eigenwert d (x) of the view data of input according to formula d (x)=lg, the eigenwert of the view data that calculates and default threshold value are compared, whether the output movement object is pedestrian's information, whether solved existing pedestrian detecting system can't be blocked according to the pedestrian and take adaptive detection mode to carry out pedestrian's detection, detect the poor problem of effect, thereby in the view data of input when having the pedestrian by selecting adaptively corresponding detection function to detect the pedestrian, for the user provides a kind of general, healthy and strong, accurate pedestrian detection method.
Below in conjunction with specific embodiment specific implementation of the present invention is described in detail:
Embodiment one:
Fig. 1 shows the realization flow of the pedestrian detection method that first embodiment of the invention provides, and details are as follows:
In step S101, receive the view data of input, obtain the proper vector of view data.
In embodiments of the present invention, in the time need to carrying out pedestrian detection to the image of input, can carry out pre-service to image in advance, for example, gray level image to input carries out size normalization, avoid affecting follow-up processing because of the distortion of image, stretching by gray scale strengthens picture contrast, by cutting apart of background and object in the binary conversion treatment realization image.Adopt dynamic thresholding method to determine the crucial threshold value of image binaryzation, the adaptive neighborhood method of average removal of images interference that the use band is revised and noise etc., thus image blurring, the crooked or damaged situation that image causes because of reasons such as weather or acquisition angles solved.
In step S 102, ((exp (a*f (x))+exp (a*g (x)))/a) calculates the eigenwert d (x) of the view data of input according to formula d (x)=lg, f (x)=wx wherein, g (x)=ux, w and u are default vectorial constant, a is the dot product sign of operation for default constant, and x is the proper vector of the view data obtained.
In embodiments of the present invention, adopt function softmax (f (x), g (x)) calculates the eigenwert of the view data of input, softmax (f (x) wherein, g (x))=lg ((exp (a*f (x))+exp (a*g (x)))/a), f (x)=wx, be the pedestrian detection function based on whole body information, g (x)=ux be one based on the pedestrian detection function of head and shoulder, w and u are default vectorial constant, a is default constant, be the dot product sign of operation, x is the proper vector of the view data obtained, but because softmax function softening output valve, poor between reducing to be worth so that the computing formula of d (x) can be selected corresponding detection function (based on whole body information or based on a shoulder information) adaptively, detects the pedestrian in the input picture exactly.
In step S103, the eigenwert of the view data that calculates and default threshold value are compared, whether output image data comprises pedestrian's information.
In embodiments of the present invention, the eigenwert of the view data that calculates and default threshold value are compared, when the eigenwert of the view data that calculates during greater than default threshold value, output image data comprises pedestrian's information, when the eigenwert of the view data that calculates was not more than default threshold value, output image data did not comprise pedestrian's information.In concrete implementation process, can mark out according to user's the demand information pedestrian to the view data that comprises the pedestrian, thus prompting user more intuitively, or be used for pedestrian's tracking and statistics etc.
Embodiment two:
In embodiments of the present invention, for the eigenwert d (x) that determines view data in the pedestrian detection process=lg (w that relates in (exp (a*f (x))+exp (a*g (x)))/a) and value of u, should train this function in advance, obtain the value of w and u.
Fig. 2 shows the realization flow of the pedestrian detection method that second embodiment of the invention provides, and details are as follows:
In step S201, head, shoulder and the whole body of pedestrian in the view data that comprises the pedestrian that collects marked.
Exist in the invention process, acquisition of image data is trained detection function being used in advance, determine the value of vector parameter w and u, the image that gathers should comprise background image and the image that includes pedestrian's whole body, and the quantity of image can gather according to the user image of respective numbers to the accuracy requirement that detects.Head, shoulder and whole body comprising pedestrian in the view data of pedestrian's whole body are marked, specifically can be by marking manually or automatically, when manually marking, at first mark out the encirclement frame of pedestrian's head, based on certain ratio, head is surrounded frame expand, as the encirclement frame of head-shoulders, further head is surrounded the encirclement frame that frame is expanded into whole body.Also can adopt corresponding algorithm identified to go out pedestrian's head, shoulder and whole body, realize the mark of pedestrian's head, shoulder and whole body, concrete mask method need not limit the present invention at this.
In step S203, the background image data that collects and the view data that comprises the pedestrian stored into set up in advance in the view data training set.
In step S203, set in advance the initial value of vector parameter w and u, take training set as field of definition, obtain function softmax (0 by the optimal value computing module, 1-y*d (x)) value of w and u when obtaining minimum value, wherein softmax (0,1-y*d (x))=lg ((1+exp (a* (1-y*d (x))))/a), a is default constant, x is the proper vector of the view data of input, y equals 1 or-1, when y=1, and d (x)=lg ((exp (a*f (x
1))+exp (a*g (x
2)))/a), x
1Be the proper vector of the pedestrian's that marks among the x whole body, x
2For the pedestrian's that marks among the x head and the proper vector of shoulder, when y=-1, d (x)=lg ((exp (a*f (x))+exp (a*g (x)))/a).
In embodiments of the present invention, set in advance the initial value of vector parameter w and u, with the input of the image in the training set as function, obtain function lg ((1+exp (a* (1-y*d (x))))/a) value of w and u when obtaining minimum value by the optimal value computing module.Particularly, after receiving the image that comprises pedestrian's whole body of input, obtain whole Characteristic of Image vector x, and according to markup information or according to the value (y=1) of variable y, obtain head and shoulder characteristic of correspondence vector x among the x
2, and pedestrian's whole body characteristic of correspondence vector x
1, according to formula d (x)=lg ((exp (a*f (x
1))+exp (a*g (x
2)))/a) find the solution the value of d (x), when y=-1, illustrate that this image is not for comprising pedestrian's image, ((exp (a*f (x))+exp (a*g (x)))/a) finds the solution the value of d (x) according to formula d (x)=lg, thereby in function lg ((1+exp (a* (1-y*d (x))))/obtain when a) obtaining minimum value value of w and u, more preferably, a can be made as 10, in specific implementation process, the optimal value computing module can adopt degree of passing descent algorithm, genetic algorithm or neural network etc., at this not in order to limit the present invention.
In step S204, the value of w and u value is set to the function lg (value of (1+exp (a* (1-y*d (x))))/when a) obtaining minimum value.
In embodiments of the present invention, with ((1+exp (a* (1-y*d (x))))/w that obtains when a) obtaining minimum value and the value of u are made as the value of parameter w and u at function lg by the optimal value computing module among the step S203.
In step S205, the employing aspect ratio is that the window of 8:3 scans the image data information that synthetic image is corresponding to input picture to be detected.
In embodiments of the present invention, after the training of finishing detection function, obtained the value of w and u, thereby can realize the detection to input picture to be detected, particularly, can adopt typical aspect ratio is that the window of 8:3 scans the image data information that synthetic image is corresponding to input picture to be detected.In addition, also can before detection, detection function be tested, determine according to test result whether also needs are trained function, adjust the value of w and u, thereby obtain more high-precision pedestrian detection effect.
In step S206, receive the view data of input, obtain the proper vector of view data.
In step S207, ((exp (a*f (x))+exp (a*g (x)))/a) calculates the eigenwert d (x) of the view data of input according to formula d (x)=lg, f (x)=wx wherein, g (x)=ux, w and u are default vectorial constant, a is the dot product sign of operation for default constant, and x is the proper vector of the view data obtained.
In step S208, the eigenwert of the view data that calculates and default threshold value are compared, export the information whether described view data comprises the pedestrian.
One of ordinary skill in the art will appreciate that all or part of step that realizes in above-described embodiment method is to come the relevant hardware of instruction to finish by program, described program can be stored in the computer read/write memory medium, described storage medium is such as ROM/RAM, disk, CD etc.
Embodiment three:
Fig. 3 shows the structure of the pedestrian detecting system that third embodiment of the invention provides, and for convenience of explanation, only shows the part relevant with the embodiment of the invention.
This pedestrian detecting system can be for the Video Monitoring Terminal with pedestrian detection function, in video monitor etc., it can be the software unit that runs in these Video Monitoring Terminals, also can be used as independently, suspension member is integrated in these Video Monitoring Terminals or runs in the application system of these Video Monitoring Terminals, wherein:
Proper vector acquiring unit 31 receives the view data of input, obtains the proper vector of view data.
In embodiments of the present invention, in the time need to carrying out pedestrian detection to the image of input, can carry out pre-service to image in advance, for example, gray level image to input carries out size normalization, avoid affecting follow-up processing because of the distortion of image, stretching by gray scale strengthens picture contrast, by cutting apart of background and object in the binary conversion treatment realization image.Adopt dynamic thresholding method to determine the crucial threshold value of image binaryzation, the adaptive neighborhood method of average removal of images interference that the use band is revised and noise etc., thus image blurring, the crooked or damaged situation that image causes because of reasons such as weather or acquisition angles solved.
((exp (a*f (x))+exp (a*g (x)))/a) calculates the eigenwert d (x) of the view data of input to eigenwert computing unit 32 according to formula d (x)=lg, f (x)=wx wherein, g (x)=ux, w and u are default vectorial constant, a is default constant, be the dot product sign of operation, x is the proper vector of the view data obtained.
In embodiments of the present invention, adopt function softmax (f (x), g (x)) calculates the eigenwert of the view data of input, softmax (f (x), g (x))=lg ((exp (a*f (x))+exp (a*g (x)))/a), f (x)=wx wherein, be used for the pedestrian detection function based on whole body information, g (x)=ux, be used for the pedestrian detection function based on head and shoulder, w and u are default vectorial constant, a is default constant, be the dot product sign of operation, x is the proper vector of the view data obtained, but because softmax function softening output valve, poor between reducing to be worth, so that the computing formula of d (x) can be selected corresponding detection function (based on whole body information or based on a shoulder information) adaptively, detect exactly the pedestrian in the input picture.
Information output unit 33 compares the eigenwert of the view data that calculates and default threshold value, exports the information whether described view data comprises the pedestrian.
In embodiments of the present invention, the eigenwert of the view data that calculates and default threshold value are compared, when the eigenwert of the view data that calculates during greater than default threshold value, output image data comprises pedestrian's information, when the eigenwert of the view data that calculates was not more than default threshold value, output image data did not comprise pedestrian's information.In concrete implementation process, can mark out according to user's the demand information pedestrian to the view data that comprises the pedestrian, thus prompting user more intuitively, or be used for pedestrian's tracking and statistics etc.
Embodiment four:
Fig. 4 shows the structure of the pedestrian detecting system that fourth embodiment of the invention provides, and for convenience of explanation, only shows the part relevant with the embodiment of the invention.
Pedestrian's head, shoulder and whole body mark in the view data that comprises the pedestrian that 41 pairs of unit of mark collect.
Storage unit 42 stores the background image data that collects into and sets up in advance in the view data training set with the view data that comprises the pedestrian.
Parameter value acquiring unit 43 sets in advance the initial value of vector parameter w and u, take training set as field of definition, obtain function lg ((1+exp (a* (1-y*d (x))))/a) value of w and u when obtaining minimum value by the optimal value computing module, wherein a is default constant, x is the proper vector of the view data of input, y equals 1 or-1, when y=1, and d (x)=lg ((exp (a*f (x
1))+exp (a*g (x
2)))/a), x
1Be the proper vector of the pedestrian's that marks among the x whole body, x
2For the pedestrian's that marks among the x head and the proper vector of shoulder, when y=-1, d (x)=lg ((exp (a*f (x))+exp (a*g (x)))/a).
The value of parameter value setting unit 44 w and u value is set to parameter value acquiring unit 43 in function lg ((1+exp (a* (1-y*d (x))))/w that obtains when a) obtaining minimum value and value of u.
Image data information generation unit 45 employing aspect ratios are that the window of 8:3 scans the image data information that synthetic image is corresponding to input picture to be detected.
Proper vector acquiring unit 46 receives the view data of input, obtains the proper vector of view data.
((exp (a*f (x))+exp (a*g (x)))/a) calculates the eigenwert d (x) of the view data of input to eigenwert computing unit 47 according to formula d (x)=lg, f (x)=wx wherein, g (x)=ux, w and u are default vectorial constant, a is default constant, be the dot product sign of operation, x is the proper vector of the view data obtained.
Information output unit 48 compares the eigenwert of the view data that calculates and default threshold value, exports the information whether described view data comprises the pedestrian.
The embodiment of the invention is by to d (x)=lg ((exp (a*f (x))+exp (a*g (x)))/a) train, the value of w and u when obtaining it and obtaining minimum value, thereby for the user provides an effective detection function, when receiving input image data to be detected, obtain this Characteristic of Image vector, ((exp (a*f (x))+exp (a*g (x)))/a) calculates the eigenwert d (x) of the view data of input according to formula d (x)=lg, the eigenwert of the view data that calculates and default threshold value are compared, whether the output movement object is pedestrian's information, whether solved existing pedestrian detecting system can't be blocked according to the pedestrian and take adaptive detection mode to carry out pedestrian's detection, detect the poor problem of effect, thereby in the view data of input when having the pedestrian by selecting adaptively corresponding detection function to detect the pedestrian, for the user provides a kind of general, healthy and strong, accurate pedestrian detection method.
The above only is preferred embodiment of the present invention, not in order to limiting the present invention, all any modifications of doing within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.