CN111259825B - PTZ scanning path generation method based on face recognition - Google Patents

PTZ scanning path generation method based on face recognition Download PDF

Info

Publication number
CN111259825B
CN111259825B CN202010060746.7A CN202010060746A CN111259825B CN 111259825 B CN111259825 B CN 111259825B CN 202010060746 A CN202010060746 A CN 202010060746A CN 111259825 B CN111259825 B CN 111259825B
Authority
CN
China
Prior art keywords
ptz
face
points
path
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
Application number
CN202010060746.7A
Other languages
Chinese (zh)
Other versions
CN111259825A (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.)
Chengdu Yineng Sci&tech Co ltd
Original Assignee
Chengdu Yineng Sci&tech 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 Chengdu Yineng Sci&tech Co ltd filed Critical Chengdu Yineng Sci&tech Co ltd
Priority to CN202010060746.7A priority Critical patent/CN111259825B/en
Publication of CN111259825A publication Critical patent/CN111259825A/en
Application granted granted Critical
Publication of CN111259825B publication Critical patent/CN111259825B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06V40/166Detection; Localisation; Normalisation using acquisition arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • G06V10/12Details of acquisition arrangements; Constructional details thereof
    • G06V10/14Optical characteristics of the device performing the acquisition or on the illumination arrangements
    • G06V10/147Details of sensors, e.g. sensor lenses

Abstract

The invention relates to the technical field of PTZ, and aims to solve the problem of low efficiency of setting a PTZ scanning path in the existing manual mode, and provides a PTZ scanning path generation method based on face recognition, which comprises the following steps: setting a PTZ camera corresponding to a shooting field, determining a plurality of position points in the space of the shooting field, and determining PTZ path points corresponding to the position points, wherein the PTZ path points at least comprise PTZ coordinates corresponding to the position points; determining PTZ coordinates corresponding to a face after the PTZ camera acquires the face picture; and determining a PTZ coordinate area corresponding to the to-be-imaged area according to the PTZ coordinates corresponding to each face, selecting all PTZ path points in the PTZ coordinate area, and generating a PTZ scanning path capable of covering all PTZ path points in the PTZ coordinate area. The PTZ scanning path is automatically generated, so that the installation and deployment efficiency is improved, and the method is suitable for classrooms.

Description

