Electronic device-based optical camera detection method and storage medium
By using a light source and camera to acquire photos on electronic devices and analyzing highlight feature information, the problem of high difficulty in optical camera detection is solved, and convenient and efficient optical camera recognition is achieved.
Patent Information
- Application Number
- CN202210082250.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-01-24
AI Technical Summary
Existing optical camera detection methods and equipment suffer from high detection difficulty and low success rate, especially for miniaturized cameras which are difficult to detect and identify.
By using a light source and camera on an electronic device to acquire two or more photos, analyzing the feature information of bright spots, and using image matching technology to distinguish between optical cameras and ordinary objects, especially by utilizing the bright spot features formed by the cat's eye effect of optical cameras, the detection accuracy can be improved.
It enables convenient and efficient detection of optical cameras on ordinary electronic devices, reduces detection costs, improves detection success rate, and is applicable to optical camera recognition in various scenarios.
Smart Images

Figure CN116523817B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of photoelectric detection and recognition, specifically to an optical camera detection method and storage medium based on electronic devices. Background Technology
[0002] With the development of information technology, various optical cameras may be installed in places such as hotel bedrooms, bathrooms, or living rooms. These optical cameras are characterized by their small size and low power consumption, making them difficult to detect and resulting in a low success rate of detection. Summary of the Invention
[0003] In view of this, this application provides an optical camera detection method and storage medium based on electronic devices to solve the problem that optical cameras are difficult to detect.
[0004] Firstly, this application provides an optical camera detection method based on an electronic device. The detection method may include: acquiring two or more photographs using a light source and a camera; wherein the two or more photographs contain bright spots and partially overlap. The electronic device calculates feature information of the bright spots in the overlapping area of the two or more photographs. Based on the feature information of the bright spots, the electronic device determines whether an optical camera exists in the overlapping area. It should be understood that optical cameras exhibit a cat's-eye effect due to the special structure of their lens assembly and the surface reflection characteristics of their image sensors. Unlike the specular reflection of ordinary objects, light reflected from an optical camera returns along a path similar to the incident light. With the aid of a light source, both optical cameras and ordinary objects can form bright spots in photographs. Based on the differences in feature information of the bright spots in different photographs, the bright spots in the photographs can be analyzed using methods such as image matching to distinguish between optical cameras and ordinary objects. Therefore, this detection method can detect whether the actual object corresponding to a bright spot is an optical camera. Furthermore, since this detection method can be implemented on electronic devices such as mobile phones and tablets, the detection is relatively convenient.
[0005] In some implementations, electronic devices acquire two or more photos through the cooperation of a light source and a camera. Specifically, this can include: the electronic device controlling a light source to emit light at a preset frequency; and the electronic device using a camera to perform exposure and image acquisition at different positions to obtain two or more photos. It should be understood that any electronic device with a camera can acquire two or more photos using a single camera. Based on this preset frequency, the brightness, color, and shape of bright spots formed by ordinary objects and optical cameras can differ significantly, thereby avoiding interference from ordinary objects, reducing the difficulty of image matching, and improving the accuracy of image matching.
[0006] In some implementations, based on the feature information of bright spots, the electronic device determines whether an optical camera exists in the overlapping area. Specifically, this may include: the electronic device analyzing the feature information of bright spots in the overlapping area; the electronic device determining whether there is a bright spot with an unchanged position in the overlapping area; and when a bright spot with an unchanged position exists in the overlapping area, the electronic device identifying that bright spot as an optical camera. It should be understood that for two or more photos acquired by a single camera, due to the differences between the photos, bright spots formed by general objects will correspond to different world coordinate positions in different photos; however, due to the cat-eye effect, bright spots formed by an optical camera will correspond to the same world coordinate position in different photos. Therefore, when a bright spot with an unchanged position exists in the overlapping area, it can be determined that the real object corresponding to that bright spot is an optical camera.
[0007] In some implementations, electronic devices acquire two or more photos through the cooperation of a light source and cameras. Specifically, this may include: the electronic device controlling a light source to emit light at a preset frequency; and the electronic device using at least two cameras for exposure and image acquisition to obtain two or more photos. It should be understood that when an electronic device has two or more cameras, it can acquire two or more photos through at least two of them. Based on this preset frequency, the brightness, color, and shape of bright spots formed by ordinary objects and optical cameras can differ significantly, thereby avoiding interference from ordinary objects, reducing the difficulty of image matching, and improving the accuracy of image matching.
[0008] In some implementations, there are at least two cameras, and the distances between the two cameras and the light source are different; or, there are at least two cameras, and among the multiple cameras, at least two cameras are at different distances from the light source. It should be understood that when multiple cameras are used to acquire multiple photos, at least two of the multiple cameras are at different distances from the flash, but it is not necessarily required that all cameras are at different distances from the flash.
[0009] In some implementations, based on the feature information of bright spots, the electronic device determines whether an optical camera exists in the overlapping area. Specifically, this may include: the electronic device analyzing the feature information of bright spots in the overlapping area; the electronic device determining whether the feature information of the bright spots in the overlapping area has changed; and when the feature information of the bright spots in the overlapping area changes, the electronic device identifying the bright spot with the changed feature information as an optical camera. It should be understood that for two or more photos acquired by at least two cameras, due to the close distance between the cameras, there will be a large overlap between the resulting photos. Unlike other implementations mentioned above, where the distance between the at least two cameras and the flash is different, bright spots formed by general objects will generally have relatively consistent feature information in different photos; however, due to the cat-eye effect, bright spots formed by optical cameras will have different feature information in different photos. For example, the brightness of bright spots formed by optical cameras may vary significantly in different photos. Therefore, when a bright spot with changing feature information exists in the overlapping area, it can be determined that the real object corresponding to that bright spot is an optical camera.
[0010] In some implementations, the electronic device calculates feature information of bright spots in an overlapping region of two or more photographs. Specifically, this may include: the electronic device performing image matching on two or more photographs to determine the overlapping region; the electronic device marking the position of the bright spots in the photographs; and the electronic device calculating feature information of the bright spots located in the overlapping region based on the overlapping region.
[0011] In some implementations, after the electronic device determines whether an optical camera exists in the overlapping area based on the feature information of the highlights, it may further include: when it is determined that an optical camera exists in the overlapping area, the electronic device saves or marks a photo including the optical camera; the electronic device then displays the photo including the optical camera. Based on this, when these photos are needed, it is convenient for users to view, send, or export them.
[0012] In some implementations, after determining whether an optical camera exists in the overlapping area based on the feature information of the bright spot, the electronic device may further include: when it is determined that an optical camera exists in the overlapping area, the electronic device continuously tracks the bright spot of the corresponding optical camera.
[0013] In some implementations, the light source is an external light source; or, the light source is a flash of an electronic device. When the light source is an external light source, it can be part of the light-emitting device.
[0014] In some implementations, the light source is used to emit one, two, or more monochromatic lights; the characteristic information of the bright spot includes the color information of the corresponding monochromatic light. It should be understood that for constantly lit interference sources that can actively emit light, because they are less affected by the monochromatic light emitted by the light source, the bright spots formed by the constantly lit interference source will have relatively consistent characteristic information in different photos. For example, the bright spots formed by the constantly lit interference source will maintain consistency in color and brightness, while the bright spots formed by the optical camera will have corresponding characteristic information based on the monochromatic light emitted by the light source, thus distinguishing between constantly lit interference sources and optical cameras.
[0015] In some implementations, the preset frequency can refer to a fixed frequency or duty cycle. The light source can then blink according to this preset frequency.
[0016] In some other implementations, the preset frequency can also refer to a frequency higher than 60Hz. It should be understood that the human eye can generally only perceive flicker frequencies below 60Hz. Therefore, when the preset frequency of the light source is higher than 60Hz, it is difficult for the user to perceive flickering.
[0017] Secondly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores instructions that can execute the detection methods described in the above implementations.
[0018] Thirdly, this application also provides an optical camera detection method based on an electronic device. The detection method includes: based on a light source, the electronic device sequentially acquires a first image and a second image through a camera; wherein both the first image and the second image have bright spots, and the first image and the second image partially overlap. The electronic device calculates the position information of the bright spots in the overlapping area of the first image and the second image, respectively. The electronic device determines whether there are bright spots in the overlapping area whose positions remain unchanged. When there are bright spots in the overlapping area whose positions remain unchanged, the electronic device determines that the bright spots whose positions remain unchanged are optical cameras.
[0019] In some implementations, the electronic device, based on a light source, sequentially acquires a first and a second photograph via a camera. Specifically, the electronic device controls the light source to emit light at a preset frequency. The electronic device uses the camera to perform exposure and image acquisition at different positions to obtain the first and second photographs.
[0020] In some implementations, the electronic device calculates the position information of bright spots in the overlapping area of the first and second photos, specifically including: the electronic device determining the overlapping area of the first and second photos; the electronic device marking the position of bright spots in the overlapping area of the first photo and marking the position of bright spots in the overlapping area of the second photo.
[0021] Fourthly, this application also provides an optical camera detection method based on an electronic device. The detection method includes: based on a light source, the electronic device simultaneously acquires a first photo and a second photo through two cameras; both the first photo and the second photo have bright spots, and the first photo and the second photo partially overlap; the electronic device calculates the brightness information of the bright spots in the overlapping area of the first photo and the second photo; the electronic device determines whether the brightness information of the bright spots in the overlapping area has changed; when there are bright spots in the overlapping area whose brightness changes are greater than a brightness threshold, the electronic device determines that the bright spots whose brightness changes are greater than the brightness threshold are optical cameras.
[0022] In some implementations, the electronic device, based on a light source, simultaneously acquires a first photo and a second photo through two cameras. Specifically, this includes: the electronic device controlling the light source to emit light at a preset frequency; and the electronic device simultaneously performing exposure and image acquisition through the two cameras to acquire the first photo and the second photo.
[0023] In some implementations, the electronic device calculates the brightness information of bright spots in the overlapping area of the first and second photos, specifically including: the electronic device determining the overlapping area of the first and second photos; the electronic device calculating the brightness of bright spots in the overlapping area of the first photo; and calculating the brightness of bright spots in the overlapping area of the second photo.
[0024] This application utilizes a camera and a light source to acquire two or more images of the area to be detected. By comparing the acquired images, bright spots exhibiting a cat's-eye effect can be identified. Based on this, the presence of an optical camera in the area to be detected can be determined. Attached Figure Description
[0025] Figure 1 This is a frame diagram of an electronic device according to an embodiment of this application.
[0026] Figure 2 This is a flowchart of an optical camera detection method based on an electronic device according to an embodiment of this application.
[0027] Figure 3 This is a schematic diagram of the back of an electronic device according to an embodiment of this application.
[0028] Figure 4 This is a schematic diagram of the back of an electronic device according to another embodiment of this application.
[0029] Figure 5 This is a flowchart of a detection method according to another embodiment of this application.
[0030] Figure 6 This is a schematic diagram of a graphical user interface based on a detection method according to an embodiment of this application.
[0031] Figure 7This is a schematic diagram of a graphical user interface based on a detection method according to another embodiment of this application.
[0032] Figure 8 This is a schematic diagram of a first photograph obtained based on a detection method according to an embodiment of this application.
[0033] Figure 9 This is a schematic diagram of a second photograph obtained based on a detection method according to an embodiment of this application.
[0034] Figure 10 This is a schematic diagram of an optical camera marked in a second photograph according to an embodiment of this application.
[0035] Figure 11 This is a flowchart of a detection method according to another embodiment of this application.
[0036] Figure 12 This is a schematic diagram of a first photograph obtained based on a detection method according to another embodiment of this application.
[0037] Figure 13 This is a schematic diagram of a second photograph obtained based on a detection method according to another embodiment of this application.
[0038] Figure 14 This is a schematic diagram of an optical camera marked in a second photograph, which is another embodiment of this application. Detailed Implementation
[0039] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise.
[0040] References to "one embodiment" or "some embodiments" as described in this specification mean that at least one embodiment of this application includes a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," "in some implementations," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0041] With the development of imaging and communication technologies, various miniaturized optical cameras have been developed and applied. These miniaturized optical cameras are highly concealed, making them difficult for users to notice. When these cameras blend seamlessly into their surroundings, they are even harder for users to spot. For example, an optical camera embedded in a wall with murals is unlikely to be noticed. Similarly, an optical camera placed inside a room's electrical outlet socket is less likely to be observed by users. Or, an optical camera placed in a corner of a room is less likely to be observed by users venturing into the corner.
[0042] Therefore, in various real-world scenarios, such optical cameras may be hidden in various corners and difficult to identify.
[0043] In response to these situations, there are specialized detection devices and software available on the market for detecting optical cameras; among them, the detection software uses wireless network technology to detect the presence of optical cameras.
[0044] For example, users can perform testing through testing equipment. On the one hand, due to the high price of testing equipment, fewer users are willing to purchase this type of equipment, limiting its applicability to a narrow range of people. On the other hand, such testing equipment is bulky and heavy, making it inconvenient to use. For typical home users, the cost of testing through such equipment is high, and even if they purchase it, they may not carry it with them, resulting in inconvenience and low frequency of use.
[0045] For example, if the optical cameras in the current environment are transmitting data via a wireless network, users can use detection software to detect them. It should be understood that the aforementioned detection software can use the current wireless network to detect various optical cameras to determine their presence. However, this software generally can only detect optical cameras that are connected to a wireless network and are actively operating, and the detection success rate is relatively low.
[0046] Furthermore, because this detection software is based on a wireless network, the types of optical cameras it can cover are relatively limited. It can essentially not detect optical cameras that store data locally, or those connected to a wired network.
[0047] As mentioned above, general detection software and equipment can detect optical cameras to a certain extent, but the actual detection effect is relatively limited.
[0048] To address the aforementioned technical problems, the following embodiments of this application provide methods for detecting optical cameras based on electronic devices. Leveraging the differences between the optical characteristics of optical cameras and those of general objects, the detection methods provided in each embodiment can detect optical cameras through methods such as image matching. It should be understood that the detection methods provided in each embodiment can be implemented on electronic devices such as mobile phones and tablets, without the need for specialized detection equipment, making detection more convenient. Furthermore, they can improve the efficiency and success rate of optical camera detection, thereby reducing the cost for users to detect optical cameras.
[0049] Please refer to Figure 1 This application provides an electronic device 100. The electronic device 100 may include at least one of the following: mobile phone, foldable electronic device, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, super mobile personal computer, netbook, cellular phone, PDA, AR device, VR device, MR device, artificial intelligence device, wearable device, in-vehicle device, smart home device, smart city device, etc., all of which have a camera. This application does not impose any special limitations on the type of electronic device 100.
[0050] Electronic device 100 may include a processor 110, internal memory 121, USB connector 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone connector 170D, sensor module 180, button 190, motor 191, indicator 192, camera module 193, display screen 194, memory card connector 120, and SIM card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, gyroscope sensor 180B, barometric pressure sensor 180C, magnetic sensor 180D, accelerometer sensor 180E, proximity sensor 180F, proximity light sensor 180G, fingerprint sensor 180H, temperature sensor 180J, touch sensor 180K, ambient light sensor 180L, bone conduction sensor 180M, etc.
[0051] The structures illustrated in the embodiments of this application do not constitute a limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0052] Processor 110 may include one, two, or more processing units. For example, processor 110 may be an application processor, a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, or a neural network processing unit (NPU), etc. The different processing units may be independent devices or integrated into one, two, or more processors.
[0053] The processor 110 can generate operation control signals based on the instruction opcode and timing signals to control the instruction fetching and execution.
[0054] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 may be a cache memory. This cache memory can store instructions or data that have been used or are frequently used by the processor 110.
[0055] In some embodiments, the processor 110 may include one, two, or more interfaces. The interface type may include at least one of the following: integrated circuit I2C interface, I2S interface, PCM interface, UART interface, MIPI, GPIO interface, SIM interface, or USB interface. The processor 110 can connect to modules such as touch sensors, audio modules, wireless communication modules, displays, or cameras through at least one of these interfaces.
[0056] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0057] Electronic device 100 can implement display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and graphics rendering. Processor 110 may include one, two, or more GPUs, which execute program instructions to generate or modify display information.
[0058] Display screen 194 is used to display images, videos, etc. In some embodiments, electronic device 100 may include one, two, or more display screens 194. Display screen 194 may be at least one of LCD, OLED, AMOLED, FLED, Miniled, MicroLED, Micro-OLED, quantum dot light-emitting diode (QLED) display, e-ink screen, etc.
[0059] Electronic device 100 can realize camera function through camera module 193, ISP, video codec, GPU, display screen 194, application processor AP, neural network processor NPU, etc.
[0060] The camera module 193 can be used to acquire color image data and depth data of the subject. The Information Service Provider (ISP) can be used to process the color image data acquired by the camera module 193. For example, when taking a picture, the shutter is opened, and light passes through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the photosensitive element transmits this electrical signal to the ISP for processing, converting it into a visible image. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be integrated into the camera module 193.
[0061] In some embodiments, the camera module 193 may consist of a color camera module and a 3D sensing module.
[0062] In some embodiments, the photosensitive element of the camera in a color camera module may include a CCD or a CMOS phototransistor. The photosensitive element converts light signals into electrical signals, which are then transmitted to the ISP for conversion into digital image signals. The ISP outputs the digital image signals to the DSP for processing.
[0063] In some embodiments, the 3D sensing module may be a structured light 3D sensing module. The structured light 3D sensing module may include an infrared emitter, an infrared camera module, etc. The structured light 3D sensing module first emits a light spot of a specific pattern onto the object being photographed, then receives the encoded pattern of the light spot on the object's surface, and compares it with the original projected light spot to determine the object's three-dimensional coordinates. These three-dimensional coordinates may include the distance between the electronic device 100 and the object being photographed. The 3D sensing module can obtain the distance (i.e., depth) between itself and the object being photographed by measuring the infrared reflection time, thus obtaining a 3D depth map.
[0064] Structured light 3D sensing modules can also be applied to fields such as face recognition, motion-sensing game consoles, and industrial machine vision inspection.
[0065] 3D sensing modules can also be applied to fields such as game consoles, AR, and VR.
[0066] In other embodiments, the camera module 193 may further include two or more cameras. These two or more cameras may include a color camera, which can be used to acquire color image data of the object being photographed. These two or more cameras may employ stereoscopic vision technology to acquire depth data of the object being photographed.
[0067] In some embodiments, the electronic device 100 may include one, two, or more camera modules 193. The electronic device 100 may include a front-facing camera module 193 and a rear-facing camera module 193. The front-facing camera module 193 can be used to acquire color image data and depth data of the photographer, while the rear-facing camera module can be used to acquire color image data and depth data of the subject (such as a person, landscape, etc.) in front of the photographer.
[0068] In some embodiments, the CPU, GPU, or NPU in the processor 110 can process the color image data and depth data acquired by the camera module 193. In some embodiments, the NPU can identify the color image data acquired by the camera module 193 using neural network algorithms based on skeletal point recognition technology, such as convolutional neural network algorithms (CNN), to determine the skeletal points of the person being photographed. The CPU or GPU can also be used to run neural network algorithms to determine the skeletal points of the person being photographed based on the color image data. In some embodiments, the CPU, GPU, or NPU can also be used to confirm the body shape of the person being photographed (such as body proportions, the degree of fatness or thinness of body parts between skeletal points) based on the depth data acquired by the camera module 193 (which may be a 3D sensing module) and the identified skeletal points, and can further determine the beautification parameters for the person being photographed, and finally process the captured image of the person being photographed based on the body beautification parameters so that the body shape of the person being photographed in the captured image is beautified.
[0069] Please refer to Figure 2 In some embodiments, the detection method may include, but is not limited to, the following steps:
[0070] S201: Electronic devices acquire two or more photos through the combination of a light source and a camera.
[0071] In some embodiments, through the cooperation of a light source and a camera, the camera can expose and capture images of the external space to obtain two or more photographs of the external space. These two or more photographs can be obtained by the camera exposing and capturing images of the external space from different positions. For example, an electronic device can acquire two or more photographs of a specific area to be detected in the external space from different positions.
[0072] In some embodiments, corresponding to the electronic device exemplified above, the light source may be a built-in light source of the electronic device, such as the flash of the electronic device.
[0073] In other embodiments, when the electronic device does not have a flash or does not use a flash, the light source can also be an external light source (not shown), and there is no limitation on this. For example, the external light source can be a desk lamp, a flashlight, or a light-emitting device specifically used for detecting optical cameras.
[0074] In some embodiments, the light-emitting device can also be fitted onto the outer surface of the electronic device. While serving as a light source, the light-emitting device can also protect the electronic device. For example, the electronic device is a mobile phone, the light-emitting device is a mobile phone protective device, and the external light source can be part of the mobile phone protective device. The mobile phone protective device can house the mobile phone, and LED lights can be arranged around the corresponding camera of the mobile phone; depending on the detection requirements of the optical camera, the LED lights can emit specific light to cooperate with the mobile phone's camera.
[0075] In some embodiments, the phone protection device can be powered by a mobile phone, for example, the mobile phone can power the phone protection device wirelessly or through a data interface; in addition, the phone protection device has a built-in power supply that can power the LED lights.
[0076] In some embodiments, the light source can emit monochromatic light. For example, the light source can emit white light or yellow light. In other embodiments, the light source can emit two or more monochromatic lights, for example, the light source can emit white light and yellow light; or, the light source can emit white light, yellow light and red light, etc., without limitation.
[0077] It should be understood that portable electronic devices such as mobile phones and tablets typically have one, two, three, four, or five cameras. Therefore, in the detection methods provided in the embodiments of this application, appropriate cameras can be selected based on the relative positional relationship between each camera and the light source.
[0078] In some embodiments, when the light source is a flash of an electronic device and the number of cameras is two or more, at least one camera can be selected based on the relative positional relationship between the flash and each camera. For example, the camera closest to the flash can be selected; or, a camera at a moderate distance from the flash can be selected; or, the camera furthest from the flash can be selected.
[0079] Please refer to Figure 3 In some embodiments, the electronic device 100 is exemplified as a mobile phone, which may include a rear camera module 12 and a flash 14. Please refer to the following references. Figure 1 and Figure 3 The rear camera module 12 can be part of the camera module 193.
[0080] In some embodiments, the rear camera module 12 may include cameras 12a, 12b, 12c, and 12d. The four cameras (12a-12d) are arranged in a 2x2 matrix, with the flash located to one side of cameras (12a, 12c) and away from cameras (12b, 12d). It should be understood that the flash 14 can be selected as the light source for the detection methods provided in the various embodiments. Depending on actual needs, at least one of the cameras (12a-12d) can be selected to acquire an image of the area to be detected.
[0081] It should be understood that when acquiring two or more photos using a single camera, the electronic device can move a certain distance to acquire photos of the area to be detected from different angles. When acquiring two or more photos using at least two cameras, the electronic device may or may not move, depending on the distance between the at least two cameras and the light source, as well as the differences in the position, structure, and performance of the at least two cameras, without any restrictions.
[0082] In other embodiments, the light source may also be a ring-shaped, fan-shaped, or dot-matrix flash arranged around a camera in an electronic device. For example, the light source may be a ring-shaped flash arranged around a wide-angle camera.
[0083] Please refer to Figure 4 In some other embodiments, the electronic device 100 may also include a rear camera module 16, a first flash 18a, and a second flash 18b. Please refer to the accompanying documentation. Figure 1 and Figure 4 The rear camera module 16 can be part of the camera module 193.
[0084] In some embodiments, the rear camera module 16 may include cameras 16a, 16b, 16c, and 16d. A first flash 18a is located to one side of the cameras (16a, 16b) and away from the cameras (16c, 16d); a second flash 18b is circular and surrounds the camera 16a. It should be understood that, for the detection methods provided in the various embodiments, the first flash 18a can be selected as the light source. Alternatively, the second flash 18b can also be selected as the light source to cooperate with at least one of the cameras (16a-16d) to acquire an image of the area to be detected.
[0085] In some embodiments, when light emitted from a light source is projected onto a real object in the area to be detected, the light can undergo optical phenomena such as diffuse reflection and scattering, reflecting away from the real object. Some of the reflected light can be transmitted to and captured by a camera to form bright spots corresponding to the aforementioned optical phenomena in the photograph.
[0086] In some embodiments, depending on the characteristics of the real objects in the area to be detected and factors such as the shooting angle, any photo may contain one, two, or more bright spots; or, any photo may not contain any bright spots, without any limitation.
[0087] It should be understood that in the detection methods provided in the embodiments of this application, the photograph may also refer to a preview frame obtained by the cooperation of a camera and a light source, and is not necessarily an image obtained by taking a picture or other similar functions. The preview photograph can be stored in a cache, and the photograph taken can be stored in internal memory. Therefore, the two or more photographs may also refer to two or more preview frames obtained by the cooperation of a camera and a light source during the detection of the area to be detected.
[0088] In some embodiments, the area to be detected may be a corner of a bedroom, a bathroom, etc. It should be understood that users can adaptively select the area to be detected according to their actual detection needs, without any restrictions.
[0089] In other embodiments, the area to be detected may be a living room, a graffiti wall, or other small items such as sockets, vases, or potted plants.
[0090] In some embodiments, for the detection method provided in this application, the user can view the two or more acquired photos through an electronic device. In other embodiments, the user may not view the two or more acquired photos, which may be processed in the background of the electronic device or transmitted to the cloud.
[0091] S202: Electronic devices calculate feature information of bright spots in the overlapping area of two or more photographs.
[0092] In some embodiments, image processing algorithms can be used to process photographs to identify bright spots. The characteristic information of these bright spots may include one, two, or more of the following: their position in the photograph, brightness, rate of change of brightness, size, color, and shape; there is no limitation on this. The position of the bright spot in the photograph can be determined by establishing relationships between the bright spot and other pixels surrounding it after image matching, thereby determining the bright spot's relative location.
[0093] For example, the feature information of a bright spot can include its location and brightness in the photo. Alternatively, the feature information of a bright spot can include its location, color, and brightness in the photo.
[0094] In some embodiments, the two or more photos may be acquired for a specific area, and based on this, image matching can be performed on the two or more photos to mark the location of bright spots in the overlapping area of the two or more photos.
[0095] In some embodiments, the overlapping area of two or more images can be understood as a region of interest (ROI). In the detection methods provided in various embodiments of this application, the overlapping area can be equated with the ROI.
[0096] In some embodiments, when multiple photos are captured by the camera, there may be a ROI between any two photos, and it is not necessarily limited to only one ROI between the multiple photos.
[0097] For example, three photos are captured by a camera. The first and second photos share a first Region of Interest (ROI), and the second and third photos share a second ROI. Furthermore, the first and second ROIs may or may not overlap. It should be understood that if there is an overlap between the first and second ROIs, then it can be determined that there is also an overlap between the first and third photos.
[0098] In other embodiments, when there is no overlapping area between two or more acquired photos, the user may be prompted to reacquire a photo of the area to be detected, or the user may be guided to perform other operations.
[0099] S203: Based on the feature information of the bright spots, the electronic device determines whether an optical camera exists in the overlapping area.
[0100] In step S203, the ROI of the acquired two or more photos can be analyzed. It should be understood that, based on the feature information of each bright spot, it can be determined whether the real object corresponding to each bright spot exhibits the cat's eye effect. The cat's eye effect refers to the phenomenon where, when incident light is emitted towards an optical camera within its field of view (FOV), due to the special structure of the optical camera's lens assembly and the surface reflectivity of the image sensor, the light reflected back from the optical camera returns along a path closely resembling the incident light.
[0101] Based on this cat's eye effect, the reflected light from the optical camera, after being received by the camera, will form a bright spot at the same world coordinates in the photo.
[0102] Ordinary reflected light travels along a path where the angle of reflection equals the angle of incidence. When this reflected light is received by the camera, it does not create a bright spot at the same world coordinate position in each photo. For example, if a bright spot based on ordinary reflection appears at position A of a region of interest (ROI) in one photo, that same bright spot will appear at position B of the ROI in another photo; where positions A and B are different.
[0103] For ease of understanding, real objects exhibiting the cat's-eye effect are referred to as cat's-eye reflection sources, while real objects (or general objects) exhibiting ordinary reflection are referred to as general reflection sources. In the absence of any contrary indication, the cat's-eye reflection source mentioned in this text can be equated with an optical camera.
[0104] Both bright spots formed by cat-eye reflections and bright spots formed by general reflections can be seen in photographs, but their characteristic information differs significantly. Therefore, the detection methods provided in the embodiments of this application can distinguish between these two types of reflections through image matching and other methods to identify optical cameras.
[0105] Please refer to Figure 5 When a bright spot corresponding to a cat's eye reflection source exists, the detection method provided in the embodiments of this application may further include the following steps:
[0106] S204: When it is determined that an optical camera exists in the overlapping area, the electronic device saves or marks the photo including the optical camera.
[0107] In some embodiments, the marking may be based on saving a photo, in which the optical camera is marked.
[0108] In other embodiments, the marker may also be a marker on the graphical user interface of an electronic device for a bright spot in a photograph corresponding to an optical camera.
[0109] Please refer to Figure 6In some embodiments, the electronic device 100 may present a graphical user interface corresponding to the detection method. The graphical user interface of the electronic device 100 may include a status bar 22, a navigation bar 24, a main view area 26, and a first tab bar 28a.
[0110] In some embodiments, the status bar 22 includes, for example, a signal strength icon, a WLAN icon, a Bluetooth icon, a current remaining battery level icon, and a time icon.
[0111] In other embodiments, the status bar 22 may also include an NFC icon, a sound icon, a WLAN hotspot icon, etc., without limitation.
[0112] In some embodiments, navigation bar 24 can provide information about the currently active graphical user interface. For example... Figure 6 As an example, the graphical user interface of the corresponding detection method can provide icons such as a back button and a light source switch for users to control via touch in the navigation bar, as well as icons that provide help information.
[0113] In some embodiments, the main view area 26 may provide two or more acquired images. For example... Figure 6 As exemplified, the main viewing area 26 of the electronic device may include three photographs (26a, 26b, 26c). For photographs (26a, 26b, 26c), Figure 6 The distinction is made by the numbers 1, 2, and 3, but not by the content presented in the limited photographs (26a, 26b, 26c).
[0114] In some embodiments, the first tab bar 28a may include a completion icon and a save icon for user touch operation. Upon responding to a user touch on the completion icon, the electronic device can exit detection. Upon responding to a user touch on the save icon, the electronic device 100 can save the captured photos (26a, 26b, 26c).
[0115] In other embodiments, the electronic device may also provide physical buttons. These physical buttons can be clicked by the user to perform at least some of the functions described above in the touch operation. The physical buttons and the touchable icons described above may coexist, either individually or together.
[0116] The saving process can be initiated in response to a user's save operation, saving photos, including those taken by an optical camera. Alternatively, the electronic device can automatically save photos, including those taken by an optical camera. Based on this step S204, users or other personnel can easily view, send, or export these photos.
[0117] In some embodiments, after the electronic device responds to the user's exit detection operation, it can also automatically delete two or more acquired photos. For example... Figure 7 As an example, before responding to a user's exit detection operation, the electronic device may also provide a second tab bar 28b, which includes a prompt message, a cancel icon, and an confirm icon, so that the user can reconfirm whether to exit the detection of the optical camera, thereby reducing the probability of accidental operation.
[0118] S205: Electronic devices display photos including those from optical cameras.
[0119] In some embodiments, the photos may be presented sequentially on the graphical user interface of an electronic device; or, the photos may be presented on other devices connected to the electronic device, without limitation.
[0120] S206: Electronic devices guide users to verify optical cameras.
[0121] In some embodiments, the guidance may involve marking the bright spots corresponding to the optical camera in the photo, so that the user can find the real object corresponding to the bright spot based on the photo.
[0122] In other embodiments, the guidance may involve merging two or more acquired photos to create a panoramic image. The panoramic image allows users to more easily determine the location of the real-world objects corresponding to the bright spots.
[0123] In other embodiments, when two photos are obtained through the camera, neither photo may contain a bright spot corresponding to the cat's eye reflection source. Similarly, when multiple photos are obtained through the camera, the presence or absence of a bright spot corresponding to the cat's eye reflection source may also be present in these photos. If no bright spot corresponding to the cat's eye reflection source is found, the user can be prompted to re-acquire photos of the area to be detected to repeat the above steps; alternatively, it can be determined that no optical camera exists in the area to be detected.
[0124] In some embodiments, when two or more photos are acquired through a single camera, the detection method may specifically include the following steps:
[0125] Electronic devices analyze the feature information of bright spots in two or more photos to determine whether there are bright spots in the overlapping area whose positions remain unchanged.
[0126] As described above, since two or more photos are acquired through the same camera, the camera's coordinates can be adjusted by changing its position, such as by rotation, translation, or a combination of translation and rotation. Based on this, the electronic device can acquire two or more photos at different angles and at different times. The unit of measurement for these different times can be seconds, minutes, or hours, etc.
[0127] For example, within seconds, a user can acquire two photos of the area to be detected using a camera and a light source, facilitating subsequent analysis to determine the presence of an optical camera. Alternatively, within several hours, a user can acquire numerous photos of the area to be detected using a camera and a light source, enabling further comprehensive analysis to determine the presence of an optical camera.
[0128] It should be understood that, based on image matching of two or more photographs, it is possible to determine whether the position of a bright spot relative to its surrounding environment changes in different photographs. Therefore, a bright spot whose position remains unchanged can refer to a bright spot corresponding to the same world coordinate position that appears in the overlapping area of at least two photographs.
[0129] If there is a bright spot in the ROI that remains in a fixed position, it is determined that there is an optical camera in the ROI.
[0130] It should be understood that when there is a bright spot in a fixed position, it can be determined that the real object corresponding to the bright spot is the cat's eye reflection source.
[0131] Please refer to this simultaneously. Figure 8 and Figure 9 To illustrate this, we can use an electronic device to capture two photos of the area to be detected through a camera.
[0132] At the first moment, the user can acquire a first photo 32 from a first angle. The first photo 32 is identified by an image feature recognition algorithm, and the first photo 32 includes five bright spots (32a, 32b, 32c, 32d, 32e) for example. Among them, the five bright spots (32a to 32e) may be formed by light from a light source reflecting off a general reflective source or a cat's eye reflective source and being captured by the camera.
[0133] At a second moment, the user can appropriately move (e.g., translate, rotate, or a combination of translation and rotation) the phone to acquire a second photo 34 from a second angle; wherein, the second moment is after the first moment, and the second angle is different from the first angle based on the adjustment of the phone's position. Similar to the first photo 32, the second photo 34 is identified using an image feature recognition algorithm, which exemplarily includes four bright spots (34a, 34b, 34c, 34d).
[0134] like Figure 8and Figure 9 As illustrated, by performing image matching on the first photograph 32 and the second photograph 34, the electronic device can determine that there is an overlapping area between the second photograph 34 and the first photograph 32. The first photograph 32 has three bright spots (32c, 32d, 32e) in the overlapping area, and the second photograph has three bright spots (34a, 34b, 34c) in the overlapping area. Based on the feature information of the three bright spots (32c, 32d, 32e) in the first photograph and the three bright spots (34a, 34b, 34c) in the second photograph, it can be determined that bright spot 32c in the first photograph 32 and bright spot 34a in the second photograph 34 correspond to the same real object. Therefore, it can be determined that bright spots (32c, 34a) are fixed in position, and the real object corresponding to bright spots (32c, 34a) is a cat's eye reflection source.
[0135] In some embodiments, for a identified optical camera, the electronic device can mark the bright spots (32c, 34a) of the corresponding optical camera in the acquired first photograph 32 or second photograph 34. For example... Figure 10 As an example, the electronic device marks the highlight 34a in the second photograph 34, with the mark labeled as "optical camera".
[0136] In some other embodiments, the electronic device may mark the bright spots (32d, 32e, 34b, 34c) corresponding to general reflective sources in the acquired first photograph 32 or second photograph 34.
[0137] In some embodiments, the light source may also emit monochromatic light at a preset frequency to acquire the two or more photographs. It should be understood that monochromatic light based on the preset frequency can make the bright spots formed by general reflective sources and cat's eye reflective sources have significant differences in brightness, color, and shape, thereby avoiding interference from general reflective sources, reducing the difficulty of image matching, and improving the accuracy of image matching.
[0138] In some embodiments, the preset frequency may refer to a fixed frequency or duty cycle, and the light source may flicker according to the preset frequency. It should be understood that the fixed frequency or duty cycle may be adjusted according to the actual scenario and design requirements, and is not limited to a specific value.
[0139] In some other embodiments, the preset frequency can also enable the light source to emit light continuously, for example, the duty cycle of the preset frequency can be 1.
[0140] Furthermore, the preset frequency can also be higher than 60Hz. It should be understood that the human eye can generally distinguish a flickering frequency of 60Hz. Based on this, when a light source flickers at a frequency higher than 60Hz, it can be understood from the user's perspective as the light source emitting light continuously.
[0141] In some embodiments, the preset frequency can also be combined with monochromatic light of different colors to further improve the recognition of general reflective sources and cat-eye reflective sources. It should be understood that since there may be many general reflective sources in the area to be detected, these sources can reflect sunlight or lamplight, creating bright spots in the photograph. Therefore, by emitting monochromatic light of different colors from the light source, interference from these general reflective sources can be eliminated, thereby improving the accuracy of detection by the optical camera.
[0142] Continuing with the example above, at the first moment of acquiring the first image and the second moment of acquiring the second image, the color of the monochromatic light emitted by the light source can be the same or different, and the preset frequency can also be the same or different. For example, at the first moment and the second moment, the color of the monochromatic light is the same, and the preset frequency is also the same. Alternatively, at the first moment and the second moment, the color of the monochromatic light is different, but the preset frequency is the same.
[0143] In practical applications, when a real object is a constantly lit interference source, it may appear as a bright spot in two or more photos. However, this constantly lit interference source is generally not affected by a light source with a preset frequency. Therefore, the detection methods provided in the embodiments of this application, based on the cooperation of a light source with a preset frequency and a camera, can distinguish constantly lit interference sources, thereby reducing interference and facilitating the identification of optical cameras.
[0144] Let's take the example of an area to be detected containing both an optical camera and a constantly lit white light source as an example. In two or more acquired photos, bright spots corresponding to both the optical camera and the constantly lit interference source can appear in the ROI. The bright spot corresponding to the optical camera is affected by the color and preset frequency of monochromatic light, thus possessing corresponding color, brightness, and other characteristic information. Therefore, this bright spot can be identified as a fixed-position bright spot. The bright spot corresponding to the constantly lit interference source is less affected by the color and preset frequency of monochromatic light. Therefore, this bright spot will have essentially consistent characteristic information across different photos. Thus, this bright spot can be excluded from the category of fixed-position bright spots; alternatively, the bright spot can be marked in the photos for user confirmation.
[0145] By performing image matching on one, two, or more Regions of Interest (ROIs) and analyzing the characteristic information of each highlight, it can be determined whether each ROI has a highlight corresponding to the cat's eye reflection source, so as to facilitate subsequent continuous tracking or prompting operations.
[0146] In some embodiments, for a bright spot determined to be a corresponding cat's eye reflection source, the detection method may further include the following steps:
[0147] The bright spot corresponding to the cat's eye reflection source is continuously tracked using algorithms such as image tracking.
[0148] It should be understood that, based on image tracking and other algorithms, a relationship can be established between the bright spots formed by the same reflective source in different photos. Based on this, a correspondence can be established between the reflective source and each bright spot, avoiding errors in the correspondence between bright spots and the reflective source, thereby improving the accuracy of detection by the optical camera.
[0149] In some embodiments, when a bright spot corresponding to a cat's eye reflection source is identified in two or more photos, the user can be notified on the electronic device through pop-up prompts or voice prompts, so that the user can find the corresponding cat's eye reflection source.
[0150] Please refer to Figure 11 This application also provides another method for detecting optical cameras based on electronic devices. This detection method includes, but is not limited to, the following steps:
[0151] S211: Electronic devices acquire at least two photos through the cooperation of a light source and at least two cameras.
[0152] In some embodiments, when the electronic device has two or more cameras, at least two cameras can be selected to capture at least two photos of the external space. "More than" means at least three (including the stated number).
[0153] like Figure 3 As shown in the example, at least two cameras (12a-12d) can be selected. Figure 4 As shown in the example, at least two cameras (16a to 16d) can be selected.
[0154] For example, electronic devices may include wide-angle cameras, telephoto cameras, and flashes. Since the distances between the wide-angle and telephoto cameras and the flash are different, either the wide-angle or telephoto camera can be selected to capture images of the area to be detected.
[0155] In some embodiments, the distances between the at least two cameras and the light source can be different. Based on this, the bright spots corresponding to the cat's eye reflection source can differ significantly in the photos acquired by each camera, thereby reducing the difficulty of image matching and improving the accuracy of optical camera detection. It should be understood that when multiple cameras are used to acquire multiple photos, at least two of the multiple cameras must be at different distances from the flash, but it is not necessarily required that all cameras be at different distances from the flash.
[0156] As mentioned above, when acquiring two or more photos using at least two cameras, the electronic device may or may not move an appropriate distance.
[0157] Based on the above, two or more photos acquired through at least two cameras can generally be understood as being acquired at the same time (or synchronously), but they can also be acquired at different times (or asynchronously), and there is no restriction on this.
[0158] For two or more photographs acquired at different times, the corresponding light source can be in the same or different states; there are no restrictions on this. For example, at both the first and second moments, the light source emits white light. Another example: at the first moment, the light source emits white light; at the second moment, the light source emits yellow light.
[0159] S212: Electronic devices calculate feature information of bright spots in the overlapping areas of two or more photographs.
[0160] Step S212 is basically the same as step S202 in the other embodiments mentioned above, and will not be described in detail here.
[0161] In some embodiments, after acquiring two or more photos, these photos can be matched using algorithms such as image matching.
[0162] It should be understood that, compared to at least two photos taken by a single camera at different angles, the overlapping area or ROI of at least two photos taken by at least two cameras is larger, which can improve the detection efficiency of the area to be detected.
[0163] S213: The electronic device determines whether the feature information of the bright spots in the overlapping area has changed.
[0164] When photos are captured using at least two cameras, the cat's eye reflector, due to its characteristic that light rays return along a path closely resembling the incident light, will show a bright spot corresponding to the cat's eye reflector in photos taken by the camera closer to the light source. Unlike photos taken by cameras closer to the light source, photos taken by cameras farther from the light source show significant differences, such as variations in brightness, color, and shape. Alternatively, photos taken by cameras farther from the light source may not show the bright spot corresponding to the cat's eye reflector.
[0165] It should be understood that, unlike cat's eye reflections, the bright spots formed by general reflections have basically the same feature information in multiple photos.
[0166] S214: When the feature information of the bright spots in the overlapping area changes, the electronic device determines that an optical camera exists in the overlapping area.
[0167] Based on this, by performing image matching on these photos, we can find bright spots whose characteristic information changes or changes significantly in different photos. The real objects corresponding to these bright spots whose characteristic information changes or changes significantly can be the cat's eye reflection source.
[0168] Please refer to this simultaneously. Figure 12 and Figure 13 This can be illustrated by using an electronic device to acquire a first photo and a second photo through two cameras, respectively.
[0169] By identifying the first photograph 42 using an image feature recognition algorithm, the electronic device can determine that the first photograph 42 includes, for example, five bright spots (42a, 42b, 42c, 42d, 42e). As described above, these bright spots (42a to 42e) may be formed by light from a light source reflecting off a general reflective source or a cat's eye reflective source and being captured by the camera.
[0170] Similar to the first photograph 42, the second photograph 44 is identified using an image feature recognition algorithm. The electronic device can determine that the second photograph 44, for example, includes four bright spots (44a, 44b, 44c, 44d). There is an overlapping area between the second photograph 44 and the first photograph 42. The first photograph 42 includes four bright spots (42b-42e) in the overlapping area, and the second photograph 44 includes four bright spots (44a-44d) in the overlapping area.
[0171] By performing image matching on the first photo 42 and the second photo 44, the electronic device can determine that bright spots 42b and 44a correspond to the same real object; the same applies to bright spots 42c and 44b, 42d and 44c, and 42e and 44d. Analysis of the feature information of each bright spot in the ROI shows that the feature information of bright spots 42b and 44a is basically the same, indicating that these two bright spots (42b, 44a) are formed by reflection from a general reflective source; the same applies to bright spots 42d and 44c, and 42e and 44d. However, the feature information of bright spots 42c and 44b changes significantly, indicating that these two bright spots (42c, 44b) are formed by reflection from a cat's eye reflective source.
[0172] In some embodiments, for a identified optical camera, the electronic device can mark the bright spots (42c, 44b) of the corresponding optical camera in the acquired first photograph 42 or second photograph 44. For example... Figure 14 As an example, the electronic device marks the highlight 44b in the second photograph 44, with the mark labeled as "optical camera".
[0173] In some other embodiments, the electronic device may mark the bright spots (42b, 42d, 42e, 44a, 44c, 44d) corresponding to general reflective sources in the acquired first photograph 32 or second photograph 34.
[0174] In some embodiments, the detection method further includes: when the brightness change of the bright spot in the overlapping region is greater than a brightness threshold, the electronic device determines that the real object corresponding to the bright spot is an optical camera.
[0175] As explained earlier regarding the cat's-eye effect, when an optical camera reflects light emitted from a light source, the light is reflected in the direction of the light source. This reflected light can be received by the camera, forming a bright spot in the photograph. It should be understood that because different cameras are at different distances from the light source, a camera closer to the light source can receive more light, resulting in a brighter bright spot. A camera farther from the light source can receive less light, and the light reflected by the optical camera will form a less bright bright spot. Therefore, the brightness of an optical camera can vary significantly in different photographs. Thus, when the brightness variation of a bright spot corresponding to the same object in different photographs exceeds a brightness threshold, it can be determined that the real object corresponding to the bright spot is the optical camera.
[0176] In some embodiments, by combining the characteristics of the monochromatic light of the light source in terms of color or preset frequency, and the characteristic information of the cat's eye reflection source, interference from general reflection sources can be eliminated to determine the specific location of the optical camera.
[0177] In some embodiments, when applied to real-world scenarios, similar to other embodiments, since constantly lit interference sources are generally not affected by light sources with preset frequencies and colors, the characteristic information of the constantly lit interference source is basically the same in different photos. Therefore, it is possible to distinguish between cat eye reflection sources and constantly lit interference sources to improve the accuracy of detection.
[0178] This application also provides a computer-readable storage medium storing instructions. These instructions are used to execute all or part of the steps in the above-described detection method. The storage medium may include, but is not limited to, any medium capable of storing instructions, such as a USB flash drive, portable hard drive, read-only memory, random access memory, magnetic disk, or optical disc.
[0179] In some embodiments, based on the above instructions, the electronic device can execute the above detection method and display the detection results on the screen of the electronic device.
[0180] In other embodiments, based on the above instructions, the user can perform simple operations, and the electronic device can respond to the user's operation to complete the above detection method and display the detection results on the screen of the electronic device.
Claims
1. A method for detecting optical cameras based on electronic devices, characterized in that, include: An electronic device acquires two or more photos through the combined use of a light source and a camera; wherein two or more photos have bright spots and partially overlap; the two or more photos are acquired by one camera, or the two or more photos are acquired by at least two cameras; The electronic device calculates feature information of the bright spots in the overlapping area of two or more of the photographs; Based on the feature information of the bright spots, the electronic device determines whether an optical camera exists in the overlapping area; When the two or more photos are acquired by a single camera, the acquisition of the two or more photos by the electronic device through the cooperation of a light source and the camera specifically includes: The electronic device controls the light source to emit light at a preset frequency; The electronic device uses a camera to expose and capture images at different positions to obtain two or more photos. When two or more photos are acquired by a single camera, the electronic device determines whether an optical camera exists in the overlapping area based on the feature information of the bright spots, specifically including: The electronic device analyzes the feature information of the bright spots in the overlapping region; The electronic device determines whether there are bright spots in the overlapping area whose positions remain unchanged; When there is a bright spot in the overlapping area that remains in a fixed position, the electronic device determines that the bright spot in the fixed position is the optical camera.
2. The detection method as described in claim 1, characterized in that, When the two or more photos are acquired by at least two cameras, the acquisition of the two or more photos by the electronic device through the cooperation of the light source and the cameras specifically includes: The electronic device controls the light source to emit light at a preset frequency; The electronic device performs exposure and image acquisition through at least two of the cameras to obtain two or more of the photographs.
3. The detection method as described in claim 2, characterized in that, The number of at least two cameras is two, and the distances between the two cameras and the light source are different; or, The number of at least two cameras is multiple; among the multiple cameras, at least two cameras are at different distances from the light source.
4. The detection method as described in claim 2, characterized in that, Based on the feature information of the bright spots, the electronic device determines whether an optical camera exists in the overlapping area, specifically including: The electronic device analyzes the feature information of the bright spots in the overlapping region; The electronic device determines whether the feature information of the bright spot in the overlapping area has changed; When the feature information of the bright spot in the overlapping area changes, the electronic device determines that the bright spot whose feature information has changed is the optical camera.
5. The detection method according to any one of claims 1 to 4, characterized in that, The electronic device calculates feature information of bright spots in the overlapping area of two or more of the photographs, specifically including: The electronic device performs image matching on two or more of the photographs to determine the overlapping area; The electronic device marks the location of the bright spot in two or more of the photographs; Based on the overlapping region, the electronic device calculates feature information of the bright spots located in the overlapping region.
6. The detection method as described in claim 1, characterized in that, Based on the feature information of the bright spots, after the electronic device determines whether an optical camera exists in the overlapping area, it further includes: When it is determined that the optical camera exists in the overlapping area, the electronic device saves or marks the photo including the optical camera; The electronic device displays the photograph, including the optical camera.
7. The detection method as described in claim 1, characterized in that, Based on the feature information of the bright spots, after the electronic device determines whether an optical camera exists in the overlapping area, it further includes: When it is determined that the optical camera exists in the overlapping area, the electronic device continuously tracks the bright spot corresponding to the optical camera.
8. The detection method according to any one of claims 1 to 7, characterized in that, The light source is an external light source; or, the light source is the flash of the electronic device.
9. The detection method as described in claim 8, characterized in that, The light source is used to emit one, two, or more monochromatic lights; the feature information of the bright spot includes the color information corresponding to the monochromatic light.
10. The detection method according to any one of claims 1 to 9, characterized in that, The feature information includes one, two, or more of the following: the location, brightness, color, and shape of the bright spot in the photo.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions for performing the detection method as described in any one of claims 1 to 9.
12. A method for detecting optical cameras based on electronic devices, characterized in that, The detection method includes: Based on the light source, the electronic device sequentially acquires a first photo and a second photo through a camera; wherein both the first photo and the second photo have bright spots, and the first photo and the second photo partially overlap. The electronic device calculates the position information of the bright spots in the overlapping area of the first and second photos, respectively. The electronic device determines whether the bright spot, whose position remains unchanged, exists in the overlapping region; When there is a bright spot in the overlapping area that remains in a fixed position, the electronic device determines that the bright spot in the fixed position is an optical camera.
13. The detection method as described in claim 12, characterized in that, The method based on a light source, whereby the electronic device sequentially acquires a first photo and a second photo via a camera, specifically includes: The electronic device controls the light source to emit light at a preset frequency; The electronic device uses the camera to perform exposure and image acquisition at different positions to obtain the first photo and the second photo.
14. The detection method as described in claim 12 or 13, characterized in that, The electronic device calculates the position information of bright spots in the overlapping area of the first and second photos, respectively, including: The electronic device determines the overlapping area of the first and second photos; The electronic device marks the positions of bright spots in the first photograph within the overlapping area, and marks the positions of bright spots in the second photograph within the overlapping area.
Citation Information
Patent Citations
Camera detection locking method and device based on optical imaging
CN110166648A
Pinhole camera detection method and device based on intelligent terminal
CN110223284A