Target detection method, device, storage medium, electronic device and system
By combining weather monitoring information and image quality information in the target detection equipment to calculate the environmental index, the fusion image of infrared and visible light images is obtained for target detection, which solves the problem of low detection accuracy caused by low image clarity in complex meteorological environments and improves The applicability and accuracy of target detection are improved.
Patent Information
- Application Number
- CN202110246751.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-05
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-03-05
AI Technical Summary
Existing target detection equipment is difficult to ensure image clarity in complex meteorological environments, resulting in low target detection accuracy, especially under all-weather surveillance requirements.
By determining the environmental index based on the weather monitoring information of the detection scene and the image quality information of historical images, the fusion image of the infrared image and the visible light image is obtained as the image to be detected, and target detection is performed to improve the confidence of the detection results.
It improves the applicability and accuracy of target detection in different weather environments and ensures the effectiveness of all-weather surveillance.
Smart Images

Figure CN115018742B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a target detection method, device, storage medium, electronic equipment and system. Background Art
[0002] Countries require border security and border surveillance capabilities to support all-weather, automated, and intelligent surveillance, and to be able to provide effective detection capabilities even in complex backgrounds.
[0003] In the surveillance system, the most intuitive and reliable is video surveillance. The traditional video surveillance solution that uses video walls for manual judgment obviously cannot meet the needs of high-intensity surveillance. Therefore, video surveillance technology based on artificial intelligence is gradually emerging. Through artificial intelligence algorithms, the controlled targets in the video screen can be automatically and accurately detected and identified, and corresponding alarm information can be given. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a target detection method, device, storage medium, electronic device and system.
[0005] According to a first aspect of an embodiment of the present disclosure, a target detection method is provided, the method comprising:
[0006] Determining an environmental index of the detection scene according to weather monitoring information of the detection scene and image quality information of historical images, wherein the historical images are images collected within a preset time period before a target time;
[0007] After the target time, when the environmental index is within a preset range, obtaining a fused image of the detection scene as the image to be detected, wherein the fused image is an image obtained by performing image fusion processing on the infrared image of the detection scene and the visible light image of the detection scene;
[0008] Performing target detection on the image to be detected to obtain a detection result and a result confidence level corresponding to the detection result.
[0009] Optionally, the weather monitoring information includes multiple types of weather monitoring values, and determining the environment index of the detection scene according to the weather monitoring information of the detection scene and the image quality information of the historical image includes:
[0010] Obtaining a conversion matrix corresponding to each type of the weather monitoring value and a weight corresponding to each type of the weather monitoring value, as well as a conversion matrix and a weight corresponding to the image quality information;
[0011] The environmental index is determined by a preset environmental index calculation formula, according to the conversion matrix corresponding to each type of weather monitoring value and the weight corresponding to each type of weather monitoring value, as well as the conversion matrix and weight corresponding to the image quality information.
[0012] Optionally, the acquiring of the fused image of the detection scene as the image to be detected includes:
[0013] According to a preset dual-lens focal length comparison table, the focal length of the infrared image acquisition device and the focal length of the visible light image acquisition device are adjusted so that the infrared image acquisition device and the visible light image acquisition device have the same field of view;
[0014] The infrared image collected by the infrared image monitoring device and the visible light image collected by the visible light image collection device are subjected to image fusion processing to obtain the image to be detected.
[0015] Optionally, the performing image fusion processing on the infrared image collected by the infrared image monitoring device and the visible light image collected by the visible light image acquisition device to obtain the image to be detected includes:
[0016] Performing image registration on the infrared image and the visible light image by using a preset feature matching algorithm so that the infrared image and the visible light image are in the same coordinate system;
[0017] Respectively performing image filtering processing and image enhancement processing on the infrared image and the visible light image to obtain a target infrared image and a target visible light image;
[0018] Performing image fusion on the target infrared image and the target visible light image by using a preset image fusion algorithm to obtain the fused image;
[0019] According to the image quality information of the fused image, it is determined to use the fused image as the image to be detected.
[0020] Optionally, performing target detection on the image to be detected to obtain a detection result and a result confidence level corresponding to the detection result includes:
[0021] Performing target detection on the image to be detected by using a preset fusion image detection model to obtain a first detection result and a first confidence level corresponding to the first detection result;
[0022] The detection result and the result confidence level are determined according to the first detection result, the first confidence level and the environmental index.
[0023] Optionally, determining the detection result and the result confidence level according to the first detection result, the first confidence level, and the environmental index includes:
[0024] Performing target detection on the infrared image by using a preset infrared image detection model to obtain a second detection result and a second confidence level corresponding to the second detection result;
[0025] Performing target detection on the visible light image by using a preset visible light image detection model to obtain a third detection result and a third confidence level corresponding to the third detection result;
[0026] Determine, according to the environmental index, a first weight corresponding to the first confidence level, a second weight corresponding to the second confidence level, and a third weight corresponding to the third confidence level;
[0027] Determine a weighted average of the first confidence level, the second confidence level, and the third confidence level according to the first weight, the second weight, and the third weight;
[0028] Any one of the first detection result, the second detection result and the third detection result is used as the detection result, and the weighted average is used as the result confidence.
[0029] According to a second aspect of an embodiment of the present disclosure, there is provided a target detection device, the device comprising:
[0030] An index determination module, used to determine the environmental index of the detection scene according to weather monitoring information of the detection scene and image quality information of historical images, wherein the historical images are images collected within a preset time period before a target time;
[0031] An image fusion module, used for obtaining, after the target time, when the environmental index is within a preset range, a fused image of the detection scene as the image to be detected, wherein the fused image is an image obtained by performing image fusion processing on the infrared image of the detection scene and the visible light image of the detection scene;
[0032] The image detection module is used to perform target detection on the image to be detected to obtain a detection result and a result confidence level corresponding to the detection result.
[0033] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, in which instructions are stored. When the instructions are executed, the target detection method provided in the second aspect of the present disclosure is executed.
[0034] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0035] A processor is used to execute the computer program in the memory to implement the steps of the target detection method provided in the second aspect of the present disclosure.
[0036] According to a fifth aspect of an embodiment of the present disclosure, there is provided a target detection system, including:
[0037] Environmental sensors, used to collect weather monitoring information for the detection scene;
[0038] Infrared image acquisition equipment, used for acquiring infrared images of the detection scene;
[0039] A visible light image acquisition device, used for acquiring a visible light image of the detection scene;
[0040] A focal length sensor, used to determine the focal length of the infrared image acquisition device and the focal length of the visible light image acquisition device; and
[0041] A fourth aspect of the present disclosure provides an electronic device.
[0042] The technical solution provided by the embodiments of the present disclosure can determine the environmental index of the detection scene according to the weather monitoring information of the detection scene and the image quality information of the historical images; when the environmental index is in a preset range, obtain the fused image of the detection scene as the image to be detected, and the fused image is the image obtained by image fusion processing of the infrared image of the detection scene and the visible light image of the detection scene; perform target detection on the image to be detected to obtain the detection result and the result confidence corresponding to the detection result. The collected images can be fused according to the weather environment of the detection scene, and then target detection is performed based on the fused image, thereby improving the applicability of target detection to different weather environments, and thus improving the accuracy of target detection.
[0043] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0045] Figure 1 is a flow chart of a target detection method according to an exemplary embodiment;
[0046] Figure 2 is based on Figure 1 A flow chart of a method for determining an environmental index is shown;
[0047] Figure 3 is based on Figure 1 A flow chart of a method for acquiring an image to be detected is shown;
[0048] Figure 4 is based on Figure 1 A flow chart of an image detection method is shown;
[0049] Figure 5 is a block diagram of a target detection device according to an exemplary embodiment;
[0050] Figure 6 is a block diagram of a target detection system according to an exemplary embodiment;
[0051] Figure 7 is a block diagram of an electronic device according to an exemplary embodiment;
[0052] Figure 8 is a block diagram of a chip according to an exemplary embodiment. DETAILED DESCRIPTION
[0053] In order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, words such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. For example, the first threshold and the second threshold are only used to distinguish different thresholds, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0054] It should be noted that, in the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0055] In the present invention, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, the combination of a and b, the combination of a and c, the combination of b and c, or the combination of a, b and c, where a, b, c can be single or multiple.
[0056] In the related technology of controlled target detection, in many monitoring scenarios, for example, monitoring scenarios for border dangers, monitoring scenarios for forest fires, and monitoring scenarios for illegal fishing and hunting in protected areas, the acquisition equipment used to shoot videos or images is usually set up in the open air in the wild. The natural environment in the wild is complex and diverse, and conditions such as light change all the time throughout the day. If only a single image acquisition device (for example, an infrared image acquisition device or a visible light image acquisition device) is used for target detection and recognition, it is difficult to meet the requirements of all-weather monitoring. In the prior art, a variety of image acquisition devices are usually used in different time periods to meet the target detection in different weather or lighting environments (for example, dark light environment at night and strong light environment during the day). However, the above-mentioned method of switching image acquisition devices based on time periods has a large granularity, resulting in a low degree of adaptability between the image acquisition device and the current detection scene, and it is difficult to ensure the clarity of the collected image. In addition, the method of distinguishing image acquisition devices by time periods cannot cope with the complex light and shooting environments such as early morning, evening, heat waves and sandstorms, and cannot ensure the clarity of the collected image, which leads to the problem of low accuracy of subsequent target detection.
[0057] In order to solve the technical problem that the image clarity collected by the existing target detection equipment in a complex meteorological environment is low, which leads to a low accuracy of target detection, the embodiment of the present invention provides a target detection method, device, storage medium, electronic device and system. Among them, the target detection method provided by the embodiment of the present invention can be applied to various monitoring scenarios. For example, the above-mentioned monitoring scene can be a border monitoring scene, an urban monitoring scene, a suburban monitoring scene, etc., but is not limited thereto.
[0058] Before introducing the target detection method provided by the present disclosure, the target application scenario involved in each embodiment of the present disclosure is first introduced. The target application scenario includes a target detection system, which includes: an environmental sensor for collecting weather monitoring information of the detection scene; an infrared image acquisition device for collecting infrared images of the detection scene; a visible light image acquisition device for collecting visible light images of the detection scene; at least one focal length sensor for determining the focal length of the infrared image acquisition device and the focal length of the visible light image acquisition device; and an electronic device. Among them, the environmental sensor may include: a photosensitive sensor, a temperature sensor, and a humidity sensor. The infrared image acquisition device may be an infrared camera, and the visible light image acquisition device may be a monocular or binocular camera. The electronic device is provided with an output and output interface capable of receiving and sending image data and weather monitoring data. The electronic device may be, for example, a monitoring device controller, a monitoring platform server, and a personal computer, a laptop computer, a smart phone, a tablet computer, a smart TV, a smart watch, a PDA (English: Personal Digital Assistant, Chinese: Personal Digital Assistant) and other electronic devices capable of receiving and processing the above-mentioned image data and weather monitoring data.
[0059] Figure 1 is a flow chart of a target detection method according to an exemplary embodiment. Figure 1 As shown, the method is applied to the electronic device described in the above application scenario, and includes the following steps:
[0060] In step 101, an environmental index of the detection scene is determined according to weather monitoring information of the detection scene and image quality information of historical images.
[0061] The historical image is a visible light image of the detection scene collected within a preset time period before the target moment. The environmental index is used to characterize the degree of influence of the weather environment on the clarity of the collected visible light image. For example, the higher the environmental index, the greater the influence of the weather environment on the clarity of the collected visible light image; on the contrary, the lower the environmental index, the smaller the influence of the weather environment on the clarity of the collected visible light image.
[0062] For example, the step 101 to the following step 103 are performed by the above-mentioned electronic device. Specifically, the timeline after the electronic device (and the environmental sensor, infrared image acquisition device, visible light image acquisition device and at least one focal length sensor connected to the electronic device) is turned on is divided into a plurality of preset time periods of equal or unequal duration, and the time of the preset time period can be, for example, 3 seconds. At the start time of each preset time period (i.e., the above-mentioned target time), the electronic device needs to obtain the weather monitoring information collected by the environmental sensor and the video stream collected by the visible light image acquisition device in one or more preset time periods before the preset time period. Each frame of the video stream is a historical image, and it can be understood that the video stream collected in the preset time period contains multiple historical images. In another embodiment of the present disclosure, the historical image may also include one or more infrared images collected by the infrared image acquisition device. The weather monitoring information is the monitoring values of various meteorological conditions detected by the environmental sensor, such as temperature monitoring values, humidity monitoring values, light monitoring values, wind intensity monitoring values, rainfall monitoring values, etc. The environmental index can be obtained by combining the above-mentioned meteorological monitoring values with the image quality information of the visible light image. It should be noted that the image quality information can be represented by an image histogram of a visible light image. Specifically, the image histogram actually corresponds to a data matrix containing a variety of image data, which is used to characterize the display quality of the image, and its visual expression is a statistical histogram. In the embodiment of the present disclosure, the data matrix corresponding to the image histogram is directly used as a parameter to describe the image quality information.
[0063] In step 102, after the target moment, when the environmental index is within a preset range, a fused image of the detection scene is acquired as an image to be detected.
[0064] The fused image is an image obtained by fusing the infrared image of the detection scene and the visible light image of the detection scene.
[0065] For example, after determining the environmental index based on the weather monitoring information and image quality information in the last preset time period, an appropriate image acquisition method and image detection method can be selected according to the environmental index. Specifically, taking the image acquisition device including an infrared image acquisition device and a visible light image acquisition device as an example, three preset intervals of environmental indexes can be pre-set, and each preset interval corresponds to an image acquisition method and an image detection method. The above-mentioned preset intervals can be preset intervals determined by collecting and analyzing historical image data and meteorological data. The preset intervals can be saved in a priori environmental knowledge base and referenced when needed. For example, the first preset interval is an environmental index less than or equal to 10, the second preset interval is an environmental index greater than 10 and less than 20, and the third preset interval is an environmental index greater than or equal to 20. When the environmental index is in the first preset range, the infrared image collected by the infrared image acquisition device is used as the image to be detected for target detection; when the environmental index is in the third preset range, the visible light image collected by the visible light image acquisition device is used as the image to be detected for target detection; when the environmental index is in the second preset range, the infrared image and the visible light image are first fused by a preset image fusion model, and then the fused image is used as the image to be detected for target detection.
[0066] In step 103, target detection is performed on the image to be detected to obtain a detection result and a result confidence level corresponding to the detection result.
[0067] For example, in step 103, the image to be detected can be detected by a preset image detection model to identify the target in the image to be detected. The detection result may include the position of the target in the image to be detected, and the result confidence is used to characterize the credibility of the detection result. It can be understood that different types of images to be detected correspond to different image detection models. For example, there is a preset infrared image detection model for infrared images; there is a preset visible light image detection model for visible light images, and there is a preset fusion image detection model for fusion images. In actual operation, the image to be detected is used as the input of the above-mentioned image monitoring model, and the detection result and result confidence output by the above-mentioned image monitoring model can be obtained.
[0068] In summary, the technical solution provided by the embodiments of the present disclosure can determine the environmental index of the detection scene according to the weather monitoring information of the detection scene and the image quality information of the historical images; when the environmental index is in a preset range, obtain a fused image of the detection scene as the image to be detected, the fused image is an image obtained by image fusion processing of the infrared image of the detection scene and the visible light image of the detection scene; perform target detection on the image to be detected to obtain the detection result and the result confidence corresponding to the detection result. The collected images can be fused according to the weather environment of the detection scene, and then target detection is performed based on the fused image, thereby improving the applicability of target detection to different weather environments, and thus improving the accuracy of target detection.
[0069] Figure 2 is based on Figure 1 A flow chart of a method for determining an environmental index is shown, Figure 2 As shown, the weather monitoring information includes multiple types of weather monitoring values, and step 101 may include:
[0070] In step 1011, a conversion matrix corresponding to each type of weather monitoring value and a weight corresponding to each type of weather monitoring value, as well as a conversion matrix and a weight corresponding to the image quality information are obtained.
[0071] For example, the sensor data and image quality information such as the above-mentioned multiple types of weather monitoring values all have their corresponding data formats or measurement units. In order to convert these data in different formats and measurement units into a unified mathematical expression, and then calculate the environmental index through a unified environmental index calculation formula, it is necessary to convert different data formats. Specifically, corresponding conversion matrices can be set for different sensor data and image quality information, and the above-mentioned data in different formats and measurement units can be converted into a unified mathematical expression through these conversion matrices. In addition, under normal circumstances, different parameters have different influences on the environmental index evaluation. Therefore, for different sensors and image quality information, different weights need to be set according to the geographical location or environmental conditions of the implementation process of the target detection method provided by the present disclosure, which are used to characterize the influence of different parameters on the environmental index evaluation. It can be understood that the above-mentioned conversion matrix and weights can be written into the memory of the above-mentioned electronic device for storage during the development stage. When this step 1011 and the following step 1012 are executed, the processor of the above-mentioned electronic device can directly obtain the above-mentioned conversion matrix and weights from the memory for use.
[0072] In step 1012, the environmental index is determined by a preset environmental index calculation formula according to the conversion matrix corresponding to each type of weather monitoring value and the weight corresponding to each type of weather monitoring value, as well as the conversion matrix and weight corresponding to the image quality information.
[0073] Taking the above-mentioned various environmental sensors including photosensors, temperature sensors and humidity sensors as an example, the environmental index calculation formula can be shown as the following formula (1):
[0074] D=PM P W P +GM G W G +TM T W T +SM S W S (1)
[0075] Wherein, D represents the environment index, P represents the image quality information, G represents the light monitoring value, T represents the temperature monitoring value, and S represents the humidity monitoring value. P Represents the image quality conversion matrix, W P Represents the image quality weight, M G Represents the illumination value conversion matrix, W G Represents the weight of the illumination value, M T Represents the temperature value conversion matrix, W T Represents the temperature value weight, M S Represents the humidity value conversion matrix, W S It can be understood that the above P, G, T and S are real-time monitoring values collected in the previous preset time period, and the above M P , W P 、M G , W G 、M T , W T 、M S and W S It is stored in the memory of the electronic device and can be obtained at any time.
[0076] Figure 3 is based on Figure 1 A flow chart of a method for determining an image to be detected is shown in FIG. Figure 3 As shown, step 102 may include:
[0077] In step 1021, the focal length of the infrared image acquisition device and the focal length of the visible light image acquisition device are adjusted according to a preset dual-lens focal length comparison table so that the infrared image acquisition device and the visible light image acquisition device have the same field of view.
[0078] For example, when the infrared image and the visible light image are fused, it is first necessary to perform image acquisition through two image acquisition devices. It is understandable that if the fields of view of the two image acquisition devices are different, the captured image content will be misaligned, thereby increasing the difficulty of image fusion. Therefore, before the two images are fused, it is necessary to adjust the fields of view of the infrared image acquisition device and the visible light image acquisition device so that the fields of view of the two are consistent, so as to facilitate image registration in the subsequent image fusion process. Specifically, the target focal length value can be directly set and sent to the two image acquisition devices so that both image acquisition devices are adjusted to the target focal length value. Alternatively, since the infrared detection distance is usually smaller than the visible light detection distance, in step 1021, the infrared image acquisition device can be used as a basis, and the focal length value of the visible light image acquisition device can be determined according to the dual-lens focal length comparison table, and then the focal length of the visible light image acquisition device can be adjusted so that the field of view size is consistent with the field of view size of the infrared image acquisition device.
[0079] In step 1022, image fusion processing is performed on the infrared image collected by the infrared image monitoring device and the visible light image collected by the visible light image collection device to obtain the image to be detected.
[0080] For example, fusion processing refers to multiple information sources obtaining environmental information from the outside, and after preprocessing and reprocessing, through the selection of image fusion schemes, multiple source information can be reasonably utilized, and finally a stable and reliable comprehensive information representation is formed. According to information representation and application, image fusion can usually be divided into decision-level, feature-level and pixel-level image fusion. In the embodiment of the present disclosure, the GTF (Gradient Transfer Fusion) pixel-level image fusion algorithm is used for image fusion.
[0081] For example, the image fusion process includes five steps: image registration, image filtering, image enhancement, image fusion and quality evaluation. Specifically, the image registration step is used to adjust the captured infrared image and visible light image to the same coordinate system. In the embodiment of the present disclosure, the feature matching registration algorithm based on SIFT (Scale-invariant feature transform) feature points can be used to realize the image registration of the infrared image and the visible light image. The image filtering step is used to suppress the image noise in the infrared image and the visible light image to reduce the impact of the image noise on the image quality. In the embodiment of the present disclosure, the infrared image and the visible light image can be image filtered by the median filtering algorithm. In addition, when it is determined according to the above-mentioned environmental sensor that the current monitoring scene is in extreme weather, such as fog, heavy rain or heavy snow, the infrared image and the visible light image can be enhanced by the corresponding image enhancement algorithm to improve the clarity of the image to a certain extent. The quality evaluation step is used to evaluate the quality of the fused image to verify the effectiveness of the fusion. The image quality in the quality evaluation step can be the above-mentioned image histogram.
[0082] By way of example, step 1022 may include: step a, performing image registration on the infrared image and the visible light image through a preset feature matching algorithm so that the infrared image and the visible light image are in the same coordinate system; step b, performing image filtering processing and image enhancement processing on the infrared image and the visible light image, respectively, to obtain a target infrared image and a target visible light image; step c, performing image fusion on the target infrared image and the target visible light image through a preset image fusion algorithm to obtain the fused image; and step d, determining, based on image quality information of the fused image, to use the fused image as the image to be detected.
[0083] By way of example, the above-mentioned feature matching algorithm may be a SIFT feature point matching and registration algorithm, based on which, the step a may include: performing a preprocessing process on the reference image and the image to be registered (the reference image may be one of the infrared image or the visible light image, and the image to be registered is the other); the preprocessing process includes grayscale processing and edge detection; thereafter, performing SIFT feature point detection on the two preprocessed images respectively, and then performing multi-layer screening to determine the correct feature point matching point pairs; finally, the RANSAC (Random Sample Consensus) algorithm is used to obtain the optimal projection transformation matrix, thereby completing the registration of the two images.
[0084] For example, the above-mentioned image fusion algorithm can be a GTF image fusion algorithm. Specifically, the fusion algorithm is aimed at image fusion of outdoor surveillance scenes, and it is necessary to integrate infrared thermal radiation information and visible light image detail information to highlight the targets that are not easily perceived in the fused image. Therefore, the image fusion algorithm is required to retain the characteristics of infrared images and visible light images to the maximum extent. The GTF image fusion algorithm can extract different features from infrared images and visible light images, and transform the image fusion problem into a total variation minimization problem. Among them, the objective function of the GTF image fusion algorithm consists of a data fidelity term and a regularization term. The data fidelity term ensures that the fused image contains the pixel intensity information of the infrared image, and the regularization term ensures that the fused image contains the gradient information of the visible light image.
[0085] By way of example, the above-mentioned step c may include: after performing median filtering processing on the infrared image and the visible light image, performing grayscale GTF image fusion processing on the visible light image and the infrared image to obtain a first fusion result, and performing grayscale GTF image fusion processing on the visible light image and the inverse infrared image to obtain a second fusion result; thereafter, performing wavelet transform fusion processing on the first fused image and the second fused image to obtain a final grayscale fused image as the fused image.
[0086] For example, after executing the above steps a, b and c in sequence, the fused image can be obtained. In step d, the image quality of the fused image can be evaluated according to the image histogram of the fused image (i.e., the above image quality information). If the image quality of the fused image meets the preset image quality condition, the fused image is used as the image to be detected, and the next step of the target detection process is continued; conversely, if the image quality of the fused image meets the preset image quality condition, the currently acquired fused image is re-acquired through the infrared image acquisition device and the visible light image acquisition device. The infrared image and the visible light image are then fused until the acquired fused image meets the above image quality condition.
[0087] Figure 4 is based on Figure 1 A flowchart of an image detection method is shown in FIG. Figure 4 As shown, step 103 may include:
[0088] In step 1031, target detection is performed on the image to be detected using a preset fusion image detection model to obtain a first detection result and a first confidence level corresponding to the first detection result.
[0089] In step 1032, the detection result and the result confidence are determined according to the first detection result, the first confidence and the environmental index.
[0090] For example, in one embodiment of the present disclosure, in step 1032, when the environmental index shows that the current meteorological environment has an impact on both the infrared image and the visible light image, the first detection result can be directly used as the detection result, and the first confidence level can be used as the result confidence level. In another embodiment of the present disclosure, target detection can be completed simultaneously through the three channels of infrared target detection, visible light target detection, and fused image target detection, and then the detection results of the three channels are fused to output the fused detection result and result confidence level.
[0091] By way of example, step 1032 may include: step A, performing target detection on the infrared image through a preset infrared image detection model to obtain a second detection result, and a second confidence corresponding to the second detection result; step B, performing target detection on the visible light image through a preset visible light image detection model to obtain a third detection result, and a third confidence corresponding to the third detection result; step C, determining, based on the environmental index, a first weight corresponding to the first confidence, a second weight corresponding to the second confidence, and a third weight corresponding to the third confidence; step D, determining, based on the first weight, the second weight, and the third weight, a weighted average of the first confidence, the second confidence, and the third confidence; step E, taking any one of the first detection result, the second detection result, and the third detection result as the detection result, and taking the weighted average as the result confidence.
[0092] It should be noted that the first detection result, the second detection result and the third detection result can all be the position information of the target in the image. Under ideal conditions, the position information corresponding to each detection result is the same. However, in the actual implementation process, it is allowed that there is a certain error between the position information corresponding to the three detection results. When the difference between the position information corresponding to the three detection results exceeds the preset error, it is considered that there is an error operation in the acquisition process of the infrared image and the visible light image, or the fused image, and then the detection result generated based on the infrared image, the visible light image or the fused image is ignored. When the difference between the position information corresponding to the three detection results does not exceed the preset error, any one of the first detection result, the second detection result and the third detection result can be used as the detection result, and the weighted average of the confidence of the three detection results is used as the confidence of the result. The weight is a weight determined by collecting and analyzing historical data in the development stage, and is stored in the memory of the electronic device in the form of a priori environmental confidence weight library. The weight is used to characterize the influence of different images on the credibility of the final target detection result under different meteorological environments.
[0093] In summary, the technical solution provided by the embodiments of the present disclosure can determine the environmental index of the detection scene according to the weather monitoring information of the detection scene and the image quality information of the historical image, wherein the historical image is an image collected within a preset time period before the target moment; after the target moment, when the environmental index is in a preset interval, a fused image of the detection scene is obtained as the image to be detected, wherein the fused image is an image obtained by image fusion processing of the infrared image of the detection scene and the visible light image of the detection scene; target detection is performed on the image to be detected to obtain the detection result and the result confidence corresponding to the detection result. The collected images can be fused according to the weather environment of the detection scene, target detection is performed based on the fused image, and the confidence of the detection results of images collected by different image acquisition devices is fused, thereby improving the applicability of target detection to different weather environments, and thus improving the accuracy of target detection.
[0094] Figure 5 is a block diagram of a target detection device according to an exemplary embodiment. Figure 5 As shown, the device 500 applied to the electronic device described in the above application scenario may include:
[0095] An index determination module 510 is used to determine the environment index of the detection scene according to the weather monitoring information of the detection scene and the image quality information of the historical image, where the historical image is an image collected within a preset time period before the target time;
[0096] An image fusion module 520 is used to obtain, after the target time, a fused image of the detection scene as the image to be detected when the environmental index is within a preset range, wherein the fused image is an image obtained by performing image fusion processing on the infrared image of the detection scene and the visible light image of the detection scene;
[0097] The image detection module 530 is used to perform target detection on the image to be detected to obtain a detection result and a result confidence level corresponding to the detection result.
[0098] In summary, the technical solution provided by the embodiments of the present disclosure can determine the environmental index of the detection scene according to the weather monitoring information of the detection scene and the image quality information of the historical image, wherein the historical image is an image collected within a preset time period before the target moment; after the target moment, when the environmental index is in a preset interval, a fused image of the detection scene is obtained as the image to be detected, wherein the fused image is an image obtained by image fusion processing of the infrared image of the detection scene and the visible light image of the detection scene; target detection is performed on the image to be detected to obtain the detection result and the result confidence corresponding to the detection result. The collected images can be fused according to the weather environment of the detection scene, target detection can be performed based on the fused image, and the confidence of the detection results of images collected by different image acquisition devices can be fused to improve the accuracy of target detection.
[0099] Figure 6 is a block diagram of a target detection system according to an exemplary embodiment. Figure 6 As shown, the system 600 includes:
[0100] Environmental sensor 610 is used to collect weather monitoring information of the detection scene.
[0101] The infrared image acquisition device 620 is used to acquire the infrared image of the detection scene.
[0102] The visible light image acquisition device 630 is used to acquire the visible light image of the detection scene.
[0103] At least one focal length sensor 640, used to determine the focal length of the infrared image acquisition device 620 and the focal length of the visible light image acquisition device 630;
[0104] The electronic device 650 includes: a memory having a computer program stored therein;
[0105] A processor is used to execute the user computer program in the memory to achieve the above Figures 1 to 4 The target detection method shown; and
[0106] Communication line 660.
[0107] For example, the at least one focal length sensor 640 is respectively arranged inside the infrared image acquisition device 620 and the visible light image acquisition device 630. The infrared image acquisition device 620 and the visible light image acquisition device 630 are arranged at the same position, and the distance between the position where the environmental sensor 610 is arranged and the positions where the infrared image acquisition device 620 and the visible light image acquisition device 630 are located is less than a preset distance. The environmental sensor 610, the infrared image acquisition device 620 and the visible light image acquisition device 630 are all connected to the electronic device 650 through the above-mentioned communication line 660. The weather monitoring information collected by the environmental sensor 610, the infrared image collected by the infrared image acquisition device 620, and the visible light image collected by the visible light image acquisition device 630 are all transmitted to the electronic device 650 through the communication line 660, so that the electronic device 650 performs the above-mentioned Figures 1 to 4 The steps of the target detection method are shown.
[0108] In summary, the technical solution provided by the embodiments of the present disclosure can determine the environmental index of the detection scene according to the weather monitoring information of the detection scene and the image quality information of the historical image, wherein the historical image is an image collected within a preset time period before the target moment; after the target moment, when the environmental index is in a preset interval, a fused image of the detection scene is obtained as the image to be detected, wherein the fused image is an image obtained by image fusion processing of the infrared image of the detection scene and the visible light image of the detection scene; target detection is performed on the image to be detected to obtain the detection result and the result confidence corresponding to the detection result. The collected images can be fused according to the weather environment of the detection scene, target detection is performed based on the fused image, and the confidence of the detection results of images collected by different image acquisition devices is fused, thereby improving the applicability of target detection to different weather environments, and thus improving the accuracy of target detection.
[0109] Figure 7 is a block diagram of an electronic device according to an exemplary embodiment. Figure 7 As shown, the electronic device 700 provided in the embodiment of the present invention includes a processor 710 and a communication interface 730. The communication interface 730 is coupled to the processor 710.
[0110] like Figure 7As shown, the processor 710 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present invention. The communication interface 730 may be one or more. The communication interface 730 may use any transceiver-like device for communicating with other devices or communication networks.
[0111] like Figure 7 As shown, the electronic device 700 may further include a communication line 740. The communication line 740 may include a path to transmit information between the above components.
[0112] Optional, such as Figure 7 As shown, the electronic device 700 may further include a memory 720. The memory 720 is used to store computer instructions for executing the solution of the present invention, and is controlled to execute by the processor 710. The processor 710 is used to execute the computer instructions stored in the memory 720, thereby implementing the target detection method provided by the embodiment of the present invention.
[0113] like Figure 7 As shown, the memory 720 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 720 may exist independently and be connected to the processor 710 via a communication line 740. The memory 720 may also be integrated with the processor 710.
[0114] Optionally, the computer instructions in the embodiment of the present invention may also be referred to as application program codes, which is not specifically limited in the embodiment of the present invention.
[0115] In a specific implementation, as an example, Figure 7 As shown, the processor 710 may include one or more CPUs, such as Figure 7 CPU0 and CPU1 in.
[0116] In a specific implementation, as an example, Figure 7 As shown, the electronic device 700 may include multiple processors 710, such as Figure 7 The processor 710 and the processor 750 in the embodiment of the present invention are shown in FIG. Each of these processors may be a single-core processor or a multi-core processor.
[0117] Figure 8 FIG. 1 is a block diagram of a chip according to an exemplary embodiment. Figure 8 As shown, the chip 800 includes one or more (including two) processors 810 and a communication interface 820 .
[0118] Optional, such as Figure 8 As shown, the chip 800 also includes a memory 830, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor 810. A portion of the memory may also include a non-volatile random access memory (NVRAM).
[0119] In some embodiments, Figure 8 As shown, the memory 830 stores the following elements, execution modules or data structures, or their subsets, or their extended sets.
[0120] In the embodiment of the present invention, Figure 8 As shown, the processor 810 executes corresponding operations by calling operation instructions stored in the memory (the operation instructions may be stored in the operating system).
[0121] like Figure 8 As shown, the processor 810 controls the processing operations of any electronic device, and the processor 810 may also be referred to as a central processing unit (CPU).
[0122] like Figure 8 As shown, the memory 830 may include a read-only memory and a random access memory, and provide instructions and data to the processor 810. A portion of the memory 830 may also include an NVRAM. For example, in an application, the memory, the communication interface, and the memory are coupled together through a bus system, wherein the bus system may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, in Figure 8Various buses are labeled as bus system 840 .
[0123] The method disclosed in the above embodiment of the present invention can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above target detection method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, a digital signal processor (digital signal processing, DSP), an ASIC, a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above target detection method in combination with its hardware.
[0124] The embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium stores instructions, and when the instructions are executed, the functions executed by the electronic device in the above embodiment are realized.
[0125] In summary, the technical solution provided by the embodiments of the present disclosure can determine the environmental index of the detection scene according to the weather monitoring information of the detection scene and the image quality information of the historical image, wherein the historical image is an image collected within a preset time period before the target moment; after the target moment, when the environmental index is in a preset interval, a fused image of the detection scene is obtained as the image to be detected, wherein the fused image is an image obtained by image fusion processing of the infrared image of the detection scene and the visible light image of the detection scene; target detection is performed on the image to be detected to obtain the detection result and the result confidence corresponding to the detection result. The collected images can be fused according to the weather environment of the detection scene, target detection is performed based on the fused image, and the confidence of the detection results of images collected by different image acquisition devices is fused, thereby improving the applicability of target detection to different weather environments, and thus improving the accuracy of target detection.
[0126] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The above computer program product includes one or more computer programs or instructions. When the above computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present invention is executed in whole or in part. The above computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user device or other programmable device. The above computer program or instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the above computer program or instruction can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The above computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that integrates one or more available media. The above available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a tape; it can also be an optical medium, such as a digital video disc (DVD); it can also be a semiconductor medium, such as a solid state drive (SSD).
[0127] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0128] Although the present invention has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present invention. Accordingly, this specification and the accompanying drawings are merely exemplary illustrations of the present invention as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present invention. Obviously, those skilled in the art may make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A target detection method, characterized in that: The method comprises: (1) Determining an environmental index of the detection scene based on weather monitoring information of the detection scene and image quality information of historical images, including: The weather monitoring information includes multiple types of weather monitoring values, and the historical images are images collected within a preset time period before the target time; Obtaining a conversion matrix corresponding to each type of the weather monitoring value and a weight corresponding to each type of the weather monitoring value, as well as a conversion matrix and a weight corresponding to the image quality information; Determine the environmental index by using a preset environmental index calculation formula, according to a conversion matrix corresponding to each type of weather monitoring value and a weight corresponding to each type of weather monitoring value, and a conversion matrix and a weight corresponding to the image quality information; (2) after the target time, when the environmental index is within a preset range, obtaining a fused image of the detection scene as the image to be detected, wherein the fused image is an image obtained by performing image fusion processing on the infrared image of the detection scene and the visible light image of the detection scene; (3) performing target detection on the image to be detected to obtain a detection result and a result confidence level corresponding to the detection result, including: Performing target detection on the image to be detected by using a preset fusion image detection model to obtain a first detection result and a first confidence level corresponding to the first detection result; The detection result and the result confidence are determined according to the first detection result, the first confidence level and the environmental index, specifically: target detection is performed on the infrared image through a preset infrared image detection model to obtain a second detection result and a second confidence level corresponding to the second detection result; target detection is performed on the visible light image through a preset visible light image detection model to obtain a third detection result and a third confidence level corresponding to the third detection result; according to the environmental index, a first weight corresponding to the first confidence level, a second weight corresponding to the second confidence level and a third weight corresponding to the third confidence level are determined; according to the first weight, the second weight and the third weight, a weighted average of the first confidence level, the second confidence level and the third confidence level is determined; any one of the first detection result, the second detection result and the third detection result is used as the detection result, and the weighted average is used as the result confidence level.
2. The method according to claim 1, characterized in that The method of obtaining a fused image of the detection scene as the image to be detected includes: adjusting the focal length of the infrared image acquisition device and the focal length of the visible light image acquisition device according to a preset dual-lens focal length comparison table so that the infrared image acquisition device and the visible light image acquisition device have the same field of view; and performing image fusion processing on the infrared image acquired by the infrared image acquisition device and the visible light image acquired by the visible light image acquisition device to obtain the image to be detected.
3. The method according to claim 2, characterized in that The image fusion processing of the infrared image collected by the infrared image monitoring device and the visible light image collected by the visible light image collection device to obtain the image to be detected includes: performing image registration on the infrared image and the visible light image through a preset feature matching algorithm to make the infrared image and the visible light image be in the same coordinate system; performing image filtering processing and image enhancement processing on the infrared image and the visible light image respectively to obtain a target infrared image and a target visible light image; performing image fusion on the target infrared image and the target visible light image through a preset image fusion algorithm to obtain the fused image; and determining to use the fused image as the image to be detected based on image quality information of the fused image.
4. A target detection device, characterized in that: The device comprises: An index determination module, used to determine the environmental index of the detection scene according to the weather monitoring information of the detection scene and the image quality information of the historical image, includes: The weather monitoring information includes multiple types of weather monitoring values, and the historical images are images collected within a preset time period before the target time; Obtaining a conversion matrix corresponding to each type of the weather monitoring value and a weight corresponding to each type of the weather monitoring value, as well as a conversion matrix and a weight corresponding to the image quality information; determining the environmental index according to a preset environmental index calculation formula, the conversion matrix corresponding to each type of the weather monitoring value and a weight corresponding to each type of the weather monitoring value, as well as a conversion matrix and a weight corresponding to the image quality information; An image fusion module, used for obtaining, after the target time, when the environmental index is within a preset range, a fused image of the detection scene as the image to be detected, wherein the fused image is an image obtained by performing image fusion processing on the infrared image of the detection scene and the visible light image of the detection scene; An image detection module is used to perform target detection on the image to be detected to obtain a detection result and a result confidence level corresponding to the detection result, including: Performing target detection on the image to be detected by using a preset fusion image detection model to obtain a first detection result and a first confidence level corresponding to the first detection result; The detection result and the result confidence are determined according to the first detection result, the first confidence level and the environmental index, specifically: target detection is performed on the infrared image through a preset infrared image detection model to obtain a second detection result and a second confidence level corresponding to the second detection result; target detection is performed on the visible light image through a preset visible light image detection model to obtain a third detection result and a third confidence level corresponding to the third detection result; according to the environmental index, a first weight corresponding to the first confidence level, a second weight corresponding to the second confidence level and a third weight corresponding to the third confidence level are determined; according to the first weight, the second weight and the third weight, a weighted average of the first confidence level, the second confidence level and the third confidence level is determined; any one of the first detection result, the second detection result and the third detection result is used as the detection result, and the weighted average is used as the result confidence level.
5. A computer storage medium, characterized in that: The computer storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 3 is executed.
6. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 3.
7. A target detection system, characterized in that: include: An environmental sensor for collecting weather monitoring information of a detection scene; an infrared image acquisition device for collecting infrared images of the detection scene; A visible light image acquisition device, used to acquire a visible light image of the detection scene; a focal length sensor, used to determine the focal length of the infrared image acquisition device and the focal length of the visible light image acquisition device; and the electronic device described in claim 6.
Citation Information
Patent Citations
Face recognition method and device
CN109117725A
Target identification method and device, computer equipment and storage medium
CN110111581A
