Key target image capture method, device and storage medium based on video
By using multiple multi-angle camera devices to shoot in the video surveillance system, and performing two similarity comparisons and rotation adjustments of the camera equipment, the problem of low success rate of key target recognition and capture in the existing technology is solved, and the more High recognition accuracy and capture success rate.
Patent Information
- Application Number
- CN202011538156.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-23
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2040-12-23
AI Technical Summary
In the existing video surveillance system, the fixed installation and shooting angle of the camera lead to a low success rate of key target recognition and capture.
Multiple multi-angle cameras are used to shoot in the preset area, and through two similarity comparisons and rotation adjustments of the camera equipment, the focus targets are photographed and identified in a direct manner.
The recognition accuracy and capture success rate of key targets are improved, ensuring the integrity and clarity of the captured images.
Smart Images

Figure CN112668435B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method, device and storage medium for capturing key target images based on video. Background Art
[0002] At present, video surveillance is an important part of the security system. It is a comprehensive system with strong prevention capabilities. In the process of video surveillance, it is necessary to use a camera to shoot pedestrians or road conditions passing by, and identify whether there are key targets in the shooting picture, so as to achieve the effect of video surveillance. However, the installation and shooting angle of existing video surveillance cameras are fixed. When the key target passes through the shooting area of the camera, it may be impossible to identify the position of the key target due to poor camera shooting angle or the key target facing away from the camera; or after the key target is identified, it is impossible to capture a clear image of the key target due to the angle problem of the camera, resulting in a low success rate of capturing the key target. Summary of the invention
[0003] In order to overcome the deficiencies of the prior art, the purpose of the present invention is to provide a method for capturing key target images based on video, which can improve the recognition accuracy of key targets and improve the capture success rate.
[0004] A second object of the present invention is to provide an electronic device.
[0005] A third object of the present invention is to provide a storage medium.
[0006] One of the purposes of the present invention is achieved by the following technical solution:
[0007] A method for capturing key target images based on video is applied in a preset area provided with multiple multi-angle camera devices, and the method includes:
[0008] Step S1: collecting a video image taken by any camera device, performing target recognition on the video image, and when an initial target whose similarity with a preset target reaches a first preset value is recognized in the video image, executing step S2;
[0009] Step S2: determining the moving direction of the initial target, controlling a camera device in the same preset area whose shooting range is facing the moving direction of the initial target to shoot in the direction of the initial target to obtain a secondary video image, and identifying and marking the initial target in the secondary video image;
[0010] Step S3: Compare the similarity between the initial target and the preset target in the secondary video image. When the similarity reaches a second preset value, the initial target is marked as the final target, and all video images related to the final target are saved; wherein the second preset value is higher than the first preset value; if the similarity does not reach the second preset value, return to step S1.
[0011] Furthermore, at least three camera devices are arranged in the preset area, and the shooting ranges of all the camera devices overlap and cover the preset area.
[0012] Furthermore, each of the camera devices has a rotation angle of 0 to 90 degrees in the horizontal direction.
[0013] Furthermore, before step S1, the method also includes: importing the three-dimensional model data of the preset target, performing feature recognition on each surface of the three-dimensional model of the preset target to obtain all-round feature information of the preset target, marking the type of the preset target, and storing the all-round feature information and type information of the preset target.
[0014] Furthermore, the method for performing target recognition on the primary video image in step S1 is:
[0015] Identify all objects in the video image, and capture the images of all objects in the video image to generate a snapshot image corresponding to each object;
[0016] Determine the type of each object, and select objects of the same type as the preset target from all objects according to the type of the object;
[0017] Feature extraction is performed on the captured image corresponding to the object of the same type as the preset target, and the extracted feature information is compared with the all-round feature information of the preset target. If the similarity between the feature information of the object and the feature information of any surface of the preset target reaches a first preset value, the object is marked as the initial target.
[0018] Furthermore, the method for determining the moving direction of the initial target is:
[0019] When the similarity between the feature information of the initial target and the feature information of any surface of the preset target reaches a first preset value, the surface of the preset target is set as a reference plane, the orientation of the reference plane in the three-dimensional model is identified, and the orientation information of the reference plane is switched to geodetic coordinates to obtain the orientation of the three-dimensional model of the preset target in geodetic space; the orientation of the three-dimensional model in geodetic space is consistent with the orientation of the initial target in geodetic space, so as to determine the moving direction of the initial target.
[0020] Furthermore, the method for identifying and marking the initial target in the secondary video image in step S2 is:
[0021] When marking an object as the initial target, at least one environmental target is marked in advance in the captured image where the initial target is located, and the positional relationship between the initial target and the environmental target is recorded;
[0022] Identify the position of the environmental target in the secondary video image, infer the position of the initial target in the secondary video image based on the positional relationship between the environmental target and the initial target, and perform feature recognition on the image of the initial target in the secondary video image so as to perform a similarity comparison again.
[0023] Furthermore, it also includes: when the initial target is marked as the final target, controlling any camera device in the same preset area to track the final target to obtain a real-time image of the final target in the preset area.
[0024] The second object of the present invention is achieved by adopting the following technical solution:
[0025] An electronic device comprises a processor, a memory and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned method for capturing key target images based on video is implemented.
[0026] The third object of the present invention is achieved by adopting the following technical solution:
[0027] A storage medium stores a computer program, which implements the above-mentioned method for capturing key target images based on video when executed.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] Two similarity comparisons are performed during the image analysis process to improve the recognition accuracy of key targets. At the same time, after the initial target is recognized in a video image, the camera device with a shooting range facing the moving direction of the initial target in the same preset area is controlled to shoot the initial target again, so that the angle of the second shooting is facing the front of the initial target. From this angle, it can be clearly judged whether the initial target is the final target, thereby improving the recognition accuracy of the final target. The image integrity and clarity captured at this angle are relatively high, and a better capture effect is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic diagram of the shooting range of three camera devices of the present invention;
[0031] Figure 2 The figure is a flow chart of the method for capturing key target images based on video of the present invention. DETAILED DESCRIPTION
[0032] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment.
[0033] Embodiment 1
[0034] This embodiment provides a method for capturing key target images based on video. Figure 1 As shown, the method is applied in a preset area with multiple multi-angle cameras, the preset area is a pre-planned area of a certain area, multiple cameras are arranged in the area, and the road conditions in the preset area are photographed by multiple cameras; and the installation positions of the multiple cameras also have certain requirements; in this embodiment, at least three cameras are arranged in the preset area, if the number of cameras is three, the lines between the three cameras form a triangle, if the number of cameras is four, the lines between the four cameras form a quadrilateral; and all cameras are oriented to shoot in the direction of the center point of the triangle or quadrilateral, such as Figure 1 As shown, Figure 1 The middle triangular area A is the shooting range of the three cameras, and the quadrilateral area B is the preset area, so that the shooting ranges of all cameras can completely cover the area of the preset area after being superimposed, avoiding blind spots in the preset area.
[0035] The camera devices can be rotated longitudinally and transversely at their respective installation positions, and each of the camera devices in the present embodiment has a rotation angle of 0 to 90° in the horizontal direction, which can facilitate accurate capture and tracking of key targets.
[0036] like Figure 2 As shown, the method of this embodiment specifically includes the following steps:
[0037] Step S1: collecting a video image taken by any camera device, performing target recognition on the video image, and when an initial target whose similarity with a preset target reaches a first preset value is recognized in the video image, executing step S2;
[0038] Before the step S1, the information of the preset target needs to be imported in advance. The preset target can be a person, an animal or other movable object. Specifically, the three-dimensional model of the preset target is established in advance. The three-dimensional model also adds various characteristic information of the preset target, such as the facial features of a person, tattoos on the human body or spots on the animal body, etc. The three-dimensional model is as consistent as possible with the preset target to improve the accuracy of recognition. Afterwards, the three-dimensional model data of the preset target is imported into the system, and the system performs feature recognition on each surface of the three-dimensional model of the preset target, such as the front, left side, right side and back of a person or an animal, so that the characteristic information of each surface of the three-dimensional model can be obtained, thereby obtaining the all-round characteristic information of the preset target, and then the characteristic information of each surface is bound to the orientation information of the surface in the three-dimensional model, and stored. For example, after the tattoo feature on the left side of the human body is recognized, the tattoo feature information and the left side of the human body are bound together, so that when the tattoo is photographed and recognized later, the current orientation of the human body can be known according to the information of the tattoo on the left side of the human body and the angle of the camera device.
[0039] In addition, when importing the stereoscopic model data of a preset target, the type of the preset target also needs to be identified. For example, when importing a model of a dog as the preset target, the model is marked as a dog, and the type information is bound to the stereoscopic model data, so that similar objects can be quickly found from the captured images according to the type of the preset target for identification, thereby improving efficiency.
[0040] Any camera device can generate the video image by shooting the preset area, and the method for performing target recognition on the video image is:
[0041] All objects in the video image are identified by using recognition technology, and the images of all objects in the video image are captured to generate a snapshot image corresponding to each object; each snapshot image is then analyzed to outline the outer contour of each object so as to determine the type of each object, and objects of the same type as the preset target are screened out from all objects according to the type of the object;
[0042] Afterwards, the captured image corresponding to the object of the same type as the preset target is subjected to feature extraction, and the extracted feature information is compared with the all-round feature information of the preset target. If the similarity between the feature information of the object and the feature information of any surface of the preset target reaches a first preset value, the object is marked as the initial target. The first preset value can be set to 60% according to demand, and a part of the targets with a similarity lower than 60% are pre-eliminated by using the first preset value, and the objects with a similarity higher than 60% are set as the initial targets, and each initial target is further compared to improve the accuracy of key target recognition.
[0043] For example: the preset target is set to a specific person. When several objects are identified in the video image, the picture of each object in the video image is captured; the captured image of each object is analyzed to obtain the type of each object in the video image, and then all the people in the image are classified, and other objects such as dogs or cats are eliminated. The captured images of each person classified are subjected to feature analysis to obtain feature information of each person classified; since each person walks in a different direction, the angle of the person in the captured image of each person will also be different. Therefore, the feature information of each person identified from the captured image is compared with the all-round feature information of the preset target. When the similarity between the features in the captured image of a person and the features of a surface of the preset target reaches 60% or more, the person is marked as the initial target. If the similarity does not reach 60%, the person is eliminated.
[0044] Since the number of initial targets may be more than one, each initial target is subjected to secondary image acquisition and secondary similarity comparison to improve the recognition accuracy of key targets.
[0045] Step S2: Determine the moving direction of the initial target based on the primary video image, control the camera device in the same preset area whose shooting range is facing the moving direction of the initial target to shoot in the direction of the initial target to obtain a secondary video image, and identify and mark the initial target in the secondary video image.
[0046] When the similarity between the feature information of the initial target and the feature information of any surface of the preset target reaches a first preset value, the surface of the preset target is set as a reference plane; the orientation of the reference plane in the stereo model is identified, and the orientation information of the reference plane is switched to the geodetic coordinates to obtain the orientation of the stereo model of the preset target in the geodetic space; the orientation of the stereo model in the geodetic space coincides with the orientation of the initial target in the geodetic space, thereby determining the moving direction of the initial target. For example: when the captured image of the initial target is the back of a person, and the similarity between the feature information of the back of the initial target and the feature information of the back of the preset target reaches a first preset value, the back of the preset target is marked as a reference plane, and the orientation information of the reference plane is obtained as the back orientation of the reference plane of the stereo model. At this time, the stereo model is rotated to the back view, so that the orientation of the stereo model in the geodetic coordinate space is the same as the orientation of the initial target in the geodetic coordinate space. At this time, the moving direction of the initial target can be obtained according to the orientation of the stereo model in the geodetic coordinate space.
[0047] After knowing the moving direction of the initial target, control the camera device with a shooting range facing the moving direction of the initial target in the same preset area to shoot in the direction of the initial target to obtain a secondary video image. Since the shooting angle of the camera device faces the moving direction of the initial target, the front of the initial target will definitely be captured in the secondary video image generated by the shooting. By performing a secondary comparison of the front image of the initial target, the recognition accuracy can be greatly improved.
[0048] In order to quickly locate the position of the initial target in the secondary video image, when marking the object as the initial target, it is necessary to mark at least one environmental target in the captured image where the initial target is located in advance, and record the positional relationship between the initial target and the environmental target; when the position of the environmental target in the secondary video image is identified, the position of the initial target in the secondary video image is inferred according to the positional relationship between the environmental target and the initial target, and feature recognition is performed on the image of the initial target in the secondary video image so as to perform a similarity comparison again.
[0049] For example, the initial target is a person. During a video image processing process, an environmental target is added to the environment where the person is located. The environmental target can be a tree next to the person, and the approximate distance between the person and the tree is determined. After the secondary video image is acquired, the environmental target is found in the secondary video image, that is, the position of the tree in the secondary video image is determined, and then the position of the initial target in the secondary video image is calculated based on the distance between the person and the tree. The object at this position is marked as the initial target, and then a snapshot image of the initial target can be captured from the secondary video image, and feature recognition is performed on the image to perform a secondary similarity comparison.
[0050] Step S3: perform a similarity comparison between the initial target in the secondary video image and the preset target. The similarity comparison method is the same as the first similarity comparison method and is not described in detail here. When the similarity reaches a second preset value, the initial target is marked as the final target, and all video images related to the final target are saved, that is, the captured image of the final target in the first video image and the captured image of the final target in the secondary video image are saved. If the similarity does not reach the second preset value, it means that the selection of the initial target is incorrect, and then return to step S1 to select a new initial target again.
[0051] The second preset value is higher than the first preset value. In this embodiment, the second preset value can be set to 98% according to needs; the final target marked after two similarity comparisons is the preset key target, and its similarity is closest to the preset target; if in the second similarity comparison process, the similarity of two or more initial targets is greater than the second preset value, then combined with the similarity of the first similarity, the initial target with the highest first and second similarities is selected as the final target. If there is a parallel situation with the same similarities twice, the information of the parallel initial targets is sent to the system administrator, and the system administrator selects the final target from the parallel initial targets.
[0052] In addition, when the initial target is marked as the final target, any camera device in the same preset area can be controlled to track the final target to obtain a real-time image of the final target in the preset area, and the real-time image taken during the tracking process can be saved to obtain the real-time dynamics of the final target.
[0053] Embodiment 2
[0054] The present embodiment provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the video-based key target image capture method in the first embodiment when executing the computer program; in addition, the present embodiment also provides a storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned video-based key target image capture method when executed.
[0055] The device and storage medium in this embodiment and the method in the aforementioned embodiment are two aspects based on the same inventive concept. The method implementation process has been described in detail above, so those skilled in the art can clearly understand the structure and implementation process of the system in this embodiment based on the aforementioned description. For the sake of brevity of the specification, they will not be repeated here.
[0056] The above-mentioned embodiments are only preferred embodiments of the present invention and cannot be used to limit the scope of protection of the present invention. Any non-substantial changes and substitutions made by technicians in this field on the basis of the present invention shall fall within the scope of protection required by the present invention.
Claims
1. A method for capturing key target images based on video, characterized in that: The method is applied in a preset area provided with a plurality of multi-angle camera devices, and comprises: step S1: collecting a video image taken by any camera device, performing target recognition on the video image, and when an initial target whose similarity with the preset target reaches a first preset value is recognized in the video image, executing step S2; Step S2: determining the moving direction of the initial target, controlling a camera device in the same preset area whose shooting range is facing the moving direction of the initial target to shoot in the direction of the initial target to obtain a secondary video image, and identifying and marking the initial target in the secondary video image; Step S3: comparing the initial target in the secondary video image with the preset target for similarity. When the similarity reaches a second preset value, the initial target is marked as the final target, and all video images related to the final target are saved; wherein the second preset value is higher than the first preset value; if the similarity does not reach the second preset value, returning to step S1; Before step S1, the method further includes: importing the 3D model data of the preset target, performing feature recognition on each surface of the 3D model of the preset target to obtain all-round feature information of the preset target, marking the type of the preset target, and storing the all-round feature information and type information of the preset target; The method for performing target recognition on the primary video image in step S1 is: identifying all objects in the primary video image, and capturing the images of all objects in the primary video image to generate a snapshot image corresponding to each object; Determine the type of each object, and select objects of the same type as the preset target from all objects according to the type of the object; Feature extraction is performed on the captured image corresponding to the object of the same type as the preset target, and the extracted feature information is compared with the all-round feature information of the preset target. If the similarity between the feature information of the object and the feature information of any surface of the preset target reaches a first preset value, the object is marked as the initial target.
2. The method for capturing key target images based on video according to claim 1, characterized in that: At least three camera devices are arranged in the preset area, and the shooting ranges of all the camera devices overlap and cover the preset area.
3. The method for capturing key target images based on video according to claim 2, characterized in that: Each of the camera devices has a rotation angle of 0 to 90 degrees in the horizontal direction.
4. The method for capturing key target images based on video according to claim 1, characterized in that: The method for determining the moving direction of the initial target is as follows: when the similarity between the feature information of the initial target and the feature information of any surface of the preset target reaches a first preset value, the surface of the preset target is set as a reference plane, the orientation of the reference plane in the three-dimensional model is identified, and the orientation information of the reference plane is switched to geodetic coordinates to obtain the orientation of the three-dimensional model of the preset target in geodetic space; The orientation of the three-dimensional model in the geodetic space is consistent with the orientation of the initial target in the geodetic space, so as to determine the moving direction of the initial target.
5. The method for capturing key target images based on video according to claim 1, characterized in that: The method for identifying and marking the initial target in the secondary video image in step S2 is: when marking an object as the initial target, at least one environmental target is marked in advance in the captured image where the initial target is located, and the positional relationship between the initial target and the environmental target is recorded; Identify the position of the environmental target in the secondary video image, infer the position of the initial target in the secondary video image based on the positional relationship between the environmental target and the initial target, and perform feature recognition on the image of the initial target in the secondary video image so as to perform a similarity comparison again.
6. The method for capturing key target images based on video according to claim 1, characterized in that: Also includes: When the initial target is marked as the final target, any camera device in the same preset area is controlled to track the final target to obtain a real-time image of the final target in the preset area.
7. An electronic device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for capturing key target images based on video as described in any one of claims 1 to 6 is implemented.
8. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, the method for capturing an image of a key target based on a video is implemented.
Citation Information
Patent Citations
Obfect tracking system and method thereof
KR1020120068150A