CN109657607A - A kind of human face target distance measuring method, device and storage medium based on recognition of face - Google Patents

A kind of human face target distance measuring method, device and storage medium based on recognition of face Download PDF

Info

Publication number
CN109657607A
CN109657607A CN201811544922.3A CN201811544922A CN109657607A CN 109657607 A CN109657607 A CN 109657607A CN 201811544922 A CN201811544922 A CN 201811544922A CN 109657607 A CN109657607 A CN 109657607A
Authority
CN
China
Prior art keywords
face
detection
distance
point
standard
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
Application number
CN201811544922.3A
Other languages
Chinese (zh)
Other versions
CN109657607B (en
Inventor
吕文艺
黄巍伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New Wisdom Technology Co Ltd
Original Assignee
New Wisdom Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by New Wisdom Technology Co Ltd filed Critical New Wisdom Technology Co Ltd
Priority to CN201811544922.3A priority Critical patent/CN109657607B/en
Publication of CN109657607A publication Critical patent/CN109657607A/en
Application granted granted Critical
Publication of CN109657607B publication Critical patent/CN109657607B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/14Measuring arrangements characterised by the use of optical techniques for measuring distance or clearance between spaced objects or spaced apertures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Studio Devices (AREA)

Abstract

The present invention relates to technical field of image processing, disclose a kind of human face target distance measuring method, device and storage medium based on recognition of face, the human face target distance measuring method includes the steps that carrying out ranging for single detection face, the step includes: the human face target identified in single image, is therefrom determined as the detection face of test object;Calculate the scale factor for obtaining detection face relative to the positive face of preset standard;According to the Pixel Dimensions of the facial parameters of the positive face of standard and the scale factor, the Pixel Dimensions of the facial parameters of estimation detection face;Optical center point is calculated to the point-to-plane distance for detecting face institute bit plane by fitting function according to the Pixel Dimensions of the facial parameters of detection face;According to the horizontal offset of point-to-plane distance and detection face in the picture, distance between detection face and the point of camera lens is calculated.Present invention can apply to carry out ranging for the detection face in the acquired image of camera to distort to a certain degree, have many advantages, such as that ranging accuracy is high.

Description

A kind of human face target distance measuring method, device and storage medium based on recognition of face
Technical field
The present invention relates to technical field of image processing more particularly to a kind of human face target ranging sides based on recognition of face Method, device and storage medium.
Background technique
In terms of the application service of robot, robot needs make reasonable response according to target at a distance from itself, Such as: when gtoal setting, cause to target and open gate etc..Object ranging algorithm services robot application and provides base Plinth data, but the precision of current object ranging algorithm is not high, this will certainly largely effect on the interbehavior that robot makes Order of accuarcy, reduce user experience, therefore to improve user experience, which urgently improves.
Summary of the invention
The purpose of the present invention is to provide a kind of, and human face target distance measuring method, device and storage based on recognition of face are situated between Matter, the defect for overcoming existing distance measuring method precision low.
To achieve this purpose, the present invention adopts the following technical scheme:
A kind of human face target distance measuring method based on recognition of face includes the steps that carrying out ranging for single detection face; It is described to include: for the step of single detection face progress ranging
It identifies the human face target in single image, is therefrom determined as the detection face of test object;
Calculate the scale factor for obtaining the detection face relative to the positive face of preset standard;
According to the Pixel Dimensions of the facial parameters of the positive face of the standard and the scale factor, the face of the detection face is estimated The Pixel Dimensions of portion's parameter;
Optical center point is calculated and arrives by fitting function according to the Pixel Dimensions of the facial parameters of the detection face Detect the point-to-plane distance of face institute bit plane;
According to the horizontal offset of the point-to-plane distance and detection face in described image, detection face and camera lens is calculated Point between distance.
Optionally, the human face target distance measuring method further include:
Obtain the N frame image in real time video data;
For every frame image, respectively according to described the step of carrying out ranging for single detection face, to the same detection Face carries out ranging, obtains distance between N number of point;
Carry out denoising, between N number of point in distance choose optimal distance D.
Optionally, it is described between N number of point distance choose optimal distance after, further includes: to the optimal distance D into Row error correction obtains actual range range D '=D* (1 ± Etotal), the EtotalFor global error;
The global error EtotalCalculation method are as follows:
Etotal=EReal*(1.0+Ecali)*(1.0+Eturn) * 100%;
Wherein, the ERealFor real face and standard faces error, the EcaliTo demarcate error of fitting, the Eturn For face activity error.
Optionally, the presetting method of the positive face of the standard includes:
The positive face of benchmark is chosen, the physical size of the facial parameters of the positive face of the standard is defined;
Printing specimen is made after being adjusted according to the physical size of the facial parameters to the positive face of the benchmark;
The printing specimen take pictures and obtains the positive face of the standard.
It is optionally, described to calculate the scale factor for obtaining the detection face relative to the positive face of preset standard, comprising:
By facial features localization algorithm, the positive face of standard and the detection face described in Detection and Extraction are M corresponding respectively Characteristic point;Projective transformation is carried out to each characteristic point of detection face and the positive face of standard, obtains the scale factor.
A kind of human face target range unit based on recognition of face, comprising: the image for obtaining at least one image obtains Unit is taken, further includes the distance measuring unit for carrying out ranging for single detection face;The distance measuring unit includes:
Target identification module is detected, the human face target in single image, is therefrom determined as test object for identification Detect face;
Scale factor extraction module, for calculate obtain it is described detection face relative to the positive face of preset standard scale because Son;
Face size estimation block, for according to the Pixel Dimensions of the facial parameters of the positive face of the standard and the scale because Son estimates the Pixel Dimensions of the facial parameters of the detection face;
Point-to-plane distance computing module, for the Pixel Dimensions according to the facial parameters of the detection face, by fitting function, Optical center point is calculated to the point-to-plane distance for detecting face institute bit plane;
Distance calculation module between point, for the horizontal-shift according to the point-to-plane distance and detection face in described image Distance between detection face and the point of camera lens is calculated in amount.
Optionally, the human face target range unit further includes denoising unit;
Described image acquiring unit, for obtaining the N frame image in video data;
The distance measuring unit obtains between N number of point for carrying out ranging respectively to the detection face in every frame image Distance;
The denoising unit, for carrying out denoising, between N number of point in distance choose optimal distance D.
Optionally, the human face target range unit further includes error correction unit;
The error correction unit, for the optimal distance D carry out error correction, obtain actual range range D '= D*(1±Etotal), the EtotalFor global error, and
Etotal=EReal*(1.0+Ecali)*(1.0+Eturn) * 100%=5.92%;
Wherein, the ERealFor real face and standard faces error, the EcaliTo demarcate error of fitting, the Eturn For face activity error.
Optionally, the human face target range unit further includes that the positive face of standard presets unit;
The positive face of standard presets unit and defines the object of the facial parameters of the positive face of the standard for choosing the positive face of benchmark Size is managed, makes printing specimen after being adjusted according to the physical size of the facial parameters to the positive face of the benchmark;To described Printing specimen, which take pictures, obtains the positive face of the standard.
A kind of storage medium, the storage medium are stored with a plurality of instruction, and described instruction is suitable for processor and is loaded, with Execute the step in as above any human face target distance measuring method based on recognition of face.
Compared with prior art, the embodiment of the present invention has the advantages that
The embodiment of the present invention proposes the non-linear relation model between a kind of target size and actual range, passes through face Feature detects the facial parameters size of face to estimate, and then seeks distance by fitting function, improves the essence of distance measurement result True property, suitable for being realized for the distance measurement function with the detection face the acquired image of camera to distort to a certain degree.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art To obtain other attached drawings according to these attached drawings.
Fig. 1 is the human face target distance measuring method flow chart based on recognition of face that the embodiment of the present invention one provides;
Apart from Computing Principle schematic diagram between the point that Fig. 2 provides for the embodiment of the present invention one;
Fig. 3 is the human face target distance measuring method flow chart provided by Embodiment 2 of the present invention based on recognition of face;
Fig. 4 is the human face target range unit structure chart that the embodiment of the present invention three provides.
Specific embodiment
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below Embodiment be only a part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field Those of ordinary skill's all other embodiment obtained without making creative work, belongs to protection of the present invention Range.
To further illustrate the technical scheme of the present invention below with reference to the accompanying drawings and specific embodiments.
Referring to Fig. 1, a kind of human face target distance measuring method based on recognition of face is present embodiments provided, comprising steps of
Step 101 obtains image, identifies the human face target in image, determines from the whole human face targets identified One test object as this ranging, the test object are known as detecting face.
It may only include a human face target in acquired image in this step, it at this time can be directly by the human face target It is appointed as current detection face.Acquired image may also include two or more human face targets, need at this time from In specify a human face target as current detection face, can be specified according to different demands in practical application, can also be with meaning It is fixed.
The acquisition modes of image are unlimited, can be any way, such as: it is obtained from having shot in photo, from real-time video It is obtained in data.
Step 102 calculates the scale factor for obtaining detection face relative to the positive face of preset standard.
Wherein, the positive face of standard can use any presetting method, and a kind of presetting method is provided below:
(1) it determines the positive face of benchmark, the positive perfect face of the computer synthesis of Web Publishing can be chosen as benchmark just Face;
(2) physical size of the facial parameters of the positive face of standard is defined, the physical size of the facial parameters specifically can basis The facial parameters that China's Statistical standard " GBT 2428-1998 adult Head Face Dimensions " proposes define, and relate generally to two Facial parameters: 1. morphological facial length, i.e., from bridge of the nose point (se) to the linear distance of gnathion (gn), physical size 119mm;② Head is maximum wide, i.e., the linear distance between left and right cranium side point (eu), physical size 154mm;
(3) printing specimen is made after being adjusted according to the physical size of the facial parameters of definition to the positive face of benchmark;
(4) the positive face of acquisition standard of taking pictures is carried out to printing specimen.It is 450* to obtain a resolution ratio in the present embodiment For the positive face of 600 standard, the resolution ratio of certain positive face of standard is not limited to this, as long as can satisfy scheduled required precision i.e. It can.
Based on the positive face of preset standard, following calculation method is can be used in scale factor: facial features localization algorithm is first passed through, The positive face of Detection and Extraction standard M characteristic point corresponding with detection face respectively;Again to each feature of detection face and the positive face of standard Point carries out projective transformation, obtains the corresponding scale factor of the two.
At the same time, also using facial features localization algorithm, according to the physical size of the facial parameters of the positive face of standard, meter The Pixel Dimensions of the facial parameters of the positive face of standard under current resolution are calculated, for the picture of the subsequent facial parameters for calculating detection face Plain size provides foundation.
Specifically, Dlib facial features localization algorithm can be applied, detection obtains 68 characteristic points of the positive face of standard respectively With 68 characteristic points of detection face.Based on this, the specific calculating process of scale factor are as follows:
Enable 68 dot matrixs of detection face68 dot matrixs of standard facesIt asks The result formats of C=A*B-1, C areα is the scale factor for detecting face and corresponding to the positive face of standard, other β etc. Coefficient is related numerical value with facial angle, deformation etc., by further calculating and decomposing it can be concluded that corresponding have geometry The parameter of meaning only uses scale factor in the application.
To simplify the matrix form in algorithm, point is transformed into polar coordinate system from rectangular coordinate system, retains ρ, letter is removed θ, obtainedThenα is still scale factor;Wherein (xc,yc) coordinate of point (prn) between nose, prenasale is the 30th characteristic point in Dlib.
Step 103, Pixel Dimensions and scale factor according to the facial parameters of the positive face of standard, the face ginseng of estimation detection face Several Pixel Dimensions.
In abovementioned steps 102, it can be calculated using facial features localization algorithm: under 450*600 resolution ratio, mark The maximum wide Pixel Dimensions of head of quasi- positive face are 370 pixels;Therefore, it can estimate that the maximum wide Pixel Dimensions of the head of detection face are w =α * 370.
Optical center is calculated by fitting function according to the Pixel Dimensions of the facial parameters of detection face in step 104 Point-to-plane distance of the point to detection face institute bit plane.
In the present embodiment, the nonlinear mathematical model of data fitting are as follows:Wherein, A, B, C are experiment gained Fitting coefficient, x is the maximum wide Pixel Dimensions of the head in the facial parameters for detect face, and y refers to optical center point to detecting face The point-to-plane distance of institute's bit plane.
Specifically, the acquisition methods of fitting function are as follows: to the printing sample made according to state statistical standard in step 102 This, the different location in a distance is repeatedly taken pictures, and the head that statistics obtains standard faces under different location is maximum wide Pixel Dimensions x and point-to-plane distance y are input in above-mentioned non-property mathematical model, are calculated by Pixel Dimensions x and point-to-plane distance y Fitting coefficient A, B, C, to obtain fitting function.
Step 105, the horizontal offset according to point-to-plane distance and detection face in the picture, are calculated detection face and camera lens Point between distance.
As shown in Fig. 2, people needs to be acquired according to point-to-plane distance y and horizontal offset w to distance d between the point of camera lens.Wherein Y has been asked, and x is the maximum wide Pixel Dimensions of head for detecting face, and the maximum wide physical size of the head of standard faces is 154mm, then water Flat offset w: setting detection face center to the horizontal offset of picture centre as w ' pixel, then w=w ' * 0.154/x, unit m.
In the case of considering that camera lens is constant, people of different heights, the upright position that face is imaged in the picture is different, meeting Cause higher people's distance may be slightly larger.Therefore, do not consider in this algorithm face center to picture centre vertical offset.Most Distance d=sqrt (w between being put eventually2+y2)。
To sum up, the present embodiment proposes the non-linear relation model between a kind of target size and actual range, passes through people Face feature detects the facial parameters size of face to estimate, and then seeks distance by fitting function.The program not with pin hole at The camera lens of shooting image are not required as based on principle, thus in application, for various with different degrees of The camera lens of distortion can guarantee the accuracy of distance measurement result.
Embodiment two
Referring to Fig. 3, the present embodiment proposes another human face target distance measuring method based on recognition of face, including step It is rapid:
N frame image in step 301, acquisition video data.
Step 302, for the same detection face in every frame image, respectively according to method shown in FIG. 1 carry out ranging, obtain N number of detection face is to distance between the point of camera lens.
Step 303, carry out denoising, between N number of point in distance choose optimal distance D.
Specifically, can adjust the distance by the method for median filtering carries out dynamic calibration, optimal distance D is obtained.
Since in most cases, people is mainly appeared in the visual field with positive shape of face formula, and head rotation once in a while can produce Raw side face.Therefore, in the present embodiment, for individual human face, do not export its distance since the 1st frame, but count N (N=1~ 20) it after frame, is exported every time using the optimal distance of preceding N frame as real-time range.Although will lead to the dynamic change of distance in this way N frame is lagged, but can be mutated to avoid side face moment bring distance.
Step 304 carries out error correction for optimal distance D, obtains actual range D ', D '=D* (1 ± Etotal), wherein EtotalFor global error, calculation method is as follows:
Etotal=EReal*(1.0+Ecali)*(1.0+Eturn) * 100%=5.92%;
Wherein, ERealFor real face and standard faces error, EcaliTo demarcate error of fitting, EturnFor face activity mistake Difference.
In the present embodiment, real face and standard faces error EReal=6.55/119 (percentage).
Standard faces are obtained according to national statistics data correction, and the different real face of size will give this ranging scheme band Carry out certain error.By national statistics data, standard faces morphological facial length is 119mm, and head maximum width is 154mm, standard deviation Respectively 6.55 and 5.86.
As can be seen that the standard deviation of morphological facial length is bigger compared with the maximum wide standard deviation of head.Due to location algorithm and face ruler Very little is to be fitted calculating according to specified mapping relations, so facial size error will pass to range error.Therefore, may be used The first item that the standard deviation of morphological facial length is accumulated as range error.
Demarcate error of fitting Ecali=0.23/164.82.
Error of fitting is demarcated, is the generated error when carrying out camera calibration using standard faces.Camera calibration process In, it is labeled using characteristic point of the facial features localization algorithm to standard faces, since the light intensity of photo environment has subtle tremble Dynamic, then the characteristic point information detected can also float with the variation of light intensity.Therefore, error statistics are carried out to the sample of calibration, Obtain standard deviation are as follows: 0.23.
It regard the morphological facial length (unit: pixel) of standard faces (after imaging) as benchmark, obtains the second of range error accumulation Item (percentage) Ecali=0.23/164.82
Facial features localization error
Calibration model of fit is based on face characteristic, and facial features localization error influences calibration model of fit, It influences to carry out ranging using calibration model of fit, therefore the detection error of face characteristic is dual.Nevertheless, face characteristic The order of magnitude of detection error is relatively low, is not the main component of error.This part is the same as the 2nd error.
Face activity error Eturn=12.27/164.82
Model of fit is demarcated, is calculated on the basis of positive face.Face activity error, as when face active transition When for side face, brought range error.The analysis of face activity error still uses similar method, to same distance People carries out multiple groups shooting, and in situ, face is done to be moved up and down, is calculated the face and is for the standard deviation of positive face at the people station 12.27。
Due to face activity error comprising facial features localization error including, i.e., this item error contains the 3rd mistake Difference, therefore when progress error accumulation, the 3rd error can be cast out, replace with this item error.The Section 3 of range error accumulation (percentage) Eturn=12.27/164.82.
By above three errors merge because error be accumulation, latter error can on the basis of previous item error, It is overlapped again, so global error is not the direct addition relationship of every error, finally obtains global error Etotal=EReal* (1.0+Ecali)*(1.0+Eturn) * 100%=5.92%.
It is obtained from above formula, range error is accumulated as 5.92%, i.e. for distance in 100cm, mean error about 6cm works as distance When 200cm, mean error in 11.8cm, and so on.
To sum up, the present embodiment two distinguishes ranging to detection face same in the multiple image obtained in real time, then carries out at denoising Reason and error correction after export as a result, replace embodiment one propose only to after single image ranging export result scheme, into One step improves the accuracy of distance measurement result.
Embodiment three
Referring to Fig. 4, present embodiments providing a kind of human face target range unit based on recognition of face, comprising: be used for The image acquisition unit for obtaining at least one image, for carrying out the distance measuring unit of ranging for single detection face.
Further, the distance measuring unit includes:
Target identification module is detected, the human face target in single image, is therefrom determined as test object for identification Detect face;
Scale factor extraction module, for calculating the scale factor for obtaining detection face relative to the positive face of preset standard;
Face size estimation block, for the Pixel Dimensions and scale factor according to the facial parameters of the positive face of standard, estimation Detect the Pixel Dimensions of the facial parameters of face;
Point-to-plane distance computing module, the Pixel Dimensions for the facial parameters according to detection face are calculated by fitting function Optical center point is obtained to the point-to-plane distance for detecting face institute bit plane;
Distance calculation module between point is calculated for the horizontal offset according to point-to-plane distance and detection face in the picture Distance between face and the point of camera lens is detected out.
Wherein, image acquisition unit, it may also be used for obtain the N frame image in video data;At this point, distance measuring unit, is used for Ranging is carried out to the detection face in every frame image respectively, obtains distance between N number of point.
In addition, the human face target range unit of the present embodiment may also include that denoising unit, error correction unit and standard just Face presets unit.
Denoise unit, for carrying out denoising, between N number of point in distance choose optimal distance D.
Error correction unit obtains actual range range D '=D* (1 for carrying out error correction to the optimal distance D ±Etotal), the EtotalFor global error, and
Etotal=EReal*(1.0+Ecali)*(1.0+Eturn) * 100%=5.92%;
Wherein, the ERealFor real face and standard faces error, the EcaliTo demarcate error of fitting, the Eturn For face activity error.
The positive face of standard presets unit, for choosing the positive face of benchmark, defines the physics ruler of the facial parameters of the positive face of the standard It is very little, the positive face of the benchmark is adjusted according to the physical size of the facial parameters, obtains the positive face of the standard.
In addition, the human face target range unit of the present embodiment may also include that the camera for acquiring video and image, with And the storage unit for storing the data such as all kinds of videos and image.
In practical applications, above-mentioned human face target range unit can be specially mobile robot, gate inhibition robot and lock Machine etc. needs to have the various equipment of human face target distance measurement function, does not limit specifically.
Example IV
It will appreciated by the skilled person that all or part of the steps in the various methods of above-described embodiment can be with It is completed by instructing, or relevant hardware is controlled by instruction to complete, which can store computer-readable deposits in one In storage media, and is loaded and executed by processor.
For this purpose, the embodiment of the present invention provides a kind of storage medium, wherein being stored with a plurality of instruction, which can be processed Device is loaded, to execute the step in any human face target distance measuring method provided by the embodiment of the present invention.For example, this refers to Order can execute following steps:
It identifies the human face target in single image, is therefrom determined as the detection face of test object;
Calculate the scale factor for obtaining detection face relative to the positive face of preset standard;
According to the Pixel Dimensions and scale factor of the facial parameters of the positive face of standard, the pixel of the facial parameters of estimation detection face Size;
Optical center point is calculated to detection by fitting function according to the Pixel Dimensions of the facial parameters of detection face The point-to-plane distance of face institute bit plane;
According to the horizontal offset of point-to-plane distance and detection face in described image, the point of detection face and camera lens is calculated Between distance.
The specific implementation of above each operation can be found in the embodiment of front, and details are not described herein.
Wherein, which may include: read-only memory (ROM, Read Only Memory), random access memory Body (RAM, Random Access Memory), disk or CD etc..
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of human face target distance measuring method based on recognition of face includes the steps that carrying out ranging for single detection face;Its It is characterized in that, it is described to include: for the step of single detection face progress ranging
It identifies the human face target in single image, is therefrom determined as the detection face of test object;
Calculate the scale factor for obtaining the detection face relative to the positive face of preset standard;
According to the Pixel Dimensions of the facial parameters of the positive face of the standard and the scale factor, the face ginseng of the detection face is estimated Several Pixel Dimensions;
Optical center point is calculated to detection by fitting function according to the Pixel Dimensions of the facial parameters of the detection face The point-to-plane distance of face institute bit plane;
According to the horizontal offset of the point-to-plane distance and detection face in described image, the point of detection face and camera lens is calculated Between distance.
2. the human face target distance measuring method according to claim 1 based on recognition of face, which is characterized in that the face mesh Mark distance measuring method further include:
Obtain the N frame image in real time video data;
For every frame image, respectively according to described the step of carrying out ranging for single detection face, to the same detection face into Row ranging obtains distance between N number of point;
Carry out denoising, between N number of point in distance choose optimal distance D.
3. the human face target distance measuring method according to claim 2 based on recognition of face, which is characterized in that described from N number of Between the point after distance selection optimal distance, further includes: carry out error correction to the optimal distance D, obtain actual range Range D '=D* (1 ± Etotal), the EtotalFor global error;
The global error EtotalCalculation method are as follows:
Etotal=EReal*(1.0+Ecali)*(1.0+Eturn) * 100%;
Wherein, the ERealFor real face and standard faces error, the EcaliTo demarcate error of fitting, the EturnFor people Face activity error.
4. the human face target distance measuring method according to claim 1 based on recognition of face, which is characterized in that the standard is just The presetting method of face includes:
The positive face of benchmark is chosen, the physical size of the facial parameters of the positive face of the standard is defined;
Printing specimen is made after being adjusted according to the physical size of the facial parameters to the positive face of the benchmark;
The printing specimen take pictures and obtains the positive face of the standard.
5. the human face target distance measuring method according to claim 1 based on recognition of face, which is characterized in that the calculating obtains Take scale factor of the detection face relative to the positive face of preset standard, comprising:
By facial features localization algorithm, the positive face of standard and the corresponding M feature of the detection face described in Detection and Extraction are distinguished Point;Projective transformation is carried out to each characteristic point of detection face and the positive face of standard, obtains the scale factor.
6. a kind of human face target range unit based on recognition of face, comprising: the image for obtaining at least one image obtains Unit, which is characterized in that further include the distance measuring unit for carrying out ranging for single detection face;The distance measuring unit includes:
Target identification module is detected, the human face target in single image, is therefrom determined as the detection of test object for identification Face;
Scale factor extraction module, for calculating the scale factor for obtaining the detection face relative to the positive face of preset standard;
Face size estimation block, for according to the facial parameters of the positive face of the standard Pixel Dimensions and the scale factor, Estimate the Pixel Dimensions of the facial parameters of the detection face;
Point-to-plane distance computing module, the Pixel Dimensions for the facial parameters according to the detection face are calculated by fitting function Optical center point is obtained to the point-to-plane distance for detecting face institute bit plane;
Distance calculation module between point, for the horizontal offset according to the point-to-plane distance and detection face in described image, meter Calculation obtains distance between detection face and the point of camera lens.
7. human face target range unit according to claim 6, which is characterized in that the human face target range unit also wraps Include denoising unit;
Described image acquiring unit, for obtaining the N frame image in video data;
The distance measuring unit obtains N number of described spacing for carrying out ranging respectively to the detection face in every frame image From;
The denoising unit, for carrying out denoising, between N number of point in distance choose optimal distance D.
8. human face target range unit according to claim 7, which is characterized in that the human face target range unit also wraps Include error correction unit;
The error correction unit obtains actual range range D '=D* (1 for carrying out error correction to the optimal distance D ±Etotal), the EtotalFor global error, and
Etotal=EReal*(1.0+Ecali)*(1.0+Eturn) * 100%=5.92%;
Wherein, the ERealFor real face and standard faces error, the EcaliTo demarcate error of fitting, the EturnFor people Face activity error.
9. human face target range unit according to claim 6, which is characterized in that the human face target range unit also wraps It includes the positive face of standard and presets unit;
The positive face of standard presets unit and defines the physics ruler of the facial parameters of the positive face of the standard for choosing the positive face of benchmark It is very little, printing specimen is made after being adjusted according to the physical size of the facial parameters to the positive face of the benchmark;To the printing Sample, which take pictures, obtains the positive face of the standard.
10. a kind of storage medium, which is characterized in that the storage medium is stored with a plurality of instruction, and described instruction is suitable for processor It is loaded, the step in 1 to 5 described in any item human face target distance measuring methods based on recognition of face is required with perform claim Suddenly.
CN201811544922.3A 2018-12-17 2018-12-17 Face target ranging method, device and storage medium based on face recognition Active CN109657607B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811544922.3A CN109657607B (en) 2018-12-17 2018-12-17 Face target ranging method, device and storage medium based on face recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811544922.3A CN109657607B (en) 2018-12-17 2018-12-17 Face target ranging method, device and storage medium based on face recognition

Publications (2)

Publication Number Publication Date
CN109657607A true CN109657607A (en) 2019-04-19
CN109657607B CN109657607B (en) 2020-07-07

Family

ID=66114412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811544922.3A Active CN109657607B (en) 2018-12-17 2018-12-17 Face target ranging method, device and storage medium based on face recognition

Country Status (1)

Country Link
CN (1) CN109657607B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110084763A (en) * 2019-04-29 2019-08-02 北京达佳互联信息技术有限公司 Image repair method, device, computer equipment and storage medium
CN111091083A (en) * 2019-12-09 2020-05-01 Oppo广东移动通信有限公司 Face scale calculation method and device based on image and electronic equipment
CN111784660A (en) * 2020-06-29 2020-10-16 厦门市美亚柏科信息股份有限公司 Method and system for analyzing face correcting degree of face image
CN112070021A (en) * 2020-09-09 2020-12-11 深圳数联天下智能科技有限公司 Distance measurement method, distance measurement system, distance measurement equipment and storage medium based on face detection
CN112818916A (en) * 2021-02-25 2021-05-18 灯岛科技(杭州)有限公司 Method for automatically and truly measuring related parameters of aesthetic standards of human faces
CN113056907A (en) * 2020-07-28 2021-06-29 深圳市大疆创新科技有限公司 Imaging method, imaging device, and storage medium
CN113361337A (en) * 2021-05-19 2021-09-07 中新智擎科技有限公司 Face temperature measurement compensation method and device and electronic equipment
CN114608521A (en) * 2022-03-17 2022-06-10 北京市商汤科技开发有限公司 Monocular distance measuring method and device, electronic equipment and storage medium
CN114608521B (en) * 2022-03-17 2024-06-07 北京市商汤科技开发有限公司 Monocular ranging method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101908212A (en) * 2010-07-09 2010-12-08 深圳超多维光电子有限公司 Tracking three-dimensional display equipment, tracking equipment and method
CN103310200A (en) * 2013-06-25 2013-09-18 郑州吉瑞特电子科技有限公司 Face recognition method
CN106919250A (en) * 2015-12-28 2017-07-04 中国移动通信集团公司 A kind of based reminding method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101908212A (en) * 2010-07-09 2010-12-08 深圳超多维光电子有限公司 Tracking three-dimensional display equipment, tracking equipment and method
CN103310200A (en) * 2013-06-25 2013-09-18 郑州吉瑞特电子科技有限公司 Face recognition method
CN106919250A (en) * 2015-12-28 2017-07-04 中国移动通信集团公司 A kind of based reminding method and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110084763A (en) * 2019-04-29 2019-08-02 北京达佳互联信息技术有限公司 Image repair method, device, computer equipment and storage medium
CN111091083A (en) * 2019-12-09 2020-05-01 Oppo广东移动通信有限公司 Face scale calculation method and device based on image and electronic equipment
CN111091083B (en) * 2019-12-09 2023-08-08 Oppo广东移动通信有限公司 Face scale calculation method and device based on image and electronic equipment
CN111784660A (en) * 2020-06-29 2020-10-16 厦门市美亚柏科信息股份有限公司 Method and system for analyzing face correcting degree of face image
CN111784660B (en) * 2020-06-29 2022-07-15 厦门市美亚柏科信息股份有限公司 Method and system for analyzing frontal face degree of face image
CN113056907A (en) * 2020-07-28 2021-06-29 深圳市大疆创新科技有限公司 Imaging method, imaging device, and storage medium
CN112070021A (en) * 2020-09-09 2020-12-11 深圳数联天下智能科技有限公司 Distance measurement method, distance measurement system, distance measurement equipment and storage medium based on face detection
CN112818916A (en) * 2021-02-25 2021-05-18 灯岛科技(杭州)有限公司 Method for automatically and truly measuring related parameters of aesthetic standards of human faces
CN113361337A (en) * 2021-05-19 2021-09-07 中新智擎科技有限公司 Face temperature measurement compensation method and device and electronic equipment
CN114608521A (en) * 2022-03-17 2022-06-10 北京市商汤科技开发有限公司 Monocular distance measuring method and device, electronic equipment and storage medium
CN114608521B (en) * 2022-03-17 2024-06-07 北京市商汤科技开发有限公司 Monocular ranging method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109657607B (en) 2020-07-07

Similar Documents

Publication Publication Date Title
CN109657607A (en) A kind of human face target distance measuring method, device and storage medium based on recognition of face
Chen et al. High-accuracy multi-camera reconstruction enhanced by adaptive point cloud correction algorithm
CN108549873B (en) Three-dimensional face recognition method and three-dimensional face recognition system
US9965870B2 (en) Camera calibration method using a calibration target
CN107798685B (en) Pedestrian's height determines method, apparatus and system
CN111476827B (en) Target tracking method, system, electronic device and storage medium
CN110580723A (en) method for carrying out accurate positioning by utilizing deep learning and computer vision
CN106971408B (en) A kind of camera marking method based on space-time conversion thought
CN110672020A (en) Stand tree height measuring method based on monocular vision
CN103278138A (en) Method for measuring three-dimensional position and posture of thin component with complex structure
CN112648976B (en) Live-action image measuring method and device, electronic equipment and storage medium
KR101974638B1 (en) Apparatus for processing plant images and method thereof
CN109003312A (en) A kind of camera calibration method based on nonlinear optimization
CN111179335A (en) Standing tree measuring method based on binocular vision
CN111323125A (en) Temperature measurement method and device, computer storage medium and electronic equipment
CN115187612A (en) Plane area measuring method, device and system based on machine vision
Yang et al. Auto-recognition Method for Pointer-type Meter Based on Binocular Vision.
CN112634375B (en) Plane calibration and three-dimensional reconstruction method in AI intelligent detection
CN113658270A (en) Multi-view visual calibration method, device, medium and system based on workpiece hole center
CN111833379A (en) Method for tracking target position in moving object by monocular camera
Xu Study on accurate measurement technology for microscopic image
CN112990190A (en) Method and device for identifying reading of pointer instrument
CN102967277A (en) Method for measuring depth of parallelism of orienting pipes
CN105078404A (en) Fully automatic eye movement tracking distance measuring calibration instrument based on laser algorithm and use method of calibration instrument
US20230018554A1 (en) Method for inspecting an object

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