Visibility detection method and device, electronic equipment and storage medium
By constructing a video image static target recognition model in visibility detection, and using reference object recognition results and associated distance information to generate visibility data, it solves the problems of high training sample requirements and data imbalance in the existing technology, and achieves high performance under a small amount of training. Accurate visibility detection.
Patent Information
- Application Number
- CN202410583922.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-11
- Publication Date
- 2024-10-18
AI Technical Summary
The existing technology requires a large number of training samples and model training when detecting visibility, which is difficult to apply to environments that lack specific distance reference objects. Moreover, fewer low-visibility events lead to data imbalance, resulting in low recognition accuracy.
Obtain reference shooting images through the target camera, determine at least three visibility reference objects with different distances, and construct a video image static target recognition model. Use this model to analyze the real-time shooting images and generate reference object recognition results. Based on the recognition results and associated distances The information generates visibility data, reducing the need for overall image analysis and improving recognition accuracy.
It achieves the ability to identify visibility of new video surveillance points with a small number of training samples and model training, and is suitable for high-precision visibility detection in different environments, reducing training sample requirements and computing costs.
Smart Images

Figure CN118799710A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of visibility detection, and in particular, to a visibility detection method, device, electronic device, and storage medium. Background Art
[0002] In traffic scenarios such as highways and airports, visibility is an important factor affecting traffic safety, so it is necessary to keep track of changes in visibility in a timely manner. Generally, a special visibility meter is required to measure visibility, but visibility meters are not densely distributed and cannot meet actual needs. Now some research and inventions have been published that use surveillance video images to measure visibility.
[0003] In the prior art, the visibility can be detected by using the method of fixed-position reference marks. For the surveillance video of fixed positions, some reference marks need to be set in advance, such as digital marks or poles with prominent colors, and then image processing algorithms are developed to detect these reference marks, and the visibility range is determined according to the visibility of the reference marks. This technical route is often used in fixed-position scenes such as airports where there is little change and there are reference objects with standard intervals. It cannot be applied to environments where there are no reference objects at specific distances.
[0004] In order to solve the above problems, a method of detecting visibility using a deep learning model has emerged. For multiple target cameras in the study area, actual video images of a long time series are collected, and then the visibility data observed by the nearby meteorological observation station are matched according to time and distance to establish a visibility image dataset. Based on the visibility image dataset, a deep learning model is constructed and trained, and applied to the actual visibility estimation scene after evaluation. This technical route is often used in general traffic scenarios, but it requires the collection of a large number of pictures, that is, it takes a lot of time to collect video image data with different visibility. In addition, since low visibility events rarely occur, and the results obtained by such deep learning models under different visibility conditions (haze, fog, vehicle smoke, etc.) will be different, if the training samples are small, the error will increase, so the visibility image dataset is often seriously unbalanced in visibility distribution. That is, the training samples of the visibility deep learning model are too few, and a large number of training samples need to be accumulated and the model trained to give the new video surveillance point visibility recognition capability. Summary of the invention
[0005] The present application discloses a visibility detection method, device, electronic device and storage medium, which can provide the visibility recognition capability of new video surveillance points by only accumulating a small amount of training samples and model training.
[0006] The first aspect of the present application discloses a visibility detection method, comprising:
[0007] A reference image is acquired through a target camera, where the reference image is an image taken under high visibility;
[0008] Determine at least three visibility reference objects at different distances from the reference captured image, and associate distance information for the three visibility reference objects at different distances;
[0009] Build a video image static object recognition model;
[0010] Acquire real-time shooting images through the target camera;
[0011] The real-time captured images are analyzed through the video image static target recognition model to generate reference object recognition results;
[0012] Visibility data is generated based on the reference object recognition results and the distance information associated with the reference captured image.
[0013] Optionally, the video image static object recognition model is a computer vision model;
[0014] The real-time captured images are analyzed through the video image static target recognition model to generate reference object recognition results, including:
[0015] Input the real-time captured images into the computer vision model;
[0016] Perform grayscale conversion on the real-time captured image to generate a grayscale converted image;
[0017] Perform image superposition operation and image translation operation on the grayscale converted image to generate a first two-dimensional matrix;
[0018] Use an operator to perform image superposition operations and image translation operations on the first two-dimensional matrix to generate a second two-dimensional matrix;
[0019] The closed area of the second two-dimensional matrix is filled by the water flooding method and converted into a binary image to generate a third two-dimensional matrix;
[0020] Segment the framed area in the visibility reference object of the real-time captured image and convert it into a binary image to generate a fourth two-dimensional matrix, and determine the number of values 1 in the fourth two-dimensional matrix as the value S1;
[0021] The third two-dimensional matrix is multiplied by the fourth two-dimensional matrix, and the number of matrices having values of 1 after the multiplication is determined as value C1;
[0022] The reference object recognition result of the visibility reference object is determined based on the value S1 and the value C1 in combination with the IoU formula.
[0023] Optionally, after grayscale conversion is performed on the real-time captured image to generate the grayscale conversion image, image superposition and image translation operations are performed on the grayscale conversion image to generate the first two-dimensional matrix, the visibility detection method further includes:
[0024] Generate a Gaussian convolution kernel according to the position information of the convolution kernel;
[0025] The grayscale converted image is filtered using a Gaussian convolution kernel.
[0026] Optionally, after using an operator to perform image superposition and image translation operations on the first two-dimensional matrix to generate a second two-dimensional matrix, a closed area of the second two-dimensional matrix is filled by a flooding method and converted into a binary image, and before generating a third two-dimensional matrix, the visibility detection method further includes:
[0027] The second two-dimensional matrix is subjected to dilation and erosion processing.
[0028] Optionally, the video image static object recognition model is a deep neural network model;
[0029] The real-time captured images are analyzed through the video image static target recognition model to generate reference object recognition results, including:
[0030] Normalize the real-time captured images to generate a three-dimensional array;
[0031] Input the three-dimensional array into the deep neural network model to generate a two-dimensional array M;
[0032] Binarize the two-dimensional array M to generate a two-dimensional array mask;
[0033] Segment the framed area in the visibility reference object of the real-time captured image and convert it into a binary image to generate a fifth two-dimensional matrix, and determine the number of values 1 in the fifth two-dimensional matrix as value S2;
[0034] Multiply the fifth two-dimensional matrix and the two-dimensional array mask, and determine the number of 1s in the matrix after the multiplication as the value C2;
[0035] The reference object recognition result of the visibility reference object is determined based on the value S2 and the value C2 in combination with the IoU formula.
[0036] Optionally, determining at least three visibility reference objects at different distances from the reference captured image, and associating distance information for the three visibility reference objects at different distances, includes:
[0037] Determine an electronic map near the location of the target camera;
[0038] Determine at least three different initial reference objects from the reference captured images, and assign a unique ID to each initial object;
[0039] Marking the camera position of the target camera and the reference position of each initial reference object on the electronic map;
[0040] The distance between each initial reference object and the target camera is calculated according to the camera position and the reference object position, and a distance information set is generated;
[0041] The initial reference objects are screened according to their distance information set and reference object characteristics, the initial reference objects that meet the requirements are used as visibility reference objects, and the distance information is associated with the visibility reference objects.
[0042] The second aspect of the present application discloses a visibility detection method, comprising:
[0043] A first acquisition unit is used to acquire a reference captured image through a target camera, where the reference captured image is an image captured under high visibility;
[0044] a determination unit, configured to determine at least three visibility reference objects at different distances from the reference captured image, and associate distance information for the three visibility reference objects at different distances;
[0045] A construction unit, used for constructing a video image static object recognition model;
[0046] A second acquisition unit is used to acquire a real-time captured image through a target camera;
[0047] A first generating unit is used to analyze the real-time captured image through a video image static target recognition model to generate a reference object recognition result;
[0048] The second generating unit is used to generate visibility data according to the reference object recognition result and the distance information associated with the reference captured image.
[0049] Optionally, the video image static object recognition model is a computer vision model;
[0050] The first generation unit comprises:
[0051] A first input module, used for inputting a real-time captured image into a computer vision model;
[0052] The first generating module is used to perform grayscale conversion on the real-time captured image to generate a grayscale converted image;
[0053] The second generating module is used to perform an image superposition operation and a translation operation on the grayscale converted image to generate a first two-dimensional matrix;
[0054] A third generating module is used to use an operator to perform an image superposition operation and a translation operation on the first two-dimensional matrix to generate a second two-dimensional matrix;
[0055] The fourth generating module is used to fill the closed area of the second two-dimensional matrix by a water flooding method, and convert it into a binary image to generate a third two-dimensional matrix;
[0056] a fifth generating module, configured to segment the framed area in the visibility reference object of the real-time captured image, convert the segmented area into a binary image, generate a fourth two-dimensional matrix, and determine the number of values 1 in the fourth two-dimensional matrix as the value S1;
[0057] A first determining module, used for multiplying the third two-dimensional matrix and the fourth two-dimensional matrix, and determining the number of matrices having values of 1 after the multiplication as a value C1;
[0058] The second determination module is used to determine the reference object recognition result of the visibility reference object according to the value S1 and the value C1 in combination with the IoU formula.
[0059] Optionally, after the first generating module and before the second generating module, the visibility detection device further includes:
[0060] A sixth generation module, used to generate a Gaussian convolution kernel according to the position information of the convolution kernel;
[0061] The filtering module is used to filter the grayscale converted image using a Gaussian convolution kernel.
[0062] Optionally, after the third generating module and before the fourth generating module, the visibility detection device further includes:
[0063] The expansion and erosion module is used to perform expansion and erosion processing on the second two-dimensional matrix.
[0064] Optionally, the video image static object recognition model is a deep neural network model;
[0065] The first generation unit comprises:
[0066] The seventh generating module is used to perform normalization processing on the real-time captured image to generate a three-dimensional array;
[0067] An eighth generation module, used for inputting the three-dimensional array into the deep neural network model to generate a two-dimensional array M;
[0068] The ninth generation module is used to perform binarization processing on the two-dimensional array M to generate a two-dimensional two-dimensional array mask;
[0069] a tenth generating module, configured to segment the framed area in the visibility reference object of the real-time captured image, convert the segmented area into a binary image, generate a fifth two-dimensional matrix, and determine the number of the values 1 in the fifth two-dimensional matrix as the value S2;
[0070] a third determining module, configured to multiply the fifth two-dimensional matrix and the two-dimensional array mask, and determine the number of matrices having a value of 1 after the multiplication as a value C2;
[0071] The fourth determination module is used to determine the reference object recognition result of the visibility reference object according to the value S2 and the value C2 in combination with the IoU formula.
[0072] Optionally, the first acquisition unit includes:
[0073] Determine an electronic map near the location of the target camera;
[0074] Determine at least three different initial reference objects from the reference captured images, and assign a unique ID to each initial object;
[0075] Marking the camera position of the target camera and the reference position of each initial reference object on the electronic map;
[0076] The distance between each initial reference object and the target camera is calculated according to the camera position and the reference object position, and a distance information set is generated;
[0077] The initial reference objects are screened according to their distance information set and reference object characteristics, the initial reference objects that meet the requirements are used as visibility reference objects, and the distance information is associated with the visibility reference objects.
[0078] A third aspect of the present application provides an electronic device, including:
[0079] Processor, memory, input-output unit, and bus;
[0080] The processor is connected to the memory, the input and output unit, and the bus;
[0081] The memory stores a program, and the processor calls the program to execute the first aspect and any optional visibility detection method of the first aspect.
[0082] A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the visibility detection method of the first aspect and any optional visibility detection method of the first aspect is executed.
[0083] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0084] In the present application, a reference captured image is obtained through a target camera, and the reference captured image is an image captured under high visibility. At least three visibility reference objects at different distances are determined from the reference captured image, and distance information is associated with the three visibility reference objects at different distances. A video image static target recognition model is constructed. Real-time captured images are obtained through a target camera. The real-time captured images are analyzed through the video image static target recognition model to generate a reference object recognition result. Visibility data is generated based on the reference object recognition result and the distance information associated with the reference captured image.
[0085] There is no need to use a video image static target recognition model to analyze the visibility of the entire image. It is only necessary to detect multiple visibility reference areas in the real-time image, analyze whether the visibility reference can be detected in the area, and analyze the visibility reference at different distances to obtain the analysis results, which are then compared with the visibility reference in the reference image, and the visibility of the current target camera area is analyzed through the associated distance information. The video image static target recognition model in this way requires large-scale video image data training to achieve a high visibility recognition accuracy in different environments. When this method is applied to a new video surveillance point, it only requires simple target calibration of the video image, and does not require the accumulation of a large number of training samples and model training to give the new video surveillance point the ability to recognize visibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0087] Figure 1 This is a schematic diagram of a first embodiment of the visibility detection method of the present application;
[0088] Figure 2 This is a schematic diagram of the first stage of the second embodiment of the visibility detection method of the present application;
[0089] Figure 3 This is a schematic diagram of the second stage of the second embodiment of the visibility detection method of the present application;
[0090] Figure 4 This is a schematic diagram of the third stage of the second embodiment of the visibility detection method of the present application;
[0091] Figure 5 This is a schematic diagram of the first stage of the third embodiment of the visibility detection method of the present application;
[0092] Figure 6 This is a schematic diagram of the second stage of the third embodiment of the visibility detection method of the present application;
[0093] Figure 7 This is a schematic diagram of a first embodiment of the visibility detection device of the present application;
[0094] Figure 8 This is a schematic diagram of a first embodiment of the first generation unit of the present application;
[0095] Fig. 9 This is a schematic diagram of a second embodiment of the first generating unit of the present application;
[0096] Fig.10 A schematic diagram of an embodiment of an electronic device of the present application; Fig.11 This is a schematic diagram of an embodiment of the VGG-16 model network structure of the present application. DETAILED DESCRIPTION
[0097] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0098] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0099] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0100] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0101] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0102] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0103] In the prior art, the method of using fixed camera reference marks is usually used to detect visibility. For surveillance videos of fixed camera positions, some reference marks, such as digital marks or poles with prominent colors, need to be set in advance, and then image processing algorithms are developed to detect these reference marks, and the visibility range is determined according to the visibility of the reference marks. This technical route is often used in fixed camera scenes with small changes and standard interval reference objects such as airports. It cannot be applied to environments lacking reference objects at specific distances. In order to solve the above problems, a method of detecting visibility using a deep learning model has emerged. For multiple target cameras in the study area, actual video images of a long time series are collected, and then the visibility data observed by the nearby meteorological observation station are matched according to time and distance to establish a visibility image dataset. A deep learning model is constructed and trained based on the visibility image dataset, and applied to the actual visibility estimation scenario after evaluation. This technical route is often used in general traffic scenarios, but it requires the collection of a large number of pictures, that is, it takes a lot of time to collect video image data with different visibility. In addition, since low-visibility events rarely occur and the results obtained by such deep learning models under different visibility conditions are different, if there are few training samples, the error will increase. Therefore, the visibility distribution of visibility image datasets is often seriously unbalanced. That is, the visibility deep learning model has too few training samples, and a large number of training samples need to be accumulated and the model trained to give the new video surveillance point visibility recognition capabilities.
[0104] Based on this, the present application discloses a visibility detection method, device, electronic device and storage medium, which only require the accumulation of a small amount of training samples and model training to give new video surveillance points the ability to recognize visibility.
[0105] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0106] The method of the present application can be applied to a server, a device, a terminal or other devices with logic processing capabilities, and the present application does not limit this. For the convenience of description, the following description is made by taking the execution subject as an example of a terminal.
[0107] See also Figure 1 The present application provides an embodiment of a visibility detection method, comprising:
[0108] 101. Acquire a reference image through a target camera, where the reference image is an image taken under high visibility conditions;
[0109] The terminal first needs to acquire images from cameras in a specific area. The image, which serves as a reference image, needs to be taken when visibility is quite high. Specifically, you can acquire images with a visibility of a certain number of meters according to your own requirements, or you can only take pictures based on the environmental conditions at the time. There is no limitation here.
[0110] In addition, regarding the focus and resolution, in addition to direct shooting, the target camera can also take multiple shots according to different focus points, and take different focus areas to compose the captured image, which is not limited here.
[0111] The shooting area of the target camera can use the captured images of the original environment, or add artificially set distance reference objects to the original environment and mark such reference objects on the electronic map to reduce the time of distance detection and improve efficiency.
[0112] 102. Determine at least three visibility reference objects at different distances from the reference captured image, and associate distance information for the three visibility reference objects at different distances;
[0113] The terminal first determines a plurality of reference objects from the reference captured image, performs distance analysis on the reference objects, and determines at least three visibility reference objects at different distances.
[0114] The distance analysis of the visibility reference object here may be directly based on field measurement, or may be performed through image algorithm, or may be analyzed based on electronic map, which is not limited here.
[0115] 103. Build a video image static target recognition model;
[0116] The terminal constructs a video image static target recognition model, which only needs to be able to analyze whether a corresponding object in a corresponding area in the image exists.
[0117] Construct a video image static target recognition model, which can be based on traditional computer vision or deep learning theory. The main function of this model is to identify the corresponding visibility reference objects in the image, and determine which visibility reference objects can be detected and which visibility reference objects cannot be detected in a specific video image. Detection is recorded as 1, and non-detection is recorded as 0 (flag). Each recognition is recorded as a detection event, and the ID of the detected visibility reference object is saved.
[0118] 104. Obtain real-time shooting images through the target camera;
[0119] The terminal obtains real-time images through the target camera. The specific angles need to be as similar as possible, but there are differences caused by different angles.
[0120] 105. Analyze the real-time captured image through the video image static target recognition model to generate a reference object recognition result;
[0121] The terminal analyzes the real-time image through the video image static target recognition model to generate the reference object recognition result, that is, it performs object analysis on the area of each visibility reference object in the real-time image to analyze whether the visibility reference object exists. If it exists, it represents 1, and if it does not exist, it represents 0. The distance of each reference object is different. If it cannot be detected, it means that the visibility is lower than this distance.
[0122] 106. Generate visibility data according to the reference object recognition result and the distance information associated with the reference captured image.
[0123] The terminal determines the visibility reference objects that can be detected and the reference objects that cannot be detected based on the above-mentioned reference object recognition results and the distance information associated with the reference captured image, and generates visibility data based on their associated distances.
[0124] In this embodiment, the visibility estimation method based on target visibility can generate a set of detection events for a certain target camera within a period of time according to a video image static target recognition model of a target group of visibility reference objects.
[0125] In this embodiment, a comprehensive estimate can also be calculated for the detection event set. First, the minimum distance value corresponding to the visibility reference object that can be identified at time t is calculated, and then the average value of all target minimum values in the time period is taken as the comprehensive estimated visibility for this period.
[0126] In this embodiment, the terminal obtains a reference captured image through a target camera, wherein the reference captured image is an image captured under high visibility. The terminal determines at least three visibility reference objects at different distances from the reference captured image, and associates distance information for the three visibility reference objects at different distances. The terminal constructs a video image static target recognition model. The terminal obtains a real-time captured image through a target camera. The terminal analyzes the real-time captured image through the video image static target recognition model to generate a reference object recognition result. The terminal generates visibility data based on the reference object recognition result and the distance information associated with the reference captured image.
[0127] In this embodiment, it is not necessary to use a video image static target recognition model to analyze the visibility of the entire image. It is only necessary to detect multiple visibility reference object areas in the real-time captured image, analyze whether the visibility reference object can be detected in the area, and analyze the visibility reference objects at different distances to obtain the analysis results, which are then compared with the visibility reference objects in the reference captured image, and the visibility of the current target camera area is analyzed through the associated distance information. In this way, the video image static target recognition model does not need to be trained with a large amount of visibility image data, and can also be trained to improve the analysis accuracy in different environments. It greatly reduces the demand for training samples, improves the applicable field of the model, and improves the visibility detection accuracy of the camera area.
[0128] Secondly, compared with the traditional model detection visibility, in this embodiment, camera images with multiple visibilities can be used as training samples, or only clear camera images can be used as training samples, and the selectivity of training samples is high. The traditional model detection visibility relies on a large number of visibility training samples, and such samples are difficult to collect, which makes the cost of such model training samples very high. Moreover, compared with the recognition model of this embodiment, the model used by the traditional model detection visibility requires a larger amount of calculation, because the recognition model of this embodiment can perform visibility analysis based on several fixed reference areas in the captured image without analyzing the entire image, which makes the cost of obtaining a traditional visibility detection model much higher than the cost of the recognition model of this embodiment under the same analysis accuracy.
[0129] See also Figure 2 , Figure 3 and Figure 4 The present application provides an embodiment of a visibility detection method, comprising:
[0130] 201. Acquire a reference captured image through a target camera, where the reference captured image is an image captured under high visibility conditions;
[0131] Step 201 in this embodiment is similar to step 101 in the above embodiment and will not be described again here.
[0132] 202. Determine an electronic map near the location of the target camera;
[0133] 203. Determine at least three different initial reference objects from the reference captured image, and assign a unique ID to each initial object;
[0134] 204. Marking the camera position of the target camera and the reference object positions of each initial reference object on the electronic map;
[0135] 205. Calculate the distance between each initial reference object and the target camera according to the camera position and the reference object position, and generate a distance information set;
[0136] 206. Screening the initial reference objects according to the distance information set and reference object characteristics of the initial reference objects, using the initial reference objects that meet the requirements as visibility reference objects, and associating distance information with the visibility reference objects;
[0137] In this embodiment, the terminal can build a database to record target cameras that need to apply visibility estimation, as well as information such as the latitude and longitude, altitude, and sensor parameters of the target cameras, and record images taken by the target cameras in real time.
[0138] The terminal also displays the target camera location and remote sensing image map on the electronic map. The electronic map provides commonly used GIS functions such as marking and ranging.
[0139] In this embodiment, artificially set distance reference objects are used, and more accurate distance association data can be established through map annotation. Secondly, existing distance reference objects in the target area can also be selected, such as crosswalks, road markings, warning signs, etc. Such distance reference objects do not require additional artificial settings, and there is no need to worry about reference objects such as flowers, plants and trees changing over time, affecting the detection effect, which not only improves efficiency but also reduces costs.
[0140] An interactive marking function is then provided so that visibility reference objects can be marked. The terminal determines an electronic map near the location of the target camera. At least three different initial reference objects are determined from the reference captured image, and a unique ID is assigned to each initial object. The camera position of the target camera and the reference position of each initial reference object are marked on the electronic map. The distance between each initial reference object and the target camera is calculated based on the camera position and the reference object position, and a distance information set is generated. The initial reference objects are screened based on the distance information set of the initial reference objects and the reference object characteristics, and the initial reference objects that meet the requirements are used as visibility reference objects, and distance information is associated with the visibility reference objects.
[0141] Specifically, the terminal simultaneously displays the target camera (C) shooting screen view (View1) and the electronic map (View2) near the location on the web page. Select the visibility reference object on View1, and the system assigns it a unique ID, recorded as R. Find the position of R on the map on View2, add a location mark, and then the system automatically calculates the distance D of CR. Repeat the above steps until the user believes that the marking of the target camera is completed, and finally save all visibility reference objects related to C and their distance sets. Then for a certain target camera C, there is a corresponding visibility reference object distance set. Principles of interactive marking:
[0142] a) Three or more visibility reference objects;
[0143] b) The distances between visibility reference objects are relatively evenly distributed;
[0144] c) It can cover different visibility levels such as low visibility, medium visibility, high visibility, and subdivided visibility levels;
[0145] d) The visibility reference object has clear characteristics and can be clearly distinguished from the sky background and surrounding objects.
[0146] 207. Construct a video image static object recognition model;
[0147] 208. Acquire real-time shooting images through a target camera;
[0148] Steps 207 to 208 in this embodiment are similar to steps 103 to 104 in the above embodiment and are not described again here.
[0149] 209. Input the real-time captured image into the computer vision model;
[0150] 210. Perform grayscale conversion on the real-time captured image to generate a grayscale converted image;
[0151] 211. Generate a Gaussian convolution kernel according to the position information of the convolution kernel;
[0152] 212. Filter the grayscale converted image using a Gaussian convolution kernel;
[0153] 213. Perform an image superposition operation and an image translation operation on the grayscale conversion image to generate a first two-dimensional matrix;
[0154] 214. Use an operator to perform an image superposition operation and an image translation operation on the first two-dimensional matrix to generate a second two-dimensional matrix;
[0155] 215. Perform expansion processing and corrosion processing on the second two-dimensional matrix;
[0156] 216. Fill the closed area of the second two-dimensional matrix by the water flooding method and convert it into a binary image to generate a third two-dimensional matrix;
[0157] 217. Segment the framed area in the visibility reference object of the real-time captured image and convert it into a binary image to generate a fourth two-dimensional matrix, and determine the number of values 1 in the fourth two-dimensional matrix as value S1;
[0158] 218. Multiply the third two-dimensional matrix and the fourth two-dimensional matrix, and determine the number of matrices whose values after the multiplication are 1 as value C1;
[0159] 219. Determine the reference object recognition result of the visibility reference object according to the value S1 and the value C1 in combination with the IoU formula;
[0160] In this embodiment, a video image static target recognition model is constructed. This model can be based on traditional computer vision or deep learning theory. The main function of this model is to identify the corresponding visibility reference objects in the video surveillance image, and determine which visibility reference objects can be detected and which visibility reference objects cannot be detected in a specific video image. Detection is recorded as 1, and non-detection is recorded as 0 (flag). Each recognition is recorded as a detection event, and the detected visibility reference object ID is saved.
[0161] This static target recognition model has two main technical routes:
[0162] This embodiment is a traditional machine vision detection method, which is introduced in detail.
[0163] First, when visibility is extremely high, a reference image is taken using a target camera, requiring that all targets included in the comparison are clearly visible and can be easily distinguished, that is, the contents of steps 201 to 206.
[0164] In the actual visibility detection, the image captured by the target camera at time t (real-time image) is first converted into grayscale. The conversion formula is as follows:
[0165] Gray(i,j)=0.299*R i,j +0.587G i,j +0.114B i,j
[0166] Among them, i and j correspond to the coordinates of the real-time image, R, G, and B represent the three color channels of the image: red, green, and blue. The three-channel (X, Y, N) image is converted into a plane image (grayscale conversion image) of (X, Y). Gray(i, j) is the grayscale conversion image. The grayscale conversion parameter is relatively effective in the test experiment and can be applied to more scenarios.
[0167] If you need to improve accuracy, you need to make adjustments in the grayscale conversion based on the data of historical changes in regional visibility. If visibility is generally low, the R coefficient needs to be higher than the sum of the G and B coefficients.
[0168] Next, the grayscale conversion image is filtered using the Gaussian convolution kernel g to filter the high frequencies in the grayscale conversion image, reduce noise, and make the image smooth. The Gaussian convolution kernel calculation formula is as follows:
[0169]
[0170] Among them, x and y are the coordinate positions of the convolution kernel, δ is a constant, and the value of δ can change according to different visibility scenarios. In this embodiment, the lower the visibility, the lower the value of δ. In the actual application scenario, first use a centered δ value to perform a test to detect the initial visibility data, and then select δ from the database based on the initial visibility data, and recalculate once. If the second visibility data is consistent with the first, the data is output, otherwise δ is reselected for three tests. g(x,y) is the Gaussian convolution kernel, and Π is the product operation or direct product operation. The Gaussian convolution kernel and the grayscale conversion image are then filtered and calculated.
[0171]
[0172] in, Including superposition and translation, obtain the first two-dimensional matrix Gray is the abbreviation of grayscale conversion image, and g is the abbreviation of Gaussian convolution kernel. The Laplace8 neighborhood operator is used to extract the image edge, and the operator is defined as Operator With the first two-dimensional matrix Perform the following operation to obtain the second two-dimensional matrix I.
[0173]
[0174] The second two-dimensional matrix is expanded and eroded to make the detected edges continuous. The closed area is filled by the water flooding method and converted into a binary image to obtain the third two-dimensional matrix I1. The framed area in the reference object is segmented and converted into a binary image to obtain the fourth two-dimensional matrix I2, and the number of 1s in the fourth two-dimensional matrix is calculated as S1.
[0175] Calculate I1*I2, and count the number of 1s in the matrix I1*I2 as C1, calculate the IoU formula, and the F formula.
[0176]
[0177]
[0178] In this embodiment, the threshold H is set to 0.05. When F=1, it means that the visibility reference object is visible. When F=0, it means that the visibility reference object is not visible. Then corresponding to the target distance, it represents the visibility at the current moment.
[0179] 220. Generate visibility data based on the reference object recognition result and the distance information associated with the reference captured image.
[0180] Step 220 in this embodiment is similar to step 106 in the above embodiment and will not be described again here.
[0181] In this embodiment, the terminal obtains a reference captured image through a target camera, wherein the reference captured image is an image captured under high visibility. The terminal determines an electronic map near the location of the target camera. At least three different initial reference objects are determined from the reference captured image, and a unique ID is assigned to each initial object. The camera position of the target camera and the reference object position of each initial reference object are marked on the electronic map. The distance between each initial reference object and the target camera is calculated according to the camera position and the reference object position, and a distance information set is generated. The initial reference object is screened according to the distance information set and the reference object characteristics of the initial reference object, and the initial reference object that meets the requirements is used as a visibility reference object, and the visibility reference object is associated with distance information. The terminal constructs a video image static target recognition model. The terminal obtains a real-time captured image through the target camera. The terminal inputs the real-time captured image into a computer vision model. The real-time captured image is gray-converted to generate a gray-converted image. A Gaussian convolution kernel is generated according to the position information of the convolution kernel. The gray-converted image is filtered using the Gaussian convolution kernel. The gray-converted image is subjected to image superposition and image translation operations to generate a first two-dimensional matrix. The operator is used to perform image superposition and image translation operations on the first two-dimensional matrix to generate a second two-dimensional matrix. The second two-dimensional matrix is expanded and eroded. The closed area of the second two-dimensional matrix is filled by the water flooding method and converted into a binary image to generate a third two-dimensional matrix. The framed area in the visibility reference object of the real-time image is segmented and converted into a binary image to generate a fourth two-dimensional matrix, and the number of values 1 in the fourth two-dimensional matrix is determined as value S1. The third two-dimensional matrix is multiplied by the fourth two-dimensional matrix, and the number of values 1 in the matrix after the multiplication is determined as value C1. The reference object recognition result of the visibility reference object is determined according to the value S1 and the value C1 in combination with the IoU formula. The terminal generates visibility data according to the reference object recognition result and the distance information associated with the reference captured image.
[0182] In this embodiment, it is not necessary to use a video image static target recognition model to analyze the visibility of the entire image. It is only necessary to detect multiple visibility reference object areas in the real-time captured image, analyze whether the visibility reference object can be detected in the area, and analyze the visibility reference objects at different distances to obtain the analysis results, which are then compared with the visibility reference objects in the reference captured image, and the visibility of the current target camera area is analyzed through the associated distance information. In this way, the video image static target recognition model does not need to be trained with a large amount of visibility image data, and can also be trained to improve the analysis accuracy in different environments. It greatly reduces the demand for training samples, improves the applicable field of the model, and improves the visibility detection accuracy of the camera area.
[0183] Secondly, the present embodiment has few parameter requirements and strong universality. For general surveillance cameras, as long as the principle of interactive marking is met, the present embodiment can be applied.
[0184] Secondly, this embodiment does not require the accumulation of a large number of visibility image data sets. In this embodiment, it is necessary to first obtain the reference target by image labeling, and then perform visibility estimation based on the visibility of the reference target. For the reference target group detection model, its basic technology is optional and open. You can choose a traditional computer vision algorithm, or you can choose a target detection model based on deep learning pre-training. For scenarios with data set conditions, you can also choose to train a dedicated target detection model, but it is not necessary.
[0185] Secondly, this embodiment has a strong quantitative characteristic. This embodiment estimates visibility by determining the visibility of the reference target object, and can retrieve the distance between the target object and the camera when determining the visibility of the target object, which can be used as a quantitative reference for visibility estimation. However, the disclosed solutions often require the observed visibility to be roughly graded in order to create a data set and train a classification model.
[0186] See also Figure 5 and Figure 6 The present application provides an embodiment of a visibility detection method, comprising:
[0187] 501. Acquire a reference captured image through a target camera, where the reference captured image is an image captured under high visibility conditions;
[0188] 502. Determine an electronic map near the location of the target camera;
[0189] 503. Determine at least three different initial reference objects from the reference captured image, and assign a unique ID to each initial object;
[0190] 504. Marking the camera position of the target camera and the reference object positions of each initial reference object on the electronic map;
[0191] 505. Calculate the distance between each initial reference object and the target camera according to the camera position and the reference object position, and generate a distance information set;
[0192] 506. Screening the initial reference objects according to the distance information set and reference object characteristics of the initial reference objects, using the initial reference objects that meet the requirements as visibility reference objects, and associating the distance information with the visibility reference objects;
[0193] 507. Construct a video image static target recognition model;
[0194] 508. Acquire real-time shooting images through a target camera;
[0195] Steps 501 to 508 in this embodiment are similar to steps 201 to 508 in the aforementioned embodiment, and are not described again here.
[0196] 509. Perform normalization processing on the real-time captured image to generate a three-dimensional array;
[0197] 510. Input the three-dimensional array into the deep neural network model to generate a two-dimensional array M;
[0198] 511. Binarize the two-dimensional array M to generate a two-dimensional array mask;
[0199] 512. Segment the framed area in the visibility reference object of the real-time captured image and convert it into a binary image to generate a fifth two-dimensional matrix, and determine the number of values 1 in the fifth two-dimensional matrix as value S2;
[0200] 513. Multiply the fifth two-dimensional matrix and the two-dimensional array mask, and determine the number of 1s in the matrix after the multiplication as the value C2;
[0201] 514. Determine the reference object recognition result of the visibility reference object according to the value S2 and the value C2 in combination with the IoU formula;
[0202] In this embodiment, a video image static target recognition model is constructed. This model can be based on traditional computer vision or deep learning theory. The main function of this model is to identify the corresponding visibility reference objects in the video surveillance image, and determine which visibility reference objects can be detected and which visibility reference objects cannot be detected in a specific video image. Detection is recorded as 1, and non-detection is recorded as 0 (flag). Each recognition is recorded as a detection event, and the detected visibility reference object ID is saved.
[0203] This static target recognition model has two main technical routes:
[0204] This embodiment is a deep neural network model for target detection, which is introduced in detail.
[0205] First, obtain a pre-trained VGG-16 model for building recognition. The model network structure is as follows Fig.11 As shown. Take a reference image at a time when visibility is extremely high. Select the image taken at time t.
[0206] Normalize the target image, that is, I = (R Img ,G Img ,B Img ) / 255, where R, G, and B are the three color channels of the image, and are processed to generate a three-dimensional array I. Input I into the pre-trained VGG-16 model Model() to obtain a two-dimensional array M, and then binarize the two-dimensional array M to obtain a two-dimensional binary array mask. The formula is as follows:
[0207]
[0208]
[0209] Segment the framed area in the reference object and convert it into a binary image to obtain the fifth two-dimensional matrix And calculate the fifth 2D matrix The number of 1s in is S2. After the calculation is completed, the three-dimensional array I is input into the VGG-16 model Model(), and then combined with the fifth two-dimensional matrix Calculate the two-dimensional array M. Binarize the two-dimensional array M to generate a two-dimensional two-dimensional array mask.
[0210] calculate And count the number of matrices that are 1 as C2, calculate the IoU formula, and the F formula.
[0211]
[0212]
[0213] In this embodiment, the threshold H is set to 0.05. When F=1, it means that the visibility reference object is visible. When F=0, it means that the visibility reference object is not visible. Then corresponding to the target distance, it represents the visibility at the current moment.
[0214] 515. Generate visibility data according to the reference object recognition result and the distance information associated with the reference captured image.
[0215] Step 515 in this embodiment is similar to step 106 in the above embodiment and will not be described again here.
[0216] In this embodiment, the terminal obtains a reference captured image through a target camera, wherein the reference captured image is an image captured under high visibility. The terminal determines an electronic map near the location of the target camera. At least three different initial reference objects are determined from the reference captured image, and a unique ID is assigned to each initial object. The camera position of the target camera and the reference object position of each initial reference object are marked on the electronic map. The distance between each initial reference object and the target camera is calculated according to the camera position and the reference object position, and a distance information set is generated. The initial reference object is screened according to the distance information set and the reference object characteristics of the initial reference object, and the initial reference object that meets the requirements is used as a visibility reference object, and the distance information is associated with the visibility reference object. The terminal constructs a video image static target recognition model. The terminal obtains a real-time captured image through the target camera. The terminal normalizes the real-time captured image to generate a three-dimensional array. The three-dimensional array is input into a deep neural network model to generate a two-dimensional array M. The two-dimensional array M is binarized to generate a two-dimensional two-dimensional array mask. The framed area in the visibility reference of the real-time captured image is segmented and converted into a binary image to generate a fifth two-dimensional matrix, and the number of values 1 in the fifth two-dimensional matrix is determined as value S2. The fifth two-dimensional matrix is multiplied by the two-dimensional array mask, and the number of values 1 in the matrix after the multiplication is determined as value C2. The reference object recognition result of the visibility reference object is determined based on the value S2 and the value C2 and combined with the IoU formula. The terminal generates visibility data based on the reference object recognition result and the distance information associated with the reference captured image.
[0217] In this embodiment, it is not necessary to use a video image static target recognition model to analyze the visibility of the entire image. It is only necessary to detect multiple visibility reference object areas in the real-time captured image, analyze whether the visibility reference object can be detected in the area, and analyze the visibility reference objects at different distances to obtain the analysis results, which are then compared with the visibility reference objects in the reference captured image, and the visibility of the current target camera area is analyzed through the associated distance information. In this way, the video image static target recognition model does not need to be trained with a large amount of visibility image data, and can also be trained to improve the analysis accuracy in different environments. It greatly reduces the demand for training samples, improves the applicable field of the model, and improves the visibility detection accuracy of the camera area.
[0218] Secondly, the present embodiment has few parameter requirements and strong universality. For general surveillance cameras, as long as the principle of interactive marking is met, the present embodiment can be applied.
[0219] Secondly, this embodiment does not require the accumulation of a large number of visibility image data sets. In this embodiment, it is necessary to first obtain the reference target by image labeling, and then perform visibility estimation based on the visibility of the reference target. For the reference target group detection model, its basic technology is optional and open. You can choose a traditional computer vision algorithm, or you can choose a target detection model based on deep learning pre-training. For scenarios with data set conditions, you can also choose to train a dedicated target detection model, but it is not necessary.
[0220] Secondly, this embodiment has a strong quantitative characteristic. This embodiment estimates visibility by determining the visibility of the reference target object, and can retrieve the distance between the target object and the camera when determining the visibility of the target object, which can be used as a quantitative reference for visibility estimation. However, the disclosed solutions often require the observed visibility to be roughly graded in order to create a data set and train a classification model.
[0221] See also Figure 7 The present application provides an embodiment of a visibility detection device, comprising:
[0222] The first acquisition unit 701 is used to acquire a reference captured image through a target camera, where the reference captured image is an image captured under high visibility;
[0223] A determining unit 702, configured to determine at least three visibility reference objects at different distances from the reference captured image, and associate distance information for the three visibility reference objects at different distances;
[0224] A construction unit 703 is used to construct a video image static object recognition model;
[0225] The second acquisition unit 704 is used to acquire a real-time captured image through a target camera;
[0226] The first generating unit 705 is used to analyze the real-time captured image through the video image static target recognition model to generate a reference object recognition result;
[0227] The second generating unit 706 is used to generate visibility data according to the reference object recognition result and the distance information associated with the reference captured image.
[0228] Optionally, the first obtaining unit 706 includes:
[0229] Determine an electronic map near the location of the target camera;
[0230] Determine at least three different initial reference objects from the reference captured images, and assign a unique ID to each initial object;
[0231] Marking the camera position of the target camera and the reference position of each initial reference object on the electronic map;
[0232] The distance between each initial reference object and the target camera is calculated according to the camera position and the reference object position, and a distance information set is generated;
[0233] The initial reference objects are screened according to their distance information set and reference object characteristics, the initial reference objects that meet the requirements are used as visibility reference objects, and the distance information is associated with the visibility reference objects.
[0234] See also Figure 8 , the present application provides an embodiment of a first generation unit, including:
[0235] The first input module 801 is used as an input module, and is used to input the real-time captured image into the computer vision model;
[0236] The first generating module 802 is used to perform grayscale conversion on the real-time captured image to generate a grayscale converted image;
[0237] The sixth generating module 803 is used to generate a Gaussian convolution kernel according to the position information of the convolution kernel;
[0238] A filtering module 804 is used to filter the grayscale converted image using a Gaussian convolution kernel;
[0239] The second generating module 805 is used to perform an image superposition operation and a translation operation on the grayscale converted image to generate a first two-dimensional matrix;
[0240] A third generating module 806 is used to use an operator to perform an image superposition operation and an image translation operation on the first two-dimensional matrix to generate a second two-dimensional matrix;
[0241] An expansion and corrosion module 807 is used to perform expansion and corrosion processing on the second two-dimensional matrix;
[0242] The fourth generating module 808 is used to fill the closed area of the second two-dimensional matrix by a water flooding method, and convert it into a binary image to generate a third two-dimensional matrix;
[0243] The fifth generating module 809 is used to segment the framed area in the visibility reference object of the real-time captured image, convert it into a binary image, generate a fourth two-dimensional matrix, and determine the number of values 1 in the fourth two-dimensional matrix as the value S1;
[0244] A first determining module 810 is used to multiply the third two-dimensional matrix and the fourth two-dimensional matrix, and determine the number of matrices with values of 1 after the multiplication as a value C1;
[0245] The second determination module 811 is used to determine the reference object recognition result of the visibility reference object according to the value S1 and the value C1 in combination with the IoU formula.
[0246] See also Fig. 9 , the present application provides another embodiment of the first generation unit, including:
[0247] The seventh generating module 901 is used to perform normalization processing on the real-time captured image to generate a three-dimensional array;
[0248] An eighth generating module 902 is used to input the three-dimensional array into the deep neural network model to generate a two-dimensional array M;
[0249] The ninth generating module 903 is used to perform binarization processing on the two-dimensional array M to generate a two-dimensional array mask;
[0250] A tenth generating module 904 is used to segment the framed area in the visibility reference object of the real-time captured image, convert it into a binary image, generate a fifth two-dimensional matrix, and determine the number of values 1 in the fifth two-dimensional matrix as value S2;
[0251] A third determining module 905 is used to multiply the fifth two-dimensional matrix and the two-dimensional array mask, and determine the number of 1s in the matrix after the multiplication as a value C2;
[0252] The fourth determination module 906 is used to determine the reference object recognition result of the visibility reference object according to the value S2 and the value C2 in combination with the IoU formula.
[0253] See also Fig.10 , the present application provides an electronic device, including:
[0254] Processor 1001 , memory 1002 , input / output unit 1003 , and bus 1004 .
[0255] The processor 1001 is connected to the memory 1002 , the input and output unit 1003 , and the bus 1004 .
[0256] The memory 1002 stores a program, and the processor 1001 calls the program to execute the following steps: Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 Visibility detection method in .
[0257] The present application provides a computer-readable storage medium, on which a program is stored, and when the program is executed on a computer, the program performs the following steps: Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 Visibility detection method in .
[0258] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0259] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0260] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0261] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0262] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A visibility detection method, characterized in that: include: Acquiring a reference captured image through a target camera, wherein the reference captured image is an image captured under high visibility; Determine at least three visibility reference objects at different distances from the reference captured image, and associate distance information for the three visibility reference objects at different distances; Build a video image static object recognition model; Acquire real-time captured images through the target camera; Analyzing the real-time captured image by using the video image static target recognition model to generate a reference object recognition result; Visibility data is generated according to the reference object recognition result and the reference captured image associated distance information.
2. The visibility detection method according to claim 1, characterized in that: The video image static object recognition model is a computer vision model; The real-time captured image is analyzed by the video image static target recognition model to generate a reference object recognition result, including: Inputting the real-time captured image into the computer vision model; Performing grayscale conversion on the real-time captured image to generate a grayscale converted image; Perform image superposition and image translation operations on the grayscale conversion image to generate a first two-dimensional matrix; Using an operator to perform image superposition operation and image translation operation on the first two-dimensional matrix to generate a second two-dimensional matrix; Filling the closed area of the second two-dimensional matrix by a flooding method and converting it into a binary image to generate a third two-dimensional matrix; Segment the framed area in the visibility reference object of the real-time captured image and convert it into a binary image to generate a fourth two-dimensional matrix, and determine the number of values 1 in the fourth two-dimensional matrix as value S1; Multiply the third two-dimensional matrix and the fourth two-dimensional matrix, and determine the number of matrices with values of 1 after the multiplication as value C1; The reference object recognition result of the visibility reference object is determined according to the value S1 and the value C1 in combination with the IoU formula.
3. The visibility detection method according to claim 2, characterized in that: After grayscale conversion is performed on the real-time captured image to generate a grayscale conversion image, image superposition and image translation operations are performed on the grayscale conversion image to generate a first two-dimensional matrix, and before the first two-dimensional matrix is generated, the visibility detection method further includes: Generate a Gaussian convolution kernel according to the position information of the convolution kernel; The grayscale converted image is filtered using a Gaussian convolution kernel.
4. The visibility detection method according to claim 2, characterized in that: After performing image superposition and image translation operations on the first two-dimensional matrix using an operator to generate a second two-dimensional matrix, filling a closed area of the second two-dimensional matrix using a flooding method and converting it into a binary image before generating a third two-dimensional matrix, the visibility detection method further includes: The second two-dimensional matrix is subjected to dilation and erosion processing.
5. The visibility detection method according to claim 1, characterized in that: The video image static object recognition model is a deep neural network model; The real-time captured image is analyzed by the video image static target recognition model to generate a reference object recognition result, including: Normalizing the real-time captured image to generate a three-dimensional array; Input the three-dimensional array into the deep neural network model to generate a two-dimensional array M; Binarizing the two-dimensional array M to generate a two-dimensional array mask; Segment the framed area in the visibility reference object of the real-time captured image and convert it into a binary image to generate a fifth two-dimensional matrix, and determine the number of values 1 in the fifth two-dimensional matrix as value S2; Multiply the fifth two-dimensional matrix and the two-dimensional array mask, and determine the number of 1s in the matrix after the multiplication as value C2; The reference object recognition result of the visibility reference object is determined according to the value S2 and the value C2 in combination with the IoU formula.
6. The visibility detection method according to any one of claims 1 to 5, characterized in that: Determining at least three visibility reference objects at different distances from the reference captured image, and associating distance information for the three visibility reference objects at different distances, including: Determine an electronic map near the location of the target camera; Determining at least three different initial reference objects from the reference captured image, and assigning a unique ID to each initial object; Marking the camera position of the target camera and the reference object positions of each initial reference object on the electronic map; Calculating the distance between each initial reference object and the target camera according to the camera position and the reference object position, and generating a distance information set; The initial reference objects are screened according to the distance information set and reference object characteristics of the initial reference objects, the initial reference objects that meet the requirements are used as visibility reference objects, and distance information is associated with the visibility reference objects.
7. A visibility detection device, characterized in that: include: A first acquisition unit is used to acquire a reference captured image through a target camera, wherein the reference captured image is an image captured under high visibility; a determining unit, configured to determine at least three visibility reference objects at different distances from the reference captured image, and associate distance information for the three visibility reference objects at different distances; A construction unit, used for constructing a video image static object recognition model; A second acquisition unit, used to acquire a real-time captured image through the target camera; A first generating unit, configured to analyze the real-time captured image by using the video image static target recognition model to generate a reference object recognition result; The second generating unit is used to generate visibility data according to the reference object recognition result and the reference captured image associated distance information.
8. The visibility detection device according to claim 1, characterized in that: The video image static object recognition model is a computer vision model; The first generation unit comprises: A first input module, used for inputting the real-time captured image into the computer vision model; A first generating module, used for performing grayscale conversion on the real-time captured image to generate a grayscale converted image; A second generating module is used to perform an image superposition operation and a translation operation on the grayscale conversion image to generate a first two-dimensional matrix; A third generating module is used to use an operator to perform an image superposition operation and a translation operation on the first two-dimensional matrix to generate a second two-dimensional matrix; A fourth generating module, used for filling the closed area of the second two-dimensional matrix by a water flooding method, and converting it into a binary image to generate a third two-dimensional matrix; a fifth generating module, configured to segment the framed area in the visibility reference object of the real-time captured image, convert the segmented area into a binary image, generate a fourth two-dimensional matrix, and determine the number of values 1 in the fourth two-dimensional matrix as a value S1; A first determining module, configured to multiply the third two-dimensional matrix and the fourth two-dimensional matrix, and determine the number of matrices having values of 1 after the multiplication as a value C1; The second determination module is used to determine the reference object recognition result of the visibility reference object according to the value S1 and the value C1 in combination with the IoU formula.
9. An electronic device, characterized in that: include: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the visibility detection method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is executed on a computer, the visibility detection method according to any one of claims 1 to 6 is executed.
Citation Information
Patent Citations
Visibility monitoring and model training method and device based on deep learning, terminal and medium
CN111259957A
Visibility detection method, detection model training method and device, and storage medium
CN116824491A
Cited By
Tunnel photogrammetry image visibility test method
CN119946247A
Road low visibility monitoring method and system based on video analysis
CN120823548A