PTZ scanning path generation method based on face recognition
Technical Field
The invention relates to the technical field of PTZ, in particular to a PTZ scanning path generation method.
Background
PTZ, pan, tilt, zoom, refers to a camera that supports omnidirectional (horizontal, vertical) movement and Zoom control. The PTZ camera is internally provided with two motors in the horizontal direction and the vertical direction, and the angles of the two motors are different, so that the PTZ camera faces towards different angles.
The camera is deployed in a field such as a classroom, video images in the field are obtained by the camera, and the scanning and the identification of faces from the images are a novel application. When the field size is large, the common camera can not present images of all people in the picture any more, and the PTZ camera can be used instead. The PTZ camera changes shooting angle and magnification through internal motor movement, so that the person images with wider and more distant ranges can be clearly acquired, and the problems are further solved. For an object in any field, when the PTZ camera is aligned with the object and appears in the center of the screen, the offset angles of the two motors form the PTZ coordinate (x, y) of the object, where x represents the motor offset angle in the horizontal direction of the PTZ camera and y represents the motor offset angle in the vertical direction of the PTZ camera.
PTZ cameras provide a movement function but require control of movement. Under the prior art, some PTZ solutions define their movement behavior manually. Specifically, a network interface is provided to manually set a plurality of PTZ coordinates and magnification factors corresponding to the PTZ coordinates, and when in operation, the PTZ camera sequentially controls a motor to adjust to the PTZ coordinates and ensures that lens magnification factors correspond to magnification factors defined by the PTZ coordinates, so that a scanning path is formed. However, this method has a problem of low installation and deployment efficiency, for example, there are a plurality of sites having different specifications, and manual setting is required for each site, and it takes several to tens of minutes for each setting.
Disclosure of Invention
The invention aims to solve the problem of low efficiency of the existing mode for setting a PTZ scanning path, and provides a PTZ scanning path generation method based on face recognition.
The technical scheme adopted by the invention for solving the technical problems is as follows: the PTZ scanning path generation method based on face recognition comprises the following steps:
step 1, setting a PTZ camera corresponding to a shooting field, determining a plurality of position points in the space of the shooting field, wherein an area formed by the position points at least can cover an area to be shot, and determining PTZ path points corresponding to the position points, wherein the PTZ path points at least comprise PTZ coordinates corresponding to the position points;
step 2, the PTZ camera carries out comprehensive scanning on the shooting field, and when the PTZ camera acquires a face picture, the PTZ coordinates corresponding to the face are determined;
and 3, determining a PTZ coordinate area corresponding to the to-be-imaged area according to the PTZ coordinates corresponding to each face, selecting all PTZ path points in the PTZ coordinate area, and generating a PTZ scanning path capable of covering all PTZ path points in the PTZ coordinate area.
Further, in order to determine the location points, in step 1, the method for determining a plurality of location points in the space of the image capturing field includes:
setting default specification information of a shooting field and position information of a PTZ (pan-tilt-zoom) camera, wherein the default specification information at least comprises default length and default width, the default length is not smaller than the actual length of the shooting field, and the default width is not smaller than the actual width of the shooting field;
and selecting a plurality of position points in a plane of a shooting field with a default specification according to the preset length interval and the preset width interval, wherein the plane and the plane where the face is positioned are the same plane.
Further, in order to determine PTZ coordinates corresponding to each location point, in step 1, the method for determining a PTZ path point corresponding to each location point includes:
respectively calculating the horizontal transverse distance, the horizontal longitudinal distance and the height difference of each position point relative to the PTZ camera according to the preset length interval, the preset width interval, the default specification information of the shooting field and the position information of the PTZ camera;
and respectively calculating a horizontal offset angle of the PTZ camera and a vertical distance of a position point relative to a vertical line of the PTZ camera on a wall according to the horizontal transverse distance and the horizontal longitudinal distance, calculating a vertical offset angle of the PTZ camera according to the vertical distance and the height difference, and determining PTZ coordinates corresponding to each position point according to the horizontal offset angle and the vertical offset angle.
Further, in order to obtain a face image with a proper size, the PTZ path point further includes a lens magnification corresponding to each position point, and the method for determining the lens magnification includes:
and calculating the distance information of each position point and the PTZ camera according to the vertical distance and the height difference, and determining the lens magnification corresponding to each position point according to the distance information.
Further, in order to determine the location points, in step 1, the method for determining a plurality of location points in the space of the image capturing field further includes:
and selecting a plurality of position points in a space region which can be scanned by the PTZ camera according to preset angle intervals of a motor in the horizontal direction and a motor in the vertical direction of the PTZ camera.
Further, in order to obtain a face image with a proper size, the PTZ path point further includes a lens magnification corresponding to each position point, and the method for determining the lens magnification includes:
when the PTZ camera collects the face image, the lens magnification corresponding to the face is determined when the face image can be displayed in a preset size in an image pickup picture, and the magnification of each position point is set to be the magnification corresponding to the face nearest to the position point.
Further, in order to avoid face omission, the step 2 further includes:
the PTZ camera comprehensively scans the shooting field for a plurality of times, and determines PTZ coordinates corresponding to each face.
Further, in step 2, in order to determine the PTZ coordinates corresponding to the face, the method for determining the PTZ coordinates corresponding to the face includes:
when the PTZ camera acquires a face picture and the face is positioned in the center of the picture, acquiring current offset angles of motors in two directions of the PTZ camera, forming PTZ coordinates according to the current offset angles of the motors in the two directions, and taking the PTZ coordinates as PTZ coordinates corresponding to the face; or alternatively
When the PTZ camera acquires the face images, the current offset angles of the motors in the two directions of the PTZ camera are acquired, an angle difference value is calculated according to the relative positions of the faces in the images and the centers of the images, and the PTZ coordinates corresponding to the faces are calculated according to the current offset angles and the angle difference values of the motors in the two directions of the PTZ camera.
Further, in step 3, the method for generating a PTZ scan path capable of covering all PTZ path points in the PTZ coordinate area includes:
connecting PTZ path points in the PTZ coordinate area according to any sequence to generate a PTZ scanning path capable of covering all PTZ path points in the PTZ coordinate area; or alternatively
And connecting the PTZ path points in the PTZ coordinate area in rows, and then alternately connecting the head and tail PTZ path points of adjacent rows to generate a PTZ scanning path capable of covering all the PTZ path points in the PTZ coordinate area.
Further, in order to effectively scan and pick up the image of the area to be imaged, the step 3 further includes:
and expanding the PTZ coordinate area according to a preset proportion to generate an expanded area, selecting all PTZ path points in the expanded area, and generating a PTZ scanning path capable of covering all PTZ path points in the expanded area.
The beneficial effects of the invention are as follows: according to the PTZ scanning path generation method based on face recognition, after the faces in the shooting field are recognized, the scanning path for scanning and shooting the to-be-shot area containing all the faces is automatically generated, so that a user does not need to manually set the PTZ scanning path, the workload of installers is reduced, and the installation and deployment efficiency is improved.
Drawings
Fig. 1 is a flow chart of a PTZ scan path generation method based on face recognition according to an embodiment of the present invention;
fig. 2 is a schematic diagram for explaining a horizontal motor offset angle in PTZ coordinates corresponding to a determined position point according to an embodiment of the present invention;
fig. 3 is a schematic diagram for explaining a vertical motor offset angle in PTZ coordinates corresponding to a determined position point according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of selecting all PTZ path points in a PTZ coordinate region according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of generating a PTZ scan path from a PTZ coordinate region according to an embodiment of the present invention;
reference numerals illustrate:
an A-PTZ camera; b-position points; offset angle of horizontal motor of x-PTZ camera; offset angle of the y-PTZ camera vertical motor; d1—horizontal lateral distance of the location point from the PTZ camera; d2—horizontal longitudinal distance of the location point from the PTZ camera; d3—the vertical distance of the location point relative to the PTZ camera on a vertical line on the wall; h-height difference between the position point and the PTZ camera; s1, forming a region by PTZ coordinates corresponding to the position point; s2, a PTZ coordinate area corresponding to the area to be imaged.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
The invention discloses a face recognition-based PTZ scanning path generation method, which comprises the following steps: step 1, setting a PTZ camera corresponding to a shooting field, determining a plurality of position points in the space of the shooting field, wherein an area formed by the position points at least can cover an area to be shot, and determining PTZ path points corresponding to the position points, wherein the PTZ path points at least comprise PTZ coordinates corresponding to the position points; step 2, the PTZ camera carries out comprehensive scanning on the shooting field, and when the PTZ camera acquires a face picture, the PTZ coordinates corresponding to the face are determined; and 3, determining a PTZ coordinate area corresponding to the to-be-imaged area according to the PTZ coordinates corresponding to each face, selecting all PTZ path points in the PTZ coordinate area, and generating a PTZ scanning path capable of covering all PTZ path points in the PTZ coordinate area.
After the PTZ camera is installed, a plurality of position points are required to be selected in the space of the shooting field, an area formed by the position points at least can cover the area to be shot, a PTZ path point corresponding to each position point is determined, the PTZ path point at least comprises PTZ coordinates corresponding to each position point, the PTZ coordinates corresponding to the position points are used for representing motor offset angles when the PTZ camera is aligned to the position points, and the motor offset angles of the PTZ camera comprise offset angles of two motors in the horizontal direction and the vertical direction of the PTZ camera; then, the PTZ camera carries out comprehensive scanning on the shooting field, the PTZ camera is provided with a face recognition function, after all faces are scanned and recognized, the PTZ coordinates corresponding to each face are determined, and the PTZ coordinates corresponding to the faces are used for representing the motor offset angle when the PTZ camera is aligned to the faces; then, determining a PTZ coordinate area corresponding to the to-be-imaged area according to the PTZ coordinates corresponding to each face, namely determining a coordinate area by the PTZ coordinates corresponding to each face, wherein the PTZ coordinate area corresponds to the to-be-imaged area; and finally, selecting all PTZ path points in the PTZ coordinate area, generating a PTZ scanning path capable of covering all PTZ path points in the PTZ coordinate area, and comprehensively scanning the to-be-imaged area by the PTZ camera according to the PTZ scanning route and PTZ coordinates in the PTZ path points. When the face distribution of the shooting field changes, the PTZ scanning path can be regenerated by the method.
Examples
The method for generating the PTZ scanning path based on the face recognition according to the embodiment of the invention, as shown in fig. 1, comprises the following steps:
s1, setting a PTZ camera corresponding to a shooting field, determining a plurality of position points in the space of the shooting field, wherein an area formed by the position points at least can cover an area to be shot, and determining PTZ path points corresponding to the position points, wherein the PTZ path points at least comprise PTZ coordinates corresponding to the position points;
the imaging field may be a classroom, the area to be imaged may be a seating area of a student, and the PTZ camera may be installed at a position that is disposed at a horizontal center of a wall in front of the classroom and vertically offset, for example, at a position that is disposed at a horizontal center of a wall in front of the classroom and 1.8 m to 3 m away from the ground, toward the face of the student.
The method for determining a plurality of position points in the space of the shooting field can be as follows:
setting default specification information of a shooting field and position information of a PTZ (pan-tilt-zoom) camera, wherein the default specification information at least comprises default length and default width, the default length is not smaller than the actual length of the shooting field, and the default width is not smaller than the actual width of the shooting field;
and selecting a plurality of position points in a plane of a shooting field with a default specification according to the preset length interval and the preset width interval, wherein the plane and the plane where the face is positioned are the same plane.
Specifically, the default specification information of the image capturing field at least includes a default length and a default width of the image capturing field, the position information of the PTZ camera may include a distance between the PTZ camera and the periphery of the default specification image capturing field and a height from the ground, and the default specification information of the image capturing field and the position information of the PTZ camera may be set through an API interface provided by the PTZ camera.
As shown in fig. 4, the area S1 represents an area formed by PTZ coordinates corresponding to position points, and the cross marks in the drawing represent PTZ path points corresponding to each position point, where a preset length interval and a preset width interval may be set according to actual needs, a preset length interval may be set according to a distance between front and rear adjacent seat intervals, a preset width interval may be set according to a distance between left and right adjacent seat intervals, the smaller the preset length interval and the preset width interval, the higher the scanning accuracy, and the preset length interval and the preset width interval are preferably 1 meter according to standards of classroom adjacent seat areas, that is, the distance between two horizontally adjacent position points and the distance between two vertically adjacent position points are preferably 1 meter. The position points and the corresponding PTZ path points form a plurality of rows according to the preset width interval.
In order to accurately scan and pick up the faces of students in classrooms, a plane of the default specification pick-up field can be a plane with a preset height from the ground, wherein the preset height can be the height of a standard face from the ground when a national standard student sits down, and the preset height can also be set according to practical conditions such as age and height of the student.
The method for determining the PTZ path points corresponding to the position points determined by the method can be as follows:
respectively calculating the horizontal transverse distance, the horizontal longitudinal distance and the height difference of each position point relative to the PTZ camera according to the preset length interval, the preset width interval, the default specification information of the shooting field and the position information of the PTZ camera;
and respectively calculating a horizontal offset angle of the PTZ camera and a vertical distance of a position point relative to a vertical line of the PTZ camera on a wall according to the horizontal transverse distance and the horizontal longitudinal distance, calculating a vertical offset angle of the PTZ camera according to the vertical distance and the height difference, and determining PTZ coordinates corresponding to each position point according to the horizontal offset angle and the vertical offset angle.
As shown in fig. 2, the horizontal lateral distance of the position point B with respect to the PTZ camera a is d1, that is, the horizontal distance of the projection point of the position point B on the wall where the PTZ camera is disposed with respect to the PTZ camera a is d2, that is, the horizontal longitudinal distance of the position point B with respect to the PTZ camera a is the distance of the projection point thereof on the wall where the PTZ camera is disposed, then the horizontal offset angle of the PTZ camera, that is, the offset angle of the horizontal direction motor is determined as x, and the vertical distance of the position point B with respect to the vertical line of the PTZ camera a on the wall is determined as d3, wherein,
Figure BDA0002374372880000061
as shown in fig. 3, the height difference of the position point B with respect to the PTZ camera a is h, and then the vertical offset angle of the PTZ camera, that is, the offset angle of the vertical direction motor is determined as y based on the vertical distance d3 of the position point B with respect to the PTZ camera on the vertical line on the wall and the height difference h of the position point B with respect to the PTZ camera a, thereby determining the PTZ coordinates (x, y) corresponding to the position point B. And similarly, obtaining the PTZ coordinates corresponding to each position point.
For the location points selected by the method, the PTZ path point may further include lens magnification corresponding to each location point, and the method for determining the lens magnification includes:
and calculating the distance information of each position point and the PTZ camera according to the vertical distance and the height difference, and determining the lens magnification corresponding to each position point according to the distance information.
Specifically, the lens magnification corresponding to each position point can be determined according to the linear distance between each position point and the PTZ camera, and after the PTZ scanning path is generated, when the PTZ camera is aligned to the position point, that is, when the PTZ camera is at the PTZ coordinate corresponding to the position point, the lens magnification corresponding to the position point is also adjusted, so as to obtain a clearer face image.
In addition, the method for determining a plurality of position points in the space of the image pick-up field further comprises:
and selecting a plurality of position points in a space region which can be scanned by the PTZ camera according to preset angle intervals of a motor in the horizontal direction and a motor in the vertical direction of the PTZ camera.
Specifically, the motor in the horizontal direction and the motor in the vertical direction of the PTZ camera are offset within a certain angle range, and in general, the motor in the horizontal direction of the PTZ camera is offset by an angle range of 0 to 180 degrees, and the motor in the vertical direction is offset by an angle range of 0 to 90 degrees. The spatial area that the PTZ camera can scan is then determined. First, the motor offset angle in the horizontal direction of the PTZ camera may be fixed, for example, 0 degrees, and the motor offset angle in the vertical direction may be incrementally adjusted at preset angle intervals, for example, the motor offset angle in the vertical direction may be increased by 10 degrees each time from 0 degrees, and after each increase, a plurality of position points may be selected on the imaging path of the PTZ camera determined according to the offset angles of the two motors. Then, fixing the motor offset angle in the vertical direction of the PTZ camera, for example, 0 degree, incrementally adjusting the motor offset angle in the horizontal direction according to the preset angle interval, for example, starting from 0 degree, increasing by 10 degrees each time, and selecting a plurality of position points on the imaging path of the PTZ camera determined according to the offset angles of the two motors after each increase, so as to obtain a plurality of position points in the space area which can be scanned by the PTZ camera, and meanwhile, obtaining the PTZ coordinates corresponding to the position points. The preset angle interval can be set according to actual requirements, so that a denser PTZ scanning path is generated, and the higher the scanning and shooting accuracy is, the lower the scanning and shooting accuracy is, on the contrary.
For the location points selected by the method, the PTZ path point further includes lens magnification corresponding to each location point, and the method for determining the lens magnification includes:
when the PTZ camera collects the face image, the lens magnification corresponding to the face is determined when the face image can be displayed in a preset size in an image pickup picture, and the magnification of each position point is set to be the magnification corresponding to the face nearest to the position point.
Specifically, when the PTZ camera collects a face image, the lens magnification of the PTZ camera may be adjusted, and when the face image is displayed in a preset size in the image capturing screen, the lens magnification of the PTZ camera at this time is determined, and the magnification of each position point is set to the magnification corresponding to the face nearest to the position point. In actual use, the face nearest to the location point may be determined by the PTZ coordinates corresponding to the location point and the PTZ coordinates corresponding to the face. If a PTZ coordinate point sets a plurality of lens magnifications, the maximum value of the lens magnifications is retained. When the PTZ camera is positioned on the scanning path, namely, the PTZ camera is positioned on the PTZ coordinate corresponding to the PTZ path point on the scanning path, the lens magnification corresponding to the PTZ path point is adjusted to obtain a face image with a proper size.
S2, the PTZ camera carries out comprehensive scanning on the shooting field, and when the PTZ camera acquires a face picture, the PTZ coordinates corresponding to the face are determined;
it can be understood that when the PTZ camera is installed and used for the first time, or the face position in the field to be imaged is changed, the PTZ camera scans the whole field, that is, the motors in the horizontal direction and the vertical direction of the PTZ camera are respectively offset from the minimum angle to the maximum angle, in this process, the face recognition function built in the PTZ camera recognizes each face image, and determines the PTZ coordinates corresponding to each face.
Specifically, the method for determining the PTZ coordinates corresponding to the face includes:
when the PTZ camera collects a face picture and the face is positioned in the center of the picture, the current offset angles of the motors in the two directions of the PTZ camera are obtained, PTZ coordinates are formed according to the current offset angles of the motors in the two directions, and the PTZ coordinates are used as the PTZ coordinates corresponding to the face.
The method for determining the PTZ coordinates corresponding to the face further comprises the following steps:
when the PTZ camera acquires the face images, the current offset angles of the motors in the two directions of the PTZ camera are acquired, an angle difference value is calculated according to the relative positions of the faces in the images and the centers of the images, and the PTZ coordinates corresponding to the faces are calculated according to the current offset angles and the angle difference values of the motors in the two directions of the PTZ camera.
S3, determining a PTZ coordinate area corresponding to the to-be-imaged area according to the PTZ coordinates corresponding to each face, selecting all PTZ path points in the PTZ coordinate area, and generating a PTZ scanning path capable of covering all PTZ path points in the PTZ coordinate area.
As shown in fig. 4, the region S2 represents a PTZ coordinate region corresponding to the region to be imaged determined by the face image, all PTZ path points in the PTZ coordinate region S2 are selected, PTZ coordinates corresponding to all the PTZ path points in the PTZ coordinate region S2 are determined, and a PTZ scan path capable of covering all the PTZ path points in the scan region is generated.
In order to effectively scan and pick up an image of an area to be picked up, in actual use, the PTZ coordinate area can be expanded according to a preset proportion to generate an expanded area, all PTZ path points in the expanded area are selected, and a PTZ scanning path capable of covering all PTZ path points in the expanded area is generated. The preset proportion of expansion only needs to ensure that the expansion area is slightly larger than the PTZ coordinate area.
Generating a PTZ scan path capable of covering all the PTZ path points in the PTZ coordinate area may sequentially connect the PTZ coordinates corresponding to all the PTZ path points in the PTZ coordinate area S2 in any order, so as to obtain a PTZ scan path, as shown in fig. 5, or may connect the PTZ coordinates corresponding to all the PTZ path points in the PTZ coordinate area in a row and then end-to-end, so as to generate a PTZ scan path capable of covering all the PTZ path points in the PTZ coordinate area, and the PTZ camera may perform cyclic scanning according to the PTZ scan path. In this process, the PTZ camera is always located on a certain PTZ path point or on a path between two PTZ path points, and when the PTZ camera is located on two PTZ path points, the PTZ camera can ensure that the PTZ coordinates of the two PTZ path points and the corresponding lens magnification change uniformly from one PTZ path point to the next PTZ path point.
The PTZ scan path may be regenerated according to a preset time interval, for example, when the image capturing place is a classroom, the PTZ camera performs a full scan to identify a face in the classroom when a class is opened, so as to generate a PTZ scan path suitable for the class, in the class, the PTZ always scans according to the PTZ scan path, after the preset time interval, if the next class is reached, the PTZ camera performs a full scan to identify a face in the classroom, and regenerates a PTZ scan path suitable for the next class, so as to push the class, and the preset time interval may be set according to the actual use condition.

