Hidden camera detection method, terminal and readable storage medium
The initial two-dimensional image and speckle map are obtained through the depth camera and shooting module, and combined with the deep learning model, the problem of difficulty in detecting hidden cameras in the existing technology is solved, achieving high accuracy and convenient detection effects.
Patent Information
- Application Number
- CN202210266600.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-17
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2042-03-17
AI Technical Summary
The prior art is difficult to effectively detect hidden cameras, especially in the absence of infrared fill light, and professional detectors are not easy to be used by ordinary users.
By equipped with a depth camera and shooting module, the initial two-dimensional image and speckle map are obtained, and combined with a deep learning model to identify the position of the hidden camera, improving detection accuracy and convenience.
It realizes accurate identification of most hidden cameras with lenses, improves the detection accuracy and application range, no additional equipment is required, and reduces user operation complexity and power consumption.
Smart Images

Figure CN114640842B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of hidden camera device identification, and in particular to a hidden camera detection method, terminal and computer-readable storage medium. Background Art
[0002] When people stay in hotels, guesthouses, B&Bs and other places, they worry about hidden cameras installed in the room. Usually, they keep the room dark, turn on their mobile phones to observe the room, and if they find a red dot on the screen, they think there is a hidden camera. However, this method of directly using the mobile phone camera to detect hidden cameras still has many limitations: first, the cameras of mobile phones currently on the market have basically filtered out infrared light, and second, this method can generally only find infrared night vision cameras that actively emit light. In addition, professional detectors can be used to detect hidden cameras, but ordinary users rarely buy such professional equipment specifically to find hidden cameras. Summary of the invention
[0003] Embodiments of the present application provide a hidden camera detection method, a terminal, and a computer-readable storage medium.
[0004] The detection method in the embodiment of the present application includes: acquiring an initial two-dimensional image of the current viewing angle; turning on the depth camera to emit light to acquire a speckle pattern; and acquiring the position of the hidden camera according to the speckle pattern and the initial two-dimensional image.
[0005] The terminal in the embodiment of the present application includes a shooting module, a depth camera and one or more processors, the shooting module is used to shoot two-dimensional images, the depth camera is used to emit light to obtain a speckle pattern, and the one or more processors are used to: obtain an initial two-dimensional image of the current viewing angle; turn on the depth camera to emit light to obtain a speckle pattern; and obtain the position of the hidden camera according to the speckle pattern and the initial two-dimensional image.
[0006] An embodiment of the present application provides a non-volatile computer-readable storage medium according to an embodiment of the present application, which includes a computer program. When the computer program is executed by one or more processors, the processors execute the following detection method: obtaining an initial two-dimensional image of the current viewing angle; turning on a depth camera to emit light to obtain a speckle pattern; and obtaining the position of the hidden camera based on the speckle pattern and the initial two-dimensional image.
[0007] The hidden camera detection method, terminal and non-volatile computer-readable storage medium in the present application can improve the recognition accuracy of hidden camera detection by jointly determining the position of the hidden camera through a two-dimensional image and a speckle pattern, and do not require users to purchase and carry other peripheral devices. The position of the hidden camera can be determined only by being equipped with a shooting module that can obtain a two-dimensional image and a depth camera that can obtain a speckle pattern, which is conducive to improving the convenience of users in detecting hidden cameras.
[0008] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0010] Figure 1 is a schematic flow chart of a detection method in certain embodiments of the present application;
[0011] Figure 2 is a schematic diagram of the structure of a terminal in some embodiments of the present application;
[0012] Figures 3 to 6 is a schematic flow chart of a detection method in certain embodiments of the present application;
[0013] Figure 7 It is a schematic diagram of obtaining a depth map and a confidence map by fusing an initial two-dimensional image with a speckle map in certain embodiments of the present application;
[0014] Figure 8 is a schematic flow chart of a detection method in certain embodiments of the present application;
[0015] Fig. 9 is a schematic diagram of a two-dimensional image and a corresponding confidence map in certain embodiments of the present application;
[0016] Fig.10 is a schematic flow chart of a detection method in certain embodiments of the present application;
[0017] Fig.11 is a schematic diagram of a terminal issuing a movement instruction in certain embodiments of the present application;
[0018] Fig.12 It is a schematic diagram of a confidence map and a two-dimensional image of a preset object obtained by a user at different angles in some embodiments of the present application;
[0019] Fig.13 and Fig.14is a schematic flow chart of a detection method in certain embodiments of the present application;
[0020] Fig.15 It is a connection diagram of a non-volatile computer-readable storage medium and a processor in certain embodiments of the present application. DETAILED DESCRIPTION
[0021] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the embodiments of the present application.
[0022] See also Figure 1 The present application embodiment provides a method for detecting a hidden camera. The detection method includes:
[0023] 01: Get the initial two-dimensional image of the current viewing angle;
[0024] 02: Turn on the depth camera 20 to emit light to obtain a speckle pattern;
[0025] 03: Get the location of the hidden camera based on the speckle pattern and the initial two-dimensional image.
[0026] See also Figure 2, the embodiment of the present application provides a terminal 100. The terminal 100 includes a shooting module 10, a depth camera 20 and one or more processors 30. The shooting module 10 is used to shoot a two-dimensional image, and the depth camera 20 is used to emit light to obtain a confidence map. The methods described in 01, 02 and 03 above can be implemented by one or more processors 30. That is, one or more processors 30 are used to obtain an initial two-dimensional image of the current viewing angle; turn on the depth camera 20 to emit light to obtain a speckle pattern; and obtain the position of the hidden camera according to the speckle pattern and the initial two-dimensional image. The detection method and terminal 100 of the hidden camera in the present application can improve the recognition accuracy of the hidden camera detection by jointly determining the position of the hidden camera through the two-dimensional image and the speckle pattern, and the user does not need to purchase and carry other peripheral devices. The location of the hidden camera can be determined only by being equipped with a shooting module that can obtain a two-dimensional image and a depth camera that can obtain a speckle pattern, which is conducive to improving the convenience of users in detecting hidden cameras. In addition, the traditional RGB camera-based hidden camera detection has limited application scenarios and can only detect hidden cameras with infrared fill light; the traditional network traffic detection-based solution can only detect hidden cameras that transmit data in real time. However, the hidden camera detection method and terminal 100 in the present application can determine the location of the hidden camera through two-dimensional images and speckle patterns, and can accurately identify most hidden cameras with lenses, which is conducive to expanding the application scope of hidden camera detection.
[0027] It should be noted that, in some embodiments, the two-dimensional image is a color image, and the shooting module 10 used to obtain the two-dimensional image can be an RGB camera. Since the two-dimensional image is a color image, it is more conducive to the subsequent image recognition of the two-dimensional image than the two-dimensional image is a black and white image. Of course, in some embodiments, the two-dimensional image can also be a black and white image, which is not limited here. For the convenience of explanation, the embodiments of the present application are all described by taking the two-dimensional image as a color image and the shooting module 10 as an RGB camera as an example. In addition, in some embodiments, the terminal 100 includes at least one of a mobile phone, a smart watch, a tablet computer, a laptop computer and smart glasses. In the embodiments of the present application, the terminal 100 is described as a mobile phone.
[0028] See also Figure 3 In some embodiments, the detection method further comprises:
[0029] 04: Perform image recognition on the initial two-dimensional image;
[0030] At this time, turn on the depth camera to emit light to obtain the speckle pattern, including:
[0031] 021: When the initial two-dimensional image includes a preset object, the depth camera is turned on to emit light to the preset object to obtain a speckle pattern.
[0032] Please combine Figure 2 In some embodiments, the methods described in 04 and 021 above may also be implemented by the processor 30. That is, the processor 30 is further configured to: perform image recognition on the initial two-dimensional image; and when the initial two-dimensional image includes a preset object, start the depth camera to emit light to the preset object to obtain a speckle pattern.
[0033] Specifically, the user turns on the shooting module 10 to obtain a two-dimensional image of the initial scene of the current viewing angle, and the processor 30 obtains the initial two-dimensional image of the current viewing angle, and performs image recognition processing on the initial two-dimensional image to determine whether there is a preset object in the initial two-dimensional image. By way of example, in some embodiments, the initial two-dimensional image can be input into a pre-trained deep learning model. The deep learning model performs a series of operations such as convolution and pooling on the input initial two-dimensional image to obtain feature information, and then obtains the object contained in the initial two-dimensional image based on the feature information, and determines whether the object belongs to the preset object.
[0034] Among them, in some embodiments, the preset objects can be objects that may be equipped with hidden cameras, which are obtained by the manufacturer through extensive research before the terminal 100 leaves the factory, and these objects are used as preset objects; or, in some embodiments, the preset objects can also be user-defined settings; or, in some embodiments, special data sets are collected in advance for specific objects and scenes where hidden cameras are easily hidden to train the deep learning model, and the trained deep learning model can autonomously define specific objects that are easy to hide hidden cameras as preset objects.
[0035] In addition, in some embodiments, after each time the terminal 100 detects a hidden camera, the deep model can be trained again based on the currently detected object containing the hidden camera and the specific location of the hidden camera on the object. In this way, the deep learning model can be continuously updated to improve the accuracy of the terminal 100 in detecting hidden cameras.
[0036] When the preset object is identified in the initial two-dimensional image, the depth camera 20 is turned on to emit light to the preset object to obtain a speckle pattern. At this time, the speckle pattern obtained by the depth camera 20 corresponds to the initial two-dimensional image. If the scene perspective corresponding to a certain frame of speckle is the same as the scene perspective corresponding to a certain frame of two-dimensional image, the speckle pattern of the frame is said to correspond to the frame of two-dimensional image. The correspondence between the speckle pattern and the two-dimensional image in the following text is also explained in this way and will not be repeated.
[0037] If the initial two-dimensional image of the current viewing angle contains the preset object, it means that there is a high possibility that a hidden camera exists in the scene of the current viewing angle; conversely, if the initial two-dimensional image of the current viewing angle does not contain the preset object, it means that there is a low possibility that a hidden camera exists in the scene of the current viewing angle. In the case that there is a low possibility that a hidden camera exists in the scene of the current viewing angle, turning on the depth camera 20 to obtain the speckle pattern will undoubtedly increase the terminal 100 ( Figure 2 However, in this embodiment, the depth camera 20 is turned on to obtain the speckle pattern only when it is recognized that the initial two-dimensional image contains a preset object, that is, a preliminary judgment is made before the depth camera 20 is turned on. Compared with directly turning on the depth camera 20, the power consumption of the terminal 100 can be reduced while detecting hidden cameras.
[0038] See also Figure 4 In some embodiments, when the initial two-dimensional image includes a preset object, starting the depth camera 20 to emit light to the preset object to obtain a speckle pattern includes:
[0039] 0211: Detect whether a preset object in an initial two-dimensional image has a predetermined part of interest;
[0040] 0212: When there is a portion of interest, the depth camera 20 is turned on to emit light to a preset object to obtain a speckle pattern.
[0041] Please combine Figure 2 In some embodiments, the methods in 0211 and 0212 may also be implemented by the processor 30. That is, the processor 30 may also be used to detect whether there is a predetermined part of interest in the preset object in the initial two-dimensional image; and when there is a predetermined part of interest, the depth camera is turned on to emit light to the preset object to obtain a speckle pattern.
[0042] It should be noted that the predetermined part of interest of the preset object indicates the location where a hidden camera may be set in the preset object. When the preset object is included in the initial two-dimensional image, it is detected whether there is a part of interest in the preset object in the initial two-dimensional image. For example, the terminal 100 stores parts of interest corresponding to different preset objects. For example, when the preset object is a socket, the part of interest of the socket is the socket; when the preset object is a router, the part of interest corresponding to the router is the indicator light. The parts of interest mentioned below are also explained in this way and will not be repeated.
[0043] When there is a part of interest in the preset object in the initial two-dimensional image, the depth camera 20 is turned on to emit light to the preset object to obtain a speckle pattern. Since the depth camera 20 is turned on to obtain the speckle pattern only when the part of interest where a hidden camera may be located is included in the two-dimensional image, the position of the hidden camera is further determined, which is beneficial to reducing the power consumption of the terminal 100 and improving the accuracy of detecting the hidden camera.
[0044] For example, it is assumed that the terminal 100 stores: when the preset object is a socket, the part of interest of the socket is the socket; when the preset object is a router, the part of interest corresponding to the router is the indicator light. It is recognized that the initial two-dimensional image includes the preset object, and the preset object is a socket. Since the terminal 100 stores that when the preset object is a socket, the part of interest of the socket is the socket, it is determined whether the socket in the current two-dimensional image includes the socket. If the socket is included, that is, the part of interest exists in the preset object of the initial two-dimensional image, the depth camera 20 is turned on to emit light to the preset object to obtain a speckle pattern.
[0045] If there is no portion of interest in the preset object in the initial two-dimensional image, that is, the position where the preset object may be equipped with a hidden camera is not in the current image, then the possibility of detecting the hidden camera by turning on the depth camera 20 to obtain the speckle pattern is small. Therefore, in some embodiments, if there is no portion of interest in the preset object in the initial two-dimensional image, a move prompt is issued to instruct the user to change the shooting angle.
[0046] See also Figure 5 In some embodiments, when the initial two-dimensional image includes a preset object, the depth camera 20 is turned on to emit light to the preset object to obtain a speckle pattern, and further includes:
[0047] 0213: Obtaining a depth estimation value of a preset object according to the initial two-dimensional image; and
[0048] 0214: If the depth estimation value is within the preset range, turn on the depth camera to obtain the speckle pattern.
[0049] Please combine Figure 2 In some embodiments, the methods in 0213 and 0214 may also be implemented by the processor 30. That is, the processor 30 is further configured to: obtain a depth estimation value of a preset object according to the initial two-dimensional image; and if the depth estimation value is within a preset range, start the depth camera to obtain a speckle pattern.
[0050] Since the depth camera 20 emits light when it is too far or too close to the object, even if there is no hidden camera in the object, the intensity of the light reflected back by the object will be too weak or too strong, which will lead to misjudgment in the subsequent process. Therefore, it is necessary to control the distance between the depth camera 20 and the preset object within a certain range to avoid misjudging the position of the hidden camera due to low confidence caused by the distance.
[0051] In some embodiments, when a preset object is included in the two-dimensional image, a depth estimation value of the preset object can be obtained according to the initial two-dimensional image. When the depth estimation value is within a preset range, the depth camera 20 is turned on to emit light to the preset object to obtain a speckle pattern. In this way, when the depth estimation value is within the preset range, the depth camera 20 is turned on to obtain the confidence, which can avoid misjudging the position of the hidden camera due to low confidence obtained later due to distance reasons.
[0052] For example, it can be understood that the closer the distance between the preset object and the depth camera 20 is, that is, the smaller the depth estimation value of the pixel corresponding to the preset object is, the larger the area occupied by the preset object in the initial two-dimensional image is; the farther the distance between the preset object and the depth camera 20 is, that is, the larger the depth estimation value of the pixel corresponding to the preset object is, the smaller the area occupied by the preset object in the initial two-dimensional image is. Therefore, in some embodiments, the depth value of the object can be obtained according to the area occupied by the preset object in the initial two-dimensional image. For example, in one example, when the ratio between the area occupied by the preset object in the initial two-dimensional image and the total area of the initial two-dimensional image is within the preset ratio range, it means that the depth value is within the preset range, and at this time, the depth camera 20 is turned on to reflect light to the preset object to obtain a speckle pattern.
[0053] In some embodiments, when the depth estimation value is not within the preset range, it means that the position between the preset object and the terminal 100 is not appropriate, and the terminal 100 may issue a forward or backward prompt. The forward or backward prompt is used to instruct the user to reduce or increase the distance between the terminal 100 and the preset object, wherein the movement prompt may be a voice broadcast or displayed on the display screen of the terminal 100, which is not limited here. In this way, the user can be guided to control the distance between the preset object and the depth camera 20 within a suitable range, and the position of the hidden camera can be avoided from being misjudged due to distance reasons.
[0054] After the depth camera 20 is turned on to obtain the speckle pattern, the processor 30 obtains the position of the hidden camera according to the speckle pattern and the initial two-dimensional image. Figure 6 In some embodiments, obtaining the position of the hidden camera according to the speckle pattern and the initial two-dimensional image includes:
[0055] 031: Fusing the speckle image and the initial two-dimensional image to obtain a depth map and a confidence map; and
[0056] 032: Get the location of the hidden camera based on the initial two-dimensional image and confidence map.
[0057] Please combine Figure 2 In some embodiments, the methods in 031 and 032 can also be implemented by the processor 30, that is, the processor 30 can also be used to fuse the speckle image and the initial two-dimensional image to obtain a depth map and a confidence map; and obtain the position of the hidden camera according to the initial two-dimensional image and the confidence map. Specifically, the depth camera 20 includes a light emitting module (not shown) and a light receiving module (not shown). After the depth camera 20 is turned on, the light emitting module is used to emit light, and the light receiving module is used to receive at least part of the light reflected by the object. Among them, the light receiving module includes an image sensor (not shown in the figure), and the image sensor includes a two-dimensional pixel array containing multiple pixels. The light reflected back by the object can be received by multiple pixels in the pixel array, and the multiple pixels can convert the received light into an electrical signal output to obtain a speckle image, which includes multiple scattered spots. The depth value corresponding to each pixel in the speckle image can be obtained according to the time when each pixel in the speckle image receives the light and the emission time of the corresponding light. The confidence is used to characterize the reliability of the depth value corresponding to the pixel. For example, when the distance between the object and the depth camera 20 is too far or the reflectivity of the object is too low, the intensity of the reflected light is relatively weak; when the distance between the object and the depth camera 20 is too close or the reflectivity of the object is too high, the intensity of the reflected light is relatively strong, which will cause a large error in the measured depth value.
[0058] Therefore, in some embodiments, the confidence corresponding to the pixel can be obtained by the intensity of the light received by the pixel. For example, in some embodiments, when the intensity of the light received by the pixel is within the preset range, the confidence corresponding to the pixel is relatively high; when the intensity of the light received by the pixel is outside the preset range, the confidence corresponding to the pixel is relatively low. For example, when the intensity of the light received by the pixel is within the preset range, the confidence corresponding to the pixel is 95, and when the intensity of the light received by the pixel is outside the preset range, the confidence corresponding to the pixel is 40. Further, in some embodiments, when the intensity of the light received by the pixel is outside the preset range, the greater the difference between the intensity of the light and the preset range, the lower the confidence. For example, assuming that the preset range is 50 to 80, the intensity of the light received by the first pixel is 20, and the intensity of the light received by the second pixel is 150. The intensities of the light received by the first pixel and the second pixel are both outside the preset range, and the difference between the intensity of the light received by the second pixel and the preset range is greater than the difference between the intensity of the light received by the first pixel and the preset range, so the confidence corresponding to the first pixel is greater than the confidence corresponding to the second pixel.
[0059] After obtaining the speckle image, the processor 30 fuses the speckle image and the initial two-dimensional image to obtain a depth map and a confidence map. Figure 7 As shown, in some embodiments, an arbitrary pixel is extracted from the initial two-dimensional image, and the depth value of the pixel corresponding to the pixel is obtained in the speckle map. If a certain pixel in the speckle map and a certain pixel in the initial two-dimensional image both correspond to the same point in the scene, it is considered that the two pixels correspond, and the pixel correspondence described below is also explained in this way and will not be repeated. The depth value is then used as the depth value of the pixel arranged at the corresponding position in the depth map. For example, the pixel A extracted from the initial two-dimensional image is located in the first row and first column of the initial two-dimensional image, and the pixel B arranged in the first row and first column of the speckle map and the pixel A both correspond to the same point in the scene, that is, the pixel A corresponds to the pixel B. The depth value of pixel B is obtained, and then the obtained depth value is used as the depth value of the pixel C arranged in the first row and first column of the depth map. Subsequently, the next pixel is extracted from the initial two-dimensional image and the above steps are repeated until all pixels in the initial two-dimensional image are extracted, so that the depth map is obtained. Similarly, in some embodiments, an arbitrary pixel is extracted from the initial two-dimensional image, the confidence of the pixel corresponding to the pixel is obtained in the speckle map, and the confidence is used as the confidence of the pixel arranged at the corresponding position in the confidence map. For example, the pixel A extracted from the initial two-dimensional image is located in the first row and first column of the initial two-dimensional image, and the pixel D and the pixel A arranged in the first row and second column of the speckle map both correspond to the same point in the scene, that is, the pixel A corresponds to the pixel D. The confidence of the pixel D is obtained, and then the obtained confidence is used as the confidence of the pixel C arranged in the first row and first column of the confidence map. Then, the next pixel is extracted from the initial two-dimensional image and the above steps are repeated until all pixels in the initial two-dimensional image are extracted, so that the confidence map is obtained. Of course, other methods can also be used to fuse the speckle map and the initial two-dimensional image to obtain the depth map and the confidence map, as long as the depth map contains the depth value corresponding to each pixel in the initial two-dimensional image, and the confidence map contains the confidence corresponding to each pixel in the initial two-dimensional image, which is not limited here.
[0060] After obtaining the confidence map, the processor 30 can obtain the location of the hidden camera based on the initial two-dimensional image and the confidence map. Figure 8 In some embodiments, obtaining the position of the hidden camera according to the initial two-dimensional image and the confidence map includes:
[0061] 0321: taking an area in the confidence map where the confidences of pixels are all less than a preset threshold as a first area I1;
[0062] 0322: Acquire a second area I2 corresponding to the first area I1 in the initial two-dimensional image; and
[0063] 0323: Traverse the second area I2, and take the second area I2 where the preset object exists as the location of the hidden camera.
[0064] Please combine Figure 2 In some embodiments, the methods in 0321, 0322 and 0323 can also be implemented by the processor 30. That is, the processor 30 can also be used to take the area in the confidence map where the confidence of the pixels is less than the preset threshold as the first area I1; obtain the second area I2 corresponding to the first area I1 in the initial two-dimensional image; and traverse the second area I2, and take the second area I2 where the preset object exists as the location of the hidden camera.
[0065] Specifically, see Fig. 9 ( Fig. 9 In the confidence map, the confidence of the pixels in the area filled with oblique lines is less than the preset threshold, and the confidence of the pixels in the area not filled with oblique lines is not less than the preset threshold). After obtaining the confidence map, the first area I1 in the confidence map is obtained, wherein the confidence of the pixels in the first area I1 is less than the preset threshold. It should be noted that the first area I1 may include multiple non-circulating sub-areas, or may be a whole connected area, which is not limited here, and it only needs to satisfy that the confidence of the pixels in the first area I1 is less than the preset threshold.
[0066] After obtaining the first area I1 in the confidence map, obtain the second area I2 in the initial two-dimensional image, where the first area I1 corresponds to the second area I2. That is, the confidence of the pixels corresponding to each pixel in the second area I2 in the confidence map is less than the preset threshold. Traverse the second area I2, and take the second area I2 where the preset object exists as the location of the hidden camera. For example, Fig. 9 As shown, the initial two-dimensional image also includes a third area I3, which is the area where the preset object is located in the two-dimensional image. After obtaining the second area I2, all pixels in the second area I2 are traversed. If the pixel is located in the third area I3, that is, if the pixel is located in the area where the preset object is located, it can be considered that there may be a hidden camera here, and only the pixel is used as a candidate pixel. After traversing all pixels in the second area I2, the area composed of all the candidates is the location of the hidden camera.
[0067] It should be noted that the diameter of the lens of a general hidden camera is very small, usually about 1 to 2 mm, which is in line with the principle of pinhole imaging. When external light is irradiated to the lens of the hidden camera, "retroreflection" (also known as "backward reflection") is likely to occur, that is, a device or surface that reflects the light irradiated thereon with minimal scattering. After the depth camera 20 is turned on, the depth camera 20 emits light to the current scene. If a hidden camera is set in the current scene, after the light hits the hidden camera, the hidden camera will have retroreflection, that is, there will be strong reflected light reflected back to the depth camera 20. At this time, the light intensity received by the pixel corresponding to the position in the depth camera 20 is relatively strong, and the confidence of the corresponding pixel in the obtained confidence map is relatively low. In addition, after the light hits the edge of the current scene, the reflected light reflected back to the depth camera 20 will be relatively weak, and the confidence of the pixel at the corresponding position is relatively low. If the current scene contains a black object, the reflected light reflected back to the depth camera 20 after the light hits the black object will also be relatively weak, and the confidence of the pixel at the corresponding position is also relatively low. That is to say, the first area I1 may also include the edge of the current scene and the area where the black object is located. In the embodiment of the present application, the area with a confidence level less than a preset threshold and located within the preset object is identified as the location of the hidden camera, so that the hidden camera in the scene can be detected, and compared with identifying the hidden camera only based on the confidence level, it can avoid misjudgment caused by interference from the edge of the scene or objects in the scene, which is conducive to improving the accuracy of detection.
[0068] See also Fig.10 In some embodiments, obtaining the position of the hidden camera according to the two-dimensional image and the confidence map may also include:
[0069] 0324: If the number of pixels in the second area I2 where the preset object exists is less than the preset number, the mobile depth camera 20 emits light to the preset object at different viewing angles to obtain a speckle pattern after movement;
[0070] 0325: Acquire a moved two-dimensional image corresponding to the moved speckle pattern, and acquire a corresponding moved confidence map according to the moved speckle pattern and the corresponding moved two-dimensional image; and
[0071] 0326: Get the position of the hidden camera based on the confidence map after the move and the two-dimensional image after the move.
[0072] Please combine Figure 2In some embodiments, the methods in 0324, 0325 and 0326 can also be implemented by the processor 30. That is, the processor 30 is further configured to: if the number of pixels in the second area I2 where the preset object exists is less than the preset number, move the depth camera 20 to emit light to the preset object at different viewing angles to obtain a moved speckle pattern; obtain a moved two-dimensional image corresponding to the moved speckle pattern, and obtain a corresponding moved confidence map according to the moved speckle pattern and the corresponding moved two-dimensional image; and obtain the position of the hidden camera according to the moved confidence map and the moved two-dimensional image.
[0073] Since the hidden camera needs light to hit it from a certain angle to cause retro-reflection, even if the position of the hidden camera is not identified by the two-dimensional image and the confidence map obtained at the current viewing angle, it cannot be determined that there is no hidden camera in the preset object of the current scene. It may be that the hidden camera does not have retro-reflection only due to the problem of light angle. Therefore, in some embodiments, if the number of pixels in the second area where the preset object exists is less than the preset number, it means that the position of the hidden camera cannot be identified by the initial two-dimensional image and the confidence map obtained at the current viewing angle, then the mobile depth camera 20 emits light to different sides of the preset object to obtain the moved speckle pattern, wherein the moved speckle pattern contains the preset objects at different viewing angles.
[0074] It should be noted that, in some embodiments, if the number of pixels in the second area where the preset object exists is less than the preset number, a movement prompt may be issued to instruct the user to move the depth camera 20 through the mobile terminal 100 to shoot the object at different angles. The movement information may be a voice broadcast or may be displayed on the display screen of the terminal 100 (e.g. Fig.11 shown).
[0075] After the moved speckle pattern is obtained, a moved two-dimensional image corresponding to the moved speckle image is obtained, and a corresponding moved confidence map is obtained according to the moved speckle pattern and the corresponding moved two-dimensional image. Then, the position of the hidden camera is obtained according to the moved confidence map and the moved two-dimensional image. The specific implementation of obtaining the corresponding moved confidence map according to the moved speckle pattern and the corresponding moved two-dimensional image is the same as the specific implementation of obtaining the confidence map according to the speckle pattern and the initial two-dimensional image in the above embodiment; the specific implementation of obtaining the position of the hidden camera according to the moved confidence map and the moved two-dimensional image is the same as the specific implementation of obtaining the position of the hidden camera according to the confidence map and the initial two-dimensional image in the above embodiment, and will not be repeated here.
[0076] For example, Fig.12As shown, assuming that the user first obtains an initial two-dimensional image a1 at point A, and there is a preset object in the initial two-dimensional image a1, the depth camera 20 is also turned on at point A to obtain a speckle map a2, wherein the speckle map a2 corresponds to the two-dimensional image a1. A confidence map a3 is obtained according to the speckle map a2 and the initial two-dimensional image a1. If the hidden camera is not identified according to the confidence map a3 and the initial two-dimensional image a1, the user moves the terminal 100 to move the depth camera 20 to point B, and the depth camera 20 emits light to the preset object at point B to obtain the moved speckle map b2. The terminal 100 is kept turned on the shooting module 10 at point B to obtain the moved two-dimensional image b1, and the position of the hidden camera is obtained according to the moved speckle map b2 and the corresponding moved two-dimensional image b1. It can be understood that for the same position of the preset object, the angle at which the light emitted by the depth camera 20 at point B to the preset object reaches the position is different from the angle at which the light emitted by the depth camera 20 at point A to the preset object reaches the position. By moving the depth camera 20 to emit light to different sides of a preset object, the possibility of triggering a hidden camera to generate retroreflection is increased, thereby facilitating the improvement of the accuracy of the terminal 100 in detecting the hidden camera.
[0077] Further, in some embodiments, if the position of the hidden camera still cannot be detected according to the moved speckle pattern and the moved two-dimensional image, the depth camera 20 is continuously moved to emit light to different sides of the preset object to obtain a new confidence map after the move and repeat the above steps until the position of the hidden camera is identified, or the depth camera 20 has been moved to emit light to all viewing angles of the preset object. In some embodiments, when the depth camera 20 has been moved to emit light to all viewing angles of the preset object and the position of the hidden camera has not been identified, it can be considered that the preset object in the current scene has no hidden camera set.
[0078] See also Fig.13 In some embodiments, obtaining the position of the hidden camera according to the initial two-dimensional image and the confidence map further includes:
[0079] 0327: When the preset object in the initial two-dimensional image includes a preset portion of interest, obtaining a region to be measured of the initial two-dimensional image, wherein the region to be measured includes the portion of interest;
[0080] 0328: If the confidence of the pixel corresponding to the area to be measured in the confidence map is less than a preset threshold, it is determined that the area to be measured is the location of the hidden camera.
[0081] Please combine Figure 2In some embodiments, the methods in 0327 and 0328 may also be implemented by the processor 30. That is, the processor 30 is further configured to obtain the region to be measured of the initial two-dimensional image when the preset object in the initial two-dimensional image includes the preset part of interest, and the region to be measured includes the part of interest; and if the confidence of the pixel corresponding to the region to be measured in the confidence map is less than the preset threshold, determine that the region to be measured is the location of the hidden camera.
[0082] Specifically, in some embodiments, when the preset object in the initial two-dimensional image includes a preset part of interest, the area to be measured of the initial two-dimensional image is taken, and the area to be measured includes the part of interest. For example, in some embodiments, the terminal 100 stores: when the preset object is a socket, the part of interest of the socket is the jack; when the preset object is a router, the part of interest corresponding to the router is the indicator light. The deep learning model recognizes that the initial two-dimensional image includes a router, that is, there is a preset object in the initial two-dimensional image and the preset object is a router. Since the terminal 100 stores that when the preset object is a router, the position where a hidden camera may be set is an indicator light, the deep learning model will recognize the position of the router indicator light in the initial two-dimensional image and identify the position as the area to be measured. Of course, in some embodiments, the area to be measured can also be specified by the user; or, after a large amount of training, when the deep learning model recognizes whether there is a preset object in the initial two-dimensional image, it can directly identify the position where a hidden camera may be set as the area to be measured, which is not limited here.
[0083] After obtaining the area to be measured in the two-dimensional image, the confidence of the pixels in the area corresponding to the area to be measured in the confidence map is obtained. If the confidence of at least part of the pixels corresponding to the area to be measured in the confidence map is less than the preset threshold, it means that a retroreflection occurs in the area to be measured, and the area to be measured can be determined to be the location of the hidden camera. For example, in some embodiments, if the number of pixels corresponding to the area to be measured in the confidence map whose confidence is less than the preset threshold is greater than the preset number, the area to be measured can be determined to be the location of the hidden camera. In this embodiment, by first obtaining the area to be measured in which a hidden camera may be provided in the preset object, if the confidence of at least part of the pixels corresponding to the area to be measured in the confidence map is less than the preset threshold, the area to be measured is determined to be the location of the hidden camera. Compared with traversing the confidence of all pixels in the confidence map, the location of the hidden camera can be obtained more quickly and accurately, which is conducive to improving the speed of detecting hidden cameras.
[0084] In some embodiments, in order to avoid misjudgment due to the distance between the depth camera 20 and the object being too far or too close, the distance between the depth camera 20 and the object can also be determined based on the depth map. For example, in some embodiments, after the depth map is obtained, the depth value of the preset object is obtained based on the depth map. If the depth value is within the preset depth range, the hidden camera is obtained based on the initial two-dimensional image and the confidence map. This can avoid misjudging the position of the hidden camera due to low confidence subsequently obtained due to distance reasons.
[0085] In some embodiments, if the depth value is not within the preset depth range, the terminal 100 may also issue a forward or backward prompt to instruct the user to reduce or increase the distance between the terminal 100 and the preset object. After the user responds to the prompt to change the distance between the terminal 100 and the preset object, the camera module 10 reacquires a new two-dimensional image. This can guide the user to control the distance between the preset object and the depth camera 20 within an appropriate range, and avoid misjudging the location of the hidden camera due to low confidence caused by distance. Please refer to Fig.14 In some embodiments, the detection method further comprises:
[0086] 04: Perform image recognition on the initial two-dimensional image;
[0087] 05: When the initial two-dimensional image includes a preset object, the shooting module 10 is moved to obtain multiple two-dimensional images of the preset object at different viewing angles;
[0088] At this time, when the initial two-dimensional image contains the preset object, the depth camera is turned on to emit light to obtain the speckle pattern, including:
[0089] 0215: The mobile depth camera emits light to different sides of the preset object at different viewing angles to obtain multiple frames of speckle patterns, wherein each frame of the speckle pattern corresponds to the preset object at different viewing angles;
[0090] According to the speckle pattern and the initial two-dimensional image, the position of the hidden camera is obtained, including:
[0091] 033: Obtain the position of the hidden camera according to the multi-frame speckle pattern, the initial two-dimensional image and the multi-frame two-dimensional image.
[0092] Please combine Figure 2In some embodiments, the methods in 04, 05, 0215 and 033 can be implemented by the processor 0. That is, the processor 30 is also used to: perform image recognition on the initial two-dimensional image; when the initial two-dimensional image contains a preset object, move the shooting module 10 to obtain multiple frames of two-dimensional images of the preset object at different viewing angles; move the depth camera to emit light to different sides of the preset object at different viewing angles to obtain multiple frames of speckle patterns, wherein each frame of the speckle pattern corresponds to the preset object at different viewing angles; and obtain the position of the hidden camera according to the multiple frames of speckle patterns, the initial two-dimensional image and the multiple frames of two-dimensional images.
[0093] In some embodiments, specifically, after acquiring the initial two-dimensional image of the current viewing angle, image recognition is performed on the initial two-dimensional image. If the initial two-dimensional image contains a preset object, the depth camera 20 is first turned on to emit light to the preset object to obtain a frame of speckle pattern corresponding to the initial two-dimensional image; then, the mobile shooting module 10 acquires multiple frames of two-dimensional images of the preset object at different viewing angles, and the mobile depth camera 20 emits light to different sides of the preset object at different viewing angles to acquire multiple frames of speckle patterns, each frame of which corresponds to the preset object at different viewing angles.
[0094] For example, in some embodiments, since the depth camera 20 and the shooting module 10 are both arranged on the terminal 100, when the user moves the depth camera 20 by moving the terminal 100, the shooting module 10 will also move accordingly. Therefore, the moving shooting module 10 to obtain multiple frames of two-dimensional images and the moving depth camera 20 to obtain multiple frames of speckle patterns can be performed synchronously, that is, each time the terminal 100 is moved, the depth camera 20 obtains a speckle pattern once, and the shooting module 10 also obtains a two-dimensional image once at the same time. In this way, on the one hand, the user only needs to move the terminal 100 once to synchronously obtain a frame of two-dimensional image and the corresponding speckle pattern, which can facilitate user operation; on the other hand, the corresponding two-dimensional image and speckle pattern are obtained at a similar time, which is convenient for the subsequent rapid acquisition of the speckle pattern corresponding to a frame of two-dimensional image, which is beneficial to improving the detection speed. For example, Fig.12 The schematic diagram of the user obtaining the speckle pattern and the two-dimensional image of the preset object at different angles in one embodiment is as follows. Assuming that the user first obtains the initial two-dimensional image a1 at point A, and there is a preset object in the initial two-dimensional image a1, the depth camera 20 is also turned on at point A to obtain the speckle pattern a2, wherein the speckle pattern a2 corresponds to the initial two-dimensional image a1. Subsequently, the user moves the terminal 100 to point B, the shooting module 10 obtains the two-dimensional image b1 at point B, and the depth camera 20 emits light to the preset object at point B to obtain the speckle pattern b2; subsequently, the user moves the terminal 100 to point C, the shooting module 10 obtains the two-dimensional image c1 at point C, and the depth camera 20 emits light to the preset object at point C to obtain the speckle pattern c2.
[0095] For another example, in some implementation examples, the shooting module 10 may be moved first to obtain multiple frames of two-dimensional images, and then the depth camera 20 may be moved to obtain multiple frames of speckle images. Fig.12 The schematic diagram of a user obtaining a speckle pattern and a two-dimensional image of a preset object at different angles in one embodiment is as follows. Assuming that the user first obtains an initial two-dimensional image a1 at point A, and there is a preset object in the initial two-dimensional image a1, the depth camera 20 is also turned on at point A to obtain a speckle pattern a2, wherein the speckle pattern a2 corresponds to the initial two-dimensional image a1. Subsequently, the user moves the shooting module 10 to point B, and the shooting module 10 obtains a two-dimensional image b1 at point B; the user then moves the shooting module 10 to point C, and the shooting module 10 obtains a two-dimensional image c1 at point C; subsequently, the user moves the depth camera 20 to point B, and the depth camera 20 emits light to the preset object at point B to obtain a speckle pattern b2; the user then moves the depth camera 20 to point C, and the depth camera 20 emits light to the preset object at point C to obtain a speckle pattern c2. Of course, in some embodiments, the depth camera 20 may be moved to obtain multiple frames of speckle patterns first, and then the shooting module 10 may be moved to obtain multiple frames of two-dimensional images, which is not limited here.
[0096] It should be noted that in some embodiments, after performing image recognition on the initial two-dimensional image and finding that the initial two-dimensional image contains a preset object, it is also possible to directly move the shooting module 10 to obtain the preset object at different viewing angles, and move the depth camera 20 to emit light to different sides of the preset object at different viewing angles to obtain multiple frames of speckle patterns without obtaining the speckle pattern corresponding to the initial two-dimensional image. The specific method of obtaining multiple frames of two-dimensional images and multiple frames of speckle patterns corresponding to objects at different viewing angles is the same as that in the above embodiment and will not be repeated.
[0097] After obtaining multiple speckle patterns and multiple two-dimensional images, the position of the hidden camera is obtained according to the multiple speckle patterns, the initial two-dimensional images and the multiple two-dimensional images. Specifically, in some embodiments, all two-dimensional images (including the initial two-dimensional image and the multiple two-dimensional images obtained after the moving shooting module 10) are traversed to obtain the speckle pattern corresponding to each two-dimensional image. If a certain two-dimensional image does not have a corresponding speckle pattern, the two-dimensional image is eliminated. Subsequently, the hidden camera is obtained according to the two-dimensional image and the speckle pattern corresponding thereto. The specific implementation method of obtaining the hidden camera according to the two-dimensional image and the speckle pattern corresponding thereto is the same as the specific implementation method of obtaining the hidden camera according to the initial two-dimensional image and the speckle pattern in the above embodiment, and will not be repeated.
[0098] Since the hidden camera needs light to be projected from a certain angle to cause retro-reflection, in this embodiment, after recognizing that the two-dimensional image contains a preset object, the depth camera 20 is turned on and moved to emit light to different sides of the preset object to obtain multiple frames of speckle patterns, and the position of the hidden camera is obtained according to the multiple frames of speckle patterns and multiple frames of two-dimensional images corresponding to objects at different viewing angles. In this way, by moving the depth camera 20 to emit light to different sides of the preset object, the possibility of triggering the hidden camera to generate retro-reflection is increased, and multiple hidden cameras set on a preset object can be discovered in time, which is conducive to improving the accuracy of the terminal 100 in detecting hidden cameras.
[0099] It should be noted that, in some embodiments, before traversing all two-dimensional images, it is also possible to first detect whether the preset object in each frame of the two-dimensional image has a predetermined part of interest. If the preset object in a frame of the two-dimensional image does not have a part of interest, the two-dimensional image is discarded, and the hidden camera is not subsequently obtained based on the frame of the two-dimensional image. Pre-screening the two-dimensional images in this way can reduce the processing power consumption of the terminal 100 and improve the detection speed.
[0100] See also Fig.15 The present application also provides a non-volatile computer-readable storage medium 400 including a computer program 401. When the computer program 401 is executed by one or more processors 30, the processor 30 executes the detection methods in 01, 02, 03, 04, 021, 0211, 0213, 0213, 0214, 031, 032, 0321, 0322, 0323, 0324, 0325, 0326, 0327, 0328, 05, 0215 and 033.
[0101] For example, please combine Figure 1 , when the computer program 401 is executed by one or more processors 30, the processor 30 performs the following method:
[0102] 01: Get the initial two-dimensional image of the current viewing angle;
[0103] 02: Turn on the depth camera 20 to emit light to obtain a speckle pattern;
[0104] 03: Get the location of the hidden camera based on the speckle pattern and the initial two-dimensional image.
[0105] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0106] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0107] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for detecting a hidden camera, characterized in that: include Get the initial two-dimensional image of the current viewing angle; Turn on the depth camera to emit light to obtain the speckle pattern; Acquiring the position of the hidden camera according to the speckle pattern and the initial two-dimensional image; The step of obtaining the position of the hidden camera according to the speckle pattern and the initial two-dimensional image includes: The speckle pattern and the initial two-dimensional image are fused to obtain a depth map and a confidence map, wherein the speckle pattern includes a plurality of pixels, the speckle pattern is used to obtain depth values corresponding to the plurality of pixels, and the confidence is used to characterize the reliability of the depth value corresponding to the target pixel, the target pixel is any pixel among the plurality of pixels, the depth value is used to generate the depth map, and the confidence is used to generate the confidence map; Acquire the position of the hidden camera according to the initial two-dimensional image and the confidence map; The obtaining the position of the hidden camera according to the initial two-dimensional image and the confidence map includes: Taking an area in which the confidences of pixels in the confidence map are all less than a preset threshold as a first area; Acquire a second area corresponding to the first area in the initial two-dimensional image; and The second area is traversed, and the second area where the preset object exists is used as the location of the hidden camera.
2. The detection method according to claim 1, characterized in that: The detection method further comprises: Performing image recognition on the initial two-dimensional image; The step of starting the depth camera to emit light to obtain a speckle pattern includes: In a case where a preset object is included in the initial two-dimensional image, the depth camera is turned on to emit light to the preset object to obtain the speckle pattern.
3. The detection method according to claim 2, characterized in that: When the initial two-dimensional image includes a preset object, starting the depth camera to emit light to the preset object to obtain the speckle pattern includes: Detecting whether a predetermined part of interest exists in the preset object in the initial two-dimensional image; In the case where the portion of interest exists, the depth camera is turned on to emit light toward the preset object to acquire the speckle pattern.
4. The detection method according to claim 2, characterized in that When the initial two-dimensional image includes a preset object, starting the depth camera to emit light to the preset object to obtain the speckle pattern includes: Acquire a depth estimation value of a preset object according to the initial two-dimensional image; and If the depth estimation value is within a preset range, the depth camera is turned on to obtain the speckle image.
5. The detection method according to claim 1, characterized in that: The step of obtaining the position of the hidden camera according to the initial two-dimensional image and the confidence map further includes: In a case where the preset object in the initial two-dimensional image includes a preset portion of interest, acquiring a region to be measured of the initial two-dimensional image, wherein the region to be measured includes the portion of interest; If the confidence of the pixel corresponding to the area to be measured in the confidence map is less than a preset threshold, it is determined that the area to be measured is the location of the hidden camera.
6. The detection method according to claim 1, characterized in that: The step of obtaining the position of the hidden camera according to the speckle pattern and the initial two-dimensional image further includes: Acquire a depth estimation value of the preset object according to the depth map; The obtaining the position of the hidden camera according to the initial two-dimensional image and the confidence map includes: If the depth estimation value is within a preset range, the position of the hidden camera is obtained according to the initial two-dimensional image and the confidence map.
7. A terminal, characterized in that: The system comprises a shooting module, a depth camera and one or more processors, wherein the shooting module is used to shoot a two-dimensional image, the depth camera is used to emit light to obtain a speckle pattern, and the one or more processors are used to: Get the initial two-dimensional image of the current viewing angle; Turn on the depth camera to emit light to obtain the speckle pattern; Acquire the position of the hidden camera according to the speckle pattern and the initial two-dimensional image; The speckle pattern and the initial two-dimensional image are fused to obtain a depth map and a confidence map, wherein the speckle pattern includes a plurality of pixels, the speckle pattern is used to obtain depth values corresponding to the plurality of pixels, and the confidence is used to characterize the reliability of the depth value corresponding to the target pixel, the target pixel is any pixel among the plurality of pixels, the depth value is used to generate the depth map, and the confidence is used to generate the confidence map; Taking an area in which the confidences of pixels in the confidence map are all less than a preset threshold as a first area; Acquire a second area corresponding to the first area in the initial two-dimensional image; and The second area is traversed, and the second area where the preset object exists is used as the location of the hidden camera.
8. The terminal according to claim 7, characterized in that: The terminal includes at least one of a mobile phone, a smart watch, a tablet computer, a laptop computer and smart glasses.
9. A non-volatile computer-readable storage medium storing a computer program, which, when executed by one or more processors, implements the detection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Image processing method and device and storage medium
CN110335303A
Secret photography device detection method and electronic equipment
CN110807405A
