Shooting method, device and system and electronic equipment
The first camera determines the set of people to be photographed and the information of personnel, combines the camera parameters of the second camera, determines the set of people to be photographed at different rotation angles, and controls the second camera to take pictures at the optimal rotation angle, which solves the problem of the current situation. The problem of inaccurate facial information capture caused by the inability to adjust the shooting angle in real time by cameras, which increases the capture rate of people's faces.
Patent Information
- Application Number
- CN202311020420.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2043-08-14
AI Technical Summary
The existing cameras cannot adjust the shooting angle in real time after installation, which makes it impossible to capture the face information of people in some sections of the road, resulting in inaccurate data when finding people or drawing face trajectories.
The first camera captures an image to be photographed to be determined, and the personnel information is information, based on the camera parameters and personnel information of the second camera, the collection of photographable personnel at different rotation angles is determined, and the second camera is controlled to be at the optimal rotation angle. Take a photo.
This improves the capture rate of the entire crowd's face and avoids missed photos of people's faces caused by excessive blind spots or inappropriate camera angles.
Smart Images

Figure CN119496984A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a shooting method, device, system and electronic equipment. Background Art
[0002] Currently, many cameras do not adjust the shooting angle of the camera in real time after being installed and adjusted to the corresponding angle. As a result, in some continuous road sections, when multiple people pass by the camera from different angles, the facial information of the people cannot be captured. This results in inaccurate data obtained when searching for people or drawing someone's facial trajectory, resulting in data deviation.
[0003] In the related art, multiple cameras are used to take pictures of faces at different angles to determine the rotation angle of the face in the current face picture compared to the front face, and the smallest rotation angle is taken as the most correct front face picture. In fact, the front face picture finally obtained is not necessarily a complete front face picture, and the face picture used in the process is not necessarily a picture of the person himself, so the front face capture rate is still not high. Summary of the invention
[0004] In view of the above problems existing in the related art, the embodiments of the present invention provide a shooting method, device, system and electronic equipment.
[0005] In a first aspect, the present invention provides a photographing method, comprising:
[0006] Based on the first image captured by the first camera, determining a set of persons to be photographed and personnel information of each person in the set of persons to be photographed;
[0007] Based on the camera parameters of the second camera and the position information in the person information, a set of persons that can be photographed by the second camera at various rotation angles is determined from the set of persons to be photographed, and the first camera and the second camera are set at different positions;
[0008] Based on the set of persons that can be photographed at each rotation angle, a target angle is determined from the various rotation angles, and the second camera is controlled to shoot at the target angle.
[0009] In some embodiments, the step of determining a target angle from the various rotation angles based on the set of photographable persons at the various rotation angles includes:
[0010] Determining a shooting weight of each person in the set of persons to be photographed based on at least one of a position, a speed, a face acquisition rate, and a face library comparison conformity of each person in the set of persons to be photographed;
[0011] Determining the shooting score at each rotation angle based on the shooting weight of each person in the set of persons that can be shot at each rotation angle;
[0012] Based on the acquisition integration of the respective rotation angles, the target angle is determined from the respective rotation angles.
[0013] In some embodiments, determining the shooting weight of each person in the set of persons to be photographed based on at least one of the position, speed, face acquisition rate, and face library comparison conformity of each person includes:
[0014] Based on the position of the person and the position of the center point of the shooting area corresponding to the first camera, determine the distance between the person and the center point;
[0015] Based on the distance and the number of second cameras corresponding to the presence of the person in the set of photographable persons, a photographing weight of the person is determined.
[0016] In some embodiments, determining the photographing weight of the person based on the distance and the number of second cameras corresponding to the presence of the person in the set of photographable persons includes:
[0017] Determine a first weight of the person based on the distance and the number of second cameras corresponding to the presence of the person in the set of photographable persons;
[0018] Determining a second weight of the person based on at least one of the person's speed, face acquisition rate, and face library comparison conformity;
[0019] Based on the first weight and the second weight of the person, a shooting weight of the person is determined.
[0020] In some embodiments, the step of determining the face acquisition rate includes:
[0021] Obtain the number of second cameras that have historically photographed the person as a person in the set of photographable persons, and the number of times the person has historically been photographed as a person in the set of photographable persons;
[0022] Based on the number of the second cameras and the number of shots, a face acquisition rate of the person is determined.
[0023] In some embodiments, the step of determining each rotation angle includes:
[0024] According to the order of the shooting weights from high to low, the corresponding rotation angles are determined with the positions of the persons in the set of persons to be shot as the shooting center.
[0025] In some embodiments, it also includes:
[0026] Acquire a second image captured by the second camera at the target angle;
[0027] Based on the second image, determining the photographed persons from the set of photographable persons at the target angle, and re-controlling the first camera to capture a new first image;
[0028] The step of determining a set of persons to be photographed based on the first image photographed by the first camera includes:
[0029] Based on the new first image, a set of persons to be photographed is determined, excluding the photographed persons.
[0030] In a second aspect, the present application further provides a photographing device, including:
[0031] A first determining unit, configured to determine a set of persons to be photographed and personnel information of each person in the set of persons to be photographed based on a first image captured by a first camera;
[0032] a second determining unit, configured to determine, from the set of persons to be photographed, a set of persons that can be photographed by the second camera at various rotation angles based on camera parameters of the second camera and position information in the person information, wherein the first camera and the second camera are set at different positions;
[0033] The third determining unit is used to determine a target angle from the various rotation angles based on the set of persons that can be photographed at the various rotation angles, and control the second camera to shoot at the target angle.
[0034] In a third aspect, the present application also provides a shooting system, comprising a connected first camera, a second camera, and the shooting device provided in the second aspect.
[0035] In a fourth aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the shooting methods described above is implemented.
[0036] In a fifth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described shooting methods.
[0037] In a sixth aspect, the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the shooting method as described above is implemented.
[0038] The shooting method, device, system and electronic device provided in the embodiments of the present application determine the set of people that can be photographed by the low-point camera at different rotation angles, determine the optimal rotation angle of the low-point camera, and thus control the low-point camera to shoot at the optimal rotation angle, avoiding the omission of people's facial photos due to too many blind spots or inappropriate camera angles, thereby improving the capture rate of the faces of the entire crowd. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 is a flowchart of a shooting method provided in an embodiment of the present application;
[0041] Figure 2 is a schematic diagram of a spatial area that can be photographed by a low-point camera provided in an embodiment of the present application;
[0042] Figure 3 is a schematic diagram of the structure of a photographing device provided in an embodiment of the present application;
[0043] Figure 4 is a structural schematic diagram of a shooting system provided in an embodiment of the present application;
[0044] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] Currently, many cameras do not adjust the shooting angle of the camera in real time after being installed and adjusted to the corresponding angle. As a result, in some continuous road sections, when multiple people pass by the camera from different angles, the facial information of the people cannot be captured. This results in inaccurate data obtained when searching for people or drawing someone's facial trajectory, resulting in data deviation.
[0046] In the related art, a method and system for outputting the most normal face image based on a multi-camera array is provided. The method includes: obtaining multiple face images of the current face captured by the multi-camera array at a time; analyzing the rotation angle of the current face in each face image, and selecting the face image with the smallest rotation angle; judging whether the rotation angle of the current face in the face image newly acquired when the multi-camera array tracks the current face is smaller than the selected face image with the smallest rotation angle; if so, replacing the selected face image with the smallest rotation angle with the newly acquired face image, until the current face leaves the tracking range, outputting the final face image as the most normal face image of the current face.
[0047] This method selects the most positive face in facial images acquired by a multi-camera array based on space and time, and the output most positive face image is more accurate, thus providing a more reliable data basis for subsequent face comparison.
[0048] However, this method uses multiple cameras to take pictures of faces at different angles to determine the rotation angle of the face in the current face picture compared to the front face, and takes the smallest rotation angle as the most correct front face picture. In fact, the front face picture finally obtained is not necessarily a complete front face picture, and the face picture used in the process is not necessarily a picture of the person himself, so the front face capture rate is still not high.
[0049] In response to the above-mentioned problems existing in the related technologies, the embodiments of the present application provide a shooting method, device, system and electronic device, which determines the set of people that can be photographed by the low-point camera at different rotation angles and determines the optimal rotation angle of the low-point camera, thereby controlling the low-point camera to shoot at the optimal rotation angle, avoiding the omission of people's facial photos due to too many blind spots or inappropriate camera angles, thereby improving the capture rate of the faces of the entire crowd.
[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] Figure 1 is a flow chart of the shooting method provided in the embodiment of the present application, such as Figure 1 As shown, the method comprises at least the following steps:
[0052] Step 101: Based on a first image captured by a first camera, determine a set of persons to be photographed and the personnel information of each person in the set of persons to be photographed.
[0053] Specifically, the first camera is a high-point camera. A high-point camera refers to a camera installed at a high altitude, such as the roof of a building, which can provide a bird's-eye view of a certain area. A high-point camera array refers to high-point cameras installed at multiple locations, which can capture images of the same area from multiple angles.
[0054] The images taken by high-point cameras are usually from a bird's-eye view, and can obtain personal information, such as the person's location information, height information, clothing features, shoe features, whether they are carrying pets, whether they are wearing hats, etc.
[0055] Based on the first image captured by the first camera, a set of people to be photographed is determined, that is, the set of people to be photographed is determined from the area covered by the high-point camera array. Optionally, the personal information of each person in the set of people to be photographed can be obtained.
[0056] For example, at a certain time T, the personnel information obtained in the shooting area of the high-point camera matrix is shown in Table 1.
[0057] Table 1: Personnel information obtained by high-point cameras
[0058]
[0059]
[0060] The above personnel information only lists several common types of personnel information, and the embodiments of the present application do not limit this.
[0061] Step 102: Based on the camera parameters of the second camera and the position information in the personnel information, a set of persons that can be photographed by the second camera at various rotation angles is determined from the set of persons to be photographed, and the first camera and the second camera are set at different positions.
[0062] Specifically, the first camera and the second camera are arranged at different positions. Optionally, the first camera is a high-point camera, and the corresponding second camera is a low-point camera. And the low-point camera is a low-point camera within the coverage range of the high-point camera array.
[0063] The camera parameters of the second camera include but are not limited to the installation position of the low-point camera, the rotation angle (horizontal rotation angle and pitch rotation angle), the zoom factor, etc., as shown in Table 2:
[0064] Table 2: Parameters of low-point cameras
[0065]
[0066] By combining the camera parameters of the second camera and the position information of each person in the set of persons to be photographed, a set of persons that can be photographed by the second camera at various rotation angles is determined from the set of persons to be photographed.
[0067] For any low-point camera, the installation position is fixed, the rotation angle and the zoom factor are determined, so at any rotation angle, the space area that can be photographed is determined. Combined with the person's location information, it can be determined whether the person's head is within the space area that can be photographed by the low-point camera, thereby judging whether the person is a person that can be photographed by the low-point camera. Optionally, the person's location information includes both the person's latitude and longitude information and the person's height (stature) information.
[0068] Figure 2 is a schematic diagram of a space area that can be photographed by a low-point camera provided in an embodiment of the present application, such as Figure 2 As shown, geometric body ABCDE is the spatial area that can be photographed by the low-point camera at a rotation angle perpendicular to the ground (trapezoidal shape ABCD) and perpendicular to the wall (triangle ECD), and E is the installation position of the low-point camera.
[0069] It can be seen that the camera does not actually shoot a plane, but a solid geometric figure, that is, geometric body ABCDE. To determine whether a person's head is within the space that can be photographed by the low-point camera, the following two conditions should be met:
[0070] (1) The longitude and latitude of the person must be within the coverage of the trapezoidal area ABCD.
[0071] (2) The height of a person cannot exceed the space covered by the geometric shape ABCDE. Figure 2 , for the latitude and longitude position H(x h ,y h ), the highest point of the space area that can be photographed by the low-point camera is point G. If the height of the person does not exceed the distance between H and G, it is considered that the head of the person is photographable, that is, the face of the person may exist in the shooting range of the low-point camera. The height of GH can be obtained by combining the existing technology. The height of the person can be calculated by comparing the first image taken by the high-point camera with the surrounding reference objects.
[0072] When the low-point camera rotates vertically or horizontally, the spatial area that can be photographed by the low-point camera changes. The GH height can also be calculated in the above manner to determine whether a person is a person that can be photographed by the low-point camera.
[0073] Through the above calculation, it can be obtained that at a certain time Tn, according to the position of the people in the shooting area of the high-point camera array (which can be simply referred to as the high-point area) and the height information of the people, the set of people who can be photographed by any low-point camera at any capture angle can be obtained.
[0074] For example: There are 10 people in the area. When the low-point camera A is at horizontal angle A and pitch angle A at the current moment, the people that can be captured are 3 people marked as P1, P2, and P3. If it is at horizontal angle B and pitch angle B, the three people marked as P1, P3, and P4 can be captured. If it is at horizontal angle C and pitch angle C, the two people marked as P5 and P6 can be captured. The number of people that can be captured and their information can be determined in advance.
[0075] Step 103: Based on the set of persons that can be photographed at each rotation angle, determine a target angle from the various rotation angles, and control the second camera to shoot at the target angle.
[0076] Specifically, the target angle is the optimal rotation angle of the second camera. According to the set of persons that can be photographed at various rotation angles of the second camera, at any time, the optimal rotation angle can be determined from various rotation angles, and the second camera can be controlled to shoot at the optimal rotation angle.
[0077] The shooting method provided in the embodiment of the present application determines the set of people that can be photographed by the low-point camera at different rotation angles, and determines the optimal rotation angle of the low-point camera, so as to control the low-point camera to shoot at the optimal rotation angle, avoids the omission of people's facial photos due to too many blind spots or inappropriate camera angles, thereby improving the capture rate of the entire crowd's faces.
[0078] In some embodiments, the step of determining a target angle from the various rotation angles based on the set of photographable persons at the various rotation angles includes:
[0079] Determining a shooting weight of each person in the set of persons to be photographed based on at least one of a position, a speed, a face acquisition rate, and a face library comparison conformity of each person in the set of persons to be photographed;
[0080] Determining the shooting score at each rotation angle based on the shooting weight of each person in the set of persons that can be shot at each rotation angle;
[0081] Based on the acquisition integration of the respective rotation angles, the target angle is determined from the respective rotation angles.
[0082] Specifically, the process of shooting progresses over time, and at different times, the calculation method for selecting the optimal rotation angle of the second camera from the set of persons that can be shot at various rotation angles of the second camera may be different. The selection of the optimal rotation angle may be achieved based on the shooting scores of the second camera at different rotation angles, and the shooting scores at different rotation angles depend on the shooting weights of each person in the set of persons that can be shot.
[0083] Optionally, according to the comparison result of the frontal face capture of the image taken by the second camera at the optimal rotation angle at the historical moment, the calculation method of the optimal rotation angle at the future moment can be corrected.
[0084] The shooting weight of each person is determined by combining the personnel information obtained by the high-point camera and the low-point camera, including but not limited to the position, speed, and face acquisition rate. Furthermore, since shooting is often continuous, the shooting weight of the person at the future moment can also be determined based on the comparison and conformity of the face library at the historical moment.
[0085] In the capture area covered by the high-point camera array, the closer a person is to the center of the capture area, the more low-point cameras can capture the person, the higher the possibility of capturing the person's face, the lower the capture priority and the lower the capture weight. Conversely, the farther a person is from the center of the capture area, the higher the capture priority and the higher the capture weight.
[0086] In the capture area covered by the high-point camera array, the faster a person moves, the easier it is to miss a photo, the higher the capture priority and the higher the capture weight. Conversely, the slower a person moves, the easier it is to be captured, the lower the capture priority and the lower the capture weight.
[0087] In the capture area covered by the high-point camera array, the face acquisition rate is affected by the frontal face capture rate and the number of low-point cameras that can capture. In the image of a person captured by a low-point camera, the head area is not necessarily the face, and the face may be facing away from or sideways to the camera. The more images that do not contain the face are captured, the lower the frontal face capture rate and the lower the face acquisition rate. At the same time, the more low-point cameras that can capture a specified person, the higher the face acquisition rate. The higher the face acquisition rate, the lower the shooting priority and the lower the shooting weight. Conversely, the lower the face acquisition rate, the higher the shooting priority and the higher the shooting weight.
[0088] Since the shooting is continuous, the captured person image will be compared with the face database at a fixed time interval, and there may be one or more comparison results. If there are multiple comparison results, the more comparison results there are, the less clear the face of the captured face image is, and the higher the subsequent shooting weight is; the fewer comparison results there are, the clearer the front face of the captured face image is, and the lower the subsequent shooting weight is. If there is only one comparison result, it means that the captured face is the face with the highest matching degree, that is, the front face is captured. Optionally, for a person whose front face has been captured, the person may not be captured again within a certain period of time within the capture area covered by the current high-point camera array.
[0089] Based on the shooting weight of each person in the set of persons that can be photographed at each rotation angle, the shooting score of each rotation angle can be determined, so as to determine the target angle from each rotation angle.
[0090] The shooting method provided in the embodiment of the present application combines information such as the person's position, speed, face acquisition rate, and face matching degree with the population database to dynamically calculate the person capture points that can be obtained at each rotation angle of the low-point camera, thereby determining the optimal rotation angle of the low-point camera, effectively improving the capture rate of the front face.
[0091] In some embodiments, determining the shooting weight of each person in the set of persons to be photographed based on at least one of the position, speed, face acquisition rate, and face library comparison conformity of each person includes:
[0092] Based on the position of the person and the position of the center point of the shooting area corresponding to the first camera, determine the distance between the person and the center point;
[0093] Based on the distance and the number of second cameras corresponding to the presence of the person in the set of photographable persons, a photographing weight of the person is determined.
[0094] Specifically, within the shooting area of the high-point camera, the shooting weight of a person is mainly affected by the position of the person from the center point of the shooting area of the high-point camera. The farther the distance, the less likely the person is to be captured, and the higher the shooting weight.
[0095] Based on the position of the personnel and the position of the center point of the shooting area of the high point camera, the distance between the personnel and the center point is determined. Optionally, the distance is the actual distance between the personnel and the center point. Optionally, the actual distance between the personnel closest to the center point and the center point is used as the unit distance to determine the distance between other personnel and the center.
[0096] Based on the distance calculated in the above steps, the person's shooting weight is determined in combination with the number of second cameras corresponding to the person's presence in the set of people that can be photographed. In the above steps, the set of people that can be photographed by the low-point camera at any rotation angle at any time is determined. If a person is in the set of people that can be photographed by a certain low-point camera, it means that the low-point camera is the low-point camera that can be photographed by the person, thereby determining the number of low-point cameras that can be photographed corresponding to the person.
[0097] Case 1: The default rotation angle of the low-point camera before activation is the initial 0 degree angle (refer to Figure 2 ). Before starting the low-point camera, pre-calculate the set of people that can be photographed by the low-point camera at each rotation angle, and obtain the set of rotation angles. Each rotation angle contains a different set of people that can be photographed, and the number of people that can be captured is m.
[0098] Set the capture score of the person to r. At the initial position, the score of the person in the high point area is mainly affected by the position of the person from the center point of the high point capture area. The farther the person is from the center point of the high point area, the easier it is for the person to leave the current capture high point area.
[0099] Set the first weight to a. The first weight is obtained based on the distance l between the person and the center point of the high point area (optionally, the distance between the person closest to the center point and the center point is used as the unit distance, and the minimum distance is 1). Combined with the number of low-point cameras v where the person can be captured, we can calculate:
[0100]
[0101] From the above formula, we can see that the farther a person is from the center of the high point area, the fewer cameras can capture the person, and the greater the first weight of the person. Conversely, the closer a person is to the center point, the more cameras can capture the person, and the smaller the first weight, even less than 1 and infinitely close to 0.
[0102] The weighted capture score of a person can be obtained by using the first weight and the capture score r of the person. Therefore, the total score of the person that can be captured when the low-point camera rotates at different horizontal angles α and pitch angles β can be pre-calculated as follows:
[0103]
[0104] Among them, r i is the weighted capture score of the ith person. It is known that there are currently n rotation angles that can capture the head of a person, so the set of the sum of the points of the people that can be captured at multiple rotation angles is:
[0105]
[0106] The maximum value is selected from the above set, and the corresponding rotation angle is the initial optimal rotation angle at time T1. Optionally, if there are multiple maximum values, the rotation angle corresponding to the set of people with the largest number of people that can be photographed is the initial optimal rotation angle.
[0107] The shooting method provided in the embodiment of the present application determines the shooting weight of a person by the distance between the person and the center point of the shooting area of the high-point camera, combined with the set of low-point cameras that can shoot the person, thereby further improving the capture rate of the crowd's faces.
[0108] In some embodiments, determining the photographing weight of the person based on the distance and the number of second cameras corresponding to the presence of the person in the set of photographable persons includes:
[0109] Determine a first weight of the person based on the distance and the number of second cameras corresponding to the presence of the person in the set of photographable persons;
[0110] Determining a second weight of the person based on at least one of the person's speed, face acquisition rate, and face library comparison conformity;
[0111] Based on the first weight and the second weight of the person, a shooting weight of the person is determined.
[0112] Specifically, the first weight of the person can be determined according to the distance between the person and the center point of the shooting area of the high-point camera and the number of low-point cameras that can shoot corresponding to the person.
[0113] At the initial shooting moment, the first weight can be used as the shooting weight of the person, and the optimal rotation angle of the low-point camera can be calculated, and the shooting is performed at the optimal rotation angle. The captured person image is compared with the face database. If there are multiple comparison results, it means that only the first weight is used as the shooting weight, and the accuracy of the calculated optimal rotation angle is not enough.
[0114] Then, in the subsequent shooting process, the second weight of the person should be determined by combining the first weight and at least one of the person's speed, the person acquisition rate and the face database comparison conformity.
[0115] The first weight and the second weight are combined to determine the shooting weight of the person.
[0116] Case 2: Because the personnel in the same high-point area are constantly changing, after the capture at time T1 is completed, it is necessary to re-acquire the personnel information in the current area through the high-point camera. Optionally, the personnel who have left the area can be removed and the personnel who have newly entered the area can be added to reduce the computational complexity. For the personnel who have not left the area and have obtained the capture results at time T1, the captured faces can be associated with the corresponding personnel information in combination with the personnel information previously obtained by the high-point camera. Compare the captured faces with the faces in the population database. If there is only one file in the matching result, it proves that the face captured this time is the face with the highest value, and the person can be excluded from the target group in subsequent captures.
[0117] If there are multiple matched face files, you need to adjust the shooting weight of the person, specifically:
[0118] The second weight of the person is set to d, where d is the result value after the captured face is compared with the population database, that is, the face database comparison conformity. The maximum number of TOPs that can be compared is set to p (a preset threshold, that is, the maximum number of face comparisons), and the number of compared faces is q. The initial value of the uncaptured face is p by default, and then it can be calculated:
[0119]
[0120] From the above formula, we can know that when the captured face is compared with the face in the face library, the fewer the matched face images are, the clearer and more accurate the captured face images are, the lower the matching degree of the face library, and the lower the need to re-capture the facial image of the person in the future. Similarly, when there are too many matched face images, the matching degree of the face library is high, which proves that the quality of the face image captured this time is biased. Although the face is captured, it may be necessary to re-capture the face in the future. And according to the comparison results of each captured face, if the matching degree of the face library captured this time is high and the matched files are less than the previous ones, the face previously associated with the personnel information will be replaced.
[0121] After excluding the people whose faces have been captured at time T1, combined with the capture situation of the camera shooting picture at time T1, before the start of time T2, it is necessary to combine the two parts of the state to calculate the points of the people before time T2, that is, combine a and d to determine the weighted shooting weight of the people, and determine the actual points of the people according to the weighted shooting weight.
[0122] Case 3: The speed of movement of people in the high-point area will also affect the capture rate of people. Therefore, the second weight is set to b for this person, where b is the speed of movement of people in the high-point area. The method of obtaining b is: when T n-1 At time T, the person will be captured ideally, but if the person does not appear at the scheduled location, then T v Moment and T n-1 The actual distance s of the personnel at the moment can be calculated as:
[0123]
[0124] As can be seen from the above, the faster the person moves, the easier it is to miss the capture. Optionally, based on the person's moving direction and speed, combined with the camera rotation time, the position that the person may reach when the low point camera completes the rotation can be pre-calculated, and the position of the next capture is based on the pre-calculated position.
[0125] Case 4: The face acquisition rate of a person will also affect the capture rate of the person. Therefore, the second weight is set to c for this person, where c is the face acquisition rate, indicating the number of consecutive faces that have not been captured. The method for obtaining c is: the product of the number of shots of the person t and the cumulative number of cameras that can capture low points, as follows:
[0126] c=t(v1+v2+…+v t )
[0127] Among them, v n Indicates the number of cameras that can capture low points corresponding to the specified person during the nth shooting.
[0128] If a person's face is facing away from the camera or the person's face is intentionally blocked, the person's face photo cannot be correctly acquired for multiple consecutive times, and the photo cannot be acquired even when multiple cameras are shooting together, then the priority of acquiring the person's face photo will be higher.
[0129] The number of shots t and the number of cameras v are continuously accumulated. For example, if the number of shots for the first time is 1 and one camera can capture the image, the final value is 1. If the number of shots for the second time is 2 and three cameras can capture the image, the final value is 2×(1+3)=8.
[0130] In actual implementation, the first weight a is given priority, and the second weight can be one or more of b, c, and d, and when considering multiple items of b, c, and d, the order is not fixed.
[0131] Optionally, considering a, b, c and d at the same time, setting the initial score of the person to r, the actual capture score of the person before the start of time T2 is:
[0132]
[0133] The shooting method provided in the embodiment of the present application gives priority to the position of each person in the set of people to be photographed to calculate the first weight. When the accuracy of the optimal rotation angle of the low-point camera calculated using the first weight as the shooting weight is insufficient, the second weight of the person is determined by further combining the speed of the person, the person acquisition rate and at least one of the face library comparison conformity. The shooting weight of the person is determined by combining the first weight and the second weight, thereby improving the frontal face capture rate while reducing the complexity of the calculation.
[0134] In some embodiments, the step of determining the face acquisition rate includes:
[0135] Obtain the number of second cameras that have historically photographed the person as a person in the set of photographable persons, and the number of times the person has historically been photographed as a person in the set of photographable persons;
[0136] Based on the number of the second cameras and the number of shots, a face acquisition rate of the person is determined.
[0137] Specifically, since the shooting process is often continuous in time, the person acquisition rate is different at different times.
[0138] The face acquisition rate can be calculated by first obtaining the number of second cameras that can be used to take photos of a person in history and the number of times the person will be photographed, and then combining the two to determine the face acquisition rate of the person. The face acquisition rate is positively correlated with the number of second cameras that can be used to take photos of a person and the number of times the person will be photographed.
[0139] The shooting method provided in the embodiment of the present application takes the face acquisition rate into consideration during the calculation of the shooting weights of personnel, and shifts the shooting focus more toward personnel with a low face acquisition rate, thereby further improving the capture rate of the faces of the crowd.
[0140] In some embodiments, the step of determining each rotation angle includes:
[0141] According to the order of the shooting weights from high to low, the corresponding rotation angles are determined with the positions of the persons in the set of persons to be shot as the shooting center.
[0142] Specifically, after calculating the shooting weight of each person, each person in the set of people to be photographed is taken as the center point of the low-point camera in turn according to the shooting weight of each person in the set of people to be photographed from high to low, and the set of people to be photographed is obtained with the center point, so as to calculate the sum of the shooting weights of the people in the capturing area with the person as the center point.
[0143] The person with the largest sum of shooting weights is selected as the capture center point at the next moment, that is, the initial rotation angle of the low point camera at the next moment is determined. Optionally, if there are multiple maximum sums of shooting weights, the rotation angle with the largest number of people that can be captured is used as the initial rotation angle at the next moment.
[0144] Specifically, after calculating the actual capture score of each person in the area before the start of time T2, the people are sorted from high to low according to the capture score, in the order from 1 to w, and each person in the sorting is used as the center point of the low-point camera capture at the next moment. The number of people that can be captured by the low-point camera is obtained with this center point. The total score of people in the capture area with a single person as the center point can be calculated:
[0145]
[0146] Then the set of the sum of the points of the personnel in the order from 1 to w is:
[0147]
[0148] The maximum value is selected from the above set. If there are multiple maximum values, the one with more captured people is given priority, and the corresponding rotation angle is determined as the initial rotation angle at time T2.
[0149] The shooting method provided in the embodiment of the present application selects the rotation angle of the low-point camera according to the shooting weight of the personnel, thereby selecting the optimal rotation angle of the low-point camera, thereby improving the capture rate of the faces of the crowd.
[0150] In some embodiments, it also includes:
[0151] Acquire a second image captured by the second camera at the target angle;
[0152] Based on the second image, determining the photographed persons from the set of photographable persons at the target angle, and re-controlling the first camera to capture a new first image;
[0153] The step of determining a set of persons to be photographed based on the first image photographed by the first camera includes:
[0154] Based on the new first image, a set of persons to be photographed is determined, excluding the photographed persons.
[0155] Specifically, the low-point camera is controlled to shoot at an optimal rotation angle, a second image shot by the low-point camera at the optimal rotation angle is obtained, and the photographed person is determined from the set of photographable persons at the optimal rotation angle based on the second image. Optionally, based on the comparison result between the second image and the face library, the photographed person is determined from the set of photographable persons at the optimal rotation angle. Optionally, the photographed person is a photographed person for which the comparison result of the face library shows only one person. When the comparison result of the face library shows only one person, it means that the front face of the person is captured, and the shooting of the person can be filtered out in the subsequent shooting process.
[0156] The first camera is controlled to capture a new first image, and the captured persons are filtered out from the set of persons to be captured identified in the new first image. The set of persons to be captured determined based on the first image captured by the first camera may be the set of persons to be captured after the captured persons are filtered out.
[0157] Specifically, the process of personnel existing in the entire high point area is a continuous process, which can be photographed from T1 to Tn. It is known that the personnel set at the initial time T1 is U T1 , as time changes, the number of people in the high point area is constantly changing, denoted as U Tn , then as time changes, the complete set of data is:
[0158] (U T1 ,U T2 ,…,U Tn )
[0159] It can be seen that as time changes, all the header data that should be obtained at time Tn is:
[0160] U all =U T1 ∪U T2 ∪…∪U Tn
[0161] At the initial time T1, the default captured face set P is obtained. T1, then the number of faces remaining to be captured at the current time T1 is P T1 In the complement of all face data that need to be captured At the next time T2, the captured face set is P T2 , the remaining faces that need to be captured are The person captured at T1 may also exist Then the actual remaining captured faces at time T2 are:
[0162]
[0163] It can be seen that the remaining captured faces at time Tn are:
[0164]
[0165] The number of faces that need to be captured calculated in the above steps is that in an ideal state, when rotating to the corresponding position, 100% of the faces that need to be captured can be captured. However, in actual situations, the presence of people in various states will lead to inaccurate capture data. Therefore, it is necessary to distinguish the shooting weights of people in different states.
[0166] The shooting method provided in the embodiment of the present application filters out the photographed persons during the shooting process, thereby increasing the capture rate of the faces of the crowd and reducing the complexity of the calculation.
[0167] Optionally, according to the comparison result of the frontal face capture of the image taken by the second camera at the optimal rotation angle at the historical moment, the calculation method of the optimal rotation angle at the future moment can be corrected.
[0168] Specifically, after the rotation is completed at time T2 and the capture is taken, it is necessary to consider excluding the people whose faces cannot be captured. For these people, the faces cannot be captured after multiple captures. It is believed that the current camera installation position and camera rotation angle cannot capture this person.
[0169] Then set the maximum capture number threshold t max When the number of snapshots of a person is greater than or equal to the threshold, it is considered that within the snapshot area covered by the current high-point camera array, no matter how the low-point camera is rotated, the face information of the person cannot be obtained. The person's information is recorded and placed in the next high-point area to continue to obtain the person.
[0170] After the elimination is completed, the entire calculation process of the camera rotation angle at time T2 is repeated to calculate the angle that the camera needs to rotate at time T3.
[0171] Furthermore, for the faces that are not captured in the capture area covered by the current high-point camera array, the body-related information of the person is recorded. When the person enters the next high-point visible area, the third weight should be set to e, where e is the number of high-point camera areas that have not captured the best face of the person. When calculating the capture score of the person, the shooting weight needs to be increased until the best face of the person is captured.
[0172] The shooting method provided in the embodiment of the present application, based on the linkage between the high-point camera and the low-point camera, can calculate whether the facial information of the person can be captured by the low-point camera at the current position of the person within the shooting area of the high-point camera by capturing the information of the person through the high-point camera, combined with the latitude and longitude data of the low-point camera and the capturing range of the camera, and can calculate the rotation angle required for the camera to capture the face; for different personnel statuses in the area, combined with information such as the position of the person, the speed of the person, the face acquisition rate, and the degree of conformity with the face comparison with the population database, the personnel capture points that can be obtained at each rotation angle of the low-point camera are dynamically calculated, thereby judging the optimal rotation position at the current moment, thereby improving the capture rate of crowd faces.
[0173] The photographing device provided by the present invention is described below. The photographing device described below and the photographing method described above can be referred to each other.
[0174] Figure 3 is a schematic diagram of the structure of the photographing device provided in the embodiment of the present application, such as Figure 3 As shown, the device at least includes:
[0175] A first determining unit 301 is used to determine a set of persons to be photographed and personnel information of each person in the set of persons to be photographed based on a first image taken by a first camera;
[0176] A second determining unit 302 is used to determine, from the set of persons to be photographed, a set of persons that can be photographed by the second camera at various rotation angles based on camera parameters of the second camera and position information in the person information, wherein the first camera and the second camera are set at different positions;
[0177] The third determining unit 303 is used to determine a target angle from the various rotation angles based on the set of persons that can be photographed at the various rotation angles, and control the second camera to shoot at the target angle.
[0178] In some embodiments, the third determining unit 303 is specifically configured to:
[0179] Determining a shooting weight of each person in the set of persons to be photographed based on at least one of a position, a speed, a face acquisition rate, and a face library comparison conformity of each person in the set of persons to be photographed;
[0180] Determining the shooting score at each rotation angle based on the shooting weight of each person in the set of persons that can be shot at each rotation angle;
[0181] Based on the acquisition integration of the respective rotation angles, the target angle is determined from the respective rotation angles.
[0182] In some embodiments, the third determining unit 303 is specifically configured to:
[0183] Based on the position of the person and the position of the center point of the shooting area corresponding to the first camera, determine the distance between the person and the center point;
[0184] Based on the distance and the number of second cameras corresponding to the presence of the person in the set of photographable persons, a photographing weight of the person is determined.
[0185] In some embodiments, the third determining unit 303 is specifically configured to:
[0186] Determine a first weight of the person based on the distance and the number of second cameras corresponding to the presence of the person in the set of photographable persons;
[0187] Determining a second weight of the person based on at least one of the person's speed, face acquisition rate, and face library comparison conformity;
[0188] Based on the first weight and the second weight of the person, a shooting weight of the person is determined.
[0189] In some embodiments, the step of determining the face acquisition rate includes:
[0190] Obtain the number of second cameras that have historically photographed the person as a person in the set of photographable persons, and the number of times the person has historically been photographed as a person in the set of photographable persons;
[0191] Based on the number of the second cameras and the number of shots, a face acquisition rate of the person is determined.
[0192] In some embodiments, the step of determining each rotation angle includes:
[0193] According to the order of the shooting weights from high to low, the corresponding rotation angles are determined with the positions of the persons in the set of persons to be shot as the shooting center.
[0194] In some embodiments, the apparatus further comprises:
[0195] an acquisition unit, configured to acquire a second image captured by the second camera at the target angle;
[0196] a fourth determining unit, configured to determine, based on the second image, the photographed persons from the set of photographable persons at the target angle, and to re-control the first camera to photograph a new first image;
[0197] The first determining unit 301 is specifically configured to:
[0198] Based on the new first image, a set of persons to be photographed is determined, excluding the photographed persons.
[0199] Figure 4 is a schematic diagram of the structure of the shooting system provided in the embodiment of the present application, such as Figure 4 As shown, the system at least includes:
[0200] A connected first camera 401, a second camera 402, and any one of the aforementioned shooting devices 403.
[0201] Figure 5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 5 As shown, the electronic device may include: a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 communicate with each other through the communication bus 504. The processor 501 may call the logic instructions in the memory 503 to execute the shooting method, including:
[0202] Based on the first image captured by the first camera, determining a set of persons to be photographed and personnel information of each person in the set of persons to be photographed;
[0203] Based on the camera parameters of the second camera and the position information in the person information, a set of persons that can be photographed by the second camera at various rotation angles is determined from the set of persons to be photographed, and the first camera and the second camera are set at different positions;
[0204] Based on the set of persons that can be photographed at each rotation angle, a target angle is determined from the various rotation angles, and the second camera is controlled to shoot at the target angle.
[0205] In addition, the logic instructions in the above-mentioned memory 503 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0206] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the shooting methods provided by the above methods, including:
[0207] Based on the first image captured by the first camera, determining a set of persons to be photographed and personnel information of each person in the set of persons to be photographed;
[0208] Based on the camera parameters of the second camera and the position information in the person information, a set of persons that can be photographed by the second camera at various rotation angles is determined from the set of persons to be photographed, and the first camera and the second camera are set at different positions;
[0209] Based on the set of persons that can be photographed at each rotation angle, a target angle is determined from the various rotation angles, and the second camera is controlled to shoot at the target angle.
[0210] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the shooting method provided by the above methods is implemented, including:
[0211] Based on the first image captured by the first camera, determining a set of persons to be photographed and personnel information of each person in the set of persons to be photographed;
[0212] Based on the camera parameters of the second camera and the position information in the person information, a set of persons that can be photographed by the second camera at various rotation angles is determined from the set of persons to be photographed, and the first camera and the second camera are set at different positions;
[0213] Based on the set of persons that can be photographed at each rotation angle, a target angle is determined from the various rotation angles, and the second camera is controlled to shoot at the target angle.
[0214] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0215] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0216] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A shooting method, characterized in that: include: Based on the first image captured by the first camera, determining a set of persons to be photographed and personnel information of each person in the set of persons to be photographed; Based on the camera parameters of the second camera and the position information in the person information, a set of persons that can be photographed by the second camera at various rotation angles is determined from the set of persons to be photographed, and the first camera and the second camera are set at different positions; Based on the set of persons that can be photographed at each rotation angle, a target angle is determined from the various rotation angles, and the second camera is controlled to shoot at the target angle.
2. The shooting method according to claim 1, characterized in that: The step of determining a target angle from the various rotation angles based on the set of photographable persons at the various rotation angles includes: Determining a shooting weight of each person in the set of persons to be photographed based on at least one of a position, a speed, a face acquisition rate, and a face library comparison conformity of each person in the set of persons to be photographed; Determining the shooting score at each rotation angle based on the shooting weight of each person in the set of persons that can be shot at each rotation angle; Based on the acquisition integration of the respective rotation angles, the target angle is determined from the respective rotation angles.
3. The shooting method according to claim 2, characterized in that: The determining of the shooting weight of each person based on at least one of the position, speed, face acquisition rate and face library comparison conformity of each person in the set of persons to be photographed includes: Based on the position of the person and the position of the center point of the shooting area corresponding to the first camera, determine the distance between the person and the center point; Based on the distance and the number of second cameras corresponding to the presence of the person in the set of photographable persons, a photographing weight of the person is determined.
4. The shooting method according to claim 3, characterized in that: The determining the photographing weight of the person based on the distance and the number of second cameras corresponding to the person existing in the set of photographable persons includes: Determine a first weight of the person based on the distance and the number of second cameras corresponding to the presence of the person in the set of photographable persons; Determining a second weight of the person based on at least one of the person's speed, face acquisition rate, and face library comparison conformity; Based on the first weight and the second weight of the person, a shooting weight of the person is determined.
5. The shooting method according to claim 2, characterized in that: The step of determining the face acquisition rate includes: Obtain the number of second cameras that have historically photographed the person as a person in the set of photographable persons, and the number of times the person has historically been photographed as a person in the set of photographable persons; Based on the number of the second cameras and the number of shots, a face acquisition rate of the person is determined.
6. The shooting method according to claim 2, characterized in that: The steps of determining each rotation angle include: According to the order of the shooting weights from high to low, the corresponding rotation angles are determined with the positions of the persons in the set of persons to be shot as the shooting center.
7. The shooting method according to any one of claims 1 to 6, characterized in that: Also includes: Acquire a second image captured by the second camera at the target angle; Based on the second image, determining the photographed persons from the set of photographable persons at the target angle, and re-controlling the first camera to capture a new first image; The step of determining a set of persons to be photographed based on the first image photographed by the first camera includes: Based on the new first image, a set of persons to be photographed is determined, excluding the photographed persons.
8. A photographing device, characterized in that: include: A first determining unit, configured to determine a set of persons to be photographed and personnel information of each person in the set of persons to be photographed based on a first image captured by a first camera; a second determining unit, configured to determine, from the set of persons to be photographed, a set of persons that can be photographed by the second camera at various rotation angles based on camera parameters of the second camera and position information in the person information, wherein the first camera and the second camera are set at different positions; The third determining unit is used to determine a target angle from the various rotation angles based on the set of persons that can be photographed at the various rotation angles, and control the second camera to shoot at the target angle.
9. A shooting system, characterized in that: The invention comprises a first camera and a second camera connected to each other, and the device as claimed in claim 8.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the shooting method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Photographing method and photographing apparatus for terminal, and terminal
CN108605087A
Photographing control method and related product
CN110113515A
Face recognition method and terminal equipment
CN110738078A
Self-adaptive light field imaging method, device and equipment
CN112367474A
Photographing device, control method, control program, and recording medium
JP2014062931A