Claims (7)

1. The PTZ scanning path generation method based on face recognition is characterized by comprising the following steps of:
step 1, setting a PTZ camera corresponding to a shooting field, determining a plurality of position points in the space of the shooting field, wherein an area formed by the position points at least can cover an area to be shot, and determining PTZ path points corresponding to the position points, wherein the PTZ path points at least comprise PTZ coordinates corresponding to the position points;
the method for determining a plurality of position points in the space of the shooting field comprises the following steps:
selecting a plurality of position points in a space region which can be scanned by the PTZ camera according to preset angle intervals of a motor in the horizontal direction and a motor in the vertical direction of the PTZ camera; or alternatively
Setting default specification information of a shooting field and position information of a PTZ (pan-tilt-zoom) camera, wherein the default specification information at least comprises default length and default width, the default length is not smaller than the actual length of the shooting field, and the default width is not smaller than the actual width of the shooting field; selecting a plurality of position points in a plane of a shooting field with a default specification according to a preset length interval and a preset width interval, wherein the plane and a plane where a face is positioned are the same plane;
the method for determining the PTZ path point corresponding to each position point comprises the following steps:
respectively calculating the horizontal transverse distance, the horizontal longitudinal distance and the height difference of each position point relative to the PTZ camera according to the preset length interval, the preset width interval, the default specification information of the shooting field and the position information of the PTZ camera;
respectively calculating a horizontal offset angle of the PTZ camera and a vertical distance of a position point relative to a vertical line of the PTZ camera on a wall according to the horizontal transverse distance and the horizontal longitudinal distance, calculating a vertical offset angle of the PTZ camera according to the vertical distance and the height difference, and determining PTZ coordinates corresponding to each position point according to the horizontal offset angle and the vertical offset angle;
step 2, the PTZ camera carries out comprehensive scanning on the shooting field, and when the PTZ camera acquires a face picture, the PTZ coordinates corresponding to the face are determined;
and 3, determining a PTZ coordinate area corresponding to the to-be-imaged area according to the PTZ coordinates corresponding to each face, selecting all PTZ path points in the PTZ coordinate area, and generating a PTZ scanning path capable of covering all PTZ path points in the PTZ coordinate area.
2. The face recognition-based PTZ scan path generation method of claim 1, wherein the PTZ path points further comprise lens magnification corresponding to each location point, and the method of determining the lens magnification comprises:
and calculating the distance information of each position point and the PTZ camera according to the vertical distance and the height difference, and determining the lens magnification corresponding to each position point according to the distance information.
3. The face recognition-based PTZ scan path generation method of claim 1, wherein the PTZ path points further comprise lens magnification corresponding to each location point, and the method of determining the lens magnification comprises:
when the PTZ camera collects the face image, the lens magnification corresponding to the face is determined when the face image can be displayed in a preset size in an image pickup picture, and the magnification of each position point is set to be the magnification corresponding to the face nearest to the position point.
4. The face recognition-based PTZ scan path generation method according to claim 1, wherein the step 2 further comprises:
the PTZ camera comprehensively scans the shooting field for a plurality of times, and determines PTZ coordinates corresponding to each face.
5. The face recognition-based PTZ scan path generation method according to claim 1, wherein in step 2, the method for determining PTZ coordinates corresponding to the face comprises:
when the PTZ camera acquires a face picture and the face is positioned in the center of the picture, acquiring current offset angles of motors in two directions of the PTZ camera, forming PTZ coordinates according to the current offset angles of the motors in the two directions, and taking the PTZ coordinates as PTZ coordinates corresponding to the face; or alternatively
When the PTZ camera acquires the face images, the current offset angles of the motors in the two directions of the PTZ camera are acquired, an angle difference value is calculated according to the relative positions of the faces in the images and the centers of the images, and the PTZ coordinates corresponding to the faces are calculated according to the current offset angles and the angle difference values of the motors in the two directions of the PTZ camera.
6. The face recognition-based PTZ scan path generation method according to claim 1, wherein in step 3, the method of generating a PTZ scan path capable of covering all PTZ path points in a PTZ coordinate area comprises:
connecting PTZ path points in the PTZ coordinate area according to any sequence to generate a PTZ scanning path capable of covering all PTZ path points in the PTZ coordinate area; or alternatively
And connecting the PTZ path points in the PTZ coordinate area in rows, and then alternately connecting the head and tail PTZ path points of adjacent rows to generate a PTZ scanning path capable of covering all the PTZ path points in the PTZ coordinate area.
7. The face recognition-based PTZ scan path generation method according to claim 1, wherein the step 3 further comprises:
and expanding the PTZ coordinate area according to a preset proportion to generate an expanded area, selecting all PTZ path points in the expanded area, and generating a PTZ scanning path capable of covering all PTZ path points in the expanded area.
CN202010060746.7A 2020-01-19 2020-01-19 PTZ scanning path generation method based on face recognition Active CN111259825B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010060746.7A CN111259825B (en) 2020-01-19 2020-01-19 PTZ scanning path generation method based on face recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010060746.7A CN111259825B (en) 2020-01-19 2020-01-19 PTZ scanning path generation method based on face recognition

