Face tracking method and video picture automatic tracking system applied to court
By applying face recognition technology in court video images, through compression and exposure adjustment of face images, the feature points of the face are depicted and the European distance between the feature points is calculated, and the rapid and timely judgment of the judge's head rotation movement is achieved. Automatically switch the video screen of the camera device to output the video screen, solving the problem of untimely switching in the prior art, and improving the judgment speed and accuracy.
Patent Information
- Application Number
- CN202411531373.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-18
AI Technical Summary
The existing facial recognition technology does not switch in time when switching court video images, and cannot meet the requirements of quickly and timely switching output images in court application scenarios.
By obtaining face images, compressing and exposure adjustments, depicting facial feature points, selecting feature points in the center, side face, chin, and forehead as reference feature points, calculate the European-style distance between feature points, and judge the head rotation action. And automatically switch the camera device to output the video screen.
It realizes the correct judgment of the judge's head movements quickly and in a timely manner, improves the speed and accuracy of face recognition and tracking, and solves the problem of slow speed and error-proneness when manually switching output pictures.
Smart Images

Figure CN119479036A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of face recognition technology, and in particular to a face tracking method and a video picture automatic tracking system applied to courts. Background Art
[0002] The existing court recording and broadcasting system structure is shown in a panoramic video court trial broadcasting supervision system disclosed in Chinese patent application with announcement number CN101841695A, which is provided with a presiding judge's seat camera device to record the presiding judge's movements.
[0003] A single camera at the presiding judge's seat is usually installed directly in front of the presiding judge. When the presiding judge turns his head to question relevant personnel at the plaintiff's seat or the defendant's seat, the camera at the presiding judge's seat in front of him cannot capture the presiding judge's complete face after turning his head, and thus cannot capture details such as the presiding judge's expression after turning his head. Therefore, some courts will install cameras at the presiding judge's seat directly in front of and on both sides of the presiding judge's seat. When the presiding judge turns his head, the output screen is manually switched to a camera that can capture the presiding judge's complete face. However, the manual switching method has the problem of slow switching speed and easy errors.
[0004] Existing target tracking methods based on face recognition, such as a target tracking method and device based on face recognition disclosed in the Chinese patent application with publication number CN111931564A, use different surveillance cameras with different deployment positions and / or monitoring ranges to achieve the output image at the front face position of the target tracking user. It uses the distance between the two eyes and calculates the ratio of the distance between the two eyes to the width of the head, and determines the head image with the largest ratio as the target head image with the largest facial area to perform face judgment.
[0005] Most of the existing face recognition methods use feature points that are a combination of human eyes and facial contours for judgment. There are also some face recognition methods that use other feature points, such as a face image processing method and device disclosed in announcement number CN105975935A, which obtains the left and right face widths of the user based on the position of the user's nose feature point and the position of the face edge feature point, and then determines whether a certain frame of face image is the left or right face of the user based on the left and right face widths of the user.
[0006] However, when the existing face recognition is applied to the switching of video images in the court, the screen switching is not timely, which cannot meet the requirements of fast and timely switching of output images in court application scenarios. Summary of the invention
[0007] In order to solve the above technical problems, the present invention provides a face tracking method for face recognition and a video screen automatic tracking system, wherein the face tracking method is applied to courts, and the method steps are as follows:
[0008] S10, obtaining a face image, and compressing the obtained face image;
[0009] S20, performing exposure judgment on the compressed face image, and adjusting the brightness of the face image according to the judgment result to obtain a preprocessed face image;
[0010] S30, depicting facial feature points on the pre-processed face image;
[0011] S40, selecting feature points near the center, left face, right face, chin, and forehead from the facial feature points as reference feature points;
[0012] S50, selecting at least one reference feature point from the reference feature points of the center, the left face, the right face, the chin, and the forehead as a key feature point;
[0013] S60, respectively calculating the Euclidean distances between the central key feature point and the key feature points of the left face, the right face, the chin, and the forehead to obtain the left face distance, the right face distance, the chin distance, and the forehead distance, wherein:
[0014] The central key feature points include horizontal central key feature points and vertical central key feature points;
[0015] The left face distance and the right face distance are the Euclidean distances between the horizontal center key feature point and the key feature points of the left face and the right face respectively;
[0016] The Euclidean distance between the vertical center key feature points of the chin distance and forehead distance and the key feature points of the chin and forehead respectively;
[0017] S70, if the distance between the left side of the face is less than the pre-stored first threshold judgment value, it is a left turn; if the distance between the right side of the face is less than the first threshold judgment value, it is a right turn;
[0018] If the distance between the chins is less than the pre-stored second threshold judgment value, it is a lowered head; if the distance between the foreheads is less than the pre-stored second threshold judgment value, it is a raised head;
[0019] Otherwise, the head does not turn left, turn right, lower or raise;
[0020] S80: Output the judgment result to complete the face tracking judgment.
[0021] Preferably, the method for preprocessing the face image in step S20 is specifically as follows:
[0022] The face image is converted into grayscale and the grayscale average is calculated; the brightness value of the image is adjusted by the grayscale average.
[0023] Preferably, the first threshold judgment value and the second threshold judgment value are pre-stored respectively according to the proportion of the portrait in the captured image; in the step S70, the corresponding first threshold judgment value and the second threshold judgment value are retrieved and compared according to the proportion of the portrait in the captured image.
[0024] The present invention also provides a video picture automatic tracking system, comprising a first camera device, a second camera device, a third camera device, a control terminal and a video processing terminal;
[0025] The control terminal is provided with a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by the control terminal, any of the above-described face tracking methods for use in court is implemented;
[0026] The first camera device is arranged in front of the photographed subject; the second camera device is arranged in front of the left of the photographed subject; the third camera device is arranged in front of the right of the photographed subject; the first camera device, the second camera device and the third camera device are used to capture real-time video;
[0027] The control terminal acquires real-time video data from the first camera device and determines whether the subject turns his head left or right according to a face tracking method used in court;
[0028] When it is determined that the head has not turned, the first camera device is kept outputting the video picture;
[0029] When it is determined that the head is turned left, the control terminal transmits the determination result to the video processing terminal, and the video processing terminal switches the screen to the video screen output by the second camera device;
[0030] When it is determined that the head is turned right, the control terminal transmits the determination result to the video processing terminal, and the video processing terminal switches the screen to the video screen output by the third camera device.
[0031] Preferably, the face tracking method applied in court is as follows:
[0032] S10, obtaining a face image from the video, and compressing the obtained face image;
[0033] S20, performing exposure judgment on the compressed face image, and adjusting the brightness of the face image according to the judgment result to obtain a preprocessed face image;
[0034] S30, depicting facial feature points on the pre-processed face image;
[0035] S40, selecting feature points near the center, the left side of the face, and the right side of the face from the facial feature points as reference feature points;
[0036] S50, selecting at least one reference feature point from the reference feature points of the center, the left face, and the right face as a key feature point;
[0037] S60, respectively calculating the Euclidean distances between the central key feature point and the key feature points of the left face and the right face, where:
[0038] The center key feature point is the horizontal center key feature point; the left face distance and the right face distance are the Euclidean distances between the horizontal center key feature point and the key feature points of the left face and the right face respectively;
[0039] S70, if the distance between the left side of the face is less than the pre-stored first threshold judgment value, it is a left turn; if the distance between the right side of the face is less than the first threshold judgment value, it is a right turn;
[0040] Otherwise, the head does not turn left or right;
[0041] S80: Output the judgment result to complete the face tracking judgment.
[0042] Preferably, the range of the first threshold judgment value in the face tracking method applied in court is 90-110 vectors.
[0043] Preferably, in the face tracking method applied in court, the first threshold judgment value is 100 vectors.
[0044] Compared with the existing face recognition method, the face tracking method applied to the court provided by the present invention can reduce the amount of data processing while ensuring the accuracy of the results in the subsequent steps by compressing the acquired face image, adjusting the exposure and brightness of the compressed or face image, and then describing the face feature points; and then selecting the horizontal center key feature point, the vertical center key feature point, the left face key feature point, the right face key feature point, the chin key feature point, and the forehead key feature point. The distance difference between the key feature points is compared with the pre-stored threshold judgment value to complete the face recognition tracking judgment. Compared with the existing feature point selection for face recognition, the face tracking method applied to the court provided by the embodiment of the present invention reduces the amount of data processing, improves the speed of face recognition tracking, can quickly and timely make a correct judgment on the judge's head movement, and has a high judgment accuracy, thereby achieving the purpose of quickly and accurately identifying the dynamic rotation of the face.
[0045] The video picture automatic tracking system provided by the present invention realizes head rotation tracking based on face recognition of the shooting subject, and can automatically switch the camera devices in different directions according to the rotation movement of the face of the shooting subject to display the front face of the shooting subject, thereby solving the problem of slow switching speed and easy error in manual switching of output pictures. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A flow chart of a face tracking method applied to a court provided by an embodiment of the present invention;
[0047] Figure 2 The facial feature point map is depicted;
[0048] Figure 3 is the reference feature point location map;
[0049] Figure 4 This is a frontal view of 3 / 5 of the face;
[0050] Figure 5 This is a left-turn head display of 3 / 5 of the face area;
[0051] Figure 6 This is a picture showing 3 / 5 of the face area with the head turned right;
[0052] Figure 7 This is a head-up display image of 3 / 5 of the face area;
[0053] Figure 8 This is a picture showing 3 / 5 of the face area with the head lowered;
[0054] Fig. 9 This is a frontal view of 1 / 3 of the face;
[0055] Fig.10 The picture showing 1 / 3 of the face area when the head is turned left;
[0056] Fig.11 This is a picture showing 1 / 3 of the face area when the head is turned right;
[0057] Fig.12 This is a picture showing 1 / 3 of the face area looking up;
[0058] Fig.13 This is a picture showing 1 / 3 of the face area with the head lowered;
[0059] Fig.14 This is a schematic diagram of the structure of the video screen automatic tracking system. DETAILED DESCRIPTION
[0060] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further described below in conjunction with specific embodiments. However, the following embodiments are only preferred embodiments of the present invention, not all of them. Based on the embodiments in the implementation mode, other embodiments obtained by those skilled in the art without creative work all belong to the protection scope of the present invention. The experimental methods in the following embodiments are conventional methods unless otherwise specified. The materials, reagents, etc. used in the following embodiments are all commercially available unless otherwise specified.
[0061] In the description of the present invention, it should be noted that the terms "upper", "lower", "inner", "outer", "front end", "rear end", "two ends", "one end", "the other end" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0062] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "provided with", "connected", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0063] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0064] The embodiment of the present invention provides a face tracking method and a video screen automatic tracking system for use in court, wherein: Figure 1 As shown, the face tracking method applied to the court, the method steps are as follows:
[0065] S10, obtaining a face image from the video, and compressing the obtained face image; in this step, the camera is retrieved by calling the VideoCapture function, and the camera video content with a display image size of 640*480 and a frame rate of 60FPS is calibrated, and image mirroring is performed through cv2.flip so that the image display corresponds to the processing, and a face image is obtained, and then the obtained face is compressed. The compression method is an existing compression method, which will not be repeated here. After compression, the data processing amount of subsequent steps is greatly reduced;
[0066] S20, performing exposure judgment on the compressed face image, and adjusting the brightness of the face image according to the judgment result to obtain a preprocessed face image; the accuracy of the judgment structure will be seriously interfered with by the influence of image compression and ambient brightness change, resulting in the problem of incorrect face target detection; in this step, the brightness of the face image is adjusted to solve the above problem, and the specific method is as follows: for the image captured by the camera, the exposure of each frame is judged, the grayscale average is calculated by grayscale conversion of the extracted image, and the brightness value of the image is adjusted by the grayscale average. When the grayscale average pixel intensity upper limit value exceeds the grayscale upper limit (255), the adjustment value is 1 (i.e., no adjustment or change is made), and the adjustment value is shown in Table 1:
[0067] Table 1
[0068] Grayscale average pixel intensity lower limit Grayscale average pixel intensity upper limit Alpha Adjustment Value 0 49 0.4 50 59 0.5 60 69 0.6 70 79 0.7 80 89 0.9 150 159 1.1 160 169 1.2 170 179 1.3 180 189 1.4 190 199 1.5 200 255 1.6 other other 1.0
[0069] S30, depicting facial feature points on the pre-processed face image; this step is specifically as follows:
[0070] Call dlib to depict facial feature points (by using the dlib library, we can easily perform face tracking detection):
[0071] 1) Use the detector function to detect feature points of the preprocessed image;
[0072] 2) Storing the results of target detection;
[0073] 3) Traverse each point P in the stored results. parts() and pack its coordinates (px, py) into a two-dimensional matrix; the facial feature point map depicted is as follows Figure 2 As shown;
[0074] S40, retrieve the facial feature point depiction result, and select the feature points near the center, left face, right face, chin, and forehead from the facial feature points as reference feature points (such as Figure 3As shown), in this step, the feature points near the center, side face, right face, chin, and forehead of the face are used as reference feature points. Compared with the existing face recognition judgment based on human eyes, the feature points of the eyes with many feature points are discarded, which can reduce the number of feature points selected and judged, reduce the amount of data processing, and improve the response speed of the algorithm;
[0075] The reference feature point selection table is shown in Table 2 below;
[0076] Table 2
[0077] Plan to obtain part Select reference feature point range Get the coordinate points involved in the calculation center 27,28,29,30 X,Y Left side of face 0,1,2 X Right side of face 13,14,15 X jaw 7,8,9 Y Forehead 70,71 Y
[0078] S50, from the reference feature points of the center, left face, right face, chin, and forehead, at least one reference feature point is selected as a key feature point; in this step, the key feature points used to determine the rotation are further refined (such as Figure 4 As shown in Table 3:
[0079] Table 3
[0080]
[0081]
[0082] S60, according to the horizontal center key feature point and the vertical center key feature point; respectively calculate the Euclidean distance between the horizontal center key feature point and the key feature points of the left face and the right face to obtain the left face spacing and the right face spacing; respectively calculate the Euclidean distance between the vertical center key feature point and the key feature points of the chin and the forehead to obtain the chin spacing and the forehead spacing, wherein:
[0083] The central key feature points include horizontal central key feature points and vertical central key feature points; the left face spacing and the right face spacing are the Euclidean distances between the horizontal central key feature points and the key feature points of the left face and the right face respectively; the chin spacing and the forehead spacing are the Euclidean distances between the vertical central key feature points and the key feature points of the chin and the forehead respectively; in this step, if Figure 3 As shown, when selecting the center point, you need to pay attention to the left and right, and the top and bottom. When the left and right ends (or the top and bottom ends) are in the front, the distance between them should be the same or the difference should be small, and the difference should not be too large. Therefore, the horizontal center point is selected to use 28 points, and the vertical center point is selected to use 29 points. When the vertical center point is selected to use 28 points, it is easy to be unable to distinguish the difference between looking up and looking down, especially in the case of 3 / 5 and 1 / 3 screens, the situation of being unable to distinguish the difference between looking up and looking down is more obvious, thus affecting the accuracy of the judgment result;
[0084] S70, if the distance between the left side of the face is less than the pre-stored first threshold judgment value, it is judged as a left turn; if the distance between the right side of the face is less than the first threshold judgment value, it is judged as a right turn;
[0085] If the chin distance is less than the pre-stored second threshold judgment value, it is judged as lowering the head; if the forehead distance is less than the pre-stored second threshold judgment value, it is judged as raising the head; when the above judgment is completed, the face tracking judgment is completed; in this step, when turning left, the threshold judgment value of the key feature point at the center of the nose bridge minus the key feature point at the left side of the face is the first threshold judgment, and if it is lower than the first threshold judgment, it is judged that a left turn has been made; when turning right, the threshold judgment value of the key feature point at the right face minus the key feature at the center of the nose bridge is the first threshold judgment, and if it is lower than the first threshold judgment, it is judged that a right turn has been made; when raising the head, the threshold judgment value of the key feature of the upper forehead minus the key feature of the center of the nose bridge is the second threshold judgment value, and if it is lower than the second threshold judgment value, it is judged that a raising behavior has been made; when lowering the head, the threshold judgment value of the key feature of the center of the nose bridge minus the key feature point of the lower temple angle is the second threshold judgment value, and if it is lower than the second threshold judgment value, it is judged that a lowering behavior has been made;
[0086] Otherwise, the head does not turn left, turn right, lower or raise;
[0087] S80: Output the judgment result to complete the face tracking judgment.
[0088] The above judgment process and details are recorded and saved in the local machine for backup for face recognition optimization;
[0089] Repeat steps S10-S80 to enter the next judgment.
[0090] Compared with the existing face recognition method, the face tracking method applied to the court provided by the embodiment of the present invention can reduce the amount of data processing while ensuring the accuracy of the results in the subsequent steps by compressing the acquired face image, adjusting the exposure and brightness of the compressed or face image, and then describing the face feature points; and then selecting the horizontal center key feature point, the vertical center key feature point, the left face key feature point, the right face key feature point, the chin key feature point, and the forehead key feature point. The distance difference between the key feature points is compared with the pre-stored threshold judgment value to complete the face recognition tracking judgment. Compared with the existing feature point selection for face recognition, the face tracking method applied to the court provided by the embodiment of the present invention reduces the amount of data processing, improves the speed of face recognition tracking, can quickly and timely make a correct judgment on the judge's head movement, and has a high judgment accuracy, thereby achieving the purpose of quickly and accurately identifying the dynamic rotation of the face.
[0091] In a specific implementation, the first threshold judgment value and the second threshold judgment value group are stored in advance, and the storage method is to capture the feature points respectively when facing forward, turning the head left, turning the head right, raising the head, and lowering the head, and calculate the left face distance, right face distance, chin distance, and forehead distance, and then correspond and store the calculated values of the left face distance, right face distance, chin distance, and forehead distance to the left head turning, right head turning, raising the head, and lowering the head state one by one;
[0092] The first threshold judgment value is determined according to the values or value ranges of the left side face distance and the right side face distance; the second threshold judgment value is determined according to the values or value ranges of the chin distance and the forehead distance.
[0093] Specifically, due to different shooting requirements (such as long-range and close-up shooting), when the camera of the camera device captures a person, the face occupies different areas on the captured image, which makes it impossible to accurately capture and judge the action status of the person, resulting in misjudgment of the capture point spacing. Figure 4-Figure 13 As shown, in the embodiment of the present invention, feature points are captured and the left side face distance, right side face distance, chin distance and forehead distance are calculated for the states such as the front face occupies 3 / 5 of the area of the collected image, the left-turned face occupies 3 / 5 of the area of the collected image, the right-turned face occupies 3 / 5 of the area of the collected image, the raised face occupies 3 / 5 of the area of the collected image, the lowered face occupies 3 / 5 of the area of the collected image, the front face occupies 1 / 3 of the area of the collected image, the left-turned face occupies 1 / 3 of the area of the collected image, the right-turned face occupies 1 / 3 of the area of the collected image, the raised face occupies 1 / 3 of the area of the collected image, and the lowered face occupies 1 / 3 of the area of the collected image, and the first threshold judgment value and the second threshold judgment value under different facial proportions are respectively confirmed and stored.
[0094] When judging face rotation, the proportion of the face to the collected image is first judged, and then the corresponding first threshold value and second threshold value are retrieved according to the proportion of the face to the collected image for comparison and judgment, so as to ensure the accuracy of the judgment result.
[0095] In the embodiment of the present invention, real-time video tests are performed in several different scenarios, including tests of different lighting conditions such as turning on the lights, turning off the lights, close distance, long distance, and facial expression changes; the test results show that the face tracking method provided by the present invention for use in a court can accurately and quickly identify the left and right turns of the face and the up and down lift of the face under different lighting conditions such as turning on the lights, turning off the lights, close distance, long distance, and different facial expressions, thereby realizing fast and accurate recognition of dynamic facial rotation.
[0096] like Fig.14 As shown, the embodiment of the present invention also provides a video screen automatic tracking system, which, when applied in a court use scenario, includes a first camera device, a second camera device, a third camera device, a control terminal and a video processing terminal;
[0097] The control terminal is provided with a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by the control terminal, any of the above-described face tracking methods for use in court is implemented;
[0098] The first camera device is located in front of the subject (the presiding judge's seat); the second camera device is located in front of the left side of the subject (the presiding judge's seat); the third camera device is located in front of the right side of the subject (the presiding judge's seat); the first camera device, the second camera device, and the third camera device are used to capture real-time videos of the presiding judge's seat in three different directions;
[0099] The control terminal acquires real-time video data from the first camera device and determines whether the subject turns his head left or right according to a face tracking method used in court;
[0100] When it is determined that the head has not turned, the first camera device is kept outputting the video picture;
[0101] When it is determined that the head is turned left, the control terminal transmits the determination result to the video processing terminal, and the video processing terminal switches the screen to the video screen output by the second camera device;
[0102] When it is determined that the head is turned right, the control terminal transmits the determination result to the video processing terminal, and the video processing terminal switches the screen to the video screen output by the third camera device.
[0103] Through the above system, head rotation tracking based on face recognition of the subject is realized, and the camera devices in different directions can be automatically switched according to the rotation movement of the subject's face to display the front face of the subject, thereby solving the problem of slow switching speed and easy errors in manual switching of output images.
[0104] In specific implementation, the face tracking method used in court is as follows:
[0105] S10, obtaining a face image from the video, and compressing the obtained face image;
[0106] S20, performing exposure judgment on the compressed face image, and adjusting the brightness of the face image according to the judgment result to obtain a pre-processed face image;
[0107] S30, depicting facial feature points on the pre-processed face image;
[0108] S40, selecting feature points near the center, the left side of the face, and the right side of the face from the facial feature points as reference feature points;
[0109] S50, selecting at least one reference feature point from the reference feature points of the center, the left face, and the right face as a key feature point;
[0110] S60, respectively calculating the Euclidean distances between the central key feature point and the key feature points of the left face and the right face, where:
[0111] The central key feature point is a horizontal central key feature point;
[0112] The left face distance and the right face distance are the Euclidean distances between the horizontal center key feature point and the key feature points of the left face and the right face respectively;
[0113] S70, if the distance between the left side of the face is less than the pre-stored first threshold judgment value, it is a left turn; if the distance between the right side of the face is less than the first threshold judgment value, it is a right turn; otherwise, the head does not turn left or right;
[0114] S80: Output the judgment result to complete the face tracking judgment.
[0115] In the embodiment provided by the present invention, the above-mentioned face tracking method applied in the court can realize face judgment of orientation and multiple angles. However, based on the application scenario of the court, the change amount on the plane X-axis is selected in this embodiment to simplify the judgment process, thereby further reducing the data processing amount, and can effectively improve the data processing speed, thereby shortening the reaction time of screen switching. According to actual measurements, the video screen switching response speed is within 0.5 seconds, so that the output screen switching can promptly follow the action of the presiding judge turning his head.
[0116] In the embodiment of the present invention, only steering judgment is required, and high-quality images are not required. After obtaining the video data, the data is compressed to ensure that the frame rate is 30-50 frames after compression, thereby reducing the amount of data processing to improve the response speed.
[0117] In specific implementation, if the camera switching command is continuously issued to the video processing terminal, the output video will frequently switch screens (for example, when the presiding judge turns his head, multiple facial judgments will be performed, and then commands will be continuously issued to the device), resulting in a poor experience for the audience. In this embodiment, since the position between the camera device and the subject is fixed, the range of the first threshold judgment value is 90-110 vectors. Preferably, the first threshold judgment value is 100 vectors to judge as turning the head. By judging that the switching command is skipped when it is greater than the first threshold judgment value (then saved and applied to subsequent judgments), and the original output screen is maintained, the problem of frequent switching of the output screen is solved.
[0118] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A face tracking method for court application, characterized by: The method steps are as follows: S10, obtaining a face image, and compressing the obtained face image; S20, performing exposure judgment on the compressed face image, and adjusting the brightness of the face image according to the judgment result to obtain a preprocessed face image; S30, depicting facial feature points on the pre-processed face image; S40, selecting feature points near the center, left face, right face, chin, and forehead from the facial feature points as reference feature points; S50, selecting at least one reference feature point from the reference feature points of the center, the left face, the right face, the chin, and the forehead as a key feature point; S60, respectively calculating the Euclidean distances between the central key feature point and the key feature points of the left face, the right face, the chin, and the forehead to obtain the left face distance, the right face distance, the chin distance, and the forehead distance, wherein: The central key feature points include horizontal central key feature points and vertical central key feature points; The left face distance and the right face distance are the Euclidean distances between the horizontal center key feature point and the key feature points of the left face and the right face respectively; The Euclidean distance between the vertical center key feature points of the chin distance and forehead distance and the key feature points of the chin and forehead respectively; S70, if the distance between the left side of the face is less than the pre-stored first threshold judgment value, it is a left turn; if the distance between the right side of the face is less than the first threshold judgment value, it is a right turn; If the distance between the chins is less than the pre-stored second threshold judgment value, it is a lowered head; if the distance between the foreheads is less than the pre-stored second threshold judgment value, it is a raised head; Otherwise, the head does not turn left, turn right, lower or raise; S80: Output the judgment result to complete the face tracking judgment.
2. The face tracking method used in court according to claim 1, characterized in that: The method for preprocessing the face image in step S20 is specifically as follows: The face image is converted into grayscale and the grayscale average is calculated; the brightness value of the image is adjusted by the grayscale average.
3. The face tracking method used in court according to claim 1, characterized in that: The first threshold judgment value and the second threshold judgment value are respectively pre-stored according to the proportion of the portrait in the collected image; in the step S70, the corresponding first threshold judgment value and the second threshold judgment value are retrieved according to the proportion of the portrait in the collected image for comparison.
4. Video picture automatic tracking system, characterized by: It includes a first camera device, a second camera device, a third camera device, a control terminal and a video processing terminal; The control terminal is provided with a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by the control terminal, the face tracking method for use in court as claimed in any one of claims 1 to 3 is implemented; The first camera device is arranged in front of the photographed subject; the second camera device is arranged in front of the left of the photographed subject; the third camera device is arranged in front of the right of the photographed subject; the first camera device, the second camera device and the third camera device are used to capture real-time video; The control terminal acquires real-time video data from the first camera device and determines whether the subject turns his head left or right according to a face tracking method used in court; When it is determined that the head has not turned, the first camera device is kept outputting the video picture; When it is determined that the head is turned left, the control terminal transmits the determination result to the video processing terminal, and the video processing terminal switches the screen to the video screen output by the second camera device; When it is determined that the head is turned right, the control terminal transmits the determination result to the video processing terminal, and the video processing terminal switches the screen to the video screen output by the third camera device.
5. The video picture automatic tracking system according to claim 4, characterized in that: The face tracking method used in court is as follows: S10, obtaining a face image from the video, and compressing the obtained face image; S20, performing exposure judgment on the compressed face image, and adjusting the brightness of the face image according to the judgment result to obtain a preprocessed face image; S30, depicting facial feature points on the pre-processed face image; S40, selecting feature points near the center, the left side of the face, and the right side of the face from the facial feature points as reference feature points; S50, selecting at least one reference feature point from the reference feature points of the center, the left face, and the right face as a key feature point; S60, respectively calculating the Euclidean distances between the central key feature point and the key feature points of the left face and the right face, where: The central key feature point is a horizontal central key feature point; The left face distance and the right face distance are the Euclidean distances between the horizontal center key feature point and the key feature points of the left face and the right face respectively; S70, if the distance between the left side of the face is less than the pre-stored first threshold judgment value, it is a left turn; if the distance between the right side of the face is less than the first threshold judgment value, it is a right turn; Otherwise, the head does not turn left or right; S80: Output the judgment result to complete the face tracking judgment.
6. The video picture automatic tracking system according to claim 5, characterized in that: The range of the first threshold judgment value in the face tracking method applied to the court is 90-110 vectors.
7. The video picture automatic tracking system according to claim 6, characterized in that: In the face tracking method applied in court, the first threshold judgment value is 100 vector.
Citation Information
Patent Citations
Court trial rebroadcasting monitoring system for panoramic video
CN101841695A
Face image processing method and apparatus
CN105975935A
Target tracking method and device based on face recognition
CN111931564A