Based on the coloured image of dual camera face recognition and the antidote of black white image
Technical field
The present invention relates to face recognition, particularly relate to a kind of based on the coloured image of dual camera face recognition and the antidote of black white image.
Background technology
Existing face recognition machine adopts a black and white camera and colour imagery shot, i.e. a dual camera mostly.The image of obtaining in the face recognition machine interface comprises the coloured image that can see and the invisible black white image of its back, and coloured image designs in order to give the visual enjoyment of user, and what really be used for image recognition is black white image.Because the influence of the left and right sides arrangement design of camera, during the edge of the image that obtains when colour imagery shot at the image display box, the image that the black and white camera obtains does not simultaneously demonstrate complete image in the face recognition machine, at this moment, the user confirms the complete face-image of oneself is shown in the face recognition machine, in fact, the face recognition machine but can't be identified oneself all the time, but the method for the demonstration problem of the above-mentioned coloured image of the rectification that has not yet to see practicability and black white image, not only cause puzzlement to the client, but also bring discrimination low, the reject rate height, the adverse consequences that client's favorable comment degree reduces.
Summary of the invention
Technical matters to be solved by this invention is the defective that remedies above-mentioned prior art, provides a kind of based on the coloured image of dual camera face recognition and the antidote of black white image.
Technical matters of the present invention is solved by the following technical programs.
This based on the coloured image of dual camera face recognition and the antidote of black white image, described dual camera is a black and white camera and colour imagery shot of installing on the dual camera plate of face recognition machine, and described dual camera plate is connected with the computer of correcting usefulness by the USB connecting line.
This based on the dual camera face recognition coloured image and the characteristics of the antidote of black white image be:
Supporting use one surface is provided with the rectification plate of the belt supporting frame of stain, and following steps are arranged successively:
1) width and height of the artwork master frame that definite screening pixel is identical and cromogram frame;
2) according to the screening value range, determine rectangular image rectification frame;
3) filter out that to meet the requirements be qualified dual camera;
4) qualified dual camera is installed in the face recognition machine, the start that powers on adopts colored camera lens and black and white camera lens to grasp facial image simultaneously;
5) same eye position in artwork master frame and cromogram frame respectively in the facial image of location;
6) determine the relative position of two eyes in coloured image and the black white image;
7) side-play amount according to relative position moves coloured image;
8) cutting coloured image makes about the coloured image, left-right symmetric;
9) size and the position in the cromogram frame of the coloured image of preservation cutting.
Technical matters of the present invention is solved by following further technical scheme.
Described step 1) determines to screen the width and height of the identical artwork master frame of pixel and cromogram frame, be to determine that width is at least 60 pixels, highly be at least 80 pixels, described width and the qualification rate positive correlation of height with the screening dual camera, width is with highly more big, qualification rate is more high, and width is with highly more little, and qualification rate is more low.
It is qualified dual camera that the filtering out of described step 3) meets the requirements, it is the dual camera that meets setting rectification area requirement in optical chamber, filtering out, described meeting set the rectification value range by wide, the high maximal value decision of receptible cutting coloured image, comprises following substep:
31) the screening artwork master frame of determining according to real needs and the width and height of cromogram frame, centered by the center of cromogram frame, the rectangular image that draws definite is corrected frame in the cromogram frame;
32) the dual camera plate is connected with computer by the USB connecting line, shows the rectangular image rectification frame of determining at computer screen;
33) ceaselessly absorb the scenery of its aligning by dual camera, make described scenery respectively in the complete width of cloth black white image and a width of cloth coloured image that is presented on the screen;
34) rectification plate that the surface is provided with the belt supporting frame of stain is placed on the place apart from dual camera 50cm, manually adjusts the position of described dual camera plate, and the center of the artwork master frame on stain and the screen on the rectification plate is overlapped;
35) rectangular image that shows in coloured image by the eye-observation stain is corrected the position in the frame, can judge that namely the dual camera plate is to meet the qualified dual camera that can be used for correcting that range of set value requires.
Same eyes in the facial image of described step 5) location, be that center with the center of the artwork master frame on the screen and cromogram frame is respectively as the initial point of artwork master frame coordinate system and the initial point of cromogram frame coordinate system, determine the position coordinates 1 (X1 of described eyes in the artwork master frame, Y1) and the 2 (X2 of the position coordinates in the cromogram frame, Y2), with same eyes determining the people position in artwork master frame and cromogram frame respectively.
Described step 6) is determined the relative position of two eyes in coloured image and the black white image, it is the initial point coincidence with artwork master frame and cromogram frame coordinate system, determine the position coordinates 1 (X1 of described eyes in the artwork master frame, Y1) with respect to position coordinates 2 (X2, Y2) the relative coordinate (Δ X, Δ Y) of described eyes in the cromogram frame, wherein: vector Δ X=X1-X2, vector Δ Y=Y1-Y2, on the occasion of representing direction for just, negative value represents direction for negative.
Described step 7) moves coloured image, is according to the mobile coloured image of relative coordinate (Δ X, Δ Y), and the described eyes in the cromogram frame are overlapped with described eyes in the artwork master frame.
Described step 8) cutting coloured image is cutting partial colour image, makes coloured image left-right symmetric, symmetry, and the coloured image place filling black that is cropping up and down.
Described step 9) is preserved, be that the size of the coloured image of cutting and the location parameter in the cromogram frame are kept in the storer of face recognition machine, as long as do not correct again, the color image size of face recognition machine master interface display and position are exactly this size and the position of correcting the back coloured image.
The rectification again of described step 9) is when the later maintenance of face recognition machine, if the demand of rectification is arranged, just corrects parameter by control facial recognition machine is corrected again.
The stain on described rectification plate surface is that diameter is the bullet of 1cm~3cm.
The beneficial effect that the present invention is compared with the prior art is:
Use antidote of the present invention, can make black white image and coloured image in same position, thereby make the facial image of black and white overlap with the facial image of colour, the face recognition machine can accurately be located the position of people's face, reaching the coloured image position that the people sees is exactly the visual effect of the position of invisible black white image, efficiently solves edge and the face recognition machine that people's face is placed on the cromogram frame and has demonstrated the problem that complete facial image but can not correctly be identified.Can significantly improve discrimination, accuracy of identification and recognition speed, reduce reject rate.Especially can improve client's favorable comment degree, make product more can win client's favor.
Description of drawings
Fig. 1 is the process flow diagram of the specific embodiment of the invention;
Fig. 2 is the rectification plate planimetric map that the matching used surface of the specific embodiment of the invention is provided with the belt supporting frame of stain;
Fig. 3 is the facial image demonstration figure of the dual camera picked-up of the specific embodiment of the invention;
Fig. 4 be Fig. 3 facial image same eyes respectively the position coordinates 1 in artwork master frame and cromogram frame coordinate system (X1, Y1) and position coordinates 2 (X2, planimetric map Y2);
Fig. 5 is the planimetric map with the initial point coincidence of the artwork master frame of Fig. 4 and cromogram frame coordinate system;
Fig. 6 is Δ X<0, Δ Y>0 o'clock of the relative coordinate (Δ X, Δ Y) of the facial image of Fig. 3, and coloured image is through the planimetric map after the mobile cutting;
Fig. 7 is Δ X>0, Δ Y>0 o'clock of the relative coordinate (Δ X, Δ Y) of the facial image of Fig. 3, and coloured image is through the planimetric map after the mobile cutting;
Fig. 8 is Δ X<0, Δ Y<0 o'clock of the relative coordinate (Δ X, Δ Y) of the facial image of Fig. 3, and coloured image is through the planimetric map after the mobile cutting;
Fig. 9 is Δ X>0, Δ Y<0 o'clock of the relative coordinate (Δ X, Δ Y) of the facial image of Fig. 3, and coloured image is through the planimetric map after the mobile cutting;
Figure 10 is Δ X=0, Δ Y<0 o'clock of the relative coordinate (Δ X, Δ Y) of the facial image of Fig. 3, and coloured image is through the planimetric map after the mobile cutting;
Figure 11 is Δ X=0, Δ Y>0 o'clock of the relative coordinate (Δ X, Δ Y) of the facial image of Fig. 3, and coloured image is through the planimetric map after the mobile cutting;
Figure 12 is Δ Y=0, Δ X<0 o'clock of the relative coordinate (Δ X, Δ Y) of the facial image of Fig. 3, and coloured image is through the planimetric map after the mobile cutting;
Figure 13 is Δ Y=0, Δ X>0 o'clock of the relative coordinate (Δ X, Δ Y) of the facial image of Fig. 3, and coloured image is through the planimetric map after the mobile cutting.
Embodiment
Below in conjunction with embodiment and contrast accompanying drawing the present invention will be described.
A kind of shown in accompanying drawing 1~13 based on the coloured image of dual camera face recognition and the antidote of black white image, dual camera is a black and white camera and colour imagery shot of installing on the dual camera plate of face recognition machine, and the dual camera plate is connected with the computer of correcting usefulness by the USB connecting line.
Supporting use one surface is provided with the rectification plate of the belt supporting frame of stain, and following steps are arranged successively:
1) determines to screen the identical artwork master frame of pixel and the width of cromogram frame and be at least 60 pixels, highly be at least 80 pixels, the qualification rate positive correlation of width and height and screening dual camera, width is with highly more big, qualification rate is more high, and width is with highly more little, and qualification rate is more low;
2) according to the screening value range, determine rectangular image rectification frame;
3) filter out that to meet the requirements be qualified dual camera, be the dual camera that meets setting rectification area requirement filtering out in optical chamber, described meeting set the rectification value range by wide, the high maximal value decision of receptible cutting coloured image, comprises following substep:
31) the screening artwork master frame of determining according to real needs and the width and height of cromogram frame, centered by the center of cromogram frame, the rectangular image that draws definite is corrected frame in the cromogram frame;
32) the dual camera plate is connected with computer by the USB connecting line, shows the rectangular image rectification frame of determining at computer screen;
33) ceaselessly absorb the scenery of its aligning by dual camera, make described scenery respectively in the complete width of cloth black white image and a width of cloth coloured image that is presented on the screen;
34) rectification plate that the surface is provided with the belt supporting frame of stain is placed on the place apart from dual camera 50cm, manually adjusts the position of described dual camera plate, and the center of the artwork master frame on stain and the screen on the rectification plate is overlapped;
35) rectangular image that shows in coloured image by the eye-observation stain is corrected the position in the frame, can judge that namely the dual camera plate is to meet the qualified dual camera that can be used for correcting that range of set value requires;
4) qualified dual camera is installed in the face recognition machine, the start that powers on adopts colored camera lens and black and white camera lens to grasp facial image simultaneously;
5) same eye position in artwork master frame and cromogram frame respectively in the facial image of location, with the center of the center of the artwork master frame on the screen and cromogram frame respectively as the initial point of artwork master frame coordinate system and the initial point of cromogram frame coordinate system, determine the position coordinates 1 (X1 of described eyes in the artwork master frame, Y1) and the 2 (X2 of the position coordinates in the cromogram frame, Y2), with same eyes determining the people position in artwork master frame and cromogram frame respectively;
6) determine the relative position of two eyes in coloured image and the black white image, the initial point of artwork master frame and cromogram frame coordinate system is overlapped, determine the position coordinates 1 (X1 of described eyes in the artwork master frame, Y1) with respect to position coordinates 2 (X2, Y2) the relative coordinate (Δ X, Δ Y) of described eyes in the cromogram frame, wherein: vector Δ X=X1-X2, vector Δ Y=Y1-Y2, on the occasion of representing direction for just, negative value represents direction for negative;
7) side-play amount according to relative position moves coloured image, according to the mobile coloured image of relative coordinate (Δ X, Δ Y), the described eyes in the cromogram frame is overlapped with described eyes in the artwork master frame, when Δ Y ≠ 0; Δ X ≠ 0 o'clock, prolong X-direction and move | a Δ X| unit, if the value of Δ X for negative, so just the negative direction to X-axis moves; If the value of Δ X is for just, so just the positive dirction to X moves.Secondly, prolong Y direction and move | a Δ Y| unit, if the value of Δ Y is negative, so just the negative direction to Y-axis moves; If the value of Δ Y is for just, so just the positive dirction to Y moves.Behind the mobile end, the eye position 2 in the cromogram frame is overlapped with eye position 1 in the artwork master frame, namely the position of the eyes of seeing in the coloured image is exactly the position of eyes in the black white image;
The mobile coloured image result of accompanying drawing 6~13 corresponding Δ X and eight kinds of Δ Y different combinations, the rectangle frame 3 among the figure is the artwork master frame, rectangle frame 4 is the cromogram frame;
8) cutting partial colour image makes coloured image left-right symmetric, symmetry, and the coloured image place filling black that is cropping up and down;
9) size of the coloured image of cutting and the location parameter in the cromogram frame are kept in the storer of face recognition machine, as long as do not correct again, the color image size of face recognition machine master interface display and position are exactly this size and the position of correcting the back coloured image, when the later maintenance of face recognition machine, if the demand of rectification is arranged, just correct parameter by control facial recognition machine is corrected again.
Above content be in conjunction with concrete preferred implementation to further describing that the present invention does, can not assert that concrete enforcement of the present invention is confined to these explanations.For the general technical staff of the technical field of the invention; make some alternative or obvious modification that are equal to without departing from the inventive concept of the premise; and performance or purposes are identical, all should be considered as belonging to the scope of patent protection that the present invention is determined by claims of submitting to.