Publications (2)

Publication Number Publication Date
CN111259825A CN111259825A (en) 2020-06-09
CN111259825B true CN111259825B (en) 2023-06-02

Family

ID=70949045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010060746.7A Active CN111259825B (en) 2020-01-19 2020-01-19 PTZ scanning path generation method based on face recognition

Country Status (1)

Country Link
CN (1) CN111259825B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6526160B1 (en) * 1998-07-17 2003-02-25 Media Technology Corporation Iris information acquisition apparatus and iris identification apparatus
CN102819847A (en) * 2012-07-18 2012-12-12 上海交通大学 Method for extracting movement track based on PTZ mobile camera
CN104378582A (en) * 2013-08-16 2015-02-25 北京博思廷科技有限公司 Intelligent video analysis system and method based on PTZ video camera cruising
CN107507243A (en) * 2016-06-14 2017-12-22 华为技术有限公司 A kind of camera parameters method of adjustment, instructor in broadcasting's video camera and system
CN110636204A (en) * 2018-06-22 2019-12-31 杭州海康威视数字技术股份有限公司 Face snapshot system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6526160B1 (en) * 1998-07-17 2003-02-25 Media Technology Corporation Iris information acquisition apparatus and iris identification apparatus
CN102819847A (en) * 2012-07-18 2012-12-12 上海交通大学 Method for extracting movement track based on PTZ mobile camera
CN104378582A (en) * 2013-08-16 2015-02-25 北京博思廷科技有限公司 Intelligent video analysis system and method based on PTZ video camera cruising
CN107507243A (en) * 2016-06-14 2017-12-22 华为技术有限公司 A kind of camera parameters method of adjustment, instructor in broadcasting's video camera and system
CN110636204A (en) * 2018-06-22 2019-12-31 杭州海康威视数字技术股份有限公司 Face snapshot system

