A hidden camera detection method and system based on image recognition
By combining multi-band spectral scanning and multimodal convolutional neural networks with binocular vision technology, the problems of accuracy and false alarm rate in hidden camera detection have been solved, achieving high-precision hidden camera detection and 3D positioning, which is suitable for places such as hotels and offices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2026-03-24
AI Technical Summary
Current technologies for detecting hidden cameras mainly rely on manual labor or simple equipment, resulting in a high false alarm rate and low detection accuracy, which cannot effectively protect privacy and information security.
A mobile terminal equipped with a tunable light source is used for omnidirectional spectral scanning. Combined with multimodal convolutional neural networks and binocular vision technology, the optical and geometric features of hidden cameras are identified through multi-band spectral analysis, temporal consistency analysis and geometric shape verification. Bayesian decision theory is used for detection.
It improves the accuracy of hidden camera detection, reduces the false alarm rate, achieves centimeter-level 3D positioning accuracy, is suitable for various application scenarios, and meets real-time detection requirements.
Smart Images

Figure CN120852938B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image recognition, and particularly relates to a hidden camera detection method and system based on image recognition. BACKGROUND
[0002] When people stay or work in hotels, guesthouses, offices, conference rooms and other places, they often worry about whether there are hidden cameras in the room due to personal privacy protection and information security. At present, hidden cameras are mainly found by people or with the help of mobile phones and other devices for simple search. However, in the process of searching with the existing method, false positives are prone to occur, and the detection accuracy is low. Therefore, more effective methods are needed to solve these problems to ensure the privacy and information security of people. SUMMARY
[0003] The present application is based on the above problems, and proposes a hidden camera detection method and system based on image recognition. Through the present application, the detection accuracy can be improved and the false positive rate can be reduced.
[0004] Therefore, one aspect of the present application proposes a hidden camera detection method based on image recognition, comprising:
[0005] A mobile terminal equipped with a tunable light source is used to emit infrared light bands, near-infrared light bands and visible light bands in turn to perform full-spectrum scanning on the detection area, and obtain original image data sets of three different frequency bands;
[0006] Based on the optical properties of the lens material of the hidden camera, pixel-level analysis is performed on the original image data set to extract a reflectivity difference feature vector of the lens surface under different wave bands;
[0007] The reflectivity difference feature vector is input into a pre-trained multi-modal convolutional neural network, the multi-modal convolutional neural network includes three parallel feature extraction branches, which process infrared, near-infrared and visible light features respectively, and the feature maps of the three branches are weighted and fused through an attention mechanism to generate a comprehensive feature representation;
[0008] In a continuous time window T, the same detection point is scanned multiple times to obtain a time sequence feature sequence, the time consistency of the features is analyzed through a long short-term memory network, environmental interference factors are excluded, and a time consistency analysis result is obtained;
[0009] Edge detection and shape analysis are performed on the suspected camera area to extract circular or elliptical contour features, and the circularity coefficient C of the contour is calculated. When C>0.7, it is determined that the lens geometric feature is met, and a geometric shape verification result is obtained;
[0010] The coordinates of the detected hidden camera in the three-dimensional space are determined by using the binocular vision principle and parallax calculation, and the spatial position mapping of the detection target is established.
[0011] According to the comprehensive feature representation, the timing consistency analysis result and the geometric shape verification result, the existence probability of the hidden camera is calculated by the Bayesian decision theory When the existence probability is greater than 0.85, a detection alarm signal is output, and the detection result and three-dimensional positioning information are displayed in real time on the mobile terminal interface.
[0012] Optionally, the pixel-level analysis of the original image data set based on the optical properties of the lens material of the hidden camera, and the extraction of the reflectivity difference feature vector of the lens surface under different wavebands further include:
[0013] The gradient change rate between adjacent pixels is calculated, and the gradient mutation area is identified as a potential lens boundary.
[0014] The reflectivity difference feature vector is subjected to Gaussian filtering processing to filter out noise interference.
[0015] Based on the dielectric constant characteristics of the lens material, a reflectivity theoretical model is established, and the matching degree analysis is performed with the measured value.
[0016] Optionally, the edge detection and shape analysis of the suspected camera area, the extraction of the circular or elliptical contour feature, and the calculation of the circularity coefficient C of the contour, when C>0.7, are determined as the lens geometric feature, and the geometric shape verification result is obtained. The step includes:
[0017] Image enhancement and noise filtering are performed on the screened suspected camera area, the region contrast is improved through adaptive histogram equalization, and a bilateral filter is used to remove noise while maintaining the integrity of the edge information, to obtain a first suspected area.
[0018] The Canny edge detection algorithm and Sobel operator are applied to the first suspected area in turn, and the detail edge and main contour edge are extracted, respectively, and then the two edge detection results are fused through logical or operation to form a complete edge feature map.
[0019] Based on the edge feature map, a connected domain analysis is performed to extract all closed contours, and according to the contour area size and integrity, a preliminary screening is performed to eliminate small, large or incomplete contours, and to retain candidate contours within the camera lens size range.
[0020] The area, perimeter, centroid coordinates and bounding box parameters of each candidate contour after screening are calculated, and the circularity coefficient, long-short axis ratio and convex hull area ratio are calculated, and a plurality of geometric feature parameters are established to form a geometric feature vector of the contour.
[0021] The calculated roundness coefficient is compared with a preset threshold, and the long-to-short axis ratio and the convex hull area ratio are combined to comprehensively determine whether the profile meets the circular or elliptical feature condition, and the profile that meets the condition is marked as a lens candidate region, and a geometric verification pass flag is output.
[0022] Optionally, the step of determining the coordinates of the detected hidden camera in the three-dimensional space by using the binocular vision principle and calculating the parallax, and establishing a mapping of the spatial position of the detection target, comprises:
[0023] The dual-camera system of the mobile terminal controls image acquisition of the detection area at the same time, acquires left and right view images, and ensures strict synchronization of the two images through timestamp marking to provide a reference image pair for subsequent parallax calculation;
[0024] Based on the pre-calibrated binocular camera internal and external parameter matrices, distortion correction and stereo correction are performed on the left and right images to eliminate the influence of lens distortion and convert the image pair into a standard parallel binocular configuration, so that the corresponding points are located on the same horizontal line to simplify the parallax search;
[0025] The lens candidate region is located in the corrected left and right images respectively, the same camera target in the left and right images is determined through feature point matching and region correlation analysis, a pixel-level correspondence is established, and a matching confidence is calculated;
[0026] For the camera target region that matches successfully, a block matching algorithm or a semi-global matching algorithm is used to calculate the parallax value of each pixel point in the region, a local parallax map of the target region is generated, and abnormal values in the parallax calculation are removed through median filtering and consistency checking;
[0027] The parallax information of the target region is converted into three-dimensional coordinates in the real world by using the geometric constraint relationship of binocular vision, combined with the camera calibration parameters, the centroid position coordinates of the camera target are calculated, and a spatial position record and visual display mapping of the target in the mobile terminal coordinate system are established.
[0028] Optionally, it further comprises: dynamically adjusting the emission intensity of the tunable light source of the mobile terminal according to the ambient light condition, and calculating the optimal light intensity by the following formula:
[0029] .
[0030] Optionally, the reflectivity difference feature vector extraction further comprises multi-scale texture analysis:
[0031] The texture abnormality degree is calculated by improved local binary pattern:
[0032] ;
[0033] wherein,
[0034] ;
[0035] .
[0036] Optionally, when the multi-modal convolutional neural network performs deep learning feature fusion, a dynamic attention weight distribution mechanism is adopted:
[0037] ;
[0038] wherein,
[0039] ;
[0040] .
[0041] Optionally, in the analysis of the time consistency of the features by the long short-term memory network, the long short-term memory network introduces a memory decay mechanism, wherein the hidden state update formula is:
[0042] ;
[0043] wherein,
[0044] ;
[0045] .
[0046] Optionally, the probability of the existence of the hidden camera is calculated by the Bayesian decision theory , The calculation formula is:
[0047] ;
[0048] wherein,
[0049] ;
[0050] .
[0051] Another aspect of the application provides a hidden camera detection system based on image recognition, for performing a hidden camera detection method based on image recognition, comprising: a mobile terminal equipped with a tunable light source and a server;
[0052] The mobile terminal is configured to:
[0053] emit infrared light waveband, near-infrared light waveband and visible light waveband in turn, and perform full-spectrum scanning on the detection area to obtain three different frequency band raw image data sets;
[0054] In a continuous time window T, multiple scans are performed on the same detection point to obtain a time sequence feature sequence, time consistency of the features is analyzed by a long short-term memory network, environmental interference factors are excluded, and a time sequence consistency analysis result is obtained;
[0055] The server is configured to:
[0056] Based on the optical properties of the hidden camera lens material, pixel-level analysis is performed on the original image dataset to extract a reflectivity difference feature vector of the lens surface under different wavebands;
[0057] The reflectivity difference feature vector is input into a pre-trained multi-modal convolutional neural network, which includes three parallel feature extraction branches that process infrared, near-infrared, and visible light features respectively, and generates a comprehensive feature representation by weighted fusion of the feature maps of the three branches through an attention mechanism;
[0058] Edge detection and shape analysis are performed on the suspected camera area to extract circular or elliptical contour features, and the circularity coefficient C of the contour is calculated, and when C>0.7, it is determined to meet the lens geometric features, and a geometric shape verification result is obtained;
[0059] Using the principle of binocular vision, the coordinates of the detected hidden camera in three-dimensional space are determined through parallax calculation, and a spatial position mapping of the detection target is established;
[0060] According to the comprehensive feature representation, the time sequence consistency analysis result, and the geometric shape verification result, the probability of the existence of the hidden camera is calculated through the Bayesian decision theory When >0.85, a detection alarm signal is output, and the detection result and three-dimensional positioning information are displayed in real time on the mobile terminal interface.
[0061] The technical scheme of the present application, the hidden camera detection method and system based on image recognition, can effectively identify the optical property differences of lenses made of different materials through multi-band spectral analysis, improving the detection accuracy compared to traditional single-band detection methods; Through the double-checking mechanism of time sequence consistency analysis and geometric shape verification, environmental interference such as glass reflection and metal surface is effectively excluded, reducing the false alarm rate; Lightweight neural network architecture and parallel processing technology are used, with short single detection time, meeting real-time detection requirements; Combined with binocular vision and SLAM technology, centimeter-level three-dimensional positioning accuracy is achieved, providing accurate spatial information for subsequent disposal; Supports detection of multiple types of hidden cameras, including pinhole cameras, miniature cameras, and disguised cameras, suitable for various application scenarios such as hotels, offices, and homes. BRIEF DESCRIPTION OF DRAWINGS
[0062] Fig. 1is a flow chart of a hidden camera detection method based on image recognition provided by an embodiment of the present application.
[0063] Fig. 2 is a schematic block diagram of a hidden camera detection system based on image recognition provided by an embodiment of the present application. DETAILED DESCRIPTION
[0064] In order to more clearly understand the above objectives, features and advantages of the present application, the following further specifically describes the present application with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0065] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present application, however, the present application can also be implemented in other manners different from those described herein, and therefore, the protective scope of the present application is not limited by the specific embodiments disclosed below.
[0066] The terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish different objects, and are not used to describe a specific order. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product or device.
[0067] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase appears at various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily mutually exclusive of other embodiments. It is explicitly and implicitly understood that the embodiments described herein can be combined with other embodiments.
[0068] The image recognition based hidden camera detection method and system according to some embodiments of the present application will be described below with reference to Figs. 1-2
[0069] As shown in Fig. 1 , an embodiment of the present application provides an image recognition based hidden camera detection method, comprising:
[0070] Using a mobile terminal equipped with a tunable light source, sequentially emit infrared light band (760nm-1100nm), near-infrared light band (1100nm-2500nm) and visible light band (380nm-760nm), and carry out full-spectrum scanning on the detection area, and obtain three different frequency band original image data sets {I ir , I nir , I vis};
[0071] Based on the optical properties of the hidden camera lens material, pixel-level analysis is performed on the original image data set, and the reflectivity difference feature vector R(x,y) = [r ir (x,y), r nir (x,y), r vis (x,y)] of the lens surface under different wave bands is extracted, where (x,y) is the pixel coordinate;
[0072] The reflectivity difference feature vector is input into a pre-trained multi-modal convolutional neural network, which contains three parallel feature extraction branches, respectively processing infrared, near-infrared and visible light features, and the feature maps of the three branches are weighted and fused through an attention mechanism to generate a comprehensive feature representation F fusion ;
[0073] In this step, the multi-modal convolutional neural network specifically includes: three parallel ResNet-50 feature extraction branches, respectively receiving infrared, near-infrared and visible light image inputs; the feature maps output by each branch are calculated through a self-attention mechanism to obtain weight coefficients 、 、 , satisfying ; the feature fusion formula is ; the network is pre-trained through a hidden camera dataset containing 10000 samples.
[0074] In a continuous time window T, the same detection point is scanned multiple times to obtain a time sequence feature sequence {F fusion (t1), F fusion (t2),..., F fusion (tn)}, and a long short-term memory network (LSTM) is used to analyze the time consistency of the features and exclude environmental interference factors to obtain a time consistency analysis result;
[0075] Edge detection and shape analysis are performed on the suspected camera area to extract circular or elliptical contour features, and the circularity coefficient C=4πA / P² of the contour is calculated, where A is the area and P is the perimeter. When C>0.7, it is determined that the lens geometry meets the characteristics, and a geometric shape verification result is obtained;
[0076] The coordinates (X1, Y1, Z1) of the detected hidden camera in three-dimensional space are determined by parallax calculation based on the binocular vision principle, and the spatial position mapping of the detection target is established;
[0077] According to the comprehensive feature representation F fusion , the time sequence consistency analysis result and the geometric shape verification result, the existence probability of the hidden camera is calculated through the Bayesian decision theory When > 0.85, a detection alarm signal is output, and the detection result and three-dimensional positioning information are displayed in real time on the mobile terminal interface.
[0078] The technical scheme of this embodiment can effectively identify the optical characteristic differences of lenses of different materials through multi-band spectral analysis, improve the detection accuracy compared with traditional single-band detection methods, effectively eliminate environmental interference such as glass reflection and metal surface through the double-checking mechanism of time sequence consistency analysis and geometric shape verification, and reduce the false alarm rate; the lightweight neural network architecture and parallel processing technology are adopted, the single detection time is short, and the real-time detection demand is met; combined with binocular vision and SLAM technology, the centimeter-level three-dimensional positioning accuracy is realized, accurate spatial information is provided for subsequent disposal, and multiple hidden camera types are supported, including pinhole cameras, miniature cameras, and disguised cameras, which are suitable for various application scenarios such as hotels, offices, and homes.
[0079] In some possible embodiments of the present application, based on the optical characteristics of the hidden camera lens material, the step of performing pixel-level analysis on the original image data set to extract the reflectivity difference feature vector of the lens surface under different wavebands further includes:
[0080] The gradient change rate between adjacent pixels is calculated, and the gradient mutation area is identified as a potential lens boundary;
[0081] The reflectivity difference feature vector is subjected to Gaussian filtering processing to filter out noise interference;
[0082] Based on the dielectric constant characteristics of the lens material, a reflectivity theoretical model is established, and matching degree analysis is performed with the measured value.
[0083] In some possible embodiments of the present application, the step of performing edge detection and shape analysis on the suspected camera area, extracting the circular or elliptical contour feature, calculating the circularity coefficient C = 4πA / P² of the contour, and determining that the lens geometric characteristics are met when C > 0.7 to obtain the geometric shape verification result includes:
[0084] The first suspected area is obtained by performing image enhancement and noise filtering on the suspected camera area, improving the contrast of the area by adaptive histogram equalization, and removing noise while maintaining the integrity of edge information by using a bilateral filter.
[0085] The Canny edge detection algorithm and Sobel operator are applied on the first suspected area in sequence to extract detailed edges and main contour edges respectively, and then the two edge detection results are fused by logical OR operation to form a complete edge feature map.
[0086] Connected component analysis is performed based on the edge feature map to extract all closed contours, and preliminary screening is performed according to the contour area size and integrity to eliminate small, large or incomplete contours, and to retain candidate contours within the camera lens size range;
[0087] The area, perimeter, centroid coordinates and bounding box parameters of each candidate contour after screening are calculated respectively, and multiple geometric feature parameters such as circularity coefficient, long-short axis ratio and convex hull area ratio are calculated to establish the geometric feature vector of the contour.
[0088] The calculated circularity coefficient is compared with a preset threshold, and the long-short axis ratio and convex hull area ratio are combined for comprehensive judgment. The contours meeting the circular or elliptical feature conditions are marked as lens candidate regions, and a geometric verification pass flag is output.
[0089] In this embodiment, through multi-scale edge detection and multiple geometric feature verification, the real camera lens can be accurately distinguished from other circular objects (such as decorative rings, buttons, etc.), and the false detection rate is significantly reduced; the preprocessing step and multiple screening mechanism can effectively deal with uneven illumination, shadow obstruction, surface reflection and other interference factors, and improve the detection stability in complex environments; through the hierarchical screening strategy, coarse screening is performed first and then fine geometric analysis is performed, avoiding complex calculation on all regions, and improving the overall detection speed; circular and elliptical lenses can be identified simultaneously, adapting to the shape change of the camera under different angles of observation, and the geometric feature difference of different types of cameras; the comprehensive judgment mechanism of multiple geometric features increases the reliability of the detection result, and provides more reliable geometric evidence support for subsequent intelligent decision-making.
[0090] In some possible embodiments of the present application, the step of determining the coordinates (X1, Y1, Z1) of the detected hidden camera in three-dimensional space by parallax calculation based on binocular vision principle and establishing the spatial position mapping of the detection target comprises:
[0091] The dual-camera system of the mobile terminal controls image acquisition of the detection area simultaneously, acquires left and right view images, and ensures strict synchronization of the two images through a timestamp marker to provide a reference image pair for subsequent disparity calculation.
[0092] Based on the pre-calibrated binocular camera internal and external parameter matrices, distortion correction and stereo correction are performed on the left and right images to eliminate the influence of lens distortion and convert the image pair into a standard parallel binocular configuration, so that the corresponding points are located on the same horizontal line to simplify disparity search.
[0093] In the corrected left and right images, the lens candidate area is located respectively, the corresponding same camera target in the left and right images is determined through feature point matching and region correlation analysis, a pixel-level corresponding relationship is established, and a matching confidence is calculated.
[0094] For the camera target area with successful matching, a block matching algorithm or a semi-global matching algorithm is used to calculate the disparity value of each pixel point in the area, a local disparity map of the target area is generated, and abnormal values in the disparity calculation are removed through median filtering and consistency checking.
[0095] The disparity information of the target area is converted into three-dimensional coordinates in the real world by using the geometric constraint relationship of binocular vision, combining the camera calibration parameters, calculating the centroid position coordinates of the camera target, and establishing a spatial position record and visual display mapping of the target in the mobile terminal coordinate system.
[0096] In the embodiment, through strict image correction and precise disparity calculation, millimeter-level three-dimensional positioning accuracy can be achieved, and accurate hidden camera spatial position information can be provided for the user; the optimized block matching algorithm and local disparity calculation strategy avoid the calculation burden of full-image disparity calculation, and can realize real-time three-dimensional positioning function on the mobile terminal; the image correction and matching confidence evaluation mechanism can effectively cope with difficult conditions such as light change and texture loss, and improve the positioning success rate and stability in complex environments; through the establishment of spatial position mapping and visual display, the user can intuitively understand the specific position and distance information of the hidden camera, and it is convenient to take corresponding protective measures; the three-dimensional coordinate information provides basic data support for subsequent multi-target tracking, motion trajectory analysis and spatial relationship modeling, and has good function expansion potential; the spatial positioning function expands the plane detection to three-dimensional space, and can more comprehensively master the distribution of the hidden camera, and improve the integrity and practicability of the overall detection system.
[0097] In some possible embodiments of the application, the following are further included:
[0098] The emission intensity of the tunable light source of the mobile terminal is dynamically adjusted according to the ambient light condition, and the optimal light intensity is calculated by the following formula:
[0099] ;
[0100] wherein:
[0101] is the optimal emission intensity at wavelength ;
[0102] is the reference intensity, the standard emission power preset for different wavebands;
[0103] is the environmental adaptation factor, taking a value in the range of 0.1-2.0, for adjusting the sensitivity to ambient light;
[0104] is the ambient light intensity, obtained by real-time measurement through a photosensitive sensor;
[0105] is the temperature compensation function, wherein is the ambient temperature, compensating the influence of temperature on the light source efficiency;
[0106] is the material absorption coefficient, representing the absorption characteristics of the target material to light of a specific wavelength;
[0107] is the distance decay factor base, compensating the decay of light intensity with distance;
[0108] is the detection distance, obtained by laser ranging or binocular vision;
[0109] is the nonlinear decay index, taking a value in the range of 1.8-2.2, considering the complex decay effects such as atmospheric scattering;
[0110] is the feedback gain coefficient, taking a value in the range of 0.05-0.2, dynamically adjusted according to the historical detection effect;
[0111] is the historical detection success rate cumulative value, for self-learning and optimizing the light intensity control strategy.
[0112] The scheme of the embodiment ensures that the best signal-to-noise ratio can be obtained under different environmental conditions, improving the detection precision.
[0113] In some possible embodiments of the present application, the reflectivity difference feature vector extraction further comprises multi-scale texture analysis:
[0114] The texture abnormality degree is calculated by improved local binary pattern:
[0115] ;
[0116] where,
[0117] ;
[0118] ;
[0119] where:
[0120] is the texture abnormality of pixel point ;
[0121] is the number of analysis scales, usually 3-5 neighborhoods of different radii;
[0122] is the scale weight, satisfying ;
[0123] is the number of neighborhood pixels under each scale;
[0124] is the reflectivity difference between the neighborhood pixels and the center pixel;
[0125] is the adaptive threshold, dynamically adjusted according to the local variance;
[0126] is the Heaviside step function, outputting 1 when the input is greater than 0, otherwise outputting 0;
[0127] is the spatial weight function, giving higher weight to the center region of the image;
[0128] is the image center coordinate;
[0129] is the standard deviation of the spatial weight, controlling the decay rate of the center weight;
[0130] is the local contrast enhancement factor, improving the sensitivity of texture changes;
[0131] is the contrast gain parameter, taking values between 0.1 and 0.5;
[0132] is the local reflectivity standard deviation;
[0133] is the local reflectivity mean;
[0134] A small amount of numerical stability to prevent division by zero errors.
[0135] The embodiment can capture the microscopic texture patterns unique to the lens surface, effectively distinguishing the lens from other smooth surfaces.
[0136] In some possible embodiments of the application, when the multi-modal convolutional neural network performs deep learning feature fusion, a dynamic attention weight distribution mechanism is adopted:
[0137] ;
[0138] Wherein,
[0139] ;
[0140] ;
[0141] Wherein:
[0142] is the dynamic attention weight of the feature map position ;
[0143] is the spatial query matrix, capturing the spatial position correlation;
[0144] is the spectral key matrix, encoding the spectral features of different wavebands;
[0145] is the feature dimension, used for normalization to prevent gradient explosion;
[0146] is the context adjustment parameter, controlling the influence strength of the context information;
[0147] is the context feature, combining the semantic information of the surrounding area;
[0148] is the normalization exponential function, ensuring that the weight sum is 1;
[0149] is the S-shaped activation function, mapping the context feature to the 0-1 interval;
[0150] is the timing stability modulation factor, enhancing the weight of stable features;
[0151] is the timing sensitivity parameter, controlling the response strength to timing stability;
[0152] is the local feature stability score, calculated based on the timing variance;
[0153] is a stability determination threshold value;
[0154] is a confidence enhancement factor, adjusting attention intensity based on information entropy;
[0155] is a confidence gain parameter, taking a value of 0.2-0.8;
[0156] is a modified linear unit activation function;
[0157] is a theoretical maximum entropy value;
[0158] is a local information entropy, quantifying uncertainty of feature distribution;
[0159] is an entropy value normalization parameter, preventing numerical instability.
[0160] The embodiment can adaptively adjust the importance of different spectral channels according to the detection scene, and improve the detection accuracy in a complex environment.
[0161] In some possible embodiments of the application, in the analysis of the time consistency of the features by the long short-term memory network, the long short-term memory network introduces a memory decay mechanism, wherein the hidden state update formula is:
[0162]
[0163] wherein,
[0164]
[0165]
[0166] wherein:
[0167] is a memory-enhanced hidden state at time t;
[0168] is a time-varying decay factor,
[0169] is a hidden state output of the standard LSTM;
[0170] is a memory strength coefficient, controlling the contribution degree of historical information;
[0171] Memory window size, define the backtracking depth of history information
[0172] Time weight function, , Decay rate
[0173] Decay rate parameter, control the steepness of the decay function
[0174] Reference time point, usually set to the detection start time
[0175] Adaptive performance adjustment factor, dynamically adjust the memory strength based on the history accuracy
[0176] Learning gain parameter, value 0.1-0.4, control the influence degree of performance feedback
[0177] Performance buffer size, store recent detection accuracy records
[0178] Detection accuracy at history time
[0179] Performance benchmark threshold, usually set to 0.8
[0180] Noise suppression factor, reduce the interference of time series noise on memory
[0181] Time series variance of current time feature
[0182] Baseline variance level, used for normalization
[0183] Regularization parameter, prevent excessive suppression of useful signals
[0184] The embodiment can better handle feature evolution in long time series and improve the recognition ability of real camera signals.
[0185] In some possible embodiments of the application, the probability of the existence of a hidden camera is calculated by Bayesian decision theory , The calculation formula is:
[0186] ;
[0187] Where,
[0188] ;
[0189] ;
[0190] where:
[0191] is the final detection probability, integrating the Bayesian inference results of multiple layers of evidence;
[0192] is the number of decision layers, including feature layers, temporal layers, geometric layers, etc.;
[0193] is the layer weight, satisfying ;
[0194] is the base detection probability of the th layer;
[0195] is the number of evidences for each layer;
[0196] is the evidence strength, quantifying the confidence of each type of feature;
[0197] is the evidence reliability function, evaluating the quality of evidence;
[0198] is the normalization constant, ensuring the correctness of the probability distribution;
[0199] is the layer sensitivity index, adjusting the sensitivity of different layers to evidence;
[0200] is the uncertainty adjustment factor, reducing the impact of high-uncertainty layers;
[0201] is the Shannon entropy of the th layer probability distribution;
[0202] is the number of classification categories, usually 2 (camera present / absent);
[0203] is the entropy value adjustment parameter, preventing numerical overflow;
[0204] is the inter-layer correlation compensation factor, reducing redundant information repeated calculation;
[0205] is the correlation weight between layer and layer ;
[0206] for the layer and the layer Pearson correlation coefficient of the probability output.
[0207] The embodiment can effectively integrate multi-dimensional detection evidence, significantly reduce false positive rate and false negative rate, and provide more reliable detection results.
[0208] See Fig. 2 Another embodiment of the application provides a hidden camera detection system based on image recognition, which is used to perform a hidden camera detection method based on image recognition, comprising a mobile terminal equipped with a tunable light source and a server.
[0209] The mobile terminal is configured to:
[0210] emit infrared light bands, near-infrared light bands and visible light bands in sequence, perform full-spectrum scanning on the detection area, and obtain three different frequency band original image data sets {I ir , I nir , I vis};
[0211] In a continuous time window T, the same detection point is scanned multiple times to obtain a time sequence feature sequence {F fusion (t1), F fusion (t2),..., F fusion (tn)}, the time consistency of the features is analyzed by a long short-term memory network, environmental interference factors are excluded, and a time sequence consistency analysis result is obtained;
[0212] The server is configured to:
[0213] Based on the optical properties of the hidden camera lens material, pixel-level analysis is performed on the original image data set, and a reflectivity difference feature vector R(x,y) = [r ir (x,y), r nir (x,y), r vis (x,y)] of the lens surface under different wave bands is extracted, wherein (x,y) is the pixel coordinate;
[0214] The reflectivity difference feature vector is input into a pre-trained multi-modal convolutional neural network, the multi-modal convolutional neural network includes three parallel feature extraction branches, which process infrared, near-infrared and visible light features respectively, the feature maps of the three branches are weighted and fused through an attention mechanism, and a comprehensive feature representation F fusion is generated.
[0215] Edge detection and shape analysis are performed on the suspected camera area, and a circular or elliptical contour feature is extracted, and a roundness coefficient C = 4πA / P² of the contour is calculated, where A is the area of the region and P is the perimeter, and when C > 0.7, it is determined that the lens geometry feature is consistent, and a geometric shape verification result is obtained;
[0216] The coordinates (X1, Y1, Z1) of the detected hidden camera in the three-dimensional space are determined by using the binocular vision principle and parallax calculation, and a spatial position mapping of the detection target is established;
[0217] According to the comprehensive feature representation F fusion , the timing consistency analysis result and the geometric shape verification result, the existence probability of the hidden camera is calculated by using the Bayesian decision theory When > 0.85, a detection alarm signal is output, and the detection result and three-dimensional positioning information are displayed in real time on the mobile terminal interface.
[0218] It should be understood that Fig. 2 The block diagram of the image recognition-based hidden camera detection system shown is only schematic, and the number of each module shown does not limit the protection scope of the present application. The image recognition-based hidden camera detection system provided in the embodiment can be used to execute each embodiment scheme of the corresponding image recognition-based hidden camera detection method, and the specific implementation process is described in the description of each method embodiment, which is not repeated here.
[0219] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.
[0220] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0221] In several embodiments provided in the present application, it should be understood that the disclosed apparatus can be implemented in other manners. For example, the division of the apparatus embodiments described above is merely illustrative, and the division of the units can be changed according to actual needs. For example, the units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0222] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0223] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0224] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable memory. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or all or part of the technical solutions can be embodied in the form of a software product, which is stored in a memory and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The aforementioned memory includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0225] Those of ordinary skill in the art can understand that all or part of the steps of the various methods in the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer readable memory, which can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0226] The above has carried out the detailed introduction to the embodiment of the application, the principle and implementation mode of the application have been set forth in this article by applying specific examples, the above embodiment explanation is only for helping to understand the method of the application and its core idea; at the same time, for the general technical personnel in the art, according to the idea of the application, the specific implementation mode and application range will have changes, and the above is not understood as the limitation of the application.
[0227] Although the present application is disclosed as above, the present application is not limited to this. Any person skilled in the art can easily think of changes or substitutions without departing from the spirit and scope of the present application, and various changes and modifications can be made, including the combination of different functions and implementation steps, including software and hardware implementation, which are all within the protection scope of the present application.
Claims
1. An image recognition-based hidden camera detection method, characterized by, The method comprises the steps of: Using a mobile terminal equipped with a tunable light source, sequentially emitting infrared, near-infrared and visible light bands to perform full-spectrum scanning on the detection area, and obtaining original image data sets of the three different frequency bands; Based on the optical properties of the hidden camera lens material, pixel-level analysis is performed on the original image data set to extract the reflectivity difference feature vector of the lens surface under different wave bands; The reflectivity difference feature vector is input into a pre-trained multi-modal convolutional neural network, which contains three parallel feature extraction branches to process infrared, near-infrared and visible light features respectively, and the feature maps of the three branches are weighted and fused through an attention mechanism to generate a comprehensive feature representation; In a continuous time window T, the same detection point is scanned multiple times to obtain a time sequence of features, and a long short-term memory network is used to analyze the time consistency of the features to exclude environmental interference factors and obtain a time consistency analysis result; Edge detection and shape analysis are performed on the suspected camera area to extract the circular or elliptical contour features, calculate the circularity coefficient C of the contour, and determine that the lens geometry feature is met when C > 0.7 to obtain a geometric shape verification result; The coordinates of the detected hidden camera in the three-dimensional space are determined by using the principle of binocular vision, and the spatial position mapping of the detection target is established. According to the comprehensive feature representation, the time sequence consistency analysis result and the geometric shape verification result, a probability of existence of the hidden camera is calculated through a Bayesian decision theory When the value of the ratio is greater than 0.85, a detection alarm signal is outputted, and the detection result and three-dimensional positioning information are displayed in real time on a mobile terminal interface > 0.85, a detection alarm signal is outputted, and the detection result and three-dimensional positioning information are displayed in real time on a mobile terminal interface The step of performing pixel-level analysis on the original image data set based on the optical properties of the hidden camera lens material to extract the reflectivity difference feature vector of the lens surface under different wave bands further comprises the steps of: Calculating the gradient change rate between adjacent pixels to identify the gradient mutation area as a potential lens boundary; Performing Gaussian filtering on the reflectivity difference feature vector to filter out noise interference; Based on the dielectric constant characteristics of the lens material, a reflectivity theoretical model is established for matching degree analysis with the measured values. 2.The image recognition based hidden camera detection method of claim 1, wherein, The step of performing edge detection and shape analysis on the suspected camera area to extract the circular or elliptical contour features, calculate the circularity coefficient C of the contour, and determine that the lens geometry feature is met when C > 0.7 to obtain a geometric shape verification result comprises the steps of: Performing image enhancement and noise filtering on the screened suspected camera area, enhancing the contrast of the area through adaptive histogram equalization, and removing noise while maintaining the integrity of the edge information using a bilateral filter to obtain a first suspected area; Sequentially applying the Canny edge detection algorithm and the Sobel operator on the first suspected area to extract detailed edges and main contour edges respectively, and then fusing the two edge detection results through logical OR operation to form a complete edge feature map; Performing connected component analysis based on the edge feature map to extract all closed contours, and preliminarily screening the contours according to their area size and integrity to remove small, large or incomplete contours, and retaining candidate contours within the camera lens size range; Calculating the area, perimeter, centroid coordinates and bounding box parameters of each candidate contour after screening, and calculating the circularity coefficient, long-short axis ratio and convex hull area ratio of multiple geometric feature parameters to establish the geometric feature vector of the contour. The calculated roundness coefficient is compared with a preset threshold, and the long-short axis ratio and the convex hull area ratio are combined to comprehensively determine whether the profile meets the circular or elliptical feature condition, and the profile meeting the condition is marked as a lens candidate region, and a geometric verification pass flag is output. 3.The image recognition based hidden camera detection method of claim 2, wherein, The step of establishing the spatial position mapping of the detection target comprises: The dual-camera system of the mobile terminal controls image acquisition of the detection area to obtain left and right view images, and ensures strict synchronization of the two images through timestamp marking to provide a reference image pair for subsequent parallax calculation; Based on the pre-calibrated internal and external parameter matrices of the dual-camera, distortion correction and stereo correction are performed on the left and right images to eliminate the influence of lens distortion and convert the image pair into a standard parallel dual-camera configuration so that corresponding points are located on the same horizontal line to simplify parallax search; The lens candidate region is located in the corrected left and right images, and the same camera target in the left and right images is determined through feature point matching and region correlation analysis to establish a pixel-level correspondence and calculate a matching confidence; For the camera target region with successful matching, a block matching algorithm or a semi-global matching algorithm is used to calculate the parallax value of each pixel point in the region to generate a local parallax map of the target region, and abnormal values in parallax calculation are removed through median filtering and consistency checking; The parallax information of the target region is converted into three-dimensional coordinates in the real world by combining the camera calibration parameters to calculate the centroid position coordinates of the camera target and establish a spatial position record and visual display mapping of the target in the mobile terminal coordinate system. 4.The image recognition based hidden camera detection method of claim 3, wherein, Further comprising: The emission intensity of the tunable light source of the mobile terminal is dynamically adjusted according to the ambient light condition, and the optimal light intensity is calculated by the following formula: Wherein: optimum emission intensity at a wavelength of 460 nm; The reference light intensity is a standard emission power preset for different wave bands. ambient adaptation factor, having a value in the range 0.1-2.0, for adjusting sensitivity to ambient light; The ambient light illumination is obtained in real time by a light sensitive sensor; is a temperature compensation function, wherein is the ambient temperature, compensating for the influence of temperature on the efficiency of the light source; is the material absorption coefficient, which characterizes the absorption properties of the target material for a specific wavelength of light; is a distance attenuation factor base, compensating for the decay of light intensity with distance; To detect the distance, by laser ranging or binocular vision; is the non-linear decay exponent, taking values between 1.8 and 2.2; is the feedback gain coefficient, taking a value of 0.05-0.2, dynamically adjusted according to historical detection effects; Cumulative value of historical detection success rate, used for self-learning optimization of light intensity control strategy. 5.The image recognition based hidden camera detection method of claim 4, wherein, The reflectivity difference feature vector extraction further comprises multi-scale texture analysis: The texture anomaly degree is calculated by the improved local binary pattern: Wherein, Wherein: texture anomaly degree of the pixel point texture anomaly degree of the pixel point To analyze the number of scales, usually take 3-5 different radius neighborhood; For the scale weight, satisfy ; number of neighborhood pixels at each scale; Rdiff is the reflectance difference between the neighborhood pixel and the center pixel; For adaptive threshold, dynamically adjust according to local variance; H (x) = 1 for Heaviside step function, output 1 when input is greater than 0, otherwise output 0; For the spatial weight function, higher weight is given to the center region of the image. is the image center coordinate; For the standard deviation of the spatial weights, the decay rate of the center weight is controlled; local contrast enhancement factor, increasing texture variation sensitivity; Contrast gain parameter, 0.1-0.5; Rlocai is the local reflectance standard deviation; Rmean is the average of the local reflectivity; A small quantity for numerical stability, to prevent division by zero errors. 6.The image recognition based hidden camera detection method of claim 5, wherein, The multi-modal convolutional neural network adopts a dynamic attention weight distribution mechanism when performing deep learning feature fusion: Wherein, Wherein: dynamic attention weights for feature map locations dynamic attention weights for feature map locations For spatial query matrix, capture spatial position correlation; The spectral key matrix encodes spectral features of different wavebands. characteristic dimension, for normalization to prevent gradient explosion; To adjust the parameters for context, control the strength of the impact of the context information; Contextual features are combined with semantic information about the surrounding region; To normalize the exponential function, ensure that the weights sum to 1; For the S-shaped activation function, the context features are mapped to the 0-1 interval; is a timing stability modulation factor, enhancing the weight of the stability feature; is a timing sensitivity parameter, controlling the strength of the response to timing stability; For local feature stability score, based on time series variance calculation; stability determination threshold value; For the confidence enhancement factor, the attention intensity is adjusted based on information entropy; For the confidence gain parameter, take 0.2-0.8; rectified linear unit activation function; Theoretical maximum entropy value; H is the local information entropy, quantifying the uncertainty of the feature distribution; The entropy value is normalized to prevent numerical instability. 7.The image recognition based hidden camera detection method of claim 6, wherein, In the analysis of the time consistency of the features by the long short-term memory network, the long short-term memory network introduces a memory decay mechanism, and the hidden state update formula is: Wherein, Wherein: to be a memory-enhanced hidden state; to be a memory-enhanced hidden state; a time-varying attenuation factor, ; is the hidden state output for the standard LSTM; Memory strength coefficient is used to control the contribution degree of history information; To remember the window size, define the depth of history information backtracking; is a time weighting function, , is a decay rate; For the decay rate parameter, the steepness of the decay function is controlled; The reference time point is usually set as the detection start time. Adaptive performance adjustment factor, based on historical accuracy rate dynamic adjustment of memory strength; To learn the gain parameter, the value is 0.1-0.4, the influence degree of control performance feedback; For performance buffer size, store recent detection accuracy records; accuracy of detection of historic moments; The performance benchmark threshold is typically set to 0.8; is a noise suppression factor, reducing the interference of timing noise on memory; a timing variance for the current time instance characteristic; Benchmark variance level for normalization; is a regularization parameter that prevents over-suppression of the useful signal. 8.The image recognition based hidden camera detection method of claim 7, wherein, The probability of the existence of a hidden camera is calculated by Bayesian decision theory , The calculation formula is: Wherein, Wherein: To obtain the final detection probability, the results of Bayesian inference of multi-layer evidences are integrated. To decide the number of layers, including feature layers, temporal layers, geometric layers; For layer weights, satisfy ; The base detection probability for the layer is layer. Number of evidence for each layer; To evidence strength, quantify the confidence of each type of feature; To assess the quality of evidence, the evidence reliability function is used; is a normalization constant, ensuring the correctness of the probability distribution; LAYER SENSITIVITY INDEX, which adjusts the sensitivity of different layers to evidence; to reduce the impact of high uncertainty layers as an uncertainty adjustment factor; Shannon entropy of the probability distribution of the layer Shannon entropy of the probability distribution of the layer The number of classification categories is typically 2. Entropy is used to adjust the parameters to prevent numerical overflow. is an inter-layer correlation compensation factor, reducing redundant computation of the information; for the layer and the correlation weight between the layer and the layer for the layer and the layer Pearson correlation coefficient of the probability outputs.
9. An image recognition based hidden camera detection system for performing the image recognition based hidden camera detection method according to any one of claims 1 to 8, characterized in that Comprising: The mobile terminal and the server are equipped with a tunable light source; The mobile terminal is configured to: Emit infrared, near-infrared and visible light bands in sequence to perform full-spectrum scanning on the detection area and obtain original image data sets of the three different frequency bands; In a continuous time window T, the same detection point is scanned multiple times to obtain a time sequence feature sequence, the time consistency of the features is analyzed by the long short-term memory network, environmental interference factors are excluded, and a time consistency analysis result is obtained; The server is configured to: Based on the optical properties of the lens material of the hidden camera, pixel-level analysis is performed on the original image data set to extract a reflectivity difference feature vector of the lens surface under different wave bands; The reflectivity difference feature vector is input into a pre-trained multi-modal convolutional neural network, the multi-modal convolutional neural network comprising three parallel feature extraction branches respectively processing infrared, near-infrared and visible light features, and the feature maps of the three branches are weighted and fused through an attention mechanism to generate a comprehensive feature representation; Edge detection and shape analysis are performed on the suspected camera area to extract circular or elliptical contour features, and the circularity coefficient C of the contour is calculated, and when C > 0.7, it is determined that the lens geometry feature is met, and a geometric shape verification result is obtained; The coordinates of the detected hidden camera in the three-dimensional space are determined through parallax calculation using the principle of binocular vision, and the spatial position mapping of the detection target is established. Based on the comprehensive feature representation, temporal consistency analysis results, and geometric shape verification results, the probability of the existence of a hidden camera is calculated using Bayesian decision theory. ,when When the value is >0.85, an alarm signal is output, and the detection result and three-dimensional positioning information are displayed in real time on the mobile terminal interface.
Citation Information
Patent Citations
Hidden camera detection method, system and device based on cat eye effect and medium
CN120163986A
Aerial target identification tracking method and system based on multiband electromagnetic fusion perception technology
CN120260126A