Lens occlusion detection method and device, electronic equipment and storage medium
By identifying and segmenting scenes where surveillance camera lenses are obstructed, and using Unet or ResNet for road visibility analysis, the problem of insufficient efficiency and accuracy in lens obstruction detection is solved, thereby improving the detection capability of the surveillance system.
Patent Information
- Application Number
- CN202411993831.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, when the lens of a surveillance camera is obstructed by leaves or other objects, the detection efficiency is low and the accuracy is insufficient, resulting in reduced monitoring effectiveness and impacting traffic management and safety.
By determining the road occlusion scene categories in the camera's view, Unet or ResNet is used for scene segmentation to identify the road visibility under different occlusion scenes. Detection is then performed based on the occlusion results, improving detection accuracy and efficiency.
It achieves accurate detection of lens occlusion in different occlusion scenarios, improves detection efficiency and accuracy, adapts to various occlusion situations, and ensures the integrity of monitoring results.
Smart Images

Figure CN122317404A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a lens occlusion detection method, apparatus, electronic device, and storage medium. Background Technology
[0002] In video surveillance systems, lens occlusion detection is one of the more critical detection methods. Because the location of surveillance cameras remains constant, while nearby trees grow over time, at certain seasons or times, previously properly installed cameras can become obscured by foliage, affecting monitoring effectiveness. This is especially true in road checkpoint scenarios, where accurate identification of various vehicles, pedestrians, and other targets is crucial, sometimes requiring precise judgment of traffic light status for effective traffic management and violation monitoring. Lens obstruction by foliage can lead to missing key information in the surveillance footage, reducing the accuracy and completeness of target identification, and potentially causing a series of problems such as traffic management loopholes and errors in identifying security risks. Summary of the Invention
[0003] This invention provides a lens occlusion detection method, device, electronic device, and storage medium to solve the problems of poor efficiency and low accuracy in detecting lens occlusion of shooting devices.
[0004] In a first aspect, embodiments of the present invention provide a lens occlusion detection method, the method comprising:
[0005] Determine the road obstruction scene category in the lens view of the shooting device. The visibility of the road will be different in the lens view of the shooting device under different road obstruction scene categories due to the obstruction of the road area by the reference object in the lens view of the shooting device.
[0006] The target occlusion result corresponding to the camera lens image is determined according to the road occlusion scene category. The target occlusion result is either the first occlusion result or the second occlusion result. The first occlusion result is determined based on the proportion of the reference object area in the camera lens image to the image area in the camera lens image. The second occlusion result is determined based on the proportion of the reference object area in the road area in the camera lens image.
[0007] The detection results of the reference object occlusion on the lens of the shooting device are determined based on the target occlusion results.
[0008] Secondly, embodiments of the present invention also provide a lens occlusion detection device, the device comprising:
[0009] The first determining module is used to determine the road occlusion scene category in the lens view of the shooting device. The visibility of the road is different due to the occlusion of the road area in the lens view of the shooting device by the reference object under different road occlusion scene categories.
[0010] The second determining module is used to determine the target occlusion result corresponding to the camera lens image based on the road occlusion scene category. The target occlusion result is either the first occlusion result or the second occlusion result. The first occlusion result is determined based on the proportion of the reference object area in the camera lens image to the image area in the camera lens image. The second occlusion result is determined based on the proportion of the reference object area in the road area of the camera lens image.
[0011] The third determination module is used to determine the detection result of the reference object occluding the lens image of the shooting device based on the target occlusion result.
[0012] Thirdly, this invention also provides an electronic device, which includes:
[0013] One or more processors;
[0014] Storage device for storing one or more programs.
[0015] When one or more programs are executed by one or more processors, the one or more processors implement any of the lens occlusion detection methods in the above embodiments.
[0016] Fourthly, this embodiment of the invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform any of the lens occlusion detection methods described above.
[0017] The technical solution of this invention determines the road occlusion scene category in the lens image of the shooting device. The visibility of the road varies depending on the road occlusion scene category and the occlusion caused by a reference object. This enables the identification of road occlusion scenes with different visibility levels, allowing the detection of lens occlusion to adapt to different road occlusion scenarios. Based on the road occlusion scene category, a target occlusion result is determined for the lens image. This target occlusion result can be either a first occlusion result or a second occlusion result. The first occlusion result is determined based on the proportion of the reference object area within the lens image, while the second occlusion result is determined based on the proportion of the reference object area within the road area of the lens image. This allows for the determination of the target occlusion result based on either the proportion of the reference object area within the lens image or the proportion of the reference object area within the road area of the lens image, thereby improving the accuracy of the target occlusion result and the detection effect under different road occlusion scenarios. Finally, based on the target occlusion result, the detection result of the reference object occluding the lens image is determined, thereby improving the detection efficiency of lens occlusion.
[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0019] The above and other features, advantages, and aspects of the various embodiments of the present invention will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0020] Figure 1 This is a schematic flowchart of a lens occlusion detection method provided in Embodiment 1 of the present invention;
[0021] Figure 2 This is a schematic diagram of a camera lens image provided in Embodiment 1 of the present invention;
[0022] Figure 3 This is a schematic diagram of the lens image of another shooting device provided in Embodiment 1 of the present invention;
[0023] Figure 4 This is a schematic diagram of the lens image of another shooting device provided in Embodiment 1 of the present invention;
[0024] Figure 5This is a schematic diagram of the lens image of another shooting device provided in Embodiment 1 of the present invention;
[0025] Figure 6 This is a flowchart illustrating a lens occlusion detection method provided in Embodiment 2 of the present invention.
[0026] Figure 7 This is a schematic diagram of a camera lens image provided in Embodiment 2 of the present invention;
[0027] Figure 8 This is a schematic diagram of the lens image of another shooting device provided in Embodiment 2 of the present invention;
[0028] Figure 9 This is a schematic diagram of the lens image of another shooting device provided in Embodiment 2 of the present invention;
[0029] Figure 10 This is a schematic diagram of the structure of a lens occlusion detection device provided in Embodiment 3 of the present invention;
[0030] Figure 11 This is a schematic diagram of an electronic device that implements a lens occlusion detection method according to Embodiment 4 of the present invention. Detailed Implementation
[0031] Embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While some embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the invention. It should be understood that the accompanying drawings and embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the invention.
[0032] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0033] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0034] It should be noted that the concepts of "first" and "second" mentioned in this invention are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0035] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0036] Example 1
[0037] Figure 1 This is a flowchart illustrating a lens occlusion detection method according to Embodiment 1 of the present invention. The technical solution of this embodiment is applicable to detecting whether the lens of a shooting device is obstructed. This method can be executed by a lens occlusion detection device, which can be implemented in software and / or hardware, and is generally integrated into any electronic device with network communication capabilities, such as a mobile terminal, PC, or server.
[0038] like Figure 1 As shown, the lens occlusion detection method of Embodiment 1 of the present invention may include the following process:
[0039] S101. Determine the road obstruction scene category in the lens view of the shooting device. The visibility of the road will be different in different categories due to the obstruction of the road area by the reference object in the lens view of the shooting device.
[0040] In this embodiment of the invention, the capturing device can refer to a device used to capture and monitor roads and road-related elements in a road traffic scenario, such as surveillance cameras installed on both sides of the road. Road-related elements can include lane lines, traffic signs, pedestrians, or vehicles. Road visibility refers to the degree to which the road and road-related elements can be clearly observed under specific environmental conditions. A reference object can refer to an object that obstructs the road area in the field of view of the capturing device, such as leaves or other obstructions. The field of view of the capturing device can refer to an image captured in real time by the capturing device.
[0041] The road area can refer to the road area shown in the camera's viewfinder and the road area obscured by a reference object. Road areas obscured by a reference object are not shown in the camera's viewfinder. The road occlusion scene category can be determined by the degree of road visibility resulting from the obstruction of the road area by a reference object in the camera's viewfinder. Obstruction of the road area by a reference object reduces road visibility.
[0042] Specifically, the video stream captured by the camera can be decoded frame by frame and then pushed frame by frame at a preset frequency to obtain the camera's view. Furthermore, by segmenting the view, the type of road occlusion in the view can be determined based on the visibility of the road caused by reference objects.
[0043] For example, the Real-Time Streaming Protocol (RTSP) stream address output by the shooting device can be decoded frame by frame, and the frames can be pushed at a frequency of 5 frames / s to obtain the camera's view. Then, UNet or Residual Neural Network (ResNet) can be used to perform scene segmentation on each frame of the camera's view.
[0044] As an optional but not limited implementation, the category of road obstruction scene in the lens view of the shooting device is determined, including the following steps A1-A3:
[0045] Step A1: Identify the scene category of lens occlusion in the image captured by the camera.
[0046] Step A2: If the scene occlusion of the lens is classified as a first type of scene occlusion, then the road area obtained by scene segmentation of the lens image of the shooting device is masked. Based on the road pixel features and reference object pixel features in the masked road area, the road occlusion scene of the shooting device lens is determined to be either a first type of road occlusion scene or a second type of road occlusion scene through a preset scene classification network. In the first type of scene occlusion scene, the proportion of the road area in the lens image of the shooting device is not greater than a first preset proportion threshold, or the proportion of the reference object area in the lens image of the shooting device is not less than a second preset proportion threshold.
[0047] Step A3: If the scene occlusion of the lens is classified as the second type of scene occlusion, then the road occlusion scene of the camera lens is classified as the second type of road occlusion scene. In the second type of scene occlusion scene, the proportion of the road area in the camera lens is greater than the first preset proportion threshold, or the proportion of the reference object area in the camera lens is less than the second preset proportion threshold.
[0048] In this embodiment of the invention, the lens occlusion scene category can refer to a category determined based on the degree of occlusion of the lens image by a reference object in the lens image of the shooting device. The lens occlusion scene category can include a first type of occlusion scene and a second type of occlusion scene. The reference object area can refer to the area displayed in the lens image of the shooting device that is composed of reference objects. The first preset proportion threshold can refer to a pre-set proportion threshold of the road area displayed in the lens image of the shooting device. The second preset proportion threshold can refer to a pre-set proportion threshold of the reference object area displayed in the lens image of the shooting device. Both the first and second preset proportion thresholds are used to distinguish between the first type of occlusion scene and the second type of occlusion scene. For example, the first preset proportion threshold can be 15%, and the second preset proportion threshold can be 60%.
[0049] Masking a road area refers to highlighting or protecting the road area in the image captured by the camera lens, while simultaneously occluding or weakening other areas of the image. Specifically, this can be achieved by creating a data structure with the same size or dimensions as the image captured by the camera lens, and configuring the element values of the road area to be different from those of other areas. For example, the road area in the image can be masked, while other areas can be completely blacked out. Road pixel features refer to the positions and total number of road pixels in the masked road area. Reference object pixel features refer to the positions and total number of reference object pixels in the masked road area. These features can be used to determine the proportion and distribution of reference objects within the masked road area. A pre-defined scene classification network refers to a pre-set network used to determine the road occlusion scene category in the masked road area. For example, a pre-designed ResNet classification network can be used.
[0050] For details, please refer to Figure 2 and Figure 3 Using tree leaves as an example, Figure 2 and Figure 3 The proportion of the reference object area displayed in the image from the camera lens is not less than the second preset proportion threshold. Therefore... Figure 2 and Figure 3 The lens occlusion scenarios represented by the shooting equipment are all classified as Category 1 occlusion scenarios. Furthermore, regarding... Figure 2 and Figure 3 The road area in the scene segmentation of the camera's view is masked. Then, based on the features of road pixels and reference object pixels in the masked road area, a pre-defined scene classification network can be used to determine... Figure 2 The road obstruction scene shown in the image captured by the camera lens belongs to the first category of road obstruction scenes. Figure 3 The road obstruction scene shown in the camera lens belongs to the second category of road obstruction scenes.
[0051] refer to Figure 4 and Figure 5 , Figure 4 and Figure 5 The proportion of the road area displayed in the image from the camera lens of the indicated shooting device is greater than the first preset proportion threshold, therefore... Figure 4 and Figure 5 The lens occlusion scenarios indicated by the shooting equipment are all classified as Category II occlusion scenarios. Therefore, Figure 4 and Figure 5 The road obstruction scenes shown in the camera lens images all belong to the second category of road obstruction scenes.
[0052] As an optional but not limited implementation, the road pixel features in the road region based on the mask and the reference object pixel features are used to determine the road occlusion scene category of the shooting device's lens image as either a first type of road occlusion scene or a second type of road occlusion scene through a preset scene classification network. This includes: determining the road occlusion scene category of the shooting device's lens image as either a first type of road occlusion scene or a second type of road occlusion scene based on the ratio of the number of all reference object pixels in the road region of the mask to the total number of pixels in the road region of the mask and / or the distribution of reference object pixels in the road region of the mask.
[0053] Specifically, after masking the road area in the image captured by the camera lens, a preset scene classification network can be used to extract all reference object pixels in the masked road area and calculate the ratio of the number of all reference object pixels to the total number of pixels in the masked road area. If the ratio is greater than a preset pixel percentage threshold, the road occlusion scene in the image captured by the camera lens is determined to be a first-type road occlusion scene; otherwise, it is determined to be a second-type road occlusion scene. Simultaneously, the preset scene classification network can determine whether the road occlusion scene in the image captured by the camera lens belongs to the first or second-type road occlusion scene based on the distribution of reference object pixels in the masked road area. For example, if the reference object pixels are evenly distributed in the road area of the mask, the ratio of the number of all reference object pixels to the sum of the number of pixels in the road area of the mask is not greater than the preset pixel proportion threshold. However, the even distribution of reference object pixels will occlude the road area and reduce the visibility of the road area. Therefore, it can be determined that the road occlusion scene in the lens image of the shooting device belongs to the first type of road occlusion scene.
[0054] As an optional but not limited implementation, the category of road obstruction scene in the camera's view is determined, including the following steps B1-B4:
[0055] Step B1: Identify the scene category of lens occlusion in the image captured by the camera.
[0056] Step B2: If the scene occlusion is classified as a first type of scene occlusion, determine the occlusion percentage of the road area in the camera's view and / or the distribution of the reference object in the road area of the camera's view. In the first type of scene occlusion, the proportion of the road area in the camera's view is not greater than a first preset percentage threshold, or the proportion of the reference object area in the camera's view is not less than a second preset percentage threshold.
[0057] Step B3: Based on the occlusion ratio of the road area in the camera lens image of the reference object and / or the distribution of the reference object in the road area in the camera lens image of the camera, determine whether the road occlusion scene in the camera lens image belongs to the first type of road occlusion scene or the second type of road occlusion scene.
[0058] Step B4: If the scene occlusion of the lens is classified as the second type of scene occlusion, then the road occlusion scene of the camera lens is classified as the second type of road occlusion scene. In the second type of scene occlusion scene, the proportion of the road area in the camera lens is greater than the first preset proportion threshold, or the proportion of the reference object area in the camera lens is less than the second preset proportion threshold.
[0059] The occlusion percentage of the road area by the reference object can refer to the proportion of the road area in the field of view captured by the camera lens that is obscured by the reference object. In the first type of road occlusion scenario, the occlusion percentage of the road area by the reference object is greater than that in the second type of road occlusion scenario. Consequently, the road visibility caused by the reference object in the first type of road occlusion scenario is less than that caused by the reference object in the second type of road occlusion scenario.
[0060] Specifically, if the occlusion percentage of the road area in the lens view of the shooting device by the reference object is greater than the preset road occlusion percentage threshold, then the road occlusion scene in the lens view of the shooting device is determined to belong to the first type of road occlusion scene; otherwise, the road occlusion scene in the lens view of the shooting device is determined to belong to the second type of road occlusion scene.
[0061] As an optional but not limited implementation, the method of identifying lens occlusion scenarios in the image captured by the camera includes the following steps C1-C2:
[0062] Step C1: Perform scene segmentation on the image captured by the camera lens to obtain at least one image detection region. The at least one image detection region includes a reference object region, a lane line region, and a road region.
[0063] Step C2: Identify the lens occlusion scene category based on at least one image detection area of the shooting device lens.
[0064] Specifically, when segmenting the scene of the camera's viewfinder, the pixel categories for segmentation can be at least one of reference object, road, and lane lines. Correspondingly, scene segmentation based on pixel categories yields at least one of a reference object region, a road region, and a lane line region, serving as at least one image detection region. Furthermore, the image occlusion scene category of the camera's viewfinder can be determined based on the proportion of at least one image detection region within the viewfinder. For example, if at least one image detection region includes a reference object region, the image occlusion scene category can be determined based on the proportion of the reference object region within the viewfinder and a second preset proportion threshold.
[0065] S102. Determine the target occlusion result corresponding to the camera lens image based on the road occlusion scene category. The target occlusion result is either the first occlusion result or the second occlusion result. The first occlusion result is determined based on the proportion of the reference object area in the camera lens image to the image area in the camera lens image. The second occlusion result is determined based on the proportion of the reference object area in the road area of the camera lens image.
[0066] In this embodiment of the invention, the target occlusion result can refer to the degree to which a reference object occludes a road area in the image captured by the camera lens. The first occlusion result can be determined based on the ratio of the reference object area to the area in the camera lens's view. The second occlusion result can be determined based on the ratio of the reference object area occluding the road area to the road area in the camera lens's view.
[0067] Specifically, a first occlusion result or a second occlusion result corresponding to the camera's view can be determined based on the road visibility level indicated by the road occlusion scene category, the reference object area in the camera's view, and the road area. The first or second occlusion result is then used as the target occlusion result for the camera's view. For example, if the road visibility level indicated by the road occlusion scene category is greater than a preset road visibility level, the second occlusion result is used as the target occlusion result; otherwise, the first occlusion result is used as the target occlusion result.
[0068] S103. Determine the detection result of the reference object occluding the lens image of the shooting device based on the target occlusion result.
[0069] Specifically, the degree to which the reference object obstructs the road area, as indicated by the target occlusion result, can be used as the detection result of occlusion of the camera lens image, so as to determine the degree to which the camera is obstructed by the reference object, and thus modify the camera or the reference object.
[0070] The technical solution of this invention determines the road occlusion scene category in the lens image of the shooting device. The visibility of the road varies depending on the road occlusion scene category and the occlusion caused by a reference object. This enables the identification of road occlusion scenes with different visibility levels, allowing the detection of lens occlusion to adapt to different road occlusion scenarios. Based on the road occlusion scene category, a target occlusion result is determined for the lens image. This target occlusion result can be either a first occlusion result or a second occlusion result. The first occlusion result is determined based on the proportion of the reference object area within the lens image, while the second occlusion result is determined based on the proportion of the reference object area within the road area of the lens image. This allows for the determination of the target occlusion result based on either the proportion of the reference object area within the lens image or the proportion of the reference object area within the road area of the lens image, thereby improving the accuracy of the target occlusion result and the detection effect under different road occlusion scenarios. Finally, based on the target occlusion result, the detection result of the reference object occluding the lens image is determined, thereby improving the detection efficiency of lens occlusion.
[0071] Example 2
[0072] Figure 6 This is a flowchart illustrating a lens occlusion detection method provided in Embodiment 2 of the present invention. The technical solution of this embodiment further extends the process of determining the target occlusion result corresponding to the lens image of the shooting device according to the road occlusion scene category in the previous embodiment based on the technical solution of the above embodiment. This embodiment can be combined with various optional solutions in one or more of the above embodiments.
[0073] like Figure 6 As shown, the lens occlusion detection method of Embodiment 2 of the present invention may include the following process:
[0074] S201. Determine the road obstruction scene category in the lens view of the shooting device. The visibility of the road will be different in different categories due to the obstruction of the road area by the reference object in the lens view of the shooting device.
[0075] S202. If the road occlusion scene category is the first type of road occlusion scene, then determine the first occlusion result corresponding to the lens view of the shooting device. The road occlusion scene category includes the first type of road occlusion scene and the second type of road occlusion scene. The road visibility caused by the reference object in the lens view of the shooting device occluding the road area in the lens view of the shooting device under the first type of road occlusion scene is less than the road visibility caused by the reference object in the lens view of the shooting device occluding the road area in the lens view of the shooting device under the second type of road occlusion scene.
[0076] In this embodiment of the invention, if the road occlusion scene in the image captured by the camera lens is classified as a first type of road occlusion scene, the proportion of the reference object area in the image captured by the camera lens is determined. Furthermore, a first occlusion result of the image captured by the camera lens can be determined based on the proportion of the reference object area in the image captured by the camera lens. For example, the proportion of the reference object area in the image captured by the camera lens can be calculated in the following way:
[0077]
[0078] Where R1 represents the proportion of the reference object area in the image captured by the camera lens, P1 represents the number of pixels in the reference object area in the image captured by the camera lens, and D represents the resolution of the image captured by the camera lens.
[0079] S203. If the road occlusion scene category is the second type of road occlusion scene, then determine the second occlusion result corresponding to the lens view of the shooting device.
[0080] In this embodiment of the invention, if the road occlusion scene in the image captured by the camera lens is classified as a second type of road occlusion scene, then a reference object region and the displayed road region in the image captured by the camera lens are determined. Furthermore, the proportion of the reference object region in the road region of the image captured by the camera lens is determined based on the reference object region of the occluded road region and the displayed road region, thereby determining the second occlusion result of the image captured by the camera lens. For example, the proportion of the reference object region in the road region of the image captured by the camera lens can be calculated in the following way:
[0081]
[0082] Where R2 represents the proportion of the reference object area in the road area of the camera lens image, P2 represents the number of pixels in the reference object area that obscures the road area in the camera lens image, and P3 represents the number of pixels in the road area that is displayed in the camera lens image.
[0083] As an optional but not limited implementation, determining the second occlusion result corresponding to the image captured by the camera lens includes the following steps D1-D3:
[0084] Step D1: Determine the road structure information corresponding to the image captured by the camera lens. The road structure information is used to describe the lane lines and lane areas formed by scene segmentation of the image captured by the camera lens.
[0085] Step D2: If the road structure information meets the preset information completeness condition, then based on the closed area formed by the lane lines matched on both sides of the lane area described by the road structure information and the reference object area in the lens image of the shooting device, determine the second occlusion result corresponding to the lens image of the shooting device. The preset information completeness condition is used to determine whether each lane line described by the road structure information contains the lane lines matched on both sides of the lane area described by the road structure information.
[0086] Step D3: If the road structure information does not meet the preset information completeness condition, determine the target motion information corresponding to the camera lens image, and determine the second occlusion result corresponding to the camera lens image based on the road structure information and the target motion information. The target motion information is used to describe the size and speed of the target captured in the camera lens image.
[0087] In this embodiment of the invention, a lane area can refer to an area for vehicle travel formed by lane lines. Road structure information can refer to the lane area information and lane line information in the image captured by the camera lens. The preset information completeness condition can refer to whether matching lane lines exist on both sides of each lane area in the image captured by the camera lens.
[0088] A captured target can refer to a moving object captured in the image of a camera, such as motor vehicles or non-motorized vehicles on a road. Target motion information refers to the movement information of the captured target within the camera's view, such as its direction of movement and speed.
[0089] refer to Figure 7 If matching lane lines exist on both sides of each lane area in the image captured by the camera, then the road structure information corresponding to the image captured by the camera can be considered to meet the preset information completeness condition. Furthermore, the lane lines on both sides of each lane area in the image captured by the camera can be extended to form corresponding closed regions with the boundary of the image captured by the camera. Thus, the second occlusion result corresponding to the image captured by the camera can be determined based on the ratio of the area of the reference object region in all closed regions to the sum of the areas of all closed regions.
[0090] For example, refer to Figure 8 , Figure 8The lane lines segmented in the image from the camera lens are L1', L2', L3', and L4'. The area of the closed region formed by the lane lines L1' and L2' on both sides of the lane area and the image boundary is A1'; the area of the closed region formed by the lane lines L2' and L3' on both sides of the lane area and the image boundary is A2'; the area of the closed region formed by the lane lines L3' and L4' on both sides of the lane area and the image boundary is A3'; the area of the reference object area is T1; and the area of the region within the closed region A1' that is occluded by the reference object area is S1. Therefore, the second occlusion result corresponding to the image from the camera lens can be determined based on... To be determined.
[0091] refer to Figure 9 If a lane area in the camera's view does not have matching lane lines on either side, then the road structure information corresponding to the camera's view is considered to not meet the preset information completeness condition. Therefore, the lane area occluded by the reference object area in the camera's view can be determined based on the target motion information of the captured target, and combined with the lane area described by the road structure information to form a complete lane area. Furthermore, the second occlusion result corresponding to the camera's view can be determined based on the proportion of the reference object area in the completed lane area.
[0092] As an optional but not limited implementation, determining the road structure information corresponding to the image captured by the camera lens includes the following steps E1-E2:
[0093] Step E1: Based on the lane line pixels obtained by scene segmentation of the image from the camera lens, lane lines are fitted to obtain each lane line in the image from the camera lens.
[0094] Step E2: Traverse the lane lines and lane areas in the image of the scanning device lens, and merge adjacent lane lines in the image of the scanning device lens that are less than the preset width to obtain new lane lines. The preset width is a preset multiple of the lane line width.
[0095] Specifically, when segmenting the scene from the camera lens, if lane line regions are segmented based on lane line pixels, lane lines in the camera lens image can be obtained by fitting these regions. For example, each lane line can be fitted by performing region growing, erosion dilation, and Hough transform line detection on each lane line region, forming a set of lane lines. Then, each lane line and lane region is traversed and scanned. If the distance between two adjacent lane lines is less than a preset width, the two adjacent lane lines are merged to obtain a new lane line. The preset width can refer to a preset multiple of the lane line width. For example, the preset multiple can be 3 times, and the lane line width can be the average width of two adjacent lane lines. The new lane line can be taken as the middle parallel line between two adjacent lane lines, and the width of the new lane line can be the average width of the two adjacent lane lines.
[0096] As an optional but not limited implementation, the second occlusion result corresponding to the camera lens image is determined based on road structure information and target motion information, including the following steps F1-F3:
[0097] Step F1: Determine the motion trajectory of the target in the lens view of the shooting device based on the target motion information.
[0098] Step F2: Based on the motion trajectory of the captured target in the camera lens image, supplement the lane area described by the road structure information to obtain the supplemented lane area in the camera lens image.
[0099] Step F3: Based on the supplementary rear lane area in the image of the shooting device and the reference object area in the image of the shooting device, determine the second occlusion result corresponding to the image of the shooting device.
[0100] Specifically, the target's direction and speed can be determined based on its motion information. A two-dimensional tracking model is then established based on this information to calculate the target's trajectory as it is tracked until it exits the camera's view. Furthermore, the lane area obscured by the reference object in the camera's view can be determined based on the target's trajectory. This lane area is then supplemented by the road structure information to obtain a complete, supplemented lane area. The ratio of the obscured lane area to the supplemented lane area allows for the determination of a second obscuration result in the camera's view. For example, the lane area obscured by the reference object can be determined based on the union of the target's trajectory.
[0101] S204. Determine the detection result of the reference object occluding the lens image of the shooting device based on the target occlusion result.
[0102] The technical solution of this invention determines the road occlusion scene category in the lens image of a shooting device. The visibility of the road varies depending on the road occlusion scene category, caused by a reference object occluding the road area in the lens image. This enables the identification of road occlusion scenes with different visibility levels, allowing the detection of lens occlusion to adapt to different road occlusion scenarios. If the road occlusion scene category is a first type, a first occlusion result is determined for the lens image. If the road occlusion scene category is a second type, a second occlusion result is determined for the lens image. The road occlusion scene categories include both first and second types. In the first type of road occlusion scene, the lens image... The road visibility caused by the occlusion of the road area in the camera lens image by the reference object in the first type of road occlusion scenario is less than that caused by the occlusion of the road area in the camera lens image by the reference object in the second type of road occlusion scenario. This is to determine the first occlusion result corresponding to the camera lens image when the road occlusion scenario is of the first type, and the second occlusion result corresponding to the camera lens image when the road occlusion scenario is of the second type. This allows for the selection of the corresponding target occlusion result according to different types of road occlusion scenarios, thereby further improving the accuracy of the target occlusion result of the camera lens image. The detection result of the occlusion of the camera lens image by the reference object is determined based on the target occlusion result, thereby improving the detection efficiency of camera lens occlusion.
[0103] Example 3
[0104] Figure 10 This is a schematic diagram of a lens occlusion detection device according to Embodiment 3 of the present invention. The technical solution of this embodiment is applicable to detecting whether the lens of a shooting device is obstructed. This lens occlusion detection device can be implemented in software and / or hardware.
[0105] like Figure 10 As shown, the lens occlusion detection device of Embodiment 3 of the present invention may include:
[0106] The first determining module 301 is used to determine the road occlusion scene category of the shooting device lens image. The visibility of the road is different due to the occlusion of the road area in the shooting device lens image by the reference object under different road occlusion scene categories.
[0107] The second determining module 302 is used to determine the target occlusion result corresponding to the lens image of the shooting device according to the road occlusion scene category. The target occlusion result is either a first occlusion result or a second occlusion result. The first occlusion result is determined based on the proportion of the reference object area in the lens image of the shooting device to the image area in the lens image of the shooting device. The second occlusion result is determined based on the proportion of the reference object area in the road area of the lens image of the shooting device.
[0108] The third determining module 303 is used to determine the detection result of the reference object occluding the lens image of the shooting device based on the target occlusion result.
[0109] The technical solution of this invention, through a first determining module 301, determines the road occlusion scene category in the lens image of the shooting device. The visibility of the road varies depending on the road occlusion scene category and the reference object occluding the road area in the lens image. This enables the identification of road occlusion scenes with different visibility levels, allowing the detection of lens occlusion to adapt to different road occlusion scenarios. The second determining module 302 determines the target occlusion result corresponding to the lens image based on the road occlusion scene category. The target occlusion result is either a first occlusion result or a second occlusion result. The first occlusion result is determined based on the road occlusion scene category in the lens image. The first determination is based on the proportion of the reference object area in the image area captured by the camera lens. The second occlusion result is determined based on the proportion of the reference object area in the road area of the image captured by the camera lens. This allows for the determination of the target occlusion result of the camera lens based on either the proportion of the reference object area in the image captured by the camera lens or the proportion of the reference object area in the road area of the image captured by the camera lens. This improves the accuracy of the target occlusion result of the camera lens and the detection effect under different road occlusion scenarios. The third determination module 303 determines the detection result of the reference object occluding the image captured by the camera lens based on the target occlusion result, thereby improving the detection efficiency of the camera lens occlusion.
[0110] Based on any of the above optional technical solutions, optionally, the second determining module 302 includes: a first occlusion result determining submodule and a second occlusion result determining submodule. The first occlusion result determining submodule is used to determine the first occlusion result corresponding to the camera lens image if the road occlusion scene category is a first type of road occlusion scene; the second occlusion result determining submodule is used to determine the second occlusion result corresponding to the camera lens image if the road occlusion scene category is a second type of road occlusion scene; wherein the road occlusion scene categories include both first type and second type of road occlusion scenes, and the road visibility caused by the reference object occluding the road area in the camera lens image under the first type of road occlusion scene is less than the road visibility caused by the reference object occluding the road area in the camera lens image under the second type of road occlusion scene.
[0111] Based on any of the above optional technical solutions, optionally, the first determining module 301 includes: an occlusion scene category identification submodule, a first road occlusion scene determining submodule, and a second road occlusion scene determining submodule. The occlusion scene category identification submodule is used to identify the occlusion scene category of the camera lens image; the first road occlusion scene determining submodule is used to, if the occlusion scene category is a first type of occlusion scene, mask the road area obtained by scene segmentation of the camera lens image, and determine whether the road occlusion scene category of the camera lens image is a first type of road occlusion scene or a second type of road occlusion scene based on the road pixel features in the masked road area and the reference object pixel features through a preset scene classification network. The road area in the camera lens image under the first type of occlusion scene is determined by the camera lens... The road occlusion scene determination submodule is used to determine that if the occlusion scene category of the lens image is a second type of occlusion scene, then the road area in the lens image of the shooting device belongs to the second type of road occlusion scene, and the road area in the lens image of the shooting device under the second type of occlusion scene has a proportion greater than the first preset proportion threshold or the proportion of the reference object area in the lens image of the shooting device is less than the second preset proportion threshold.
[0112] Based on any of the above optional technical solutions, the optional occlusion scene category recognition submodule includes: a scene segmentation unit and a scene category recognition unit. The scene segmentation unit is used to segment the image from the camera lens to obtain at least one image detection region, which includes a reference object region, a lane line region, and a road region. The scene category recognition unit is used to identify the occlusion scene category of the image from the camera lens based on the at least one image detection region.
[0113] Based on any of the above optional technical solutions, optionally, the second occlusion result determination submodule includes: a road structure information determination unit and a second occlusion result determination unit. The road structure information determination unit is used to determine the road structure information corresponding to the image from the camera lens. The road structure information describes the lane lines and lane areas formed by scene segmentation of the image from the camera lens. The second occlusion result determination unit is used, if the road structure information meets a preset information completeness condition, to determine the second occlusion result corresponding to the image from the camera lens based on the closed area formed by the lane lines matched on both sides of the lane area described by the road structure information and the reference object area in the image from the camera lens. The preset information completeness condition is used to determine whether each lane line described by the road structure information contains the lane lines matched on both sides of the lane area described by the road structure information; or, if the road structure information does not meet the preset information completeness condition, to determine the target motion information corresponding to the image from the camera lens, and to determine the second occlusion result corresponding to the image from the camera lens based on the road structure information and the target motion information. The target motion information describes the size and speed of the target being captured in the image from the camera lens.
[0114] Based on any of the above optional technical solutions, the optional road structure information determination unit includes: a lane line fitting subunit and a lane line determination subunit. The lane line fitting subunit is used to fit lane lines to lane lines in the image of the camera lens based on the lane line pixels obtained by scene segmentation. The lane line determination subunit is used to traverse and scan each lane line and lane area in the image of the camera lens, and merge adjacent lane lines in the image of the camera lens where the distance between them is less than a preset width to obtain new lane lines. The preset width is a preset multiple of the lane line width.
[0115] Based on any of the above optional technical solutions, optionally, the second occlusion result determination unit includes: a motion trajectory determination subunit, a lane area determination subunit, and a second occlusion result determination subunit. The motion trajectory determination subunit is used to determine the motion trajectory of the target captured in the camera's view based on the target motion information; the lane area determination subunit is used to supplement the lane area described by road structure information based on the motion trajectory of the target captured in the camera's view to obtain a supplemented lane area in the camera's view; the second occlusion result determination subunit is used to determine the second occlusion result corresponding to the camera's view based on the supplemented lane area in the camera's view and the reference object area in the camera's view.
[0116] The lens occlusion detection device provided in this embodiment of the invention can execute the lens occlusion detection method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the lens occlusion detection method.
[0117] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of the present invention.
[0118] Example 4
[0119] Figure 11 This is a schematic diagram of an electronic device implementing a lens occlusion detection method according to Embodiment 4 of the present invention. Refer to the following... Figure 11 It shows an electronic device suitable for implementing Embodiment 4 of the present invention (e.g. Figure 11 The diagram below shows the structure of the terminal device or server 400. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 11 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0120] like Figure 11As shown, electronic device 400 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of electronic device 400. The processing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. An edit / output (I / O) interface 405 is also connected to bus 404.
[0121] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 11 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0122] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the lens occlusion detection method shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 409, or installed from a storage device 408, or installed from a ROM 402. When the computer program is executed by the processing device 401, it performs the functions defined in the lens occlusion detection method of the embodiments of the present invention.
[0123] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0124] The electronic device provided in this embodiment of the invention and the lens occlusion detection method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0125] This invention provides a computer storage medium storing a computer program that, when executed by a processor, implements the lens occlusion detection method provided in the above embodiments.
[0126] It should be noted that the computer-readable medium described above in this invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, 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 device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0127] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0128] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0129] The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the one or more programs, the electronic device causes the electronic device to: determine the road occlusion scene category of the camera lens image, wherein the visibility of the road is different due to the occlusion of the road area in the camera lens image by a reference object under different road occlusion scene categories; determine the target occlusion result corresponding to the camera lens image based on the road occlusion scene category, wherein the target occlusion result is a first occlusion result or a second occlusion result, wherein the first occlusion result is determined based on the proportion of the reference object area in the camera lens image to the total area of the camera lens image, and the second occlusion result is determined based on the proportion of the reference object area in the road area of the camera lens image; and determine the detection result of the reference object occluding the camera lens image based on the target occlusion result.
[0130] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0131] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0132] The units described in the embodiments of the present invention can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0133] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0134] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. 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 fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0135] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.
[0136] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the invention. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0137] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for detecting lens occlusion, characterized in that, The method includes: Determine the road obstruction scene category in the lens view of the shooting device. The visibility of the road will be different under different road obstruction scene categories due to the obstruction of the road area in the lens view of the shooting device by the reference object in the lens view of the shooting device. The target occlusion result corresponding to the lens image of the shooting device is determined according to the road occlusion scene category. The target occlusion result is either a first occlusion result or a second occlusion result. The first occlusion result is determined based on the proportion of the reference object area in the lens image of the shooting device. The second occlusion result is determined based on the proportion of the reference object area in the road area of the lens image of the shooting device. The detection result of the reference object occluding the lens image of the shooting device is determined based on the target occlusion result.
2. The method according to claim 1, characterized in that, Determine the target occlusion result corresponding to the lens view of the shooting device based on the road occlusion scene category, including: If the road obstruction scene category is the first type of road obstruction scene, then the first obstruction result corresponding to the lens image of the shooting device is determined; If the road obstruction scene category is the second type of road obstruction scene, then the second obstruction result corresponding to the lens image of the shooting device is determined; The road occlusion scenario categories include a first type of road occlusion scenario and a second type of road occlusion scenario. In the first type of road occlusion scenario, the road visibility caused by the reference object in the lens of the shooting device obscuring the road area in the lens of the shooting device is less than that caused by the reference object in the lens of the shooting device obscuring the road area in the lens of the shooting device in the second type of road occlusion scenario.
3. The method according to claim 2, characterized in that, Determine the category of road obstruction in the camera's view, including: Identify the types of scenes where the camera lens occludes the view. If the lens occlusion scene category is the first type of occlusion scene, then the road area obtained by scene segmentation of the shooting device lens image is masked, and based on the road pixel features and reference object pixel features in the masked road area, the road occlusion scene category of the shooting device lens image is determined to be either the first type of road occlusion scene or the second type of road occlusion scene through a preset scene classification network. In the first type of occlusion scene, the proportion of the road area in the shooting device lens image is not greater than a first preset proportion threshold, or the proportion of the reference object area in the shooting device lens image is not less than a second preset proportion threshold. If the lens occlusion scene category is the second type of screen occlusion scene, then the road occlusion scene category of the camera lens is determined to be the second type of road occlusion scene. In the second type of screen occlusion scene, the proportion of the road area in the camera lens is greater than the first preset proportion threshold, or the proportion of the reference object area in the camera lens is less than the second preset proportion threshold.
4. The method according to claim 3, characterized in that, The system identifies lens occlusion scenarios within the camera's view, including: Scene segmentation is performed on the image captured by the camera lens to obtain at least one image detection region, wherein the at least one image detection region includes a reference object region, a lane line region, and a road region; Based on the at least one image detection area, the lens image of the shooting device is used to identify the category of lens image occlusion.
5. The method according to claim 2, characterized in that, Determining the second occlusion result corresponding to the image captured by the camera lens includes: Determine the road structure information corresponding to the image captured by the camera lens. The road structure information is used to describe the lane lines and lane areas formed by scene segmentation of the image captured by the camera lens. If the road structure information meets the preset information completeness condition, then based on the closed area formed by the lane lines matched on both sides of the lane area described by the road structure information and the reference object area in the lens image of the shooting device, the second occlusion result corresponding to the lens image of the shooting device is determined. The preset information completeness condition is used to determine whether each lane line described by the road structure information contains the lane lines matched on both sides of the lane area described by the road structure information. If the road structure information does not meet the preset information completeness condition, the target motion information corresponding to the lens image of the shooting device is determined, and the second occlusion result corresponding to the lens image of the shooting device is determined based on the road structure information and the target motion information. The target motion information is used to describe the size and speed of the target captured in the lens image of the shooting device.
6. The method according to claim 5, characterized in that, Determining the road structure information corresponding to the image captured by the camera lens includes: Each lane line in the image of the shooting device is obtained by fitting lane line pixels obtained by scene segmentation of the image from the lens of the shooting device. The system traverses and scans each lane line and lane area in the image of the camera lens, and merges adjacent lane lines in the image of the camera lens that are less than a preset width to obtain a new lane line. The preset width is a preset multiple of the lane line width.
7. The method according to claim 5, characterized in that, Determining the second occlusion result corresponding to the lens view of the shooting device based on the road structure information and the target motion information includes: The motion trajectory of the target captured in the lens image of the shooting device is determined based on the target motion information; The lane area described by the road structure information is supplemented based on the motion trajectory of the captured target in the lens image of the shooting device to obtain the supplemented lane area in the lens image of the shooting device. Based on the supplementary rear lane area in the image captured by the camera lens and the reference object area in the image captured by the camera lens, a second occlusion result corresponding to the image captured by the camera lens is determined.
8. A lens occlusion detection device, characterized in that, The device includes: The first determining module is used to determine the road occlusion scene category of the shooting device lens image. The visibility of the road is different under different road occlusion scene categories because the reference object in the shooting device lens image occludes the road area in the shooting device lens image. The second determining module is used to determine the target occlusion result corresponding to the lens image of the shooting device according to the road occlusion scene category. The target occlusion result is either a first occlusion result or a second occlusion result. The first occlusion result is determined based on the proportion of the reference object area in the lens image of the shooting device. The second occlusion result is determined based on the proportion of the reference object area in the road area of the lens image of the shooting device. The third determining module is used to determine the detection result of the reference object occluding the lens image of the shooting device based on the target occlusion result.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the lens occlusion detection method according to any one of claims 1-7.
10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the lens occlusion detection method according to any one of claims 1-7.
