A scene safety detection method
By adjusting the target attributes based on the distance between the target and the supplementary lighting device, the imaging of the target under the supplementary lighting device is optimized, which solves the problem of uneven brightness in the target image and improves the accuracy of scene safety detection.
Patent Information
- Application Number
- CN202511746402.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-11-26
AI Technical Summary
In existing scene security detection solutions, uneven imaging brightness of target images leads to low detection accuracy, especially in different target scenes or multiple target situations, where nearby targets are overexposed while distant targets are underexposed.
Based on the arrangement distance between the target and the supplementary lighting equipment, the target attributes are determined, and the targets are arranged at the designated locations according to the target attributes. The target attribute configuration is optimized using deep learning algorithms and relational databases to ensure that the imaging quality of each target is uniform under the illumination of the supplementary lighting equipment.
The image quality of the target image has been improved, thereby increasing the accuracy of scene security detection and meeting the needs of high-frequency real-time detection.
Smart Images

Figure CN121190492B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method for scene security detection. Background Technology
[0002] For high-risk scenarios prone to landslides or collapses, such as reservoir dams, landslides, bridges, and tunnels, a non-contact detection solution is currently used for scenario safety detection. This solution involves placing targets in the target scenario, determining the images of the placed targets, and then using image analysis technology to capture the displacement changes of the targets in real time, thereby achieving all-weather automated detection of structural deformation and displacement in the scenario.
[0003] However, the accuracy of the current scene security detection solutions is low, which urgently needs to be addressed. Summary of the Invention
[0004] This invention provides a scene security detection method to improve the accuracy of scene security detection.
[0005] According to one aspect of the present invention, a scene safety detection method is provided, which may include: for at least one target to be placed in a target scene, obtaining the placement distance corresponding to each of the at least one target, wherein the placement distance is the distance between the placement position of the target to be placed and the supplementary lighting device used to illuminate the at least one target; for each target, determining the target attribute of the target based on the placement distance of the target, so as to place the target at the placement position according to the target attribute; determining a first target image of each placed target under the illumination of the supplementary lighting device, and performing safety detection on the target scene based on the first target image.
[0006] The technical solution of this invention determines the target attributes based on the arrangement distance, and then arranges the target according to the target attributes. This makes each arranged target suitable for determining the first target image under the illumination of the supplementary lighting device, thereby improving the image quality of the determined first target image and thus improving the accuracy of scene security detection.
[0007] It should be understood that the description in this section is not intended to identify key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a flowchart of a scene security detection method provided according to an embodiment of the present invention.
[0010] Figure 2 This is a flowchart of another scenario security detection method provided according to an embodiment of the present invention.
[0011] Figure 3 This is a flowchart of another scenario security detection method provided by an embodiment of the present invention.
[0012] Figure 4 This is a flowchart of another scenario security detection method provided according to an embodiment of the present invention.
[0013] Figure 5 This is a structural block diagram of a scene safety detection device provided according to an embodiment of the present invention.
[0014] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the scene security detection method of this invention. Detailed Implementation
[0015] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0016] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The same applies to "target," "original," etc., and will not be repeated here. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0017] Before introducing the embodiments of the present invention, we will first provide an exemplary explanation of the reasons why the current solutions for scene security detection have low accuracy, so as to better understand why the solution proposed in the embodiments of the present invention can improve the accuracy of scene security detection.
[0018] For example, in large-scale target scenarios such as reservoir dams, landslides, bridges, and tunnels, supplementary lighting equipment such as supplementary lights is usually required to illuminate targets within a long depth of field to meet all-weather detection needs. However, in different target scenarios, or when there are multiple targets, the distance between different targets and supplementary lighting equipment varies. Targets closer to the target are prone to overexposure due to excessive light, while targets further away may be underexposure due to insufficient light. This results in uneven brightness in the target images, affecting the image quality of the target images and consequently the accuracy of target scene security detection.
[0019] To address this, embodiments of the present invention determine target attributes based on the arrangement distance, and then arrange target targets according to these attributes. This allows each arranged target target to be suitable for determining the first target image under the illumination of the supplementary lighting device, thereby improving the image quality of the determined first target image and thus enhancing the accuracy of scene security detection. This will be explained in detail below.
[0020] Figure 1 This is a flowchart of a scene security detection method provided in an embodiment of the present invention. This embodiment is applicable to scene security detection scenarios. The method can be executed by the scene security detection device provided in this embodiment of the present invention. This device can be implemented by software and / or hardware, and can be integrated into an electronic device, which can be various user terminals or servers.
[0021] See Figure 1The method of this invention specifically includes the following steps:
[0022] S110. For at least one target to be placed in the target scene, obtain the placement distance corresponding to each of the at least one target, wherein the placement distance is the distance between the placement position of the target to be placed and the supplementary lighting device used to illuminate the at least one target.
[0023] The target scenario can be understood as the scenario in which safety testing is required; the target scenario can be various engineering scenarios such as dams, bridges, landslides and / or tunnels.
[0024] The target can be understood as the object being detected in the target scene for security detection. In other words, security detection of the target scene is achieved by detecting whether the target has changed.
[0025] The arrangement distance can be understood as the distance between the arrangement position of the target to be arranged and the supplementary lighting device used to illuminate at least one target; the arrangement distance can be determined based on the arrangement position and the supplementary lighting position of the supplementary lighting device.
[0026] The placement location can be understood as the location of the target corresponding to the requirement; the placement location can be, for example, pre-set, or determined according to the scene type of the target scene, etc.
[0027] A supplemental lighting device can be understood as a device used to illuminate the area where each target is located in order to supplement the light in that area.
[0028] In this embodiment of the invention, the arrangement distances corresponding to at least one target can be obtained for each target.
[0029] S120. For each target, determine the target attribute based on the target's placement distance, and place the target at the placement location according to the target attribute.
[0030] Among them, target attributes can be understood as the attributes of the target; target attributes may include at least one of the following: reflectivity, transmittance, target angle, target height, and target material (which can be represented in the form of material code).
[0031] It is understandable that, under far-field conditions, light-emitting diode (LED) light sources (with lenses or diffusers) and other supplementary lighting devices still approximately follow the illuminance attenuation model of point light sources (the illuminance attenuation model caused by the inverse square law of material optical properties compensating for this). That is, the illuminance (in lux) on the illuminated surface is inversely proportional to the square of the distance. This physical characteristic leads to the following contradiction when using a single supplementary lighting device: for nearby targets, due to their proximity to the supplementary lighting device, the received light is strong, and the corresponding image is easily overexposed; for distant targets, due to their distance from the supplementary lighting device, the received light is weak, and the corresponding image is easily underexposed. To fundamentally solve this problem, in this embodiment of the invention, for each target, the target attributes can be determined according to the target's arrangement distance to automatically and accurately match the target attributes with the arrangement distance, and to differentiate the target attributes of targets at different arrangement distances. This allows for the use of different target attributes to compensate for the uneven illuminance of different targets by the supplementary lighting device. For example, for each target, a test distance corresponding to the target's deployment distance can be determined from at least one test distance, and the test attribute corresponding to that test distance can be used as the target attribute of the target.
[0032] In this embodiment of the invention, a standardized scene safety detection scheme and target attribute selection report, including the target attributes, installation parameters, expected brightness score of the first target image, and theoretical basis of the target attributes, can also be determined based on the deployment distance of the target.
[0033] In this embodiment of the invention, for each target, the hardware model (including at least one of the target camera model, the target camera lens model, and the supplementary lighting device model) can be determined according to the arrangement distance of the target target, so as to determine the first target image of each arranged target target that meets the hardware model and is illuminated by the supplementary lighting device.
[0034] In this embodiment of the invention, the target can be placed at the placement location according to the target attributes.
[0035] S130. Determine the first target image of each deployed target under the illumination of the supplementary lighting equipment, and perform security detection on the target scene based on the first target image.
[0036] The first target image can be understood as the image corresponding to each of the deployed target objects under the illumination of the supplementary lighting equipment.
[0037] In this embodiment of the invention, a first target image can be determined. For example, images of each deployed target under illumination by a supplementary lighting device can be acquired to obtain the first target image.
[0038] In this embodiment of the invention, security detection of the target scene can be performed based on the first target image. For example, computer vision technology can be used to perform security detection of the target scene based on the first target image.
[0039] The solution of this invention establishes a complete quantitative decision-making chain from acquiring data such as deployment distance to conducting security detection of the target scene, forming a standardized scene security detection solution that is replicable and scalable. This solution has been experimentally verified and can be directly applied to engineering practice. Furthermore, the solution of this invention, especially when there are multiple target objects and the first target image is determined under a single supplementary lighting condition (e.g., only one supplementary lighting device), allows each deployed target object to be used to determine the first target image under the illumination of the supplementary lighting device, eliminating the need for separate exposure of each target object to determine the first target image. This can meet the requirements of high-frequency detection scenarios with high real-time requirements.
[0040] The technical solution of this invention involves obtaining the deployment distances corresponding to at least one target target to be deployed in a target scene. The deployment distance is the distance between the deployment position of the target target and the supplementary lighting device used to illuminate the target target. For each target target, the target attribute is determined based on the deployment distance. The target target is then deployed at the designated position according to the target attribute, facilitating security detection of the target scene using the deployed target targets. A first target image of each deployed target target under the illumination of the supplementary lighting device is determined, and security detection of the target scene is performed based on the first target image, thereby achieving security detection of the target scene. This technical solution, by determining the target attribute based on the deployment distance and then deploying the target targets according to the target attribute, makes each deployed target target suitable for determining the first target image under the illumination of the supplementary lighting device, thereby improving the image quality of the determined first target image and thus improving the accuracy of scene security detection.
[0041] An optional technical solution, a scene security detection method, further includes: acquiring scene factors, wherein the scene factors include at least one of the terrain, scene type, seasonal characteristics, and time characteristics of the target scene; determining the target attributes of the target based on the deployment distance of the target, including: determining the target attributes of the target based on the scene factors and the deployment distance of the target.
[0042] Scene factors can be understood as factors related to the target scene; scene factors may include at least one of the target scene's terrain, scene type, seasonal characteristics, and time characteristics.
[0043] Terrain can be understood as the terrain of the target scene; terrain may include typical terrains such as open fields, valleys, forests and / or the area around water bodies.
[0044] Scene type can be understood as the type of target scene; scene type can include various engineering scene types such as dam, bridge, landslide and / or tunnel.
[0045] Seasonal features can be understood as seasonal characteristics of the target scene; for example, seasonal features may include the vegetation cover changes of the target scene in different seasons.
[0046] Temporal features can be understood as time-related features of the target scene; for example, temporal features may include the difference in solar altitude angle of the target scene at different times.
[0047] In this embodiment of the invention, a scene safety detection model can be used to determine target attributes based on scene factors and deployment distance. For example, the scene safety detection model can be a model obtained through deep learning algorithms, which can take scene factors and deployment distance as input and output target attributes.
[0048] In this embodiment of the invention, a relational database can be used to determine target attributes based on scene factors and deployment distance. For example, a relational database of test distance, scene factors, and test attributes can be constructed. Based on scene factors and deployment distance, the relational database can be searched to obtain target attributes, thereby achieving intelligent configuration and recommendation of target attributes integrated with the relational database.
[0049] In this embodiment of the invention, the target attributes of the target can also be determined based on at least one of the target model, hardware model, scene factors, and deployment distance. For example, the target attributes can be determined using a scene security detection model and a relational database based on the target model, hardware model, scene factors, and deployment distance.
[0050] In this embodiment of the invention, scene factors can be acquired, and then the target attributes of the target can be determined based on the scene factors and the arrangement distance of the target, thereby determining more accurate target attributes.
[0051] Figure 2 This is a flowchart of another scene security detection method provided in this embodiment of the invention. This embodiment is based on and optimized from the above-described technical solutions. In this embodiment, optionally, determining the target attributes of the target based on the deployment distance of the target includes: using a scene security detection model to determine the target attributes of the target based on the deployment distance of the target. The explanations of terms that are the same as or corresponding to those in the above embodiments will not be repeated here.
[0052] See Figure 2 The method in this embodiment may specifically include the following steps:
[0053] S210. For at least one target to be placed in the target scene, obtain the placement distance corresponding to each of the at least one target, wherein the placement distance is the distance between the placement position of the target to be placed and the supplementary lighting device used to illuminate the at least one target.
[0054] S220. For each target, use the scene safety detection model to determine the target attributes based on the target's deployment distance, and deploy the target at the deployment location according to the target attributes.
[0055] The scene security detection model can be understood as a model used to perform security detection on the target scene.
[0056] In this embodiment of the invention, the scene safety detection model can be obtained through deep learning algorithms; the scene safety detection model can also be obtained through data modeling and data fitting. For example, a large amount of paired data between test distance d and test attribute R can be input, and a regression algorithm (such as multinomial regression or exponential fitting) can be used to fit the discrete data points in the paired data to establish a continuous functional relationship model R=f(d), thereby obtaining a mathematical model that can calculate the theoretically optimal test attribute under any test distance as the scene safety detection model.
[0057] In this embodiment of the invention, the fitted scene safety detection model, historical deployment distance and test attribute determination records, as well as the characteristics of the supplementary lighting equipment, can be integrated to form a system knowledge base. By integrating the system knowledge base, more accurate target attributes can be determined based on the deployment distance of the target.
[0058] S230. Determine the first target image of each deployed target under the illumination of the supplementary lighting equipment, and perform security detection on the target scene based on the first target image.
[0059] The technical solution of this invention utilizes a scene security detection model to determine the target attributes based on the target's deployment distance. This technical solution, by determining the target attributes through a scene security detection model, can improve the accuracy of the determined target attributes.
[0060] An optional technical solution involves obtaining a scene safety detection model through the following steps: acquiring at least one test distance, and for each test distance, determining the test position corresponding to the test distance based on the supplementary lighting position of the supplementary lighting device, and arranging at least one test target corresponding to each alternative attribute at the test position; testing the brightness of each test target arranged at the test position under the illumination of the supplementary lighting device, and determining the test attribute corresponding to the test distance from at least one alternative attribute based on the brightness test results corresponding to each test target; and determining the scene safety detection model based on the test attributes corresponding to at least one test distance.
[0061] The test distance can be understood as the distance at which the brightness of the test target needs to be tested.
[0062] The location of supplementary lighting can be understood as the position where supplementary lighting equipment is placed.
[0063] The test location can be understood as the position where the target to be tested is placed, or it can be understood as the position where the distance between the target and the supplementary lighting equipment is the maximum test distance.
[0064] Alternative attributes can be understood as attributes that are alternatives to be tested; alternative attributes may include at least one of the following: reflectivity, transmittance, target angle, target height, and target material (which may be represented in the form of a material code).
[0065] A test target can be understood as a target that needs to be placed at the test location for brightness testing.
[0066] In this embodiment of the invention, at least one test distance can be acquired.
[0067] In this embodiment of the invention, for each test distance, a test position corresponding to the test distance can be determined based on the supplementary lighting position, so that at least one test target corresponding to each alternative attribute can be placed at the test position. For example, for each test distance, the distance between the test distance and the supplementary lighting position can be determined as the test position for the test distance, so that at least one test target corresponding to each alternative attribute can be placed at the test position.
[0068] In this embodiment of the invention, at least one test target corresponding to each alternative attribute (e.g., reflectivity) can be prepared in advance, so that at least one test target corresponding to each alternative attribute can be arranged at the test location, thereby helping to establish a scene safety detection model corresponding to the working distance and the test attribute (e.g., optimal reflectivity).
[0069] In this embodiment of the invention, the brightness of each test target positioned at the test location under the illumination of a supplementary lighting device can be tested. For example, the brightness of each test target positioned at the test location under the illumination of a supplementary lighting device can be tested according to the method for determining brightness scores in this embodiment of the invention (for example, for each test target, an image of the positioned test target under the illumination of the supplementary lighting device can be acquired to obtain a fourth target image, and the test area in the fourth target image can be determined; according to the test pattern of the test target, a test grayscale mask with a preset test mask ratio can be determined, and the test area can be masked according to the test grayscale mask to obtain a test mask area; the test grayscale histogram of the test mask area can be determined, and the test score of the test area can be determined according to the test grayscale histogram and the preset test mask ratio). The obtained test scores (i.e., brightness scores) corresponding to each test target are used as the brightness test results of the corresponding test target.
[0070] In this embodiment of the invention, the brightness of each test target placed at the test position under the illumination of the supplementary lighting device can be tested under fixed camera parameters, supplementary lighting intensity, supplementary lighting angle and dark environment (isolation of external light interference).
[0071] In this embodiment of the invention, a test attribute can be determined from at least one candidate attribute based on the brightness test results corresponding to each test target. This test attribute is the most suitable attribute for the corresponding test distance, ensuring that the target imaging brightness for each test distance falls within the required range under the corresponding test attribute. For example, the candidate attribute with the highest test score for the corresponding test target among at least one candidate attribute can be used as the test attribute.
[0072] In this embodiment of the invention, at least one test distance and the test attributes corresponding to at least one test distance can also be directly stored in a relational database or relational data table, so as to use the relational database or relational data table to determine the target attributes of the target based on the arrangement distance of the target.
[0073] For example, at least one target material with different transmittance (transparent film) or different reflectance (reflective material) can be pre-selected. For each target material, a test target with gradient reflection characteristics is prepared according to the target material. The prepared test targets are labeled (T1, T2, T3, ...), and the transmittance, reflectance, or target material corresponding to each test target is the corresponding candidate attribute. All test targets are subjected to uniform edge sealing treatment to ensure their mechanical structure and prevent foreign object intrusion. The protection (IP) level meets the environmental requirements of the target scene; at least one test distance is obtained, and for each test distance, the test position is determined according to the supplementary lighting position, so as to place test targets (T1, T2, T3, ...) at the test position; images of each placed test target under the illumination of the supplementary lighting device are acquired to obtain the fifth target image; a deep learning target detection algorithm is used to locate at least one detection box (corresponding to the region of interest mentioned later) in the fifth target image, and each detection box corresponds to the area where a test target is located; the image corresponding to each detection box is used as the sixth target image of the corresponding test target; for each test target, the brightness of the test target is tested according to the corresponding sixth target image to obtain the test score of the test target; from at least one test target, the candidate attribute corresponding to the test target with the highest test score is determined as the test attribute corresponding to the test distance; the test attributes and test scores corresponding to at least one test distance can be recorded respectively, and the scene security detection model can be determined according to the test attributes corresponding to at least one test distance respectively. Specifically, considering the test attributes and corresponding test scores for at least one test distance, for closer test distances, the corresponding test attribute is a target material with low reflectivity to suppress overexposure; for farther test distances, the test attribute is a target material with high reflectivity to improve signal strength.
[0074] In this embodiment of the invention, at least one test distance is acquired, and for each test distance, a test position corresponding to the test distance is determined based on the supplementary lighting position. At the test position, at least one test target corresponding to each of the alternative attributes is placed. The brightness of each test target placed at the test position under the illumination of the supplementary lighting device is tested, and based on the brightness test results corresponding to each test target, a test attribute corresponding to the test distance is determined from at least one alternative attribute. Based on the test attributes corresponding to at least one test distance, a scene safety detection model is determined. This technical solution, by determining the test attributes corresponding to at least one test distance to determine the scene safety detection model, can improve the accuracy of the determined scene safety detection model.
[0075] Figure 3This is a flowchart of another scene security detection method provided in this embodiment of the invention. This embodiment is based on and optimized from the above-mentioned technical solutions. In this embodiment, optionally, determining the first target image of each deployed target under the illumination of the supplementary lighting device includes: acquiring images of each deployed target under the illumination of the supplementary lighting device using a target camera with camera parameters, thereby obtaining the first target image. The explanations of terms that are the same as or corresponding to those in the above embodiments will not be repeated here.
[0076] See Figure 3 The method in this embodiment may specifically include the following steps:
[0077] S310. For at least one target to be placed in the target scene, obtain the placement distance corresponding to each of the at least one target, wherein the placement distance is the distance between the placement position of the target to be placed and the supplementary lighting device used to illuminate the at least one target.
[0078] S320. For each target, determine the target attribute based on the target's deployment distance, and deploy the target at the deployment location according to the target attribute.
[0079] S330: Based on the target camera with the camera parameters, acquire images of each deployed target under the illumination of the supplementary lighting equipment to obtain the first target image, and perform security detection on the target scene based on the first target image.
[0080] Here, camera parameters can be understood as the parameters of the target camera; camera parameters may include at least one of exposure time, black level, sharpness and contrast; camera parameters may be preset, set according to actual needs, or obtained through calibration, etc.
[0081] A target camera can be understood as a camera used to acquire images of various deployed target objects under illumination by supplementary lighting equipment.
[0082] In this embodiment of the invention, the target camera can acquire images of each deployed target under the illumination of the supplementary lighting device according to the target camera parameters, and obtain the first target image.
[0083] The technical solution of this invention involves acquiring images of each deployed target under illumination by a supplementary lighting device, based on the target camera's camera parameters, to obtain a first target image. This technical solution enables the acquisition and determination of the first target image.
[0084] An optional technical solution, a scene safety detection method, further includes: obtaining camera distances corresponding to at least one target, wherein the camera distance is the distance between the placement position of the target to be deployed and the target camera; determining the target attributes of the target based on the placement distance of the target, including: determining the target attributes of the target based on the placement distance of the target and the camera distance.
[0085] Here, camera distance can be understood as the distance between the corresponding target placement position and the target camera.
[0086] In this embodiment of the invention, considering that camera distance also affects the quality of the acquired second target image, the camera distance corresponding to at least one target can be obtained, and the target attributes of the target can be determined based on the target placement distance and the camera distance, so as to improve the accuracy of the determined target attributes.
[0087] Figure 4 This is a flowchart of another scene security detection method provided in this embodiment of the invention. This embodiment is based on and optimized from the above-mentioned technical solutions. In this embodiment, optionally, the camera parameters are obtained through the following steps: initializing the camera parameters; determining the farthest distance in the target scene, and determining the farthest position corresponding to the farthest distance according to the supplementary lighting position of the supplementary lighting device, so as to place the farthest target at the farthest position; according to the target camera under the camera parameters, acquiring an image of the placed farthest target under the illumination of the supplementary lighting device to obtain a second target image, and adjusting the camera parameters according to the second target image to obtain the camera parameters. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.
[0088] See Figure 4 The method in this embodiment may specifically include the following steps:
[0089] S410, Initialize camera parameters.
[0090] S420. Determine the farthest distance in the target scene. Based on the position of the supplementary lighting device, determine the farthest position corresponding to the farthest distance, so as to place the farthest target at the farthest position.
[0091] The farthest distance can be understood as the largest distance among the arrangement distances corresponding to at least one target, or it can be understood as the distance between the farthest arrangement position of the target in the target scene and the supplementary lighting device.
[0092] The farthest position can be understood as the location where the target is placed furthest away from the lighting equipment, or it can be understood as the location where the distance to the lighting equipment is the furthest.
[0093] The furthest target can be understood as the target that needs to be placed at the furthest position.
[0094] In this embodiment of the invention, the farthest distance can be determined. For example, the largest distance among the arrangement distances corresponding to at least one target can be taken as the farthest distance; another example is that the distance between the farthest arrangement position of the target in the target scene that is farthest from the supplementary lighting device and the supplementary lighting device can be taken as the farthest distance.
[0095] In this embodiment of the invention, the farthest position can be determined based on the supplementary lighting position, so that the farthest target can be placed at the farthest position. For example, the farthest position can be determined as the distance between the supplementary lighting position and the farthest distance, so that the farthest target can be placed at the farthest position.
[0096] S430: Based on the target camera with the camera parameters, acquire an image of the furthest target that has been deployed under the illumination of the supplementary lighting equipment to obtain a second target image, and adjust the camera parameters based on the second target image to obtain the camera parameters.
[0097] The second target image can be understood as an image obtained by the target camera under the illumination of the supplementary lighting equipment, based on the camera parameters, of the furthest target that has been deployed.
[0098] In this embodiment of the invention, the target camera can acquire an image of the furthest target that has been deployed under the illumination of the supplementary lighting device, based on the target camera with camera parameters, to obtain a second target image.
[0099] In this embodiment of the invention, initial targets can be placed at each of the placement positions corresponding to at least one target (the target attributes of each initial target can be the same); according to the target camera under the camera parameters, images of each of the placed initial targets under the illumination of the supplementary lighting device are acquired to obtain a third target image; a deep learning target detection algorithm is used to locate at least one region of interest (ROI) in the third target image, and each ROI corresponds to the region where an initial target is located; according to the size information and region location information (related information about the position of the ROI in the third target image) corresponding to at least one ROI, the ROI corresponding to the farthest target is automatically identified from at least one ROI (it can be the image corresponding to the farthest and smallest ROI in at least one ROI), and the image corresponding to the ROI of the farthest target is used as the second target image.
[0100] In this embodiment of the invention, considering that the farthest target is most affected by the attenuation of the supplementary lighting, the second target image corresponding to the farthest target can be used as the bottleneck factor for adjusting camera parameters. That is, the camera parameters are adjusted based on the second target image to obtain the camera parameters. For example, a brightness scoring algorithm can be used to quantitatively evaluate the second target image and obtain a brightness score. Based on the brightness score, an intelligent closed-loop control algorithm (such as binary search or proportional-integral-differential (PID) controller) is introduced to adjust the camera parameters so that the adjusted camera parameters can make the brightness score approach 1 (that is, the second target image is in the optimal exposure state) to obtain the camera parameters. Alternatively, a fixed gain (Gain=0) strategy can be used to adjust the camera parameters based on the second target image to obtain the camera parameters.
[0101] In this embodiment of the invention, at least one of the supplementary light intensity and supplementary light angle of the supplementary light device can be adjusted according to the second target image. By coordinating the adjustment of camera parameters and dynamically adjusting at least one of the supplementary light intensity and supplementary light angle, it can be ensured that the target camera under the camera parameters can acquire images of each deployed target under the illumination of the supplementary light device, and the obtained first target image has a high signal-to-noise ratio, thereby improving the accuracy of scene security detection.
[0102] S440. For at least one target to be placed in the target scene, obtain the placement distance corresponding to each of the at least one target, wherein the placement distance is the distance between the placement position of the target to be placed and the supplementary lighting device used to illuminate the at least one target.
[0103] S450. For each target, determine the target attribute based on the target's deployment distance, and deploy the target at the deployment location according to the target attribute.
[0104] Understandably, even if camera parameters are adjusted based on the furthest target, targets at other deployment distances may still be overexposed under illumination. Therefore, it is necessary to determine individual target attributes for targets at different deployment distances, forming a scene safety detection approach that prioritizes camera parameter adjustment combined with differentiated target attribute compensation. This allows for simultaneous optimization of targets at different deployment distances, ensuring that the imaging brightness of all targets is within the ideal recognition range, and providing stable and reliable image quality assurance to improve the accuracy of scene safety detection.
[0105] S460. Based on the target camera with the camera parameters, acquire images of each deployed target under the illumination of the supplementary lighting equipment to obtain the first target image, and perform security detection on the target scene based on the first target image.
[0106] The technical solution of this invention initializes camera parameters; determines the farthest distance in the target scene, and determines the farthest position corresponding to the farthest distance based on the supplementary lighting position of the supplementary lighting device, so as to place the farthest target at the farthest position; according to the target camera under the camera parameters, the image of the placed farthest target under the illumination of the supplementary lighting device is acquired to obtain a second target image, and the camera parameters are adjusted according to the second target image to obtain the final camera parameters. This technical solution can achieve automatic and intelligent determination of camera parameters applicable to image acquisition of various target targets, thereby improving the imaging quality of the obtained first target image, stabilizing the acquisition effect of the first target image, and further improving the accuracy of scene security detection.
[0107] An optional technical solution involves adjusting camera parameters based on a second target image, including: determining a target region in the second target image; determining a grayscale mask with a preset mask ratio based on the target pattern of the farthest target, and performing masking processing on the target region based on the grayscale mask to obtain a masked region; determining a grayscale histogram of the masked region, and determining a brightness score of the target region based on the grayscale histogram and the preset mask ratio; and adjusting camera parameters if the brightness score is less than a preset score threshold.
[0108] The target region can be understood as the region corresponding to the farthest target in the second target image.
[0109] In this embodiment of the invention, a target region can be determined. For example, target recognition can be performed on a second target image to determine the target region.
[0110] The target pattern can be understood as the pattern of the farthest target.
[0111] The preset mask ratio can be understood as the preset grayscale ratio that the mask area is required to achieve.
[0112] A grayscale mask can be understood as a mask used to mask the target area.
[0113] In this embodiment of the invention, a grayscale mask with a preset mask ratio can be determined based on the target pattern. Taking a white background with a black circle as an example, the first geometric parameters (center coordinates (x, y) and radius r, etc.) of the central black circle (black pattern) in the target pattern can be located using a circle fitting algorithm. The second geometric parameters of the target pattern or white pattern can also be determined (e.g., in the case of a rectangle, determining the length a and width b of the outer contour of the rectangular target pattern or the outer contour of the rectangular white pattern). Based on the first geometric parameters, the second geometric parameters, and the design of the target pattern (white background with a black circle), the area formula of a circle is used... and the formula for the area of a rectangle Using geometric calculation formulas, the area ratio between the white and black patterns is calculated; a preset mask ratio (e.g., 1:1) is set, and a grayscale mask is determined based on the area ratio. The target pattern is masked using this grayscale mask (e.g., the center of a circular grayscale mask is made to coincide with the center of the black pattern). This ensures that the area ratio between the masked black pattern and the masked white pattern in the resulting masked pattern satisfies the preset mask ratio.
[0114] The masked area can be understood as the target area obtained after masking the target area based on the grayscale mask.
[0115] In this embodiment of the invention, the target area can be masked according to the grayscale mask to obtain the masked area.
[0116] A grayscale histogram can be understood as a grayscale histogram of the mask area.
[0117] In this embodiment of the invention, the grayscale histogram can be determined.
[0118] Brightness score can be understood as a rating of the brightness of the target area; the brightness score can be greater than or equal to 0, and less than or equal to 1. It's important to note that a higher brightness score does not necessarily mean a higher target area brightness. Rather, a higher brightness score indicates more even brightness across the target area. For example, if the target area is overexposed or underexposed, the brightness score will be lower, meaning the score tends to be closer to 1, indicating higher image quality in the target area. Moderate brightness and clear contrast indicate that the illumination from the lighting device is more uniform for the furthest target. Conversely, a brightness score closer to 0 indicates overexposure, underexposure, or uneven illumination in the target area.
[0119] In this embodiment of the invention, a brightness score can be determined based on the grayscale histogram and a preset mask ratio to establish a standardized and quantifiable brightness score standard to replace subjective human judgment. This achieves objective quantification of brightness balance, standardized calculation of contrast rationality, and precise measurement of dynamic range, eliminating subjective judgment errors in brightness scoring. For example, when the preset mask ratio is 1:1, a peak detection algorithm can be used to identify two main peaks in the grayscale histogram, where these two main peaks correspond to the typical grayscale values of the black and white patterns behind the mask in the masked area, respectively. The grayscale distance between the two main peaks is calculated and normalized to obtain a contrast score S1 (a higher contrast score indicates higher contrast in the masked area). The height ratio S2 of the two main peaks is calculated (it reflects the brightness balance of the black and white patterns behind the mask; the closer it is to 1, the closer the intensity of the two peaks, and the more balanced the illumination of the supplementary lighting device is compared to the farthest target). Through a weighted fusion algorithm, using the formula... Calculate the luminance score source, where α represents the weight of the contrast score.
[0120] The preset scoring threshold can be understood as a scoring threshold that the brightness scoring requirement is less than when the camera parameters are adjusted.
[0121] In this embodiment of the invention, when the brightness score is less than a preset score threshold, the camera parameters are adjusted. For example, when the brightness score is less than the preset score threshold, the camera parameters can be adjusted with the goal of making the brightness score approach 1, so as to adjust the supplementary lighting and exposure of the farthest target, thereby obtaining the system's baseline camera parameters.
[0122] In this embodiment of the invention, the current camera parameters can be obtained directly if the brightness score is greater than or equal to a preset score threshold.
[0123] In this embodiment of the invention, the target area is masked by a grayscale mask to obtain a masked area, then a grayscale histogram is determined, and a brightness score is determined based on the grayscale histogram and a preset mask ratio. Finally, if the brightness score is less than a preset score threshold, the camera parameters are adjusted to obtain camera parameters that are more suitable for image acquisition in the target scene.
[0124] Based on the above solution, another optional technical solution, after adjusting the camera parameters, the scene safety detection method further includes: repeatedly executing the step of acquiring images of the furthest target that has been deployed under the illumination of the supplementary lighting device by the target camera according to the camera parameters, and obtaining the second target image.
[0125] In this embodiment of the invention, the step of acquiring an image of the furthest target that has been deployed under the illumination of the supplementary lighting device by the target camera with the camera parameters can be repeated until the brightness score is greater than or equal to a preset score threshold, thereby obtaining more accurate camera parameters.
[0126] Based on the above scheme, another optional technical solution is provided, wherein the target pattern includes a white pattern and a black pattern; the scene security detection method further includes: dividing the target area into regions to obtain a first region corresponding to the white pattern and a second region corresponding to the black pattern; determining the signal strength of the first region and the noise strength of the second region, and determining an initial score based on the signal strength and noise strength; determining the brightness score of the target area based on the grayscale histogram and a preset mask ratio, including: determining the brightness score of the target area based on the initial score, the grayscale histogram and the preset mask ratio.
[0127] The white pattern can be understood as the white pattern in the target pattern.
[0128] The black pattern can be understood as the black pattern within the target design.
[0129] In this embodiment of the invention, the furthest target may be, for example, a typical white background with a black circle, so that the target pattern includes a white pattern and a circular black pattern.
[0130] The first region can be understood as the area in the target region corresponding to the white pattern.
[0131] The second region can be understood as the area in the target region that corresponds to the black pattern.
[0132] In this embodiment of the invention, the target area can be divided into a first area and a second area.
[0133] Signal strength can be understood as the signal strength in the first region.
[0134] Noise intensity can be understood as the intensity of noise in the second region.
[0135] The initial score can be understood as the initial score used as a brightness score.
[0136] In this embodiment of the invention, signal strength and noise intensity can be determined, and an initial score can be determined based on the signal strength and noise intensity. For example, the average gray level of a first region can be determined as the signal strength S, and the standard deviation of a second region can be determined as the noise intensity N; based on the signal strength S and noise intensity N, the following formula can be used to... The initial score SNR is determined; based on empirical values, the initial score SNR is classified into levels and linearly mapped to the interval [0~1] to perform feature normalization processing on the initial score SNR, and the initial score SNR is updated according to the obtained feature normalization processing results.
[0137] In this embodiment of the invention, the target area can be divided into regions to obtain a first region corresponding to the white pattern and a third region corresponding to the surrounding featureless pattern in the region other than the white and black patterns. Then, the signal strength of the first region is determined, and the noise strength of the third region is determined. An initial score is determined based on the signal strength and the noise strength.
[0138] In this embodiment of the invention, a brightness score can be determined based on an initial score, a grayscale histogram, and a preset mask ratio. For example, when the preset mask ratio is 1:1, a contrast score S1 and a height ratio S2 are determined based on the grayscale histogram; based on the initial score SNR, contrast score S1, and height ratio S2, a weighted fusion algorithm is used to determine the brightness score using the formula... Calculate the luminance score source, where 1-α represents the weight of the initial score SNR and β represents the weight of the contrast score S1.
[0139] In this embodiment of the invention, by determining the signal strength and noise strength, and determining the initial score based on the signal strength and noise strength, and then determining the brightness score of the target area based on the initial score, grayscale histogram and preset mask ratio, the accuracy of the determined brightness score can be improved.
[0140] Figure 5 This is a structural block diagram of a scene security detection device provided in an embodiment of the present invention. This device is used to execute the scene security detection method provided in any of the above embodiments. This device and the scene security detection methods of the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the scene security detection device can be found in the embodiments of the above scene security detection methods. See also... Figure 5 Specifically, the device may include: a distance acquisition module 510, a target attribute determination module 520, and a scene safety detection module 530.
[0141] The arrangement distance acquisition module 510 is used to acquire the arrangement distance of at least one target target to be arranged in the target scene, wherein the arrangement distance is the distance between the arrangement position of the target target to be arranged and the supplementary lighting device used to illuminate at least one target target.
[0142] The target attribute determination module 520 is used to determine the target attribute of each target based on the target's placement distance, so as to place the target at the placement location according to the target attribute.
[0143] The scene safety detection module 530 is used to determine the first target image of each of the deployed target targets under the illumination of the supplementary lighting equipment, and to perform safety detection on the target scene based on the first target image.
[0144] Optionally, the target attribute determination module 520 may include:
[0145] The first target attribute determination submodule is used to determine the target attributes of the target based on the deployment distance of the target using the scene security detection model.
[0146] Optionally, based on the above-mentioned device, the device may further include the following modules to obtain the scene safety detection model:
[0147] The test location determination module is used to acquire at least one test distance and, for each test distance, determine the test location corresponding to the test distance based on the supplementary lighting position of the supplementary lighting device, so as to place at least one test target corresponding to each alternative attribute at the test location;
[0148] The test attribute determination module is used to test the brightness of each test target placed at the test position under the illumination of the supplementary lighting equipment, and to determine the test attribute corresponding to the test distance from at least one alternative attribute based on the brightness test results of each test target.
[0149] The scene safety detection model determination module is used to determine the scene safety detection model based on the test attributes corresponding to at least one test distance.
[0150] Optionally, the scene safety detection module 530 may include:
[0151] The first target image acquisition submodule is used to acquire images of each deployed target under the illumination of the supplementary lighting equipment based on the target camera with camera parameters, and obtain the first target image.
[0152] Optionally, based on the above-described device, the device may further include the following module for obtaining camera parameters:
[0153] Camera parameter initialization module, used to initialize camera parameters;
[0154] The farthest position determination module is used to determine the farthest distance in the target scene. Based on the position of the supplementary lighting device, the farthest position corresponding to the farthest distance is determined so that the farthest target can be placed at the farthest position.
[0155] The camera parameter adjustment module is used to acquire images of the furthest target that has been deployed under the illumination of the supplementary lighting equipment, based on the target camera with the camera parameters, to obtain a second target image, and to adjust the camera parameters based on the second target image to obtain the camera parameters.
[0156] Optionally, based on the above-described device, the camera parameter adjustment module may include:
[0157] The target region determination submodule is used to determine the target region in the second target image;
[0158] The mask region submodule is used to determine a grayscale mask with a preset mask ratio based on the target pattern of the farthest target, and to perform masking processing on the target region based on the grayscale mask to obtain the mask region.
[0159] The brightness score determination submodule is used to determine the grayscale histogram of the mask area and determine the brightness score of the target area based on the grayscale histogram and the preset mask ratio.
[0160] The camera parameter adjustment submodule is used to adjust camera parameters when the brightness score is less than a preset score threshold.
[0161] Optionally, based on the above-described apparatus, the apparatus may further include:
[0162] The repeat execution module is used to repeatedly execute the step of acquiring the image of the farthest target that has been deployed under the illumination of the supplementary lighting device, based on the target camera under the camera parameters, after adjusting the camera parameters, to obtain the second target image.
[0163] Optionally, based on the above-mentioned device, the target pattern includes a white pattern and a black pattern;
[0164] The device may also include:
[0165] The region acquisition module is used to divide the target region into regions, obtaining the first region corresponding to the white pattern and the second region corresponding to the black pattern;
[0166] An initial score determination module is used to determine the signal strength in a first region and the noise strength in a second region, and to determine an initial score based on the signal strength and noise strength.
[0167] The brightness rating determination submodule may include:
[0168] The brightness score determination unit is used to determine the brightness score of the target area based on the initial score, grayscale histogram, and preset mask ratio.
[0169] Optionally, based on the above-described apparatus, the apparatus may further include:
[0170] The camera distance acquisition module is used to acquire the camera distance corresponding to at least one target, wherein the camera distance is the distance between the placement position of the target to be deployed and the target camera;
[0171] The target attribute determination module 520 may include:
[0172] The second target attribute determination submodule is used to determine the target attributes of the target based on the target's deployment distance and the camera distance.
[0173] Optionally, the device may also include:
[0174] The scene factor acquisition module is used to acquire scene factors, wherein the scene factors include at least one of the following: terrain, scene type, seasonal features, and time features of the target scene;
[0175] The target attribute determination module 520 may include:
[0176] The third target attribute determination submodule is used to determine the target attributes of the target based on scene factors and the distance of the target deployment.
[0177] The scene safety detection device provided in this embodiment of the invention, through a deployment distance acquisition module, acquires the deployment distance corresponding to at least one target target to be deployed in a target scene, wherein the deployment distance is the distance between the deployment position of the corresponding target target and the supplementary lighting device used to illuminate the at least one target target; through a target attribute determination module, for each target target, the target attribute is determined according to the deployment distance, so that the target target is deployed at the deployment position according to the target attribute, so as to facilitate the safety detection of the target scene using the deployed target targets; through a scene safety detection module, a first target image of each deployed target target under the illumination of the supplementary lighting device is determined, and the target scene is safety detected based on the first target image, thereby realizing the safety detection of the target scene. The above device, by determining the target attribute according to the deployment distance and then deploying the target targets according to the target attribute, makes each deployed target target suitable for determining the first target image under the illumination of the supplementary lighting device, thereby improving the image quality of the determined first target image and thus improving the accuracy of scene safety detection.
[0178] The scene security detection device provided in this embodiment of the invention can execute the scene security detection method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0179] It is worth noting that in the embodiments of the above-mentioned scene safety detection device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0180] Figure 6 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0181] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer programs stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0182] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0183] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as scene safety detection methods.
[0184] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.
[0185] In some embodiments, the scene security detection method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the scene security detection method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the scene security detection method by any other suitable means (e.g., by means of firmware).
[0186] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0187] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0188] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0189] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0190] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0191] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0192] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0193] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A scene security detection method, characterized in that, include: For at least one target to be placed in a target scene, the placement distance corresponding to each of the at least one target is obtained, wherein the placement distance is the distance between the placement position of the target to be placed and the supplementary lighting device used to illuminate at least one of the target targets; For each target, the target attribute of the target is determined based on the target's placement distance, so that the target is placed at the placement position according to the target attribute; A first target image of each of the deployed target targets is determined under the illumination of the supplementary lighting device, and a security detection is performed on the target scene based on the first target image.
2. The method according to claim 1, characterized in that, Determining the target attributes of the target based on the deployment distance of the target includes: Using a scene safety detection model, the target attributes of the target are determined based on the deployment distance of the target.
3. The method according to claim 2, characterized in that, The scenario security detection model is obtained through the following steps: At least one test distance is obtained, and for each test distance, a test position corresponding to the test distance is determined according to the supplementary lighting position of the supplementary lighting device, so as to arrange at least one test target corresponding to each alternative attribute at the test position; The brightness of each of the test targets arranged at the test position under the illumination of the supplementary lighting device is tested, and the test attribute corresponding to the test distance is determined from at least one of the candidate attributes based on the brightness test results corresponding to each of the test targets. The scene security detection model is determined based on the test attributes corresponding to at least one of the test distances.
4. The method according to claim 1, characterized in that, The determination of the first target image of each of the deployed target targets under the illumination of the supplementary lighting device includes: Based on the target camera with the specified camera parameters, images of each of the arranged target targets under the illumination of the supplementary lighting device are acquired to obtain a first target image.
5. The method according to claim 4, characterized in that, The camera parameters are obtained through the following steps: Initialize the camera parameters; Determine the farthest distance in the target scene, and determine the farthest position corresponding to the farthest distance based on the supplementary lighting position of the supplementary lighting device, so as to place the farthest target at the farthest position; Based on the target camera with the specified camera parameters, an image of the farthest target, which has been positioned and illuminated by the supplementary lighting device, is acquired to obtain a second target image. Based on the second target image, the camera parameters are adjusted to obtain the specified camera parameters.
6. The method according to claim 5, characterized in that, The step of adjusting the camera parameters based on the second target image includes: Determine the target region in the second target image; Based on the target pattern of the farthest target, a grayscale mask with a preset mask ratio is determined, and the target area is masked according to the grayscale mask to obtain the mask area. Determine the grayscale histogram of the mask region, and determine the brightness score of the target region based on the grayscale histogram and the preset mask ratio; If the brightness score is less than a preset score threshold, the camera parameters are adjusted.
7. The method according to claim 6, characterized in that, After adjusting the camera parameters, the following is also included: Repeat the step of acquiring an image of the farthest target that has been deployed under the illumination of the supplementary lighting device by the target camera according to the camera parameters, and obtain a second target image.
8. The method according to claim 6, characterized in that, The target pattern includes a white pattern and a black pattern; The method further includes: The target area is divided into regions to obtain a first region corresponding to the white pattern and a second region corresponding to the black pattern; Determine the signal strength of the first region, and determine the noise strength of the second region, and determine an initial score based on the signal strength and the noise strength; The step of determining the brightness score of the target region based on the grayscale histogram and the preset mask ratio includes: The brightness score of the target region is determined based on the initial score, the grayscale histogram, and the preset mask ratio.
9. The method according to claim 4, characterized in that, Also includes: Obtain the camera distance corresponding to each of the at least one target, wherein the camera distance is the distance between the placement position of the corresponding target and the target camera; Determining the target attributes of the target based on the deployment distance of the target includes: The target attributes of the target are determined based on the target placement distance and the camera distance.
10. The method according to claim 1, characterized in that, Also includes: Obtain scene factors, wherein the scene factors include at least one of the terrain, scene type, seasonal features, and time features of the target scene; Determining the target attributes of the target based on the deployment distance of the target includes: The target attributes of the target are determined based on the scene factors and the distance of the target arrangement.
Citation Information
Patent Citations
Ground vibration signal measuring system, method and device
CN113551760A
Reflectivity calibration method, device and system
CN117310662A