An image acquisition picture occlusion detection method and device, electronic equipment and medium
By analyzing changes in the target area of the image acquisition device over different time periods, and only clearing substantial occlusions, the high maintenance cost problem in existing technologies is solved, achieving efficient occlusion detection and maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIVIEW TECH CO LTD
- Filing Date
- 2024-12-09
- Publication Date
- 2026-06-09
Smart Images

Figure CN122176289A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device and medium for detecting occlusion in image acquisition. Background Technology
[0002] Currently, in existing technologies, if an obstruction is detected in the image capture area, staff will be immediately notified, and the obstruction must be removed immediately. For example, if a camera on a highway or intercity road is obstructed by vegetation, once the obstruction is detected, staff need to rush to the site to remove it. Every time an obstruction is detected, staff need to go to the site to remove it, which results in extremely high maintenance costs. Summary of the Invention
[0003] This application provides an image acquisition screen occlusion detection method, device, electronic device, and medium, which can only clear occlusions that have a real impact, ensuring the acquisition of key information in the acquired screen, while also reducing the number of times the image acquisition device needs to be cleared and the maintenance cost.
[0004] According to a first aspect of this application, an image acquisition scene occlusion detection method is provided, the method comprising:
[0005] The system acquires historical image data of the target area obtained by the image acquisition device during a historical time period. Based on the location of the target in the historical image data, it determines the first area in the image acquisition screen where the target appears. The historical time period is the period after the image acquisition device is initially installed without any obstruction.
[0006] The method involves acquiring target image data of a target area by an image acquisition device within a target time period, and determining a second area in the image acquisition screen where the target appears based on the location of the target in the target image data; wherein the target time period is located after the historical time period.
[0007] Based on the first region and the second region, it is determined whether the field of view of the image acquisition device is obstructed during the target time period.
[0008] According to a second aspect of this application, an image acquisition screen occlusion detection device is provided, the device comprising:
[0009] The first region determination module is used to acquire historical image data obtained by the image acquisition device from image acquisition of the target region within a historical time period, and to determine the first region in which the target appears in the image acquisition screen based on the location of the target in the historical image data; wherein, the historical time period is the time period after the initial installation of the image acquisition device when there is no occlusion.
[0010] The second region determination module is used to acquire target image data obtained by the image acquisition device from the target region within the target time period, and determine the second region in the image acquisition screen where the target appears based on the location of the target in the target image data; wherein the target time period is located after the historical time period;
[0011] The occlusion determination module is used to determine, based on the first region and the second region, whether the field of view of the image acquisition device is occluded within the target time period.
[0012] According to a third aspect of this application, an electronic device is provided, the electronic device comprising:
[0013] At least one processor; and
[0014] A memory that is communicatively connected to at least one processor; wherein,
[0015] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor to enable at least one processor to perform the image acquisition screen occlusion detection method of any embodiment of this application.
[0016] According to a fourth aspect of this application, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the image acquisition screen occlusion detection method of any embodiment of this application.
[0017] The technical solution of this application embodiment involves acquiring historical image data obtained by an image acquisition device from image acquisition of a target area within a historical time period, and determining a first area in the image acquisition screen where the target appears based on the location of the target in the historical image data; wherein, the historical time period is the time period after the initial installation of the image acquisition device where there is no occlusion; acquiring target image data obtained by the image acquisition device from image acquisition of a target area within a target time period, and determining a second area in the image acquisition screen where the target appears based on the location of the target in the target image data; wherein, the target time period is located after the historical time period; and determining whether the field of view of the image acquisition device is obstructed within the target time period based on the first and second areas. This application focuses on key areas related to the target's activity range in the image acquisition footage corresponding to different time periods. Specifically, it focuses on the first area determined under the ideal condition of no occlusion in the historical time period, and the second area determined under the condition that occlusion may have occurred in the target time period. By using the changes between these two key areas, it determines whether the field of view of the image acquisition device is obstructed in the target time period. In this way, only occlusions that have a substantial impact can be cleared, while occlusions that do not have a substantial impact can be left uncleared. This not only ensures the acquisition of key information in the captured footage, but also significantly reduces the number of times the image acquisition device needs to be cleared and the maintenance cost.
[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating an image acquisition screen occlusion detection method provided in this application embodiment;
[0021] Figure 2 A schematic diagram illustrating the location of a target as provided in an embodiment of this application;
[0022] Figure 3 A flowchart illustrating another image acquisition screen occlusion detection method provided in this application embodiment;
[0023] Figure 4aA schematic diagram illustrating the location of various points of the same target as provided in an embodiment of this application;
[0024] Figure 4b A schematic diagram illustrating the effect of a target trajectory provided in an embodiment of this application;
[0025] Figure 4c This is a schematic diagram illustrating the effect of a collection region provided in an embodiment of this application;
[0026] Figure 5 A flowchart of another image acquisition screen occlusion detection method provided in an embodiment of this application;
[0027] Figure 6a This is a schematic diagram illustrating the effect of a complement region provided in an embodiment of this application;
[0028] Figure 6b This is a schematic diagram illustrating the effect of noise data filtering on the complement region, provided in an embodiment of this application.
[0029] Figure 7a This is a schematic diagram illustrating the mesh division of an occluded area according to an embodiment of this application;
[0030] Figure 7b This is a schematic diagram illustrating grid division of a first region according to an embodiment of this application.
[0031] Figure 7c This is a schematic diagram illustrating a process for determining the relative positional relationship between an occluded area and a first area, provided in an embodiment of this application.
[0032] Figure 8 This is a schematic diagram of the structure of an image acquisition screen occlusion detection device provided in an embodiment of this application;
[0033] Figure 9 This is a schematic diagram of the structure of an electronic device for implementing an image acquisition screen occlusion detection method, provided in an embodiment of this application. Detailed Implementation
[0034] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0035] It should be noted that the terms "first," "second," "third," "fourth," "actual," "preset," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0036] Figure 1 This is a flowchart illustrating an image acquisition screen occlusion detection method provided in an embodiment of this application. This embodiment is applicable to detecting the presence of occlusion in an image acquisition screen. The method can be executed by an image acquisition screen occlusion detection device, which can be implemented in hardware and / or software. This device can be configured in an electronic device, such as a mobile terminal, like a mobile phone, smart tablet, or smart wearable device. Figure 1 As shown, the image acquisition screen occlusion detection method includes:
[0037] S110. Obtain historical image data of the target area obtained by the image acquisition device during the historical time period. Based on the location of the target in the historical image data, determine the first area where the target appears in the image acquisition screen. The historical time period is the time period after the initial installation of the image acquisition device when there is no obstruction.
[0038] The target area refers to the region where the image acquisition device needs to capture images. The historical time period is the time during which the image acquisition device is unobstructed after initial installation. Targets appearing in the image data can be objects such as pedestrians or vehicles, and at least one target must appear in the image data. The location of the target can be identified by its position in the image data.
[0039] Specifically, during the operation of the image acquisition device, historical image data can be acquired by the device from images of the target area within a historical time period. Then, based on the characteristics of the targets identified in the historical image data, it can be determined whether the target appears in the historical image data, and if so, its corresponding location. For targets appearing in the historical image data, the position of a fixed point on the target can be used as the corresponding location. For example, if the target is a vehicle, the center point of the license plate can be used as the vehicle's location; similarly, if the target is a pedestrian, the center point of the pedestrian's body can be used as the pedestrian's location.
[0040] Once the locations of targets appearing in historical image data are determined, the concentration and distribution of these targets within the captured image frame can be established. This allows us to identify the first region within the captured image frame where targets are present. This first region encompasses all locations of all targets appearing in the historical image data; essentially, it reflects the distribution of targets within the captured image frame over a historical period.
[0041] For example, Figure 2 This is a schematic diagram illustrating the location of a target as provided in an embodiment of this application, such as... Figure 2 As shown, the black vehicles in the image represent the same target object identified within a certain time period, and the red dots within each vehicle represent the target's location at various points. By analyzing historical image data, other locations of other targets can be determined, and the subsequently identified first region can include all these locations.
[0042] S120. Obtain target image data obtained by the image acquisition device from the target area within the target time period. Based on the location of the target in the target image data, determine the second area where the target appears in the image acquisition screen; wherein, the target time period is after the historical time period.
[0043] Similarly, within a target time period following the historical time period, target image data can be acquired by the image acquisition device during the target time period, capturing images of the target area. Then, based on the characteristics of the targets identified in the target image data, it can be determined whether the targets appear in the target image data, and if so, their locations. After determining the locations of all targets, a second area where targets appear can be identified within the captured image frame.
[0044] It should be noted that the principles for determining the first and second regions are the same; the difference lies in that they are determined based on image data obtained over different time periods. The first region is specifically determined based on historical image data, while the second region is specifically determined based on target image data. Essentially, the first region reflects the concentrated area of target locations when the image acquisition device is initially installed without obstruction, while the second region reflects the concentrated area of target locations when the image acquisition device may be obstructed after installation. Furthermore, the time period can be set based on actual needs, such as one day or two days, etc.
[0045] S130. Based on the first region and the second region, determine whether the field of view of the image acquisition device is obstructed during the target time period.
[0046] In real-world scenarios, if the image acquisition device's field of view is obstructed during its operational period after installation, this obstruction may or may not affect data acquisition. If it doesn't affect data acquisition, then removing the obstruction in the work environment is unnecessary. For example, when an image acquisition device captures images of vehicles traveling on a highway, the captured image will include not only the highway and vehicles but also the sky and trees. If the obstruction only obstructs the corresponding area of the sky in the captured image, then this obstruction will not affect the normal acquisition of vehicle data. However, if the obstruction obstructs the corresponding area of the road surface in the image, then this obstruction will inevitably affect the normal acquisition of vehicle data, and such obstructions that have a substantial impact need to be removed promptly.
[0047] The solution in this application focuses on the key areas in the image acquisition screen that correspond to the target's activity range, namely the first area and the second area. These key areas in the acquisition screen are the effective areas that can truly record key data information. Non-key areas in the acquisition screen have little impact on the acquisition of key data information. Therefore, by focusing on the changes in the key areas in the image, it is possible to determine whether there is a substantial occlusion, and to provide a basis for decision-making on whether the occlusion needs to be cleared.
[0048] Since the first region reflects the ideal situation without occlusion, while the second region reflects the actual working scenario where occlusion may occur, the differences between the first and second regions can be used to determine whether the image acquisition device's field of view is obstructed during the target time period. Specifically, comparing the shape differences between the first and second regions can determine whether the second region differs from the first. If a shape difference exists, it indicates that occlusion has altered the second region, meaning the image acquisition device's field of view is obstructed during the target time period. If no shape difference exists, it indicates that the second region remains consistent with the first region, meaning the image acquisition device's field of view is not obstructed during the target time period.
[0049] The technical solution of this application embodiment involves acquiring historical image data obtained by an image acquisition device from image acquisition of a target area within a historical time period, and determining a first area in the image acquisition screen where the target appears based on the location of the target in the historical image data; wherein, the historical time period is the time period after the initial installation of the image acquisition device where there is no occlusion; acquiring target image data obtained by the image acquisition device from image acquisition of a target area within a target time period, and determining a second area in the image acquisition screen where the target appears based on the location of the target in the target image data; wherein, the target time period is located after the historical time period; and determining whether the field of view of the image acquisition device is obstructed within the target time period based on the first and second areas. This application focuses on key areas related to the target's activity range in the image acquisition footage corresponding to different time periods. Specifically, it focuses on the first area determined under the ideal condition of no occlusion in the historical time period, and the second area determined under the condition that occlusion may have occurred in the target time period. By using the changes between these two key areas, it determines whether the field of view of the image acquisition device is obstructed in the target time period. In this way, only occlusions that have a substantial impact can be cleared, while occlusions that do not have a substantial impact can be left uncleared. This not only ensures the acquisition of key information in the captured footage, but also significantly reduces the number of times the image acquisition device needs to be cleared and the maintenance cost.
[0050] Figure 3 This is a flowchart of another image acquisition screen occlusion detection method provided in this application embodiment. The technical solution of this embodiment further optimizes the process of determining the first region and the second region based on the technical solutions of the above embodiments. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Solutions not described in detail in this application embodiment are found in the above embodiments. Figure 3 As shown, the image acquisition screen occlusion detection method includes:
[0051] S310. Track targets appearing in the acquired image data and determine the trajectory of each target.
[0052] Specifically, target tracking algorithms or models can be used to detect continuous video frames in the acquired image data. This can be done frame-by-frame or by selecting video frames at fixed time intervals. During the detection and recognition process, the locations corresponding to each target can be determined for target tracking. After determining the locations of each target, the trajectory of each target can be determined based on the tracked locations.
[0053] It should be noted that at least one target appears in the acquired image data. During the target tracking process, each target is tracked to obtain the trajectory corresponding to each target.
[0054] For example, let's take determining the trajectory of a target as an example to illustrate this. Figure 4a This application provides a schematic diagram illustrating the location of various points of the same target in an embodiment, as shown below. Figure 4a As shown in the figure, the yellow dots P1, P2, P3, and P4 are the locations of the same target tracked during the target tracking process. After determining the locations of the target, the locations can be connected to obtain the trajectory of the target. Figure 4b This is a schematic diagram illustrating the effect of a target trajectory provided in an embodiment of this application. By performing the same operation on each target location, the trajectories of all targets appearing in the acquired image data can be determined.
[0055] S320. The area where the trajectory of each target is located is taken as the set area; if the acquired image data is historical image data, the set area is the first area, and if the acquired image data is target image data, the set area is the second area.
[0056] Specifically, the region where the trajectory of each target is located can be used as a set region, which can cover the trajectories of all appearing targets.
[0057] If the acquired image data is historical image data, that is, the historical image data obtained by the image acquisition device from the target area within a historical time period, target tracking is performed on the targets appearing in the historical image data, and the location of the targets appearing in the historical image data is determined, then the trajectory of each target can be determined; the area where the trajectory of each target is located is taken as the set area, and the first area where the target appears in the image acquisition screen can be obtained.
[0058] If the acquired image data is target image data, that is, the target image data obtained by the image acquisition device from the target area within the target time period, the target appearing in the target image data is tracked, and the location of the target appearing in the target image data is determined, so that the trajectory of each target can be determined; the area where the trajectory of each target is located is taken as the set area, so that the second area where the target appears in the image acquisition screen can be obtained.
[0059] As an optional but non-limiting implementation, the region where the trajectories of each target are located can be used as the set region, which may include the following steps A1-A2:
[0060] Step A1: Determine the distance between adjacent trajectories, and determine the width of the trajectory line based on the distance.
[0061] The trajectory line width is used to reflect the width of the trajectory line to be drawn.
[0062] Specifically, for each target's trajectory, the average distance between adjacent trajectories can be determined, and this average distance can be used as the trajectory line width. By setting the trajectory line width, the area range determined in subsequent schemes can be more accurate and reasonable.
[0063] Step A2: Draw the trajectory of each target based on the trajectory line width to form a simply connected region as the set region.
[0064] A simply connected region is a closed region that does not contain any gaps.
[0065] Specifically, the width of the trajectory line to be drawn can be determined based on its width, and the length and curvature of the trajectory line to be drawn can be determined based on the target's trajectory. Preferably, the trajectories of each target can be drawn as polylines. Continuing as... Figure 4b As shown in the figure, the yellow part is the trajectory of the drawn target. It can be seen that the drawn trajectory of the target has certain width information, length information and curvature information.
[0066] By applying the same principle to all other targets using the same trajectory line width, the trajectories of each target can be drawn. After drawing the trajectories of each target, the simply connected regions formed between the trajectories can be used as the set region.
[0067] As an optional but non-limiting implementation, the region where the trajectories of each target are located can be used as the set region. This can also be determined by the following steps: the region containing the trajectories of all targets can be used as the set region.
[0068] Specifically, for the trajectory of each target, the region corresponding to the smallest bounding polygon that can contain the trajectories of all targets can be used as the set region.
[0069] For example, Figure 4c This is a schematic diagram illustrating the effect of a collection region provided in an embodiment of this application, such as... Figure 4c As shown in the figure, the entire yellow area is the identified set region.
[0070] As an optional but non-limiting implementation, drawing the trajectories of each target based on the trajectory line width to form a simply connected region as a set region may include the following steps B1-B2:
[0071] Step B1: Determine the layer mask based on the size of the image capture screen.
[0072] Specifically, a layer mask can be created with the same scale as the size of the image capture screen. This layer mask can be initially set to black.
[0073] Step B2: Draw the trajectory of each target on the layer mask based on the trajectory line width to form a single connected region as a set region; wherein, the grayscale difference between the layer mask and the drawn trajectory of each target is greater than the preset grayscale difference threshold.
[0074] It should be noted that the initial layer mask does not yet have any trajectories drawn on it. During the subsequent trajectory drawing process, the grayscale difference between the layer mask and the trajectories of each drawn target can be made greater than a preset grayscale difference threshold. This creates a difference in grayscale values between the two, making them easier to distinguish and display. The preset grayscale difference threshold can be determined based on actual needs. For example, the trajectory of the drawn target can be set to yellow, or the drawn trajectory can be set to white, etc.
[0075] After drawing the trajectories of each target on the layer mask based on the trajectory line width, the trajectories forming a simply connected region can be used as a set region. Continue as follows... Figure 4c As shown, Figure 4c The image shown is a schematic diagram of the effect when the layer mask is black and the drawn trajectory is yellow.
[0076] S330. Based on the first region and the second region, determine whether the field of view of the image acquisition device is obstructed during the target time period.
[0077] The technical solution of this application embodiment tracks targets appearing in the acquired image data and determines the trajectory of each target; the area where the trajectory of each target is located is taken as a set region; wherein, if the acquired image data is historical image data, the set region is a first region, and if the acquired image data is target image data, the set region is a second region; based on the first region and the second region, it is determined whether the field of view of the image acquisition device is obstructed within the target time period. This application solution focuses on key areas related to the target's activity range in the image acquisition screen corresponding to different time periods, that is, focusing on the first region determined under the ideal condition of no obstruction within the historical time period, and the second region determined under the condition that obstruction may have occurred within the target time period. By using the changes between these two key regions, it determines whether the field of view of the image acquisition device is obstructed within the target time period. In this way, only obstructions that have a substantial impact can be cleared, while obstructions that do not have a substantial impact can be left uncleared. This not only ensures the acquisition of key information in the acquired screen, but also significantly reduces the number of times the image acquisition device needs to be cleared and the maintenance cost.
[0078] Figure 5 This is a flowchart of another image acquisition screen occlusion detection method provided in this application embodiment. The technical solution of this embodiment further optimizes the process of determining whether the field of view of the image acquisition device is occluded within a target time period based on the first region and the second region, building upon the technical solutions of the above embodiments. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Solutions not described in detail in this application embodiment are found in the above embodiments. Figure 5 As shown, the image acquisition screen occlusion detection method includes:
[0079] S510. Obtain historical image data of the target area obtained by the image acquisition device during the historical time period. Based on the location of the target in the historical image data, determine the first area where the target appears in the image acquisition screen. The historical time period is the time period after the initial installation of the image acquisition device when there is no obstruction.
[0080] S520. Obtain target image data obtained by the image acquisition device from the target area within the target time period. Based on the location of the target in the target image data, determine the second area in the image acquisition screen where the target appears. The target time period is after the historical time period.
[0081] S530. Determine the complement region of the second region within the first region.
[0082] Specifically, the complement region can be determined by removing the second region from the first region based on the coordinate information of the first and second regions. The complement region represents the portion of the second region that is occluded compared to the first region.
[0083] S540. If the entire complement region is filtered out after noise data is filtered out, then it is determined that the field of view of the image acquisition device is not obstructed during the target time period.
[0084] It should be noted that the identified complement region may contain noisy areas. These noisy areas may be caused by camera shake or acquisition errors, for example... Figure 6a This is a schematic diagram illustrating the effect of a complement region provided in an embodiment of this application, such as... Figure 6a As shown in the figure, the yellow area represents the determined complement region. However, it is clear that the complement region consists of two parts, one of which is... Figure 6a There is a trapezoidal yellow area corresponding to the green label ①, and the other part is... Figure 6a The thin, elongated strip-shaped area corresponds to the green label ②. Area ② is a noisy area, while area ① is essentially the truly valid complement area. Noise data in the noise area will cause interference; therefore, noise data filtering is required for the obtained complement area.
[0085] Specifically, the mask corresponding to the complement region can be blurred and filtered with a set threshold brightness, thereby filtering out noisy data in the complement region.
[0086] If the entire complement region is filtered out after noise data is removed, it means that the obtained complement regions are all noise regions and there are no truly effective complement regions. In other words, the determined second region does not have any regional shape change due to occlusion compared to the first region. Therefore, it is determined that the field of view of the image acquisition device is not occluded within the target time period.
[0087] S550 Otherwise, it is determined that the field of view of the image acquisition device is occluded within the target time period, and the unfiltered complement area is taken as the occluded area.
[0088] The occluded area is used to reflect the occluded area in the field of view of the image acquisition device. For the occluded area, relevant cleaning work such as removing the occluders is required.
[0089] If the complement region is not completely filtered out after filtering out the noise data, it means that the truly effective complement region is still retained after filtering out the noise data. This means that the determined second region has a change in shape due to occlusion compared to the first region. Therefore, it is determined that the field of view of the image acquisition device is occluded within the target time period, and the complement region that was not filtered out is regarded as the occluded region.
[0090] For example, Figure 6b This is a schematic diagram illustrating the effect of noise data filtering on the complement region, as provided in an embodiment of this application. Figure 6b As shown, the remaining yellow area on the black mask in the figure is the area retained after filtering out noise data from the complement region. Only such areas can truly be used to determine whether there is an area where the field of view of the image acquisition device is obstructed.
[0091] As an optional but non-limiting implementation, the image acquisition screen occlusion detection method may also include the following steps C1-C2:
[0092] Step C1: Determine the relative positional relationship between the occluded area and the first area.
[0093] Optionally, the relative positional relationship can be determined based on the coordinate information of the occluded area and the first area.
[0094] Specifically, a Cartesian coordinate system can be established with the top-left vertex of the layer mask as the origin, the horizontal axis as the X-axis extending from left to right, and the vertical axis as the Y-axis extending from top to bottom. The layer mask is then divided into a grid, specifically dividing the occluded area and the first area into a grid. Figure 7a This is a schematic diagram illustrating the mesh division of an occluded area provided in an embodiment of this application, as shown below. Figure 7a As shown, the centroid of the occluded area can be determined as G. 遮 G 遮 The coordinates are (X 遮 ,Y 遮 ). Figure 7b This application provides a schematic diagram of meshing a first region, as shown in the embodiment of the present application. Figure 7b As shown, the centroid of the first region can be determined as G0, and the coordinates of G0 are (X0, Y0).
[0095] After determining G 遮 After obtaining the coordinates of G0, the relative positional relationship between the occluded area and the first area can be determined based on their coordinate information. Figure 7c This application provides a schematic diagram illustrating the process of determining the relative positional relationship between an occluded area and a first area, the specific aspects of which include:
[0096] If X 遮 < X 0 and Y 遮 > Y 0, it indicates that the occlusion area is located in the lower left of the first area, then the lower left area of the field of view of the image collector is covered;
[0097] If X 遮 < X 0 and Y 遮 < Y 0, it indicates that the occlusion area is located in the upper left of the first area, then the upper left area of the field of view of the image collector is covered;
[0098] If X 遮 < X 0 and Y 遮 = Y 0, it indicates that the occlusion area is located in the horizontal left of the first area, then the left area of the field of view of the image collector is covered;
[0099] If X 遮 = X 0 and Y 遮 > Y 0, it indicates that the occlusion area is located in the lower part of the first area, then the lower area of the field of view of the image collector is covered;
[0100] If X 遮 = X 0 and Y 遮 < Y 0, it indicates that the occlusion area is located in the upper part of the first area, then the upper area of the field of view of the image collector is covered;
[0101] If X 遮 = X 0 and Y 遮 = Y 0, it indicates that the occlusion area is located in the center of the first area, then the central area of the field of view of the image collector is covered;
[0102] If X 遮 > X 0 and Y 遮 > Y 0, it indicates that the occlusion area is located in the lower right of the first area, then the lower right area of the field of view of the image collector is covered;
[0103] If X 遮 > X 0 and Y 遮 < Y 0, it indicates that the occlusion area is located in the upper right of the first area, then the upper right area of the field of view of the image collector is covered;
[0104] If X 遮 > X 0 and Y 遮 = Y 0, it indicates that the occlusion area is located in the horizontal right of the first area, then the right area of the field of view of the image collector is covered.
[0105] Step C2: Send a prompt of the existence of occlusion and the occlusion orientation to the user according to the relative position relationship.
[0106] After determining the relative positional relationship between the occluded area and the first area, a prompt message indicating the presence and location of the occlusion can be sent to the user based on this relationship. For example, the prompt could state that the image acquisition device's field of view is obstructed, specifically that the upper left area of the image acquisition device's field of view is covered.
[0107] As an optional but non-limiting implementation, the image acquisition screen occlusion detection method may also include the following steps D1-D3:
[0108] Step D1: Determine the coordinates of the occluded area in the image frame.
[0109] Specifically, the coordinates of the centroid of the occluded area can be used as the image coordinates of the occluded area.
[0110] Step D2: Based on the screen coordinates, the installation parameters of the image acquisition device, and the image acquisition parameters, determine the actual coordinates of the occluded area mapped to the actual environment.
[0111] The installation parameters for the image acquisition device include installation height, installation pitch angle, and installation horizontal rotation angle. Image acquisition parameters include focal length and aperture.
[0112] Specifically, based on the image coordinates, the installation parameters of the image acquisition device, and the image acquisition parameters, and with the help of relevant geometric principles and mathematical formulas, the actual coordinates of the occluded area mapped to the actual environment can be determined.
[0113] Step D3: Prompt the user to clear obstructions based on the actual coordinates.
[0114] After determining the actual coordinates, the user can be prompted to remove obstructions. Specifically, the actual coordinates of the obstructed area in the actual environment are also related to the distance between the actual environment and the image acquisition device. Specifically, different distances can be preset, and the actual coordinates of the obstructed area at the preset distance can be calculated, thus specifically prompting the user to remove obstructions within the actual coordinate range of the preset distance. Alternatively, the area to be actually monitored by the image acquisition device can be determined, the distance between this area and the image acquisition device can be determined, and the actual coordinate range of the obstructed area can be determined within this distance range. The user can then be prompted to remove obstructions within this actual coordinate range, thereby preventing obstructions from affecting normal monitoring of the actual monitored area. The above scheme can quantify the specific coordinate range of obstructions, making it easier for users to remove obstructions in specific areas and improving the efficiency of obstruction removal.
[0115] The technical solution of this application embodiment involves acquiring historical image data obtained by an image acquisition device from image acquisition of a target area within a historical time period. Based on the location of the target appearing in the historical image data, a first area where the target appears in the image acquisition screen is determined. The historical time period is the time period after the initial installation of the image acquisition device during which there is no occlusion. Next, target image data obtained by the image acquisition device from image acquisition of the target area within a target time period is acquired. Based on the location of the target appearing in the target image data, a second area where the target appears in the image acquisition screen is determined. The target time period is located after the historical time period. A complement region of the second area is determined within the first area. If, after filtering out noise data from the complement region, the entire complement region is filtered out, it is determined that the field of view of the image acquisition device is not occluded within the target time period. Otherwise, it is determined that the field of view of the image acquisition device is occluded within the target time period, and the unfiltered complement region is taken as the occluded area. This application focuses on key regions related to the target's activity range in image acquisition frames across different time periods. Specifically, it identifies a first region under ideal conditions where no occlusion occurs within a historical time period, and a second region under conditions where occlusion may occur within a target time period. The changes between these two key regions are used to determine whether the image acquisition device's field of view is obstructed within the target time period. In determining the obstructed region, the complementary region of the second region to the first region is identified, and noise data is filtered out from the complementary region to retain the region truly usable for occlusion assessment. This allows for the clearing of only occlusions that have a substantial impact, while omitting those without a substantial impact. This not only ensures the acquisition of key information in the captured image but also significantly reduces the frequency of image acquisition device clearing, thereby lowering maintenance costs.
[0116] Figure 8 This is a schematic diagram of an image acquisition screen occlusion detection device provided in an embodiment of this application. This device can execute the image acquisition screen occlusion detection method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the method. For example... Figure 8 As shown, the device includes:
[0117] The first region determination module 810 is used to acquire historical image data obtained by the image acquisition device from image acquisition of the target region within a historical time period, and determine the first region in which the target appears in the image acquisition screen based on the location of the target in the historical image data; wherein, the historical time period is the time period after the initial installation of the image acquisition device when there is no occlusion.
[0118] The second region determination module 820 is used to acquire target image data obtained by the image acquisition device from the target region within a target time period, and determine a second region in the image acquisition screen where the target appears based on the location of the target in the target image data; wherein the target time period is located after the historical time period.
[0119] The occlusion determination module 830 is used to determine, based on the first region and the second region, whether the field of view of the image acquisition device is occluded within the target time period.
[0120] As an optional but non-limiting implementation, the device also includes:
[0121] The set region determination module is used to determine the set region in the image acquisition screen where the target appears, based on the location of the target in the acquired image data.
[0122] The set region determination module specifically includes:
[0123] The trajectory determination unit is used to track targets appearing in the acquired image data and determine the trajectory of each target.
[0124] The set region determination unit is used to define the region where the trajectory of each target is located as the set region; wherein, if the acquired image data is the historical image data, the set region is the first region, and if the acquired image data is the target image data, the set region is the second region.
[0125] As an optional but non-limiting implementation, the set region determination unit is used to define the region where the trajectories of each target are located as the set region, specifically including:
[0126] Determine the distance between adjacent trajectories, and determine the trajectory line width based on the distance; draw the trajectory of each target based on the trajectory line width to form a simply connected region as the set region; or, take the region containing the trajectories of all targets as the set region.
[0127] As an optional but non-limiting implementation, the set region determination unit specifically draws the trajectories of each target based on the trajectory line width to form a simply connected region as the set region, including:
[0128] A layer mask is determined based on the size of the image acquisition screen; the trajectories of each target are drawn on the layer mask based on the trajectory line width to form a single connected region as the set region; wherein, the grayscale difference between the layer mask and the drawn trajectory of each target is greater than a preset grayscale difference threshold.
[0129] As an optional but non-limiting implementation, the occlusion determination module 830 specifically includes:
[0130] The complement region determination unit is used to determine the complement region of the second region in the first region;
[0131] The occlusion determination unit is configured to determine that if the entire complement region is filtered out after noise data filtering, the field of view of the image acquisition device is not occluded within the target time period; otherwise, it determines that the field of view of the image acquisition device is occluded within the target time period, and takes the unfiltered complement region as the occluded region.
[0132] As an optional but non-limiting implementation, the device also includes:
[0133] A relative position relationship determination module is used to determine the relative position relationship between the occluded area and the first area;
[0134] The orientation prompt module is used to provide the user with a prompt regarding the presence of obstruction and the direction of the obstruction based on the relative positional relationship.
[0135] As an optional but non-limiting implementation, the device also includes:
[0136] The image coordinate determination module is used to determine the image coordinates of the occluded area in the image frame;
[0137] The actual coordinate determination module is used to determine the actual coordinates of the occluded area mapped to the actual environment based on the screen coordinates, the installation parameters of the image acquisition device, and the image acquisition parameters.
[0138] The actual coordinate prompt module is used to prompt the user to clear obstructions based on the actual coordinates.
[0139] The image acquisition screen occlusion detection device provided in this application embodiment can execute the image acquisition screen occlusion detection method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of the execution method.
[0140] Figure 9This is a schematic diagram of an electronic device for implementing an image acquisition screen occlusion detection method, provided as an embodiment of this application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.
[0141] like Figure 9 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0142] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0143] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as image acquisition screen occlusion detection methods.
[0144] In some embodiments, the image acquisition screen occlusion detection method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the image acquisition screen occlusion detection method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the image acquisition screen occlusion detection method by any other suitable means (e.g., by means of firmware).
[0145] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0146] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable image acquisition and occlusion detection device, such that when executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0147] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0148] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0149] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data image acquisition occlusion detection (e.g., image acquisition occlusion detection networks) of any form or medium. Examples of image acquisition occlusion detection networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0150] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via an image capture and occlusion detection network. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0151] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired information of the technical solution of this application can be achieved, and this is not limited herein.
[0152] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for detecting occlusion in an image acquisition scene, characterized in that, The method includes: The system acquires historical image data of the target area obtained by the image acquisition device during a historical time period. Based on the location of the target in the historical image data, it determines the first area in the image acquisition screen where the target appears. The historical time period is the period after the image acquisition device is initially installed without any obstruction. The method involves acquiring target image data of a target area by an image acquisition device within a target time period, and determining a second area in the image acquisition screen where the target appears based on the location of the target in the target image data; wherein the target time period is located after the historical time period. Based on the first region and the second region, it is determined whether the field of view of the image acquisition device is obstructed during the target time period.
2. The method according to claim 1, characterized in that, Based on the location of the target in the acquired image data, determine the set of regions in the image acquisition screen where the target appears, including: Target tracking is performed on the targets appearing in the acquired image data to determine the trajectory of each target; The region where the trajectory of each target is located is defined as the set region; wherein, if the acquired image data is the historical image data, the set region is the first region, and if the acquired image data is the target image data, the set region is the second region.
3. The method according to claim 2, characterized in that, The region containing the trajectories of each target is defined as the set region, including: Determine the distance between adjacent trajectories, and determine the width of the trajectory line based on the distance; The trajectories of each target are drawn based on the trajectory line width, forming a simply connected region as the set region; or, The region containing the trajectories of all targets is defined as the set region.
4. The method according to claim 3, characterized in that, Based on the trajectory line width, the trajectories of each target are drawn to form a simply connected region as the set region, including: Determine the layer mask based on the size of the image capture frame; The trajectories of each target are drawn on the layer mask based on the trajectory line width, forming a single connected region as the set region; wherein, the grayscale difference between the layer mask and the drawn trajectory of each target is greater than a preset grayscale difference threshold.
5. The method according to claim 1, characterized in that, Based on the first region and the second region, determining whether the field of view of the image acquisition device is obstructed within the target time period includes: Determine the complement region of the second region within the first region; If noise data is filtered out from the complement region and the entire complement region is filtered out, then it is determined that the field of view of the image acquisition device is not obstructed during the target time period. Otherwise, it is determined that the field of view of the image acquisition device is obstructed during the target time period, and the unfiltered complement region is taken as the obstructed region.
6. The method according to claim 5, characterized in that, The method further includes: Determine the relative positional relationship between the occluded area and the first area; Based on the relative positional relationship, the system will issue a notification to the user indicating that there is an obstruction and the direction of the obstruction.
7. The method according to claim 5, characterized in that, The method further includes: Determine the image coordinates of the occluded area within the image frame; Based on the screen coordinates, the installation parameters of the image acquisition device, and the image acquisition parameters, determine the actual coordinates of the occluded area mapped to the actual environment; The system will prompt the user to remove obstructions based on the actual coordinates.
8. An image acquisition screen occlusion detection device, characterized in that, The device includes: The first region determination module is used to acquire historical image data obtained by the image acquisition device from image acquisition of the target region within a historical time period, and to determine the first region in which the target appears in the image acquisition screen based on the location of the target in the historical image data; wherein, the historical time period is the time period after the initial installation of the image acquisition device when there is no occlusion. The second region determination module is used to acquire target image data obtained by the image acquisition device from the target region within the target time period, and determine the second region in the image acquisition screen where the target appears based on the location of the target in the target image data; wherein the target time period is located after the historical time period; The occlusion determination module is used to determine, based on the first region and the second region, whether the field of view of the image acquisition device is occluded within the target time period.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the image acquisition screen occlusion detection method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the image acquisition screen occlusion detection method according to any one of claims 1-7.