Object tracking method and device, electronic device, and storage medium
By automatically displaying and managing real-time images of distributed camera devices on the display interface of electronic devices, the problem of poor object tracking experience under insufficient bandwidth is solved, and efficient and accurate object tracking is achieved.
Patent Information
- Application Number
- CN202011218419.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-04
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2040-11-04
AI Technical Summary
In a central control environment with insufficient bandwidth, users need to switch multiple cameras in turn to track objects, resulting in poor tracking experience.
Automatic tracking of the target object is achieved by obtaining real-time images in a distributed camera device, determining the target object, and displaying the image of the target object in a specific way on the display interface of the electronic device, while turning off or not displaying the images of other cameras.
Automatic tracking of target objects is achieved, reducing the time for missing tracking target objects, improving the accuracy of tracking, and reducing bandwidth requirements.
Smart Images

Figure CN114449212B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of control technology, and in particular to an object tracking method and device, an electronic device, and a storage medium. Background Art
[0002] At present, distributed cameras are increasingly used in traffic monitoring, urban security or home applications. The central control terminal can simultaneously display images captured by multiple cameras, or switch to the image of a certain camera. Users can record or take screenshots according to actual needs.
[0003] In actual applications, the central control terminal needs sufficient bandwidth to simultaneously obtain multiple channels of image data, so as to facilitate object tracking in multiple channels of images. However, for a central control terminal with insufficient bandwidth, the user needs to switch each camera to track the object in turn, which results in a poor tracking experience. Summary of the invention
[0004] The present disclosure provides an object tracking method and device, an electronic device, and a storage medium to address the deficiencies of related technologies.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an object tracking method, which is applied to an electronic device, and includes:
[0006] Acquire real-time images collected by each camera in the distributed camera device, wherein the real-time images include the target object;
[0007] determining a target object in a real-time image, wherein the real-time image containing the target object is used as a first image;
[0008] A first image is displayed in a first display mode on a display interface of an electronic device and other real-time images other than the first image are displayed in a second display mode; the first display mode includes maintaining the current size display or displaying at an enlarged size; the second display mode includes: not displaying other real-time images other than the first image or turning off the cameras corresponding to the other real-time images other than the first image.
[0009] Optionally, after determining the target object in the real-time image, the method further includes:
[0010] Comparing the first image with a preset image quality condition to obtain a comparison result;
[0011] When the comparison result indicates that the first image meets a preset image quality condition, a step of displaying the first image in a first display mode on a display interface of the electronic device is executed.
[0012] Optionally, after comparing the first image with a preset image quality condition to obtain a comparison result, the method further includes:
[0013] When the comparison result indicates that the image quality of the first image is lower than the image quality condition, performing image quality improvement processing on the first image to obtain an improved first image;
[0014] After the first image is updated to the first image after the enhancement process, a step of displaying the first image in a first display mode on a display interface of the electronic device is performed.
[0015] Optionally, after displaying the first image in the first display mode on the display interface of the electronic device, the method further includes:
[0016] Acquire the actual position of the target object in the first image;
[0017] When the actual position is within the warning area of the first image, an adjustment instruction is generated according to the actual position and the center position of the first image; the adjustment instruction is used to adjust the viewing angle of the first camera;
[0018] The target object is tracked based on a second image captured by the first camera after adjusting the viewing angle.
[0019] Optionally, after tracking the target object based on the second image acquired after the first camera adjusts the framing angle, the method further includes:
[0020] Obtaining the similarity between two adjacent frames of the second image;
[0021] When the similarity exceeds a preset similarity threshold, a second camera whose viewing range is closest to the target object is turned on;
[0022] The target object is tracked based on the third image captured by the second camera, and the first camera is turned off.
[0023] Optionally, after displaying the first image in the first display mode on the display interface of the electronic device, the method further includes:
[0024] Acquire the actual position of the target object in the first image;
[0025] When the actual position is within the warning area of the first image, turning on a second camera whose viewing range is closest to the target object;
[0026] The target object is tracked based on a third image captured by the second camera and the first image.
[0027] Optionally, after displaying the first image in the first display mode on the display interface of the electronic device, the method further includes:
[0028] Acquire the actual position of the target object in the first image;
[0029] When the actual position is outside the first image, each camera in the distributed camera device is turned on;
[0030] When a target object is identified in the real-time image captured by the third camera, the target object is tracked based on the fourth image captured by the third camera, and other cameras except the third camera are turned off.
[0031] Optionally, after displaying the first image in the first display mode on the display interface of the electronic device, the method further includes:
[0032] Acquire the actual position of the target object in the first image;
[0033] When the actual position is within the warning area of the first image, obtaining an actual image captured by a second camera whose viewing range is closest to the target object;
[0034] When a target object is identified in the real-time image captured by the second camera, the target object is tracked based on the third image captured by the second camera, and the first image is displayed in a second display mode.
[0035] Optionally, the method further comprises:
[0036] The images including the target object are stored in time sequence to obtain a target video.
[0037] According to a second aspect of an embodiment of the present disclosure, there is provided an object tracking device, applied to an electronic device, comprising:
[0038] A real-time image acquisition module, used to acquire real-time images collected by each camera in the distributed camera device, wherein the real-time image includes a target object;
[0039] A target object determination module, used to determine the target object in the real-time image, wherein the real-time image containing the target object is used as the first image;
[0040] A target object tracking module is used to display a first image in a first display mode on a display interface of an electronic device, and to display other real-time images other than the first image in a second display mode; the first display mode includes maintaining the current size display or displaying at an enlarged size; the second display mode includes: not displaying other real-time images other than the first image or turning off the cameras corresponding to other real-time images other than the first image.
[0041] Optionally, the device further comprises:
[0042] A comparison result acquisition module, used for comparing the first image with a preset image quality condition to obtain a comparison result;
[0043] The recognition result output module is used to trigger the target object tracking module when the comparison result indicates that the first image meets a preset image quality condition.
[0044] Optionally, the module further includes:
[0045] The recognition result output module is further used to trigger the image quality processing module when the comparison result indicates that the image quality of the first image is lower than the image quality condition; the image quality processing module is used to perform image quality improvement processing on the first image to obtain a processed image;
[0046] The first image updating module is used to update the real-time image to the real-time image after the enhancement processing, and trigger the target object tracking module.
[0047] Optionally, the device further comprises:
[0048] An actual position acquisition module, used to acquire the actual position of the target object in the first image;
[0049] an adjustment instruction generating module, configured to generate an adjustment instruction according to the actual position and the center position of the first image when the actual position is within the warning area of the first image; the adjustment instruction is used to adjust the viewing angle of the first camera;
[0050] The target object tracking module is further used to track the target object based on a second image captured after the first camera adjusts the framing angle.
[0051] Optionally, the device further comprises:
[0052] A similarity acquisition module, used to acquire the similarity between two adjacent frames of the second image;
[0053] A camera activation module, configured to activate a second camera whose viewing range is closest to the target object when the similarity exceeds a preset similarity threshold;
[0054] The target object tracking module is further used to track the target object based on the third image captured by the second camera and turn off the first camera.
[0055] Optionally, the device further comprises:
[0056] An actual position acquisition module, used to acquire the actual position of the target object in the first image;
[0057] A camera activation module, configured to activate a second camera whose viewing range is closest to the target object when the actual position is within the warning area of the first image;
[0058] The target object tracking module is further used to track the target object based on the third image captured by the second camera and the first image.
[0059] Optionally, the device further comprises:
[0060] An actual position acquisition module, used to acquire the actual position of the target object in the first image;
[0061] A camera activation module, configured to activate each camera in the distributed camera device when the actual position is outside the first image;
[0062] The target object tracking module is also used to track the target object based on the fourth image captured by the third camera when the target object is identified in the real-time image captured by the third camera, and to turn off other cameras except the third camera.
[0063] Optionally, the device further comprises:
[0064] An actual position acquisition module, used to acquire the actual position of the target object in the first image;
[0065] The real-time image acquisition module is further configured to acquire an actual image captured by a second camera whose viewing range is closest to the target object when the actual position is within the warning area of the first image;
[0066] The target object tracking module is used to track the target object based on the third image captured by the second camera when the target object is identified in the real-time image captured by the second camera, and to display the first image in the second display mode.
[0067] Optionally, the device further comprises:
[0068] The target video acquisition module is used to store images including the target object in chronological order to obtain the target video.
[0069] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0070] processor;
[0071] a memory for storing a computer program executable by the processor;
[0072] The processor is configured to execute the computer program in the memory to implement the above method.
[0073] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, and when an executable computer program in the storage medium is executed by a processor, the above-mentioned method can be implemented.
[0074] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0075] It can be known from the above embodiments that the disclosed embodiments can obtain the real-time images collected by each camera in the distributed camera device, wherein the real-time images include the target object; then, the target object is determined in the real-time image, wherein the real-time image containing the target object is used as the first image; then, the first image is displayed in a first display mode on the display interface of the electronic device and other real-time images other than the first image are displayed in a second display mode; the first display mode includes maintaining the current size display or displaying at an enlarged size; the second display mode includes: not displaying other real-time images other than the first image or closing the cameras corresponding to other real-time images other than the first image. In this way, the target object can be automatically tracked in this embodiment, which is conducive to reducing the time of losing the tracked target object and improving the accuracy of tracking.
[0076] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0078] Figure 1 The figure is a flowchart of an object tracking method according to an exemplary embodiment.
[0079] Figure 2 The diagram is a schematic diagram of a scenario according to an exemplary embodiment.
[0080] Figure 3 The figure is another schematic effect diagram of a scene according to an exemplary embodiment.
[0081] Figure 4 The figure is a flowchart of another object tracking method according to an exemplary embodiment.
[0082] Figure 5 is a schematic diagram showing that a target object is located in a warning area according to an exemplary embodiment.
[0083] Figure 6 The figure is a schematic diagram showing tracking a target object by adjusting the viewing angle of a camera according to an exemplary embodiment.
[0084] Figure 7 The figure is a schematic effect diagram of a scene according to an exemplary embodiment.
[0085] Figure 8 is a flowchart of another object tracking method according to an exemplary embodiment.
[0086] Fig. 9 The figure is a schematic effect diagram of a scene according to an exemplary embodiment.
[0087] Fig.10 The figure is a schematic effect diagram of a scene according to an exemplary embodiment.
[0088] Fig.11 The invention is a block diagram of an object tracking device according to an exemplary embodiment.
[0089] Fig.12 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0090] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described below by way of example do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices consistent with some aspects of the present disclosure as detailed in the appended claims.
[0091] In order to solve the above technical problems, the present disclosure provides an object tracking method. Figure 1 This is a flow chart of an object tracking method according to an exemplary embodiment, which can be applied to electronic devices, which may include smart phones, tablet computers, personal computers and other devices. Preferably, this solution can be applied to portable mobile terminals. Compared with the manual switching of each camera to track the object in the transmission monitoring device, for example, baby position tracking in the family, vehicle tracking in the city, this embodiment can automatically track the target object, which is conducive to reducing the time of losing the tracking target object and improving the tracking accuracy.
[0092] The distributed camera equipment is composed of several cameras set up in different geographical locations and connected to electronic devices through wired or wireless networks. It should be noted that the above-mentioned camera can refer to a real camera, such as a surveillance camera, or a camera on other electronic devices, such as a smart phone, a tablet computer, a personal computer, a distributed camera or an Internet of Things (IOT) device, which is not limited here. In this solution, each distributed camera device can establish a binding based on a variety of connection methods, and the specific binding scheme is not limited here.
[0093] See also Figure 1 , an object tracking method, comprising steps 11 to 13, wherein:
[0094] In step 11, real-time images collected by each camera in the distributed camera device are obtained.
[0095] In this embodiment, the electronic device can establish a communication connection with the distributed camera device, and the distributed camera device includes a plurality of cameras. Therefore, the communication connection may include an end-to-end connection between the electronic device and all or part of the cameras, and the end-to-end connection method includes at least one of the following: Bluetooth connection, WiFi connection, infrared data transmission connection, ZigBee connection and ultra-wideband connection, and the effect is as follows: Figure 2 See Figure 2 , the electronic device 10 can be connected to multiple cameras 20 end-to-end. In one example, the communication connection can also include the electronic device being connected to all or part of the cameras through the server, the effect is as follows Figure 3 See Figure 3 , the electronic device 10 is connected to multiple cameras 20 through the server 30.
[0096] In actual applications, electronic devices can be connected to some cameras through a server, and the rest maintain end-to-end connections. In addition, the electronic devices can control each camera through their own communication connections, and / or obtain real-time images captured by each camera.
[0097] In this embodiment, after the communication connection is established, the electronic device can obtain real-time images collected by each camera in the distributed camera device.
[0098] In step 12 , a target object is determined in the real-time image, wherein the real-time image containing the target object is used as the first image.
[0099] In this embodiment, the electronic device may store an image recognition algorithm, such as a convolutional neural network, an edge detection algorithm, or a skin detection algorithm. The electronic device may call the above image recognition algorithm to identify each real-time image and obtain an object in each real-time image. Then, the electronic device may match the target object from the above real-time image according to the user's trigger operation or the stored configuration information. Figure 2 For the convenience of description, the real-time image containing the target object is referred to as the first image, and the camera that captures the target object is referred to as the first camera.
[0100] Taking the trigger operation matching the target object as an example, the electronic device can detect the user's trigger operation on the display area in the display screen of the electronic device, and the trigger operation includes a trigger operation representing the user selecting the target object from the real-time image. In response to detecting the trigger operation representing the user selecting the target object from the real-time image, the electronic device can use the object closest to the location of the trigger operation as the target object. In this way, the user can select the target object, such as a person, a pet, or a landscape, according to actual needs or personal preferences.
[0101] In another example, the electronic device may obtain configuration information within the electronic device. The configuration information includes a target object pre-configured by the user. For example, the user may pre-collect facial images of his or her child, and a preset image recognition algorithm may be stored in the electronic device. After the user uploads the facial image, the image recognition algorithm may obtain a feature vector of the facial image, and the feature vector may be stored as part of the configuration information. Of course, the facial image may also be used as part of the configuration information, and the feature vector of the facial image may be obtained in a subsequent process, and the corresponding solution falls within the protection scope of the present disclosure. In this way, the electronic device may match the target object from the real-time image based on the facial image or feature vector in the configuration information.
[0102] Considering that the image quality of the real-time images captured by each device in the distributed camera device is different, for example, when the device is a feature phone, the image is captured with low image quality, such as 1600*1200 pixels. In one embodiment, after determining the first image containing the target object, the electronic device can compare the first image with a preset image quality condition, wherein the image quality condition may include at least one of the following: resolution, image format, and color, and the preset image quality condition may be a color image with a resolution of 1920*1080 pixels (or more). In this way, a comparison result can be obtained, which includes a characterization that the first image meets the preset image quality condition or a characterization that the image quality of the first image is lower than the image quality condition.
[0103] In one example, when the comparison result indicates that the first image meets a preset image quality condition, a step of displaying the first image in a first display mode on a display interface of the electronic device is performed.
[0104] In one example, when the comparison result indicates that the image quality of the first image is lower than the image quality condition, the electronic device can perform image quality enhancement processing on the first image to obtain the enhanced first image, wherein the image quality enhancement processing can use an image enhancement algorithm, such as real-time images from the frequency domain or spatial domain, so as to improve the contrast, layering or image details of the real-time image. The technician can select a suitable image enhancement algorithm according to the specific scenario, and if the image quality of the first image can be improved, the corresponding solution falls within the protection scope of the present disclosure.
[0105] Then, the electronic device can update the first image to the first image after the enhancement process, and execute the step of displaying the first image in the first display mode on the display interface of the electronic device. In this way, in this embodiment, by performing image enhancement process on the low-quality first image, the image quality of the first image can be improved, which is conducive to improving the accuracy of subsequent recognition.
[0106] It should be noted that the electronic device can also perform image quality improvement processing on the received real-time image before identifying the target object, which can also implement the solution of the present disclosure, and the corresponding solution falls within the protection scope of the present disclosure.
[0107] In step 13, the first image is displayed on the display interface of the electronic device in a first display mode, and other real-time images other than the first image are displayed in a second display mode.
[0108] In this embodiment, the electronic device can maintain a communication connection with the first camera, and obtain a real-time image sent by the first camera (hereinafter referred to as the first image). Then, the electronic device can track the target object according to the first image captured by the first camera, and display the first image in a first display mode. The first display mode may include maintaining the current size display or displaying it in an enlarged size, and the enlarged size refers to the size after the current size is enlarged according to a preset ratio (such as 2 to 5 times). At the same time, the electronic device can display other real-time images besides the first image in a second display mode. The second display mode refers to: not displaying other real-time images besides the first image or turning off the cameras corresponding to other real-time images besides the first image. The effect is as follows: Figure 3 As shown, Figure 3The grayscale filling shown in indicates that the corresponding camera has been turned off or the electronic device camera is on and the electronic device only receives real-time images but does not display them. Taking turning off all cameras except the first camera as an example, the electronic device only communicates with the first camera at this time, which can reduce the bandwidth and is suitable for scenarios with lower bandwidth. Taking the example of an electronic device only receiving real-time images but not displaying them, the electronic device can only display the first image, but at the same time receive real-time images from other cameras. When it is necessary to switch to other cameras, the real-time images can be directly obtained locally, which can reduce the switching time and improve the switching efficiency.
[0109] So far, the disclosed embodiment can obtain the real-time images collected by each camera in the distributed camera device, wherein the real-time image includes the target object; then, the target object is determined in the real-time image, wherein the real-time image containing the target object is used as the first image; then, the first image is displayed in a first display mode on the display interface of the electronic device and other real-time images other than the first image are displayed in a second display mode; the first display mode includes maintaining the current size display or displaying at an enlarged size; the second display mode includes: not displaying other real-time images other than the first image or turning off the cameras corresponding to other real-time images other than the first image. In this way, the target object can be automatically tracked in this embodiment, which is conducive to reducing the time of losing the tracked target object and improving the tracking accuracy.
[0110] The present disclosure provides another object tracking method. Figure 4 The present invention is a flowchart of an object tracking method according to an exemplary embodiment, which can be applied to electronic devices, such as smart phones, tablet computers, personal computers, etc. The distributed camera device is composed of a plurality of cameras arranged at different geographical locations and connected via a wired or wireless network. Figure 4 , an object tracking method, comprising steps 41 to 46, wherein:
[0111] In step 41, real-time images collected by each camera in the distributed camera device are obtained.
[0112] In this embodiment, the solution of step 41 is similar to the solution of step 11. For details, please refer to Figure 1 The contents of step 11 will not be repeated here.
[0113] In step 42 , a target object is determined in the real-time image, wherein the real-time image containing the target object is used as the first image.
[0114] In this embodiment, the solution of step 42 is similar to the solution of step 12. For details, please refer to Figure 1 The contents of step 12 will not be repeated here.
[0115] In step 43, the first image is displayed in a first display mode on the display interface of the electronic device, and other real-time images other than the first image are displayed in a second display mode.
[0116] In this embodiment, the solution of step 43 is similar to the solution of step 13, and the details can be found in Figure 1 The contents of step 13 are not repeated here.
[0117] In step 44, the actual position of the target object in the first image is obtained.
[0118] In this embodiment, the electronic device can use an image recognition algorithm to identify the target object, thereby determining the actual position of the target object in the first image. The actual position of the target object refers to the actual position of each point on the edge of the target object. Of course, after identifying the target object, the position of each point on the outer rectangular frame of the target object can be used as the actual position of the target object.
[0119] In step 45, when the actual position is within the warning area of the first image, an adjustment instruction is generated according to the actual position and the center position of the first image; the adjustment instruction is used to adjust the viewing angle of the first camera.
[0120] In this embodiment, the electronic device may store a warning area of the actual image, wherein the warning area refers to an area formed by a preset distance from the edge of the first image, such as Figure 5 That is to say, when the distance between at least one point on the target object and the edge of the first image is less than the preset distance, it indicates that the target object is located within the warning area.
[0121] In this embodiment, when the electronic device detects that the actual position of the target object is within the warning area of the first image, it can generate an adjustment instruction based on the actual position and the center position of the first image. For example, if the actual position is on the left side of the center position, an adjustment instruction to rotate left by N (such as 5, adjustable) degrees is generated; for another example, if the actual position is on the right side of the center position, an adjustment instruction to rotate right by N degrees is generated. Afterwards, the electronic device can send the above adjustment instruction to the first camera. In this way, after receiving the adjustment instruction, the first camera can control the rotation of the pan-tilt head in response to the above adjustment instruction, thereby adjusting the viewing angle of the first camera. Finally, after adjusting the viewing angle, the target object in the second image captured by the first camera can be offset back to near the center position and located outside the warning area, such as. Figure 6 The effect is shown.
[0122] In step 46, the target object is tracked based on the second image acquired by the first camera after adjusting the viewing angle.
[0123] In this embodiment, the electronic device can track the target object based on the second image captured by the first camera after adjusting the viewing angle. In this embodiment, an adjustment instruction can also be generated when the target object is in the warning area, so that the first camera continues to track the target object after adjusting the viewing angle, avoiding losing the target object, which is conducive to improving the tracking accuracy.
[0124] In this embodiment, the electronic device can store images including the target object in chronological order to obtain the target video. In other words, in this embodiment, the video including the target object can be spliced without the need for post-editing by the user, thereby improving the efficiency of obtaining the target video.
[0125] In one embodiment, considering that the pan / tilt of the first camera has a rotation range, for example, the left and right rotation range is [-90, 90] degrees, and the up and down rotation range is [-90, 90] degrees, that is, unlimited rotation cannot be achieved. To this end, the electronic device can obtain the similarity of two adjacent frames of the second image. For example, the electronic device can use a preset feature extraction algorithm to obtain the feature vectors of the two frames of the second image, wherein the feature extraction algorithm can complete the training of the deep learning algorithm, such as a neural network (such as a convolutional neural network), a spot detection algorithm (such as a method of detecting the Laplacian operator (LOG), and a method using the pixel point Hessian matrix (second-order differential) and its determinant value (DOH)), a corner detection algorithm (such as the Harris algorithm and the FAST algorithm), a binary string feature descriptor, etc. After obtaining the feature vector, the cosine formula can be used to calculate the cosine value of the two feature vectors, that is, the similarity. When the cosine value is larger, it means that the two feature vectors are more similar, that is, the first preview image and the second preview image are more similar.
[0126] The electronic device may store a preset similarity threshold, such as 0.95. The electronic device may compare the obtained similarity with the above similarity threshold. When the similarity is less than the similarity threshold, it indicates that the camera's viewing angle has changed; when the similarity exceeds the similarity threshold, it indicates that the camera's viewing angle has not changed, that is, the first camera has not rotated after the adjustment instruction. At this time, the electronic device may turn on the second camera whose viewing range is closest to the target object, such as Figure 7 For example, if the target object is located on the right side of the second image, the second camera whose viewing range is closest to the viewing range of the first camera is turned on. The electronic device can track the target object based on the third image captured by the second camera and turn off the first camera.
[0127] At this point, in one embodiment, the second camera can be turned on when the target object is in the warning area, and then the target object can be tracked based on the images captured by the first camera and the second camera to avoid losing the tracked target object, which is beneficial to improving the tracking accuracy.
[0128] The present disclosure provides another object tracking method. Figure 8 The present invention is a flowchart of an object tracking method according to an exemplary embodiment, which can be applied to electronic devices, such as smart phones, tablet computers, personal computers, etc. The distributed camera device is composed of a plurality of cameras arranged at different geographical locations and connected via a wired or wireless network. Figure 8 , an object tracking method, comprising steps 81 to 86, wherein:
[0129] In step 81, real-time images collected by each camera in the distributed camera device are obtained.
[0130] In this embodiment, the solution of step 81 is similar to the solution of step 11. For details, see Figure 1 The contents of step 11 will not be repeated here.
[0131] In step 82 , a target object is determined in the real-time image, wherein the real-time image containing the target object is used as the first image.
[0132] In this embodiment, the solution of step 82 is similar to the solution of step 12. For details, please refer to Figure 1 The contents of step 12 will not be repeated here.
[0133] In step 83, the first image is displayed in a first display mode on the display interface of the electronic device, and other real-time images other than the first image are displayed in a second display mode.
[0134] In this embodiment, the solution of step 83 is similar to the solution of step 13, and the details can be seen in Figure 1 The contents of step 13 are not repeated here.
[0135] In step 84, the actual position of the target object in the first image is obtained.
[0136] In this embodiment, the electronic device can use an image recognition algorithm to identify the target object, thereby determining the actual position of the target object in the first image. The actual position of the target object refers to the actual position of each point on the edge of the target object. Of course, after identifying the target object, the position of each point on the outer rectangular frame of the target object can be used as the actual position of the target object.
[0137] In step 85, when the actual position is outside the first image, each camera in the distributed camera device is turned on.
[0138] In this embodiment, when the electronic device is actually located outside the first image, that is, when the target object cannot be detected, each camera in the distributed camera device can be turned on, such as Fig. 9 Then, the electronic device can call the image recognition algorithm to identify the objects in each real-time image and match the target object. For details, please refer to step 82, which will not be repeated here.
[0139] In step 86, when a target object is identified in the real-time image captured by the third camera, the target object is tracked based on the fourth image captured by the third camera, and other cameras except the third camera are turned off.
[0140] In this embodiment, when the target object is recognized in the real-time image captured by the third camera, the electronic device can track the target object based on the fourth image captured by the third camera and turn off other cameras except the third camera. Fig.10 The effect is shown.
[0141] In this embodiment, the electronic device can store images including the target object in chronological order to obtain the target video. In other words, in this embodiment, the video including the target object can be spliced without the need for post-editing by the user, thereby improving the efficiency of obtaining the target video.
[0142] Thus, in this embodiment, all cameras can be turned on when the target object is in the warning area or is not in the real-time image, and when the target object is recognized in the real-time image captured by the third camera, the target object can be tracked based on the image captured by the third camera. In this way, in this embodiment, automatic camera switching can be achieved, which is conducive to reducing the time of losing the target object and improving the tracking accuracy.
[0143] The object tracking method described above is described below in combination with actual scenarios, including:
[0144] Scene 1
[0145] Babies are active and often move back and forth between different rooms, sometimes going into the kitchen and sometimes into the bathroom. There is often hot water and cooking in the kitchen, and water or shampoo and other supplies are stored in the bathroom, which can put babies in danger.
[0146] At this point, parents can use doorbells, laptop cameras, SLR cameras, home cameras and TVs to form a distributed camera device. Users connect their smartphones to the above distributed camera devices through home WiFi to form an object tracking system that can be used to determine and track the baby's location.
[0147] Each device in the distributed camera equipment can collect real-time images in the area it is responsible for according to its own collection cycle and send them to the smartphone.
[0148] The smartphone can then execute the above-mentioned object tracking method. After acquiring the real-time image, it can first determine whether the image quality of the real-time image meets the preset image quality conditions. If it does not meet the image quality conditions, the real-time image can be first improved in image quality, and the real-time image can be updated to the processed image obtained by the improved image quality. Then, the smartphone can use the preset image recognition algorithm to identify the real-time image to determine whether there is a baby in the real-time image.
[0149] When the smartphone determines that there is a baby in the real-time image, for example, when the TV camera captures a real-time image containing the baby, the TV can be kept on and other devices can be turned off. When the real-time image captured by the TV does not contain the baby, all cameras can be turned on. When the real-time image captured by the second camera contains the baby, the second camera is kept on and all other cameras are turned off. In this way, the bandwidth and traffic of the smartphone can be reduced.
[0150] Of course, the smartphone can also keep recording, so as to obtain a video that includes the baby throughout the process. In this way, parents can directly use the above video without having to edit it from multiple other videos, which is conducive to improving the user experience.
[0151] Of course, the smartphone can also push the above video to the TV. In this way, the parents who are watching the TV can also play the above video in a picture-in-picture manner while watching the TV program, so that the baby is always in the parents' sight.
[0152] Scene 2
[0153] When the police are solving a case, the suspect may be mixed in the crowd, so the staff needs to play back the videos collected by several cameras until the suspect is found. At this time, the staff can specify the target object, that is, the suspect, on the central control terminal.
[0154] At this time, the central control terminal can access all distributed camera devices in the specified area and use the preset image recognition algorithm to identify the suspect. When it is determined that there is a baby in the real-time image, the display image is enlarged and displayed, and the real-time images uploaded by other cameras are obtained but not displayed.
[0155] When the suspect leaves the camera's field of view, another camera can be switched to track the suspect. In other words, from the moment the suspect is identified, there is always a camera tracking the suspect. Of course, the central control terminal can also keep recording to obtain a video that includes the suspect throughout the process. In this way, after the suspect disappears, the staff can use the video to trace back to the suspected disappearance location without having to slowly replay, compare, search, and edit in massive amounts of data, which is conducive to improving work efficiency.
[0156] Of course, the central control end can also push the above video to the staff closest to the camera, so that they can quickly find the suspect.
[0157] Fig.11 This is a block diagram of an object tracking device according to an exemplary embodiment, which can be applied to electronic devices, which can include smart phones, tablet computers, personal computers and other devices. The distributed camera device is composed of a number of cameras set at different geographical locations and connected via wired or wireless networks. It should be noted that the above-mentioned camera can refer to a real camera, such as a surveillance camera, or a camera on other electronic devices, such as a mobile phone camera, which is not limited here.
[0158] See also Fig.11 , an object tracking device, comprising:
[0159] The real-time image acquisition module 111 is used to acquire the real-time images collected by each camera in the distributed camera device;
[0160] A target object determination module 112 is used to determine a target object in a real-time image, wherein the real-time image containing the target object is used as a first image;
[0161] The target object tracking module 113 is used to display the first image in a first display mode and display other real-time images other than the first image in a second display mode on the display interface of the electronic device.
[0162] In one embodiment, the device further comprises:
[0163] A comparison result acquisition module, used for comparing the first image with a preset image quality condition to obtain a comparison result;
[0164] The recognition result output module is used to trigger the target object tracking module when the comparison result indicates that the first image meets a preset image quality condition.
[0165] In one embodiment, the module further comprises:
[0166] The recognition result output module is further used to trigger the image quality processing module when the comparison result indicates that the image quality of the first image is lower than the image quality condition; the image quality processing module is used to perform image quality improvement processing on the first image to obtain the improved first image;
[0167] The first image updating module is used to update the first image to the first image after the enhancement processing, and trigger the target object tracking module.
[0168] In one embodiment, the device further comprises:
[0169] An actual position acquisition module, used to acquire the actual position of the target object in the first image;
[0170] an adjustment instruction generating module, configured to generate an adjustment instruction according to the actual position and the center position of the first image when the actual position is within the warning area of the first image; the adjustment instruction is used to adjust the viewing angle of the first camera;
[0171] The target object tracking module is further used to track the target object based on a second image captured after the first camera adjusts the framing angle.
[0172] In one embodiment, the device further comprises:
[0173] A similarity acquisition module, used to acquire the similarity between two adjacent frames of the second image;
[0174] A camera activation module, configured to activate a second camera whose viewing range is closest to the target object when the similarity exceeds a preset similarity threshold;
[0175] The target object tracking module is further used to track the target object based on the third image captured by the second camera and turn off the first camera.
[0176] In one embodiment, the device further comprises:
[0177] An actual position acquisition module, used to acquire the actual position of the target object in the first image;
[0178] A camera activation module, configured to activate a second camera whose viewing range is closest to the target object when the actual position is within the warning area of the first image;
[0179] The target object tracking module is further used to track the target object based on the third image captured by the second camera and the first image.
[0180] In one embodiment, the device further comprises:
[0181] An actual position acquisition module, used to acquire the actual position of the target object in the first image;
[0182] A camera activation module, configured to activate each camera in the distributed camera device when the actual position is outside the first image;
[0183] The target object tracking module is also used to track the target object based on the fourth image captured by the third camera when the target object is identified in the real-time image captured by the third camera, and to turn off other cameras except the third camera.
[0184] In one embodiment, the device further comprises:
[0185] An actual position acquisition module, used to acquire the actual position of the target object in the first image;
[0186] The real-time image acquisition module is further configured to acquire an actual image captured by a second camera whose viewing range is closest to the target object when the actual position is within the warning area of the first image;
[0187] The target object tracking module is used to track the target object based on the third image captured by the second camera when the target object is identified in the real-time image captured by the second camera, and to display the first image in the second display mode.
[0188] In one embodiment, the device further comprises:
[0189] The target video acquisition module is used to store images including the target object in chronological order to obtain the target video.
[0190] It is understandable that the device provided by the embodiment of the present disclosure is different from the above Figures 1 to 10 The method shown corresponds to the above, and the specific content can be referred to the content of each embodiment of the method, which will not be repeated here.
[0191] Fig.12 1 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 1200 may be a smart phone, a computer, a digital broadcast terminal, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0192] Reference Fig.12 , the electronic device 1200 may include one or more of the following components: a processing component 1202 , a memory 1204 , a power component 1206 , a multimedia component 1208 , an audio component 1210 , an input / output (I / O) interface 1212 , a sensor component 1214 , a communication component 1216 , and an image acquisition component 1218 .
[0193] The processing component 1202 generally controls the overall operation of the electronic device 1200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1202 may include one or more processors 1220 to execute computer programs. In addition, the processing component 1202 may include one or more modules to facilitate interaction between the processing component 1202 and other components. For example, the processing component 1202 may include a multimedia module to facilitate interaction between the multimedia component 1208 and the processing component 1202.
[0194] The memory 1204 is configured to store various types of data to support operations on the electronic device 1200. Examples of such data include computer programs for any application or method operating on the electronic device 1200, contact data, phone book data, messages, pictures, videos, etc. The memory 1204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0195] The power supply component 1206 provides power to various components of the electronic device 1200. The power supply component 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1200. The power supply component 1206 may include a power supply chip, and the controller may communicate with the power supply chip to control the power supply chip to turn on or off the switch device, so that the battery supplies power to the mainboard circuit or not.
[0196] The multimedia component 1208 includes a screen that provides an output interface between the electronic device 1200 and the target object. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the target object. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0197] The audio component 1210 is configured to output and / or input audio signals. For example, the audio component 1210 includes a microphone (MIC), and when the electronic device 1200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1204 or sent via the communication component 1216. In some embodiments, the audio component 1210 also includes a speaker for outputting audio signals.
[0198] The I / O interface 1212 provides an interface between the processing component 1202 and a peripheral interface module, which may be a keyboard, a click wheel, a button, etc.
[0199] The sensor component 1214 includes one or more sensors for providing various aspects of status assessment for the electronic device 1200. For example, the sensor component 1214 can detect the open / closed state of the electronic device 1200, the relative positioning of components, such as the display screen and keypad of the electronic device 1200, and the sensor component 1214 can also detect the position change of the electronic device 1200 or a component, the presence or absence of contact between the target object and the electronic device 1200, the orientation or acceleration / deceleration of the electronic device 1200, and the temperature change of the electronic device 1200. In this example, the sensor component 1214 may include a magnetic sensor, a gyroscope, and a magnetic field sensor, wherein the magnetic field sensor includes at least one of the following: a Hall sensor, a thin film magnetoresistive sensor, and a magnetic liquid acceleration sensor.
[0200] The communication component 1216 is configured to facilitate wired or wireless communication between the electronic device 1200 and other devices. The electronic device 1200 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component 1216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0201] In an exemplary embodiment, the electronic device 1200 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.
[0202] In an exemplary embodiment, a non-temporary readable storage medium including an executable computer program is also provided, such as a memory 1204 including instructions, and the executable computer program can be executed by a processor. The readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0203] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0204] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An object tracking method, It is characterized in that Used in electronic equipment, including: Acquire real-time images collected by each camera in the distributed camera device, wherein the real-time images include the target object; determining a target object in a real-time image, wherein the real-time image containing the target object is used as a first image; Displaying a first image in a first display mode and displaying other real-time images other than the first image in a second display mode on a display interface of an electronic device; the first display mode includes maintaining the current size display or displaying in an enlarged size; the second display mode includes: not displaying other real-time images other than the first image or turning off cameras corresponding to other real-time images other than the first image; The method further comprises: Acquire the actual position of the target object in the first image; When the actual position is within the warning area of the first image, turning on a second camera whose viewing range is closest to the target object; The target object is tracked based on a third image captured by the second camera and the first image.
2. The object tracking method according to claim 1, It is characterized in that After the target object is identified in the real-time image, the following steps are performed: Comparing the first image with a preset image quality condition to obtain a comparison result; When the comparison result indicates that the first image meets a preset image quality condition, a step of displaying the first image in a first display mode on a display interface of the electronic device is executed.
3. The object tracking method according to claim 2, It is characterized in that After comparing the first image with the preset image quality condition to obtain a comparison result, the method further includes: When the comparison result indicates that the image quality of the first image is lower than the image quality condition, performing image quality improvement processing on the first image to obtain an improved first image; After the first image is updated to the first image after the enhancement process, a step of displaying the first image in a first display mode on a display interface of the electronic device is performed.
4. The object tracking method according to claim 1, It is characterized in that After displaying the first image in the first display mode on the display interface of the electronic device, the method further includes: Acquire the actual position of the target object in the first image; When the actual position is within the warning area of the first image, an adjustment instruction is generated according to the actual position and the center position of the first image; the adjustment instruction is used to adjust the viewing angle of the first camera; The target object is tracked based on a second image captured by the first camera after adjusting the viewing angle.
5. The object tracking method according to claim 4, It is characterized in that After tracking the target object based on the second image acquired after the first camera adjusts the framing angle, the method further includes: Obtaining the similarity between two adjacent frames of the second image; When the similarity exceeds a preset similarity threshold, a second camera whose viewing range is closest to the target object is turned on; The target object is tracked based on the third image captured by the second camera, and the first camera is turned off.
6. The object tracking method according to claim 1, It is characterized in that After displaying the first image in the first display mode on the display interface of the electronic device, the method further includes: Acquire the actual position of the target object in the first image; When the actual position is outside the first image, each camera in the distributed camera device is turned on; When a target object is identified in the real-time image captured by the third camera, the target object is tracked based on the fourth image captured by the third camera, and other cameras except the third camera are turned off.
7. The object tracking method according to claim 1, It is characterized in that After displaying the first image in the first display mode on the display interface of the electronic device, the method further includes: Acquire the actual position of the target object in the first image; When the actual position is within the warning area of the first image, obtaining an actual image captured by a second camera whose viewing range is closest to the target object; When a target object is identified in the real-time image captured by the second camera, the target object is tracked based on the third image captured by the second camera, and the first image is displayed in a second display mode.
8. The object tracking method according to claim 1, It is characterized in that The method further comprises: The images including the target object are stored in time sequence to obtain a target video.
9. An object tracking device, It is characterized in that Used in electronic equipment, including: A real-time image acquisition module, used to acquire real-time images collected by each camera in the distributed camera device, wherein the real-time image includes a target object; A target object determination module, used to determine the target object in the real-time image, wherein the real-time image containing the target object is used as the first image; A target object tracking module, configured to display a first image in a first display mode on a display interface of an electronic device, and to display other real-time images other than the first image in a second display mode; the first display mode includes maintaining the current size display or displaying at an enlarged size; the second display mode includes not displaying other real-time images other than the first image or turning off cameras corresponding to other real-time images other than the first image; The device also includes: An actual position acquisition module, used to acquire the actual position of the target object in the first image; A camera activation module, configured to activate a second camera whose viewing range is closest to the target object when the actual position is within the warning area of the first image; The target object tracking module is further used to track the target object based on the third image captured by the second camera and the first image.
10. The object tracking device according to claim 9, It is characterized in that The device also includes: A comparison result acquisition module, used for comparing the first image with a preset image quality condition to obtain a comparison result; The recognition result output module is used to trigger the target object tracking module when the comparison result indicates that the first image meets a preset image quality condition.
11. The object tracking device according to claim 10, It is characterized in that The module also includes: The recognition result output module is further used to trigger the image quality processing module when the comparison result indicates that the image quality of the first image is lower than the image quality condition; the image quality processing module is used to perform image quality improvement processing on the first image to obtain the improved first image; The first image updating module is used to update the first image to the first image after the enhancement processing, and trigger the target object tracking module.
12. The object tracking device according to claim 9, It is characterized in that The device also includes: An actual position acquisition module, used to acquire the actual position of the target object in the first image; an adjustment instruction generating module, configured to generate an adjustment instruction according to the actual position and the center position of the first image when the actual position is within the warning area of the first image; the adjustment instruction is used to adjust the framing angle of the first camera; The target object tracking module is further used to track the target object based on a second image captured after the first camera adjusts the framing angle.
13. The object tracking device according to claim 12, It is characterized in that The device also includes: A similarity acquisition module, used to acquire the similarity between two adjacent frames of the second image; A camera activation module, configured to activate a second camera whose viewing range is closest to the target object when the similarity exceeds a preset similarity threshold; The target object tracking module is further used to track the target object based on the third image captured by the second camera and turn off the first camera.
14. The object tracking device according to claim 9, It is characterized in that The device also includes: An actual position acquisition module, used to acquire the actual position of the target object in the first image; A camera activation module, configured to activate each camera in the distributed camera device when the actual position is outside the first image; The target object tracking module is also used to track the target object based on the fourth image captured by the third camera when the target object is identified in the real-time image captured by the third camera, and to turn off other cameras except the third camera.
15. The object tracking device according to claim 9, It is characterized in that The device also includes: An actual position acquisition module, used to acquire the actual position of the target object in the first image; The real-time image acquisition module is further configured to acquire an actual image captured by a second camera whose viewing range is closest to the target object when the actual position is within the warning area of the first image; The target object tracking module is used to track the target object based on the third image captured by the second camera when the target object is identified in the real-time image captured by the second camera, and display the first image in the second display mode.
16. The object tracking device according to claim 9, It is characterized in that The device also includes: The target video acquisition module is used to store images including the target object in chronological order to obtain the target video.
17. An electronic device, It is characterized in that include: processor; a memory for storing a computer program executable by the processor; The processor is configured to execute the computer program in the memory to implement the method according to any one of claims 1 to 8.
18. A computer-readable storage medium, It is characterized in that When the executable computer program in the storage medium is executed by a processor, the method according to any one of claims 1 to 8 can be implemented.
Citation Information
Patent Citations
Network monitoring method based on visual tracking
CN109640059A
Target object tracking method and device and computer readable storage medium
CN109961458A