Also Published As

Publication number Publication date
CN111259825A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN111355884B (en) Monitoring method, device, system, electronic equipment and storage medium
CN109348119B (en) Panoramic monitoring system
JP4243767B2 (en) Fisheye lens camera device and image extraction method thereof
JP4268206B2 (en) Fisheye lens camera device and image distortion correction method thereof
EP1343332A2 (en) Stereoscopic image characteristics examination system
US6545699B2 (en) Teleconferencing system, camera controller for a teleconferencing system, and camera control method for a teleconferencing system
CN111263106B (en) Picture tracking method and device for video conference
KR100327852B1 (en) Image coincidence detecting device and image coincidence detecting method
KR20070061382A (en) Camera system, camera control apparatus, panorama image making method and computer program product
US20100277614A1 (en) Image capture device and control method thereof
CN1298601A (en) Automatic determining preset position corresponding to television conference attendance
GB2319421A (en) Target tracking
KR101347450B1 (en) Image sensing method using dual camera and apparatus thereof
KR20140007212A (en) Apparatus and method for correcting image distortion of rear camera
CN111259824B (en) Method for automatically generating scanning path based on classroom size
CN112307912A (en) Method and system for determining personnel track based on camera
CN112040140A (en) Wide-view-field high-resolution hybrid imaging device based on light field
CN111259825B (en) PTZ scanning path generation method based on face recognition
CN108540720B (en) System and method for automatically selecting optimal image for bullet time
CN111246097B (en) PTZ scanning path generation method based on graph perception
CN115984768A (en) Multi-target pedestrian real-time detection positioning method based on fixed monocular camera
KR101341632B1 (en) Optical axis error compensation system of the zoom camera, the method of the same
CN115396602A (en) Scene shooting control method, device and system based on three-camera system
CN115035587B (en) System and method for generating efficient automatic cruise roll-call track
KR20190110369A (en) Intelligent camera system for automatic tracking of specified subject and image capturing method using the same

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