CN116205952B - Face recognition and tracking method and device, electronic equipment and storage medium - Google Patents
Face recognition and tracking method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116205952B CN116205952B CN202310418131.0A CN202310418131A CN116205952B CN 116205952 B CN116205952 B CN 116205952B CN 202310418131 A CN202310418131 A CN 202310418131A CN 116205952 B CN116205952 B CN 116205952B
- Authority
- CN
- China
- Prior art keywords
- human body
- image
- camera
- zoom
- zoom camera
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/246—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a face recognition and tracking method, a device, electronic equipment and a storage medium, belonging to the technical field of image processing, wherein the method comprises the following steps: acquiring a first image of a human body acquired by a fixed-focus camera, and performing target tracking on the first image to acquire the position information of the human body; performing focal length adjustment on the zoom camera to obtain a second image of the human body acquired by the zoom camera after focal length adjustment; and carrying out face recognition on the second image to acquire the identity information of the human body. The invention can accurately track human body and face recognition simultaneously, thereby improving timeliness and accuracy of acquiring personnel identity information and position information.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and apparatus for face recognition and tracking, an electronic device, and a storage medium.
Background
At present, the face recognition technology is widely applied to the intelligent travel field, the identity recognition field, the access control system field and the like. The face recognition system mainly comprises four components, namely face image acquisition and detection, face image preprocessing, face image feature extraction, matching and recognition.
The face recognition technology is mainly based on facial features of people, and firstly judges whether the input face image or video stream has a face or not; if the human face exists, further giving the position, the size and the position information of each main facial organ; according to the information, further extracting the identity characteristics contained in each face; which is compared to known faces to identify the identity of each face.
But in some scenes, face recognition and tracking are required to be performed simultaneously, so that the identity information and the position information of the tracked personnel are obtained in time. For example, when tracking a target person and searching and rescuing tourists in a scenic spot, the position information of the person needs to be positioned according to the identity information of the person. Therefore, the simultaneous accurate face recognition and tracking is an important problem to be solved urgently.
The prior art generally adopts a traditional fixed focal length camera to simultaneously perform face recognition and tracking. Under the condition that the person is far away from the camera, only approximate information of the person can be obtained, the detail characteristics of the face cannot be recorded completely, and accurate face recognition cannot be achieved. Therefore, the prior art cannot accurately perform face recognition and tracking at the same time.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention provides a face recognition and tracking method, a device, electronic equipment and a storage medium.
The invention provides a face recognition and tracking method, which comprises the following steps:
acquiring a first image of a human body acquired by a fixed-focus camera, and performing target tracking on the first image to acquire the position information of the human body;
performing focal length adjustment on the zoom camera to obtain a second image of the human body acquired by the zoom camera after focal length adjustment;
and carrying out face recognition on the second image to acquire the identity information of the human body.
According to the method for recognizing and tracking the human body provided by the invention, the step of performing target tracking on the first image to acquire the position information of the human body comprises the following steps:
acquiring a third image of the human body acquired by the fixed-focus camera and a fourth image of the human body acquired by the zoom camera;
binocular positioning is carried out on the human body according to the third image and the fourth image, and initial position information of the human body is obtained;
determining a human body area of the human body in the third image according to the initial position information of the human body;
determining a human body region of the human body in the first image according to the human body region of the human body in the third image under the condition that the first image is the next frame of the third image;
and acquiring the position information of the human body according to the human body area of the human body in the first image and the calibration result of the fixed-focus camera.
According to the face recognition and tracking method provided by the invention, the step of adjusting the focal length of the zoom camera comprises the following steps:
acquiring a third image of the human body acquired by the fixed-focus camera and a fourth image of the human body acquired by the zoom camera;
binocular positioning is carried out on the human body according to the third image and the fourth image, and initial position information of the human body is obtained;
determining a human body area of the human body in the fourth image according to the initial position information of the human body;
determining a face area in the human body area, and moving a coordinate system origin of an imaging plane of the zoom camera to the face area;
and determining the zoom multiple of the zoom camera, and adjusting the focal length of the zoom camera according to the zoom multiple.
According to the face recognition and tracking method provided by the invention, the step of determining the zoom multiple of the zoom camera comprises the following steps:
determining the positions of two pupils in the face region;
determining the number of pixels between the two pupils in the face region according to the positions of the two pupils;
and determining the zoom multiple of the zoom camera according to the ratio between the preset pixel number and the pixel number between the two pupils.
According to the method for recognizing and tracking the human body provided by the invention, after the step of acquiring the second image of the human body acquired by the zoom camera with the adjusted focal length, the method further comprises the following steps:
moving a coordinate system origin of an imaging plane of the zoom camera to a midpoint of the imaging plane of the zoom camera;
and according to the zoom multiple of the zoom camera, the focal length of the zoom camera is restored to the focal length before adjustment.
According to the method for recognizing and tracking the human body provided by the invention, before the step of acquiring the first image of the human body acquired by the fixed-focus camera, the method further comprises the following steps:
adjusting the focal length of the zoom camera so that the focal length of the zoom camera is consistent with the focal length of the fixed-focus camera;
and adjusting the holder of the zoom camera so that the optical axis of the zoom camera is parallel to the optical axis of the fixed-focus camera.
According to the method for recognizing and tracking the human body provided by the invention, before the step of acquiring the first image of the human body acquired by the fixed-focus camera, the method further comprises the following steps:
calibrating the zoom camera and the fixed focus camera, and performing binocular stereo correction on the calibrated zoom camera and fixed focus camera, so that the imaging plane of the zoom camera and the imaging plane of the fixed focus camera are in the same plane.
The invention also provides a device for face recognition and tracking, which comprises:
the tracking module is used for acquiring a first image of a human body acquired by the fixed-focus camera, and carrying out target tracking on the first image to acquire the position information of the human body;
the adjusting module is used for adjusting the focal length of the zoom camera and acquiring a second image of the human body acquired by the zoom camera after focal length adjustment;
and the identification module is used for carrying out face identification on the second image and acquiring the identity information of the human body.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the face recognition and tracking method as described in any one of the above when executing the program.
The invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of face recognition and tracking as described in any of the above.
According to the face recognition and tracking method, device, electronic equipment and storage medium, the target tracking is carried out by using the human body image acquired by the fixed-focus camera to acquire the human body position information, and meanwhile, the human body image acquired by zooming of the zoom camera is used for face recognition, so that the human body tracking and the face recognition can be accurately carried out at the same time, and the timeliness and the accuracy of acquiring the identity information and the position information of the person are improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a face recognition and tracking method according to the present invention;
fig. 2 is a schematic flow chart of a target tracking method in the face recognition and tracking method provided by the invention;
FIG. 3 is a second flow chart of the face recognition and tracking method according to the present invention;
fig. 4 is a schematic structural diagram of a face recognition and tracking device provided by the invention;
fig. 5 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The following describes a face recognition and tracking method according to the present invention with reference to fig. 1, including:
step 101, acquiring a first image of a human body acquired by a fixed-focus camera, and performing target tracking on the first image to acquire the position information of the human body;
the focal length of the fixed-focus camera remains unchanged. After a human body enters the field of view of the fixed-focus camera, the fixed-focus camera shoots the human body.
The first image of the human body acquired by the fixed-focus camera is a current frame containing the human body and shot by the fixed-focus camera, and target tracking is carried out on the human body in the current frame. The present embodiment is not limited to the target tracking method.
Optionally, the target tracking method shown in fig. 2 is used to track the target on the first image. Firstly, a user calibrates a human body area in an initial frame acquired by a fixed-focus camera by using a rectangular frame, and an appearance model is built according to characteristics in the rectangular frame; then, predicting a region in which a human body may appear in the current frame according to the human body region in the previous frame through a motion model of the human body, thereby generating a plurality of candidate frames in the current frame; then, extracting the characteristics of each candidate frame through an appearance model, scoring each candidate frame through an observation model according to the similarity between the characteristics of each candidate frame and the characteristics of the human body region in the previous frame, and taking the candidate frame with the highest score as the human body region in the current frame; and finally, updating the observation model on line by using a model updating algorithm according to the characteristics of the human body region in the current frame.
The aim of calibrating the fixed-focus camera is to establish the relationship between the image pixel position of the fixed-focus camera and the scene point position, namely the relationship between the world coordinate system and the image coordinate system. The calibration method is to solve the internal and external parameters of the camera according to the camera model by the image coordinates of the known feature points, thereby determining the conversion matrix from the imaging plane of the fixed-focus camera to the world coordinates.
And recovering the three-dimensional coordinates of the human body, namely the position information of the human body, from the human body area in the first image according to the human body area in the first image acquired by the fixed-focus camera and the conversion matrix of the fixed-focus camera.
The position information of the human body at each moment is obtained by tracking the human body, and the motion trail of the human body is obtained according to the position information of the human body at each moment.
102, performing focal length adjustment on a zoom camera to obtain a second image of the human body acquired by the zoom camera after focal length adjustment;
the focal length of the zoom camera may vary according to the distance between the human body and the zoom camera. After a human body enters the field of view of the zoom camera, the zoom camera shoots the human body. Two cameras shoot the same human body simultaneously.
Optionally, in order to clearly photograph the human body, the focal length is adjusted according to the distance between the human body and the zoom camera. When the distance between the human body and the zoom camera is far, the focal length of the zoom camera is increased.
The second image is an image containing a human body, which is shot after the focal length of the zoom camera is adjusted.
And step 103, performing face recognition on the second image to acquire identity information of the human body.
In the process of tracking a human body by using the first image shot by the fixed-focus camera, one or more second images shot by the zoom camera are used for carrying out face recognition on the human body. The present embodiment does not limit the face recognition algorithm.
If the first image shot by the fixed-focus camera is used for simultaneously tracking and recognizing the human body, under a large scene, even if the fixed-focus camera is a high-definition camera, the human body can only obtain the approximate information of the human body due to the fact that the distance between the human body and the fixed-focus camera is far, and the human body cannot be recognized.
If the second image shot by the zoom camera is used for simultaneously tracking and recognizing the human body, local amplification and recognition are carried out aiming at some key information, and the human body tracking effect is poor because only local information can be seen after zooming.
According to the embodiment, the human body position information is obtained through target tracking by using the human body image collected by the fixed-focus camera, meanwhile, the human body image collected after zooming by the zoom camera is used for face recognition, and the human body tracking and the face recognition can be accurately carried out at the same time, so that the timeliness and the accuracy of obtaining the identity information and the position information of the personnel are improved.
On the basis of the above embodiment, the step of performing object tracking on the first image to obtain the position information of the human body in this embodiment includes:
acquiring a third image of the human body acquired by the fixed-focus camera and a fourth image of the human body acquired by the zoom camera;
binocular positioning is carried out on the human body according to the third image and the fourth image, and initial position information of the human body is obtained;
optionally, the third image and the fourth image are initial frames of the human body acquired by the two cameras.
Before face recognition and target tracking, binocular positioning is performed on a human body according to images acquired by two cameras, and the spatial position of the human body in a world coordinate system, namely initial position information, is acquired.
The two cameras are adjusted before binocular positioning, so that the two cameras meet the binocular positioning condition, and the two cameras are consistent in focal length, parallel in optical axis and in the same imaging plane.
Determining a human body area of the human body in the third image according to the initial position information of the human body;
and obtaining the human body region of the human body in the third image according to the initial position information of the human body and the conversion matrix obtained by calibrating the fixed-focus camera.
Determining a human body region of the human body in the first image according to the human body region of the human body in the third image under the condition that the first image is the next frame of the third image;
after the human body area in the initial frame is acquired, a target tracking method is used for tracking the human body, and the human body area in the next frame of the initial frame is obtained.
And acquiring the position information of the human body according to the human body area of the human body in the first image and the calibration result of the fixed-focus camera.
And obtaining the position information of the human body at the next moment according to the human body area in the next frame and the conversion matrix obtained by calibrating the fixed-focus camera.
According to the human body tracking method, the fixed focus camera and the zoom camera are used for binocular positioning of the human body, initial position information of the human body is obtained, initial human body areas for human body tracking are automatically determined according to the initial position information, and efficiency and accuracy of human body tracking are improved.
On the basis of the above embodiment, the step of performing focal length adjustment on the zoom camera in this embodiment includes:
acquiring a third image of the human body acquired by the fixed-focus camera and a fourth image of the human body acquired by the zoom camera;
binocular positioning is carried out on the human body according to the third image and the fourth image, and initial position information of the human body is obtained;
optionally, the third image and the fourth image are initial frames of the human body acquired by the two cameras.
Before face recognition and target tracking, binocular positioning is performed on a human body according to images acquired by two cameras, and the spatial position of the human body in a world coordinate system, namely initial position information, is acquired.
The two cameras are adjusted before binocular positioning, so that the two cameras meet the binocular positioning condition, and the two cameras are consistent in focal length, parallel in optical axis and in the same imaging plane.
Determining a human body area of the human body in the fourth image according to the initial position information of the human body;
and obtaining the human body region of the human body in the fourth image according to the initial position information of the human body and the conversion matrix obtained by calibrating the zoom camera.
Determining a face area in the human body area, and moving a coordinate system origin of an imaging plane of the zoom camera to the face area;
optionally, the face area of the upper part of the human body area is determined according to the preset proportion of the face area to the human body area, so as to determine the coordinate P of the center point of the face area on the imaging plane of the zoom camera o (x p ,y p ) At this time, the origin of the imaging plane coordinate system is the center position of the imaging plane.
A holder motor for driving the zoom camera to move the origin of coordinates of an imaging plane of the zoom camera to P o The point, thereby placing the face region at the midpoint of the imaging plane of the zoom camera.
And determining the zoom multiple of the zoom camera, and adjusting the focal length of the zoom camera according to the zoom multiple.
Optionally, the zoom multiple is determined according to the distance of the human body from the zoom camera. The present embodiment does not limit the method of determining the zoom magnification.
And determining the zoom multiple to enlarge the face area, so that the accuracy of face recognition is improved.
In the embodiment, binocular positioning is performed on a human body by using the fixed-focus camera and the zoom camera to obtain initial position information of the human body, and a human body area is accurately determined according to the initial position information, so that a human face in the human body area is placed at the middle point of an imaging plane, and the human face is accurately identified.
On the basis of the foregoing embodiment, the step of determining the zoom multiple of the zoom camera in this embodiment includes:
determining the positions of two pupils in the face region;
two pupils in the face region are identified, and the positions of the two pupils are determined.
Determining the number of pixels between the two pupils in the face region according to the positions of the two pupils;
the number of pixels between the two pupils is counted as m.
And determining the zoom multiple of the zoom camera according to the ratio between the preset pixel number and the pixel number between the two pupils.
The accuracy of face recognition is related to the image pixels. Generally, more than 25 to 30 pixels are needed between pupils to realize face recognition. When the distance between the camera and the face is far, the face recognition accuracy is not high.
Alternatively, the preset number of pixels is generally between 25 and 30. When the preset pixel number is 30, the zoom multiple is 30/m.
The original focal length of the zoom camera isFAdjusting the focal length of the zoom camera to beThereby enlarging the face area and providing a high-definition face image for realizing accurate face recognition.
And carrying out face recognition on the human body through a face recognition algorithm according to the high-definition face image, so as to acquire the identity information of the human body.
According to the embodiment, the face is enlarged according to the number of pixels between two pupils in the face, and the accuracy of face recognition is improved.
On the basis of the above embodiment, after the step of acquiring the second image of the human body acquired by the zoom camera after the focal length adjustment in this embodiment, the method further includes:
moving a coordinate system origin of an imaging plane of the zoom camera to a midpoint of the imaging plane of the zoom camera;
and according to the zoom multiple of the zoom camera, the focal length of the zoom camera is restored to the focal length before adjustment.
And restoring the holder position and focal length of the zoom camera to initial values, and preparing for next face recognition and tracking.
In the process of tracking the human body by using the fixed-focus camera, the focal length and the origin of the coordinate system of the imaging plane can be recovered after the human body in a certain frame of image is subjected to face recognition by using the zoom camera, so that binocular positioning and face recognition are convenient to carry out next time.
On the basis of the foregoing embodiments, before the step of acquiring the first image of the human body acquired by the fixed-focus camera, the method further includes:
adjusting the focal length of the zoom camera so that the focal length of the zoom camera is consistent with the focal length of the fixed-focus camera;
and adjusting the holder of the zoom camera so that the optical axis of the zoom camera is parallel to the optical axis of the fixed-focus camera.
And adjusting the focal length of the zoom camera to be consistent with the focal length of the fixed-focus camera. And adjusting the holder of the zoom cameras to enable the optical axes of the two cameras to be parallel.
On the basis of the foregoing embodiments, before the step of acquiring the first image of the human body acquired by the fixed-focus camera, the method further includes:
calibrating the zoom camera and the fixed focus camera, and performing binocular stereo correction on the calibrated zoom camera and fixed focus camera, so that the imaging plane of the zoom camera and the imaging plane of the fixed focus camera are in the same plane.
As shown in fig. 3, the present embodiment includes binocular camera calibration and correction, binocular positioning, target tracking and positioning by a fixed focus camera, and target face recognition by a zoom camera.
The binocular camera calibration and correction comprises camera monocular calibration, binocular camera stereoscopic correction and the like, and internal and external parameters of the two cameras and the position relationship between the two cameras are obtained.
Camera monocular calibration solves the internal and external parameters of the camera according to the camera model by the image coordinates of the known feature points, so as to determine the conversion matrix from the imaging plane of the camera to the world coordinates.
The binocular camera three-dimensional calibration aims at determining the position relation of two cameras, and a coordinate transformation matrix between the two cameras is calculated by a rotation matrix and a translation vector of the two cameras.
The depth of the object point is estimated through the two images, and the same object point needs to be accurately matched in the two images. To reduce the amount of computation of the matching, the imaging planes of the two cameras should be in the same plane. However, it is difficult to realize the object by placing the cameras, so that binocular camera stereo correction is required, and the imaging planes of the two cameras are positioned on the same plane by utilizing the geometric figure transformation relationship.
The face recognition and tracking method in the embodiment can be applied to face recognition and tracking in a large scene, is not limited by the face recognition distance, and can be arranged on a main road with large traffic. When the target personnel need to be tracked, the identity information of the target personnel can be input, the face recognition is carried out on pedestrians going and going on the arterial road by using the method provided by the embodiment, and the moving track of the target personnel is tracked after the target personnel are locked.
For complicated mountain areas, the topography is complicated, and once personnel are lost, search and rescue work is difficult. By using the method provided by the embodiment, identity recognition is performed on tourists in the scenic spot, the position information of the tourists is recorded, the travel track of the tourists can be provided during search and rescue, the search and rescue time is shortened, and the search and rescue efficiency is improved.
The following describes the apparatus for face recognition and tracking provided by the present invention, and the apparatus for face recognition and tracking described below and the method for face recognition and tracking described above may be referred to correspondingly.
As shown in fig. 4, the apparatus includes a tracking module 401, an adjusting module 402, and an identifying module 403, wherein:
the tracking module 401 is configured to acquire a first image of a human body acquired by a fixed-focus camera, and perform target tracking on the first image to acquire position information of the human body;
the adjusting module 402 is configured to perform focal length adjustment on the zoom camera, and obtain a second image of the human body acquired by the zoom camera after focal length adjustment;
the recognition module 403 is configured to perform face recognition on the second image, and obtain identity information of the human body.
Optionally, the high-definition zoom camera (including the cradle head) and the fixed-focus camera are fixed on a base. It is assumed that parameters such as resolution and definition are the same except for whether the two cameras are variable, and the distance between the two parameters is fixed.
The device is edge computing equipment, the zoom camera is responsible for face recognition and the fixed focus camera is responsible for person tracking. When the focal lengths of the two are the same, binocular positioning can be realized.
According to the embodiment, the human body position information is obtained through target tracking by using the human body image collected by the fixed-focus camera, meanwhile, the human body image collected after zooming by the zoom camera is used for face recognition, and the human body tracking and the face recognition can be accurately carried out at the same time, so that the timeliness and the accuracy of obtaining the identity information and the position information of the personnel are improved.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a face recognition and tracking method comprising: acquiring a first image of a human body acquired by a fixed-focus camera, and performing target tracking on the first image to acquire the position information of the human body; performing focal length adjustment on the zoom camera to obtain a second image of the human body acquired by the zoom camera after focal length adjustment; and carrying out face recognition on the second image to acquire the identity information of the human body.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, where the computer program product includes a computer program, where the computer program can be stored on a non-transitory computer readable storage medium, where the computer program when executed by a processor can perform the face recognition and tracking method provided by the above methods, and the method includes: acquiring a first image of a human body acquired by a fixed-focus camera, and performing target tracking on the first image to acquire the position information of the human body; performing focal length adjustment on the zoom camera to obtain a second image of the human body acquired by the zoom camera after focal length adjustment; and carrying out face recognition on the second image to acquire the identity information of the human body.
In yet another aspect, the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the method of face recognition and tracking provided by the above methods, the method comprising: acquiring a first image of a human body acquired by a fixed-focus camera, and performing target tracking on the first image to acquire the position information of the human body; performing focal length adjustment on the zoom camera to obtain a second image of the human body acquired by the zoom camera after focal length adjustment; and carrying out face recognition on the second image to acquire the identity information of the human body.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (9)
1. A method for face recognition and tracking, comprising:
acquiring a first image of a human body acquired by a fixed-focus camera, and performing target tracking on the first image to acquire the position information of the human body;
performing focal length adjustment on the zoom camera to obtain a second image of the human body acquired by the zoom camera after focal length adjustment;
performing face recognition on the second image to acquire identity information of the human body;
the step of adjusting the focal length of the zoom camera comprises the following steps:
acquiring a third image of the human body acquired by the fixed-focus camera and a fourth image of the human body acquired by the zoom camera;
binocular positioning is carried out on the human body according to the third image and the fourth image, and initial position information of the human body is obtained;
determining a human body area of the human body in the fourth image according to the initial position information of the human body;
determining a face area in the human body area, and moving a coordinate system origin of an imaging plane of the zoom camera to the face area;
and determining the zoom multiple of the zoom camera, and adjusting the focal length of the zoom camera according to the zoom multiple.
2. The method of face recognition and tracking according to claim 1, wherein the step of performing object tracking on the first image to obtain the position information of the human body includes:
determining a human body area of the human body in the third image according to the initial position information of the human body;
determining a human body region of the human body in the first image according to the human body region of the human body in the third image under the condition that the first image is the next frame of the third image;
and acquiring the position information of the human body according to the human body area of the human body in the first image and the calibration result of the fixed-focus camera.
3. The method of face recognition and tracking according to claim 1, wherein the step of determining the zoom magnification of the zoom camera includes:
determining the positions of two pupils in the face region;
determining the number of pixels between the two pupils in the face region according to the positions of the two pupils;
and determining the zoom multiple of the zoom camera according to the ratio between the preset pixel number and the pixel number between the two pupils.
4. The method for face recognition and tracking according to claim 3, further comprising, after the step of acquiring the second image of the human body acquired by the zoom camera after the focal length adjustment:
moving a coordinate system origin of an imaging plane of the zoom camera to a midpoint of the imaging plane of the zoom camera;
and according to the zoom multiple of the zoom camera, the focal length of the zoom camera is restored to the focal length before adjustment.
5. The method for face recognition and tracking according to claim 1 or 2, further comprising, before the step of acquiring the first image of the human body acquired by the fixed-focus camera:
adjusting the focal length of the zoom camera so that the focal length of the zoom camera is consistent with the focal length of the fixed-focus camera;
and adjusting the holder of the zoom camera so that the optical axis of the zoom camera is parallel to the optical axis of the fixed-focus camera.
6. The method for face recognition and tracking according to claim 1 or 2, further comprising, before the step of acquiring the first image of the human body acquired by the fixed-focus camera:
calibrating the zoom camera and the fixed focus camera, and performing binocular stereo correction on the calibrated zoom camera and fixed focus camera, so that the imaging plane of the zoom camera and the imaging plane of the fixed focus camera are in the same plane.
7. A face recognition and tracking device, comprising:
the tracking module is used for acquiring a first image of a human body acquired by the fixed-focus camera, and carrying out target tracking on the first image to acquire the position information of the human body;
the adjusting module is used for adjusting the focal length of the zoom camera and acquiring a second image of the human body acquired by the zoom camera after focal length adjustment;
the identification module is used for carrying out face identification on the second image and acquiring identity information of the human body;
the adjusting module is used for:
acquiring a third image of the human body acquired by the fixed-focus camera and a fourth image of the human body acquired by the zoom camera;
binocular positioning is carried out on the human body according to the third image and the fourth image, and initial position information of the human body is obtained;
determining a human body area of the human body in the fourth image according to the initial position information of the human body;
determining a face area in the human body area, and moving a coordinate system origin of an imaging plane of the zoom camera to the face area;
and determining the zoom multiple of the zoom camera, and adjusting the focal length of the zoom camera according to the zoom multiple.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of face recognition and tracking as claimed in any one of claims 1 to 6 when the program is executed by the processor.
9. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a method of face recognition and tracking as claimed in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310418131.0A CN116205952B (en) | 2023-04-19 | 2023-04-19 | Face recognition and tracking method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310418131.0A CN116205952B (en) | 2023-04-19 | 2023-04-19 | Face recognition and tracking method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116205952A CN116205952A (en) | 2023-06-02 |
CN116205952B true CN116205952B (en) | 2023-08-04 |
Family
ID=86514909
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310418131.0A Active CN116205952B (en) | 2023-04-19 | 2023-04-19 | Face recognition and tracking method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116205952B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118397567B (en) * | 2024-06-25 | 2024-09-06 | 杭州海康威视数字技术股份有限公司 | Article delivery method and apparatus |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101520838A (en) * | 2008-02-27 | 2009-09-02 | 中国科学院自动化研究所 | Automatic-tracking and automatic-zooming method for acquiring iris images |
CN108124090A (en) * | 2016-11-26 | 2018-06-05 | 沈阳新松机器人自动化股份有限公司 | Mobile robot double-camera face identification device and method |
CN108305326A (en) * | 2018-01-22 | 2018-07-20 | 中国人民解放军陆军航空兵学院 | A method of mixing virtual reality |
CN110177257A (en) * | 2019-06-26 | 2019-08-27 | 北京深醒科技有限公司 | A kind of multiple-camera video monitoring apparatus and its human body tracing method |
WO2021057887A1 (en) * | 2019-09-26 | 2021-04-01 | 北京外号信息技术有限公司 | Method and system for setting virtual object capable of being presented to target |
CN113268785A (en) * | 2021-07-19 | 2021-08-17 | 军事科学院系统工程研究院网络信息研究所 | Peep-proof display method based on target identification and automatic focusing |
CN113688794A (en) * | 2021-09-24 | 2021-11-23 | 北京声智科技有限公司 | Identity recognition method and device, electronic equipment and computer readable storage medium |
WO2022037633A1 (en) * | 2020-08-19 | 2022-02-24 | 展讯通信(上海)有限公司 | Calibration method and apparatus for binocular camera, image correction method and apparatus for binocular camera, storage medium, terminal and intelligent device |
CN114979956A (en) * | 2022-04-11 | 2022-08-30 | 齐鲁空天信息研究院 | Unmanned aerial vehicle aerial photography ground target positioning method and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101172747B1 (en) * | 2010-08-16 | 2012-08-14 | 한국표준과학연구원 | Camera tracking monitoring system and method using thermal image coordinates |
-
2023
- 2023-04-19 CN CN202310418131.0A patent/CN116205952B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101520838A (en) * | 2008-02-27 | 2009-09-02 | 中国科学院自动化研究所 | Automatic-tracking and automatic-zooming method for acquiring iris images |
CN108124090A (en) * | 2016-11-26 | 2018-06-05 | 沈阳新松机器人自动化股份有限公司 | Mobile robot double-camera face identification device and method |
CN108305326A (en) * | 2018-01-22 | 2018-07-20 | 中国人民解放军陆军航空兵学院 | A method of mixing virtual reality |
CN110177257A (en) * | 2019-06-26 | 2019-08-27 | 北京深醒科技有限公司 | A kind of multiple-camera video monitoring apparatus and its human body tracing method |
WO2021057887A1 (en) * | 2019-09-26 | 2021-04-01 | 北京外号信息技术有限公司 | Method and system for setting virtual object capable of being presented to target |
WO2022037633A1 (en) * | 2020-08-19 | 2022-02-24 | 展讯通信(上海)有限公司 | Calibration method and apparatus for binocular camera, image correction method and apparatus for binocular camera, storage medium, terminal and intelligent device |
CN113268785A (en) * | 2021-07-19 | 2021-08-17 | 军事科学院系统工程研究院网络信息研究所 | Peep-proof display method based on target identification and automatic focusing |
CN113688794A (en) * | 2021-09-24 | 2021-11-23 | 北京声智科技有限公司 | Identity recognition method and device, electronic equipment and computer readable storage medium |
CN114979956A (en) * | 2022-04-11 | 2022-08-30 | 齐鲁空天信息研究院 | Unmanned aerial vehicle aerial photography ground target positioning method and system |
Non-Patent Citations (1)
Title |
---|
Joint view-identity manifold for infrared target tracking and recognition;Jiulu Gong等;《 Computer Vision and Image Understanding》;第118卷;第211-224页 * |
Also Published As
Publication number | Publication date |
---|---|
CN116205952A (en) | 2023-06-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106251399B (en) | A kind of outdoor scene three-dimensional rebuilding method and implementing device based on lsd-slam | |
EP3236391B1 (en) | Object detection and recognition under out of focus conditions | |
KR100714724B1 (en) | Apparatus and method for estimating facial pose, and face recognition system by the method | |
WO2018232837A1 (en) | Tracking photography method and tracking apparatus for moving target | |
KR101510312B1 (en) | 3D face-modeling device, system and method using Multiple cameras | |
CN113762009B (en) | Crowd counting method based on multi-scale feature fusion and double-attention mechanism | |
JP6376474B2 (en) | Multi-view imaging system, acquired image composition processing method, and program | |
CN116205952B (en) | Face recognition and tracking method and device, electronic equipment and storage medium | |
KR20140054710A (en) | Apparatus and method for generating 3d map | |
KR20140074201A (en) | Tracking device | |
CN109141432A (en) | A kind of indoor positioning air navigation aid assisted based on image space and panorama | |
CN109753925A (en) | A kind of method and apparatus that iris feature extracts | |
CN110120013A (en) | A kind of cloud method and device | |
CN116051736A (en) | Three-dimensional reconstruction method, device, edge equipment and storage medium | |
CN113139504B (en) | Identity recognition method, device, equipment and storage medium | |
CN116883472B (en) | Face nursing system based on face three-dimensional image registration | |
CN104104911B (en) | Timestamp in panoramic picture generating process is eliminated and remapping method and system | |
KR20110024178A (en) | Device and method for face recognition using 3 dimensional shape information | |
CN113255449A (en) | Real-time matching method of binocular video images | |
CN107437257A (en) | Moving object segmentation and dividing method under a kind of mobile background | |
CN116778533A (en) | Palm print full region-of-interest image extraction method, device, equipment and medium | |
CN108090930A (en) | Barrier vision detection system and method based on binocular solid camera | |
CN113538315B (en) | Image processing method and device | |
CN113225484B (en) | Method and device for rapidly acquiring high-definition picture shielding non-target foreground | |
CN116206050A (en) | Three-dimensional reconstruction method, electronic device, and computer-readable storage medium |
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 |