CN112668636B - Camera shielding detection method and system, electronic equipment and storage medium - Google Patents

Camera shielding detection method and system, electronic equipment and storage medium Download PDF

Info

Publication number
CN112668636B
CN112668636B CN202011563466.4A CN202011563466A CN112668636B CN 112668636 B CN112668636 B CN 112668636B CN 202011563466 A CN202011563466 A CN 202011563466A CN 112668636 B CN112668636 B CN 112668636B
Authority
CN
China
Prior art keywords
picture
camera
sub
similarity
pictures
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011563466.4A
Other languages
Chinese (zh)
Other versions
CN112668636A (en
Inventor
高浩波
李海
班孝坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN202011563466.4A priority Critical patent/CN112668636B/en
Publication of CN112668636A publication Critical patent/CN112668636A/en
Priority to PCT/CN2021/131283 priority patent/WO2022134957A1/en
Application granted granted Critical
Publication of CN112668636B publication Critical patent/CN112668636B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules

Abstract

The invention discloses a camera shielding detection method and system, electronic equipment and a storage medium. The camera shielding detection method comprises the following steps: controlling the main camera and the auxiliary camera to shoot in response to entering a shooting mode of non-single shooting; the space areas shot by the main camera and the auxiliary camera are consistent; acquiring a first picture shot by the main camera and a second picture shot by the auxiliary camera; and determining whether the auxiliary camera is blocked or not according to the similarity of the first picture and the second picture. The method and the device can judge whether the auxiliary camera is shielded or not without additionally increasing hardware cost or being limited by a specific camera, and have higher universality and suitability. In addition, whether the auxiliary cameras are shielded or not is judged according to the similarity that the main cameras and the auxiliary cameras shoot pictures at the same time, and compared with subjective judgment by a user, the accuracy is higher.

Description

Camera shielding detection method and system, electronic equipment and storage medium
Technical Field
The present invention relates to the field of electronic devices, and in particular, to a method and system for detecting camera occlusion, an electronic device, and a storage medium.
Background
With the development of mobile technology, mobile terminals have become common electronic products in daily life. Along with the increasing degree of dependence of people on mobile terminals, the requirements on the performance of the mobile terminals are higher, and particularly the photographing performance of the mobile terminals. The photographing performance of a mobile terminal with a single camera reaches a limit to a certain extent, so that a breakthrough in photographing performance is wanted, and a plurality of cameras are needed.
Currently, there are dual-shot mobile phones and triple-shot mobile phones in the market, and even some mobile phone manufacturers have also proposed four-shot mobile phones and five-shot mobile phones. The complex functions of background blurring, refocusing, night scene/dim light photographing enhancement, optical zooming, HDR, three-dimensional application and the like can be realized by utilizing a plurality of cameras, and solutions of different mobile phone manufacturers are different in order to realize the functions. Some solutions provided by mobile phone manufacturers belong to a 'true multi-shot' solution, that is, the results of simultaneous imaging by using multiple cameras are used for carrying out algorithm processing so as to realize the functions. However, some cell phone manufacturers offer solutions that fall into the category of "pseudo-multiple shot" solutions, i.e. the result of imaging with only a single camera when implementing the above functionality, although there are multiple cameras on the hardware. When the user uses the multi-shot function, the user cannot distinguish whether the used mobile phone is the true multi-shot mobile phone or the false multi-shot mobile phone, if the mobile phone is the true multi-shot mobile phone, the user can cause poor shooting quality if the user accidentally shields the auxiliary camera, and if the user is not prompted to shield the auxiliary camera, the shooting experience of the user can be reduced.
Aiming at the problems, the prior art has the following methods for judging whether the auxiliary camera in the multi-camera mobile phone is shielded or not:
first, judge the auxiliary camera and shelter from by looking over the effect of shooing under the scene of taking a photograph more. This method relies on subjective judgment by the user, and the accuracy of judgment is low.
And secondly, judging whether the auxiliary camera is shielded or not according to the brightness of the ambient light. This method needs to be implemented by means of ambient light brightness, and the statistical ambient light brightness information needs to pass through the aem statistical module, but only the raw sensor has the aem statistical module, and other sensors, such as the yuv sensor, do not have the aem statistical module, so that the brightness information of the ambient light cannot be obtained, and if the sensors are used as a mobile phone camera, the above-mentioned judging function cannot be implemented.
Thirdly, a distance sensor or an ultrasonic sensor is arranged on a mobile phone rear plate, and the distance from an object to a camera is detected through the sensor, so that whether the auxiliary camera is shielded or not is judged. This method requires additional installation of a sensor, resulting in increased cost of the cellular phone.
Disclosure of Invention
The invention aims to overcome the defects in the prior art and provides a camera shielding detection method and system, electronic equipment and a storage medium.
The invention solves the technical problems by the following technical scheme:
the first aspect of the present invention provides a camera occlusion detection method, including the steps of:
controlling the main camera and the auxiliary camera to shoot in response to entering a shooting mode of non-single shooting; the space areas shot by the main camera and the auxiliary camera are consistent;
acquiring a first picture shot by the main camera and a second picture shot by the auxiliary camera;
and determining whether the auxiliary camera is blocked or not according to the similarity of the first picture and the second picture.
Optionally, the obtaining the first picture taken by the main camera and the second picture taken by the auxiliary camera specifically includes:
and respectively preprocessing the pictures shot by the main camera and the auxiliary camera to obtain a first picture and a second picture with the same angle of view and the same size.
Optionally, the determining whether the auxiliary camera is blocked according to the similarity between the first picture and the second picture specifically includes:
calculating the similarity of the first picture and the second picture;
judging whether the similarity is lower than a preset value or not;
if yes, determining that the auxiliary camera is blocked;
if not, determining that the auxiliary camera is not shielded.
Optionally, the calculating the similarity between the first picture and the second picture specifically includes:
clipping the first picture into a plurality of first sub-pictures, and clipping the second picture into a plurality of second sub-pictures; the first sub-picture and the second sub-picture are the same in size and number;
for each first sub-picture, judging whether the first sub-picture is similar to a second sub-picture at a corresponding position or not;
and calculating the similarity of the first picture and the second picture according to all the judged similarity results.
A second aspect of the present invention provides a camera occlusion detection system, comprising:
the control module is used for controlling the main camera and the auxiliary camera to shoot in response to entering a shooting mode of non-single shooting; the space areas shot by the main camera and the auxiliary camera are consistent;
the acquisition module is used for acquiring a first picture shot by the main camera and a second picture shot by the auxiliary camera;
and the determining module is used for determining whether the auxiliary camera is blocked or not according to the similarity of the first picture and the second picture.
Optionally, the obtaining module is specifically configured to pre-process the pictures shot by the main camera and the auxiliary camera respectively, so as to obtain a first picture and a second picture with the same angle of view and the same size.
Optionally, the determining module specifically includes:
a calculating unit, configured to calculate a similarity between the first picture and the second picture;
the determining unit is used for judging whether the similarity is lower than a preset value or not, and determining that the auxiliary camera is blocked if the similarity is lower than the preset value; and if not, determining that the auxiliary camera is not shielded.
Optionally, the computing unit specifically includes:
a clipping subunit, configured to clip the first picture into a plurality of first sub-pictures, and clip the second picture into a plurality of second sub-pictures; the first sub-picture and the second sub-picture are the same in size and number;
the judging subunit is used for respectively judging whether the first sub-picture is similar to the second sub-picture at the corresponding position for each first sub-picture;
and the calculating subunit is used for calculating the similarity of the first picture and the second picture according to all the judged similar results.
A third aspect of the present invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the camera occlusion detection method according to the first aspect when executing the computer program.
A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the camera occlusion detection method as described in the first aspect.
The invention has the positive progress effects that: after entering a shooting mode of non-single shooting, the main camera and the auxiliary camera are controlled to shoot simultaneously, and whether the auxiliary camera is blocked or not is determined according to the similarity of a first picture shot by the main camera and a second picture shot by the auxiliary camera. Compared with the prior art, the method and the device have the advantages that whether the auxiliary camera is shielded or not can be judged without additional hardware cost or limitation to the specific camera, and the method and the device have higher universality and suitability. In addition, whether the auxiliary cameras are shielded or not is judged according to the similarity that the main cameras and the auxiliary cameras shoot pictures at the same time, and compared with subjective judgment by a user, the accuracy is higher.
Further, by cutting the first picture into a plurality of first sub-pictures and cutting the second picture into a plurality of second sub-pictures, whether the sub-pictures are similar or not is respectively compared, and then the similarity of the first picture and the second picture is calculated based on the similarity result of the sub-pictures, the accuracy of similarity calculation is improved, the accuracy of judging whether the auxiliary camera is shielded or not is further improved, and the user experience is improved.
Drawings
Fig. 1 is a flowchart of a method for detecting camera occlusion provided in embodiment 1 of the present invention.
Fig. 2 is a flowchart of a specific method of step S103 provided in embodiment 1 of the present invention.
Fig. 3 is an effect diagram of cropping a first picture into a first sub-picture according to embodiment 1 of the present invention.
Fig. 4 is an effect diagram of cropping the second picture into the second sub-picture according to embodiment 1 of the present invention.
Fig. 5 is a block diagram of a camera occlusion detection system according to embodiment 2 of the present invention.
Fig. 6 is a schematic structural diagram of an electronic device according to embodiment 3 of the present invention.
Detailed Description
The invention is further illustrated by means of the following examples, which are not intended to limit the scope of the invention.
The camera shielding detection method provided by the embodiment of the invention can be applied to electronic equipment comprising a main camera and an auxiliary camera. The space area shot by the main camera is consistent with the space area shot by the auxiliary camera. In one possible design, the primary camera and the secondary camera are located on the same side of the electronic device, e.g., are both rear cameras. The number of auxiliary cameras can be one, two or even more.
Wherein the primary/secondary cameras are used to capture still images or video. In general, a camera may include a photosensitive element such as a lens group including a plurality of lenses (convex or concave lenses) for collecting optical signals reflected by an object to be photographed and transmitting the collected optical signals to an image sensor. The image sensor generates an original image of the object to be photographed according to the optical signal.
When the camera application of the electronic device is in an open state or an operating state, the preview screen displayed on the display screen is a screen shot by the main camera. That is, if the main camera is blocked, it can be directly known by viewing the preview screen, specifically, that the preview screen is blocked indicates that the main camera is blocked, and that the preview screen is not blocked indicates that the main camera is not blocked. Therefore, the camera shielding detection method provided by the embodiment of the invention is mainly used for detecting whether the auxiliary camera is shielded or not.
Example 1
As shown in fig. 1, the present embodiment provides a method for detecting camera occlusion, including the following steps S101 to S103:
and step S101, controlling the main camera and the auxiliary camera to shoot in response to entering a shooting mode of non-single shooting. The space area shot by the main camera is consistent with the space area shot by the auxiliary camera.
It should be noted that, the non-single shooting mode refers to shooting in a non-single shooting scene, specifically, after entering the non-single shooting mode, at least two cameras are used to perform shooting simultaneously in response to a triggered shooting operation to achieve different shooting functions, such as a depth of field mode, optical zoom, and the like.
In one example of implementation, real-time or delayed shooting is achieved in response to a user-triggered shooting operation, such as by the user clicking on a "shoot" icon. In another example of implementation, the photographing operation is performed in response to a system timing photographing operation, for example, after entering a photographing mode other than a single photographing for a preset period of time.
Step S102, a first picture shot by the main camera and a second picture shot by the auxiliary camera are acquired.
In an optional implementation manner in step S102, the pictures shot by the main camera and the auxiliary camera are preprocessed respectively, so as to obtain a first picture and a second picture with the same angle of view and size.
Because the specific positions of the main camera and the auxiliary camera on the electronic device are different, for example, the main camera and the auxiliary camera are transversely arranged or longitudinally arranged, the angles of view of the main camera and the auxiliary camera are different. In this embodiment, the pictures shot by the main camera and the auxiliary camera are preprocessed, so that the angle of view and the size of the two pictures are kept the same.
In one example of implementation of preprocessing, edges of two pictures are cut first, and then homography matrix mapping is performed on the cut pictures to obtain a first picture and a second picture with the same angle of view and the same size. Specifically, the proportion of the cut pictures is related to the arrangement mode of the main camera and the auxiliary camera.
In an optional embodiment of step S102, in order to improve the processing efficiency of the picture, the preprocessing further includes: and converting the pictures shot by the main camera and the auxiliary camera into single-channel gray level pictures.
It should be noted that, the format of the first picture and the second picture needs to be the same, and is usually YUV format or RGB format. In a specific example, the format of the primary image output picture is a raw format, and the format of the secondary image output picture is a YUV format, so that the format conversion of the primary image output picture is required, that is, the raw format is converted into the YUV format.
In an alternative implementation manner of step S102, if only the first picture shot by the main camera can be acquired, but the second picture shot by the auxiliary camera cannot be acquired, it is indicated that the electronic device still uses a single camera, that is, the main camera, to perform shooting in the non-single shooting mode, and the real non-single shooting is not realized. In this case, it is not necessary to continue to perform the subsequent step S103.
Step S103, determining whether the auxiliary camera is blocked or not according to the similarity of the first picture and the second picture.
In an alternative embodiment, as shown in fig. 2, step S103 specifically includes the following steps S103a to S103d:
step S103a, calculating the similarity between the first picture and the second picture.
In one example of implementation, step S103a includes the following steps S103a 1S 103a3:
step S103a1, clipping the first picture into a plurality of first sub-pictures, and clipping the second picture into a plurality of second sub-pictures; the first sub-picture and the second sub-picture are the same in size and number. The more the number of the sub-pictures is cut, the more accurate the similarity between the first picture and the second picture is calculated.
Step S103a2, for each first sub-picture, respectively determining whether the first sub-picture is similar to the second sub-picture at the corresponding position.
In a specific implementation, whether the first sub-picture is similar to the second sub-picture at the corresponding position can be judged according to a hash algorithm, specifically, the Hamming distance between the hash value of the first sub-picture and the hash value of the second sub-picture is calculated, and the smaller the Hamming distance is, the more similar the first sub-picture and the second sub-picture are.
In a specific example, after preprocessing, the sizes of the first picture and the second picture are 27×24, and the first picture is cut into 9 first sub-pictures with a size of 9*8, as shown in fig. 3. Likewise, the second picture is also cropped to 9 second sub-pictures of size 9*8, as shown in fig. 4. And judging whether the first sub-picture 11 is similar to the second sub-picture 21 at the corresponding position by using a difference hash algorithm, if the Hamming distance between the hash value of the first sub-picture 11 and the hash value of the second sub-picture 21 is smaller than 10, considering that the first sub-picture 11 is similar to the second sub-picture 21, otherwise, considering that the first sub-picture 11 is dissimilar to the second sub-picture 21.
Step S103a3, calculating the similarity between the first picture and the second picture according to all the judged similarity results.
In the above example, as shown in fig. 3 and 4, the similarity of the first picture and the second picture is calculated from the result of the similarity of the first sub-picture 11 and the second sub-picture 21, the result of the similarity of the first sub-picture 12 and the second sub-picture 22, the result of the similarity of the first sub-picture 13 and the second sub-picture 23, the result of the similarity of the first sub-picture 14 and the second sub-picture 24, the result of the similarity of the first sub-picture 15 and the second sub-picture 25, the result of the similarity of the first sub-picture 16 and the second sub-picture 26, the result of the similarity of the first sub-picture 17 and the second sub-picture 27, the result of the similarity of the first sub-picture 18 and the second sub-picture 28, and the result of the similarity of the first sub-picture 19 and the second sub-picture 29.
In a specific example, setting the default similarity to 1%, and there is a set of similar first and second sub-pictures, the similarity of the first and second pictures is increased by 11%. If 9 groups of similar first sub-pictures and second sub-pictures exist, the similarity of the first picture and the second picture is 100%. The default similarity and the similarity corresponding to the first sub-picture and the second sub-picture with a group of similarity can be set according to the number of the first sub-picture and the second sub-picture.
In this embodiment, by cutting the first picture into a plurality of first sub-pictures and cutting the second picture into a plurality of second sub-pictures, whether the sub-pictures are similar or not is compared respectively, and then the similarity of the first picture and the second picture is calculated based on the similarity result of the sub-pictures, the accuracy of similarity calculation is improved, the accuracy of judging whether the auxiliary camera is shielded or not is further improved, and the user experience is improved.
Step 103b, judging whether the similarity is lower than a preset value, if yes, executing step 103c, and if not, executing step 103d. The preset value may be set according to practical situations, for example, may be set to 90%, or 80%.
Step S103c, determining that the auxiliary camera is blocked. In one example of implementation, in the event that it is determined that the secondary camera is occluded, a prompt message is output to prompt the user that the secondary camera is occluded. After receiving the prompt message, the user can adjust the obstruction, such as a human hand, so that the auxiliary camera is not blocked any more.
Step S103d, determining that the auxiliary camera is not shielded.
In this embodiment, after entering a shooting mode of non-single shooting, the main camera and the auxiliary camera are controlled to shoot simultaneously, and whether the auxiliary camera is blocked is determined according to the similarity of a first picture shot by the main camera and a second picture shot by the auxiliary camera. Compared with the prior art, the method and the device have the advantages that the judgment of whether the auxiliary camera is shielded can be realized without additional hardware cost or limitation to the specific camera, and the universality and the suitability are higher. In addition, whether the auxiliary cameras are shielded or not is judged according to the similarity that the main cameras and the auxiliary cameras shoot pictures at the same time, and compared with subjective judgment by a user, the accuracy is higher.
Example 2
The embodiment provides a camera shielding detection system 50, as shown in fig. 5, including a control module 51, an acquisition module 52 and a determination module 53.
The control module 51 is configured to control the primary camera and the secondary camera to perform shooting in response to entering a shooting mode other than single shooting. The space area shot by the main camera is consistent with the space area shot by the auxiliary camera.
The obtaining module 52 is configured to obtain a first picture taken by the primary camera and a second picture taken by the secondary camera.
In an optional implementation manner, the acquiring module is specifically configured to pre-process the pictures shot by the main camera and the auxiliary camera respectively, so as to obtain a first picture and a second picture with the same angle of view and size.
The determining module 53 is configured to determine whether the auxiliary camera is blocked according to the similarity between the first picture and the second picture.
In an optional implementation manner, the determining module specifically includes:
a calculating unit, configured to calculate a similarity between the first picture and the second picture;
the determining unit is used for judging whether the similarity is lower than a preset value or not, and determining that the auxiliary camera is blocked if the similarity is lower than the preset value; and if not, determining that the auxiliary camera is not shielded.
In an alternative embodiment, the computing unit specifically includes:
a clipping subunit, configured to clip the first picture into a plurality of first sub-pictures, and clip the second picture into a plurality of second sub-pictures; the first sub-picture and the second sub-picture are the same in size and number;
the judging subunit is used for respectively judging whether the first sub-picture is similar to the second sub-picture at the corresponding position for each first sub-picture;
and the calculating subunit is used for calculating the similarity of the first picture and the second picture according to all the judged similar results.
It should be noted that the camera shielding detection system may be a separate chip, a chip module or a terminal, or may be a chip or a chip module integrated in the terminal.
The camera occlusion detection system described in the above embodiment includes each module/unit, which may be a software module/unit, or may be a hardware module/unit, or may be a software module/unit, or may be a hardware module/unit. For example, for each device or product applied to or integrated on the chip, each module/unit included in the device or product may be implemented in hardware such as a circuit, or at least part of the modules/units may be implemented in software program, where the software program runs on a processor integrated inside the chip, and the rest of the modules/units may be implemented in hardware such as a circuit; for each device and product applied to or integrated in the chip module, each module/unit contained in the device and product can be realized in a circuit and other hardware mode, different modules/units can be located in the same component (such as a chip, a circuit module and the like) or different components of the chip module, or at least part of the modules/units can be realized in a software program running in a processor integrated in the chip module, and the rest of the modules/units can be realized in a circuit and other hardware mode; for each device and product applied to or integrated in the terminal, each module/unit contained in the device and product may be implemented in hardware such as a circuit, different modules/units may be located in the same component (for example, a chip, a circuit module, etc.) or different components in the terminal, or at least part of the modules/units may be implemented in a software program, where the software program runs on a processor integrated in the terminal, and the remaining part of the modules/units may be implemented in hardware such as a circuit.
Example 3
Fig. 6 is a schematic structural diagram of an electronic device according to the present embodiment. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed implements the camera occlusion detection method of embodiment 1. The electronic device 3 shown in fig. 6 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the invention.
The electronic device in the embodiment of the invention can be a mobile phone, a tablet personal computer, a PDA (Personal Digital Assistant ), a POS (Point of Sales), a vehicle-mounted terminal, a wearable device, etc., wherein the wearable device can be an intelligent bracelet, an intelligent watch, a wristband, intelligent glasses, a necklace, etc.
The components of the electronic device 3 may include, but are not limited to: the at least one processor 4, the at least one memory 5, a bus 6 connecting the different system components, including the memory 5 and the processor 4.
The bus 6 includes a data bus, an address bus, and a control bus.
The memory 5 may include volatile memory such as Random Access Memory (RAM) 51 and/or cache memory 52, and may further include Read Only Memory (ROM) 53.
The memory 5 may also include a program/utility 55 having a set (at least one) of program modules 54, such program modules 54 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The processor 4 executes a computer program stored in the memory 5 to thereby perform various functional applications and data processing, such as the camera occlusion detection method of embodiment 1 of the present invention.
The electronic device 3 may also communicate with one or more external devices 7, such as a keyboard, pointing device, etc. Such communication may be through an input/output (I/O) interface 8. And the electronic device 3 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the internet, via the network adapter 9. As shown in fig. 6, the network adapter 9 communicates with other modules of the electronic device 3 via the bus 6. It should be appreciated that although not shown in fig. 6, other hardware and/or software modules may be used in connection with the electronic device 3, including, but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, data backup storage systems, and the like.
It should be noted that although several units/modules or sub-units/modules of an electronic device are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more units/modules described above may be embodied in one unit/module in accordance with embodiments of the present invention. Conversely, the features and functions of one unit/module described above may be further divided into ones that are embodied by a plurality of units/modules.
Example 4
The present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the camera occlusion detection method of embodiment 1.
More specifically, among others, readable storage media may be employed including, but not limited to: portable disk, hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible embodiment, the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps of implementing the camera occlusion detection method of embodiment 1, when said program product is run on the terminal device.
Wherein the program code for carrying out the invention may be written in any combination of one or more programming languages, which program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on the remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the principles and spirit of the invention, but such changes and modifications fall within the scope of the invention.

Claims (8)

1. The camera shielding detection method is characterized by comprising the following steps of:
controlling the main camera and the auxiliary camera to shoot in response to entering a shooting mode of non-single shooting; the space areas shot by the main camera and the auxiliary camera are consistent;
acquiring a first picture shot by the main camera and a second picture shot by the auxiliary camera;
determining whether the auxiliary camera is blocked or not according to the similarity of the first picture and the second picture;
wherein the similarity of the first picture and the second picture is calculated according to the following steps:
clipping the first picture into a plurality of first sub-pictures, and clipping the second picture into a plurality of second sub-pictures; the first sub-picture and the second sub-picture are the same in size and number;
for each first sub-picture, judging whether the first sub-picture is similar to a second sub-picture at a corresponding position or not;
calculating the similarity of the first picture and the second picture according to all the judged similarity results;
the more the number of the first sub-pictures and the second sub-pictures is, the more accurate the similarity between the first pictures and the second pictures is calculated.
2. The method for detecting camera occlusion of claim 1, wherein the obtaining the first picture taken by the primary camera and the second picture taken by the secondary camera specifically comprises:
and respectively preprocessing the pictures shot by the main camera and the auxiliary camera to obtain a first picture and a second picture with the same angle of view and the same size.
3. The method for detecting occlusion of a camera according to claim 1 or 2, wherein determining whether the secondary camera is occluded according to a similarity between the first picture and the second picture comprises:
judging whether the similarity is lower than a preset value or not;
if yes, determining that the auxiliary camera is blocked;
if not, determining that the auxiliary camera is not shielded.
4. A camera occlusion detection system, comprising:
the control module is used for controlling the main camera and the auxiliary camera to shoot in response to entering a shooting mode of non-single shooting; the space areas shot by the main camera and the auxiliary camera are consistent;
the acquisition module is used for acquiring a first picture shot by the main camera and a second picture shot by the auxiliary camera;
the determining module is used for determining whether the auxiliary camera is blocked or not according to the similarity of the first picture and the second picture;
the determining module specifically comprises a calculating unit, a processing unit and a processing unit, wherein the calculating unit is used for calculating the similarity of the first picture and the second picture; the computing unit specifically comprises:
a clipping subunit, configured to clip the first picture into a plurality of first sub-pictures, and clip the second picture into a plurality of second sub-pictures; the first sub-picture and the second sub-picture are the same in size and number;
the judging subunit is used for respectively judging whether the first sub-picture is similar to the second sub-picture at the corresponding position for each first sub-picture;
a calculating subunit, configured to calculate, according to all the judged similarity results, a similarity between the first picture and the second picture;
the more the number of the first sub-pictures and the second sub-pictures is, the more accurate the similarity between the first pictures and the second pictures is calculated.
5. The camera occlusion detection system of claim 4, wherein the acquisition module is specifically configured to pre-process pictures taken by the primary camera and the secondary camera, respectively, to obtain a first picture and a second picture that have the same angle of view and size.
6. The camera occlusion detection system of claim 4 or 5, wherein the determination module further comprises
The determining unit is used for judging whether the similarity is lower than a preset value or not, and determining that the auxiliary camera is blocked if the similarity is lower than the preset value; and if not, determining that the auxiliary camera is not shielded.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the camera occlusion detection method of any of claims 1-3 when the computer program is executed by the processor.
8. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the camera occlusion detection method of any of claims 1-3.
CN202011563466.4A 2020-12-25 2020-12-25 Camera shielding detection method and system, electronic equipment and storage medium Active CN112668636B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011563466.4A CN112668636B (en) 2020-12-25 2020-12-25 Camera shielding detection method and system, electronic equipment and storage medium
PCT/CN2021/131283 WO2022134957A1 (en) 2020-12-25 2021-11-17 Camera occlusion detection method and system, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011563466.4A CN112668636B (en) 2020-12-25 2020-12-25 Camera shielding detection method and system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112668636A CN112668636A (en) 2021-04-16
CN112668636B true CN112668636B (en) 2023-08-08

Family

ID=75409171

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011563466.4A Active CN112668636B (en) 2020-12-25 2020-12-25 Camera shielding detection method and system, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN112668636B (en)
WO (1) WO2022134957A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112668636B (en) * 2020-12-25 2023-08-08 展讯通信(上海)有限公司 Camera shielding detection method and system, electronic equipment and storage medium
CN113792580B (en) * 2021-08-02 2023-11-03 日立楼宇技术(广州)有限公司 Auxiliary shooting system, method and device for escalator and storage medium
CN114332720A (en) * 2021-12-31 2022-04-12 上海商汤临港智能科技有限公司 Camera device shielding detection method and device, electronic equipment and storage medium
CN116156157B (en) * 2023-04-24 2023-08-18 长沙海信智能系统研究院有限公司 Camera shielding abnormality detection method and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103295217A (en) * 2012-03-01 2013-09-11 阿里巴巴集团控股有限公司 Method and device for processing picture information
CN111080571A (en) * 2019-11-15 2020-04-28 北京迈格威科技有限公司 Camera shielding state detection method and device, terminal and storage medium
CN111970405A (en) * 2020-08-21 2020-11-20 Oppo(重庆)智能科技有限公司 Camera shielding detection method, storage medium, electronic device and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107465912A (en) * 2016-06-03 2017-12-12 中兴通讯股份有限公司 A kind of imaging difference detection method and device
CN112668636B (en) * 2020-12-25 2023-08-08 展讯通信(上海)有限公司 Camera shielding detection method and system, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103295217A (en) * 2012-03-01 2013-09-11 阿里巴巴集团控股有限公司 Method and device for processing picture information
CN111080571A (en) * 2019-11-15 2020-04-28 北京迈格威科技有限公司 Camera shielding state detection method and device, terminal and storage medium
CN111970405A (en) * 2020-08-21 2020-11-20 Oppo(重庆)智能科技有限公司 Camera shielding detection method, storage medium, electronic device and device

Also Published As

Publication number Publication date
WO2022134957A1 (en) 2022-06-30
CN112668636A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
CN112668636B (en) Camera shielding detection method and system, electronic equipment and storage medium
CN110505411B (en) Image shooting method and device, storage medium and electronic equipment
US10216267B2 (en) Portable electronic equipment and method of controlling a portable electronic equipment
WO2019085618A1 (en) Image-processing method, apparatus and device
CN110166708B (en) Night scene image processing method and device, electronic equipment and storage medium
CN108805198B (en) Image processing method, image processing device, computer-readable storage medium and electronic equipment
WO2019148978A1 (en) Image processing method and apparatus, storage medium and electronic device
CN109005366A (en) Camera module night scene image pickup processing method, device, electronic equipment and storage medium
CN110248106B (en) Image noise reduction method and device, electronic equipment and storage medium
CN110213494B (en) Photographing method and device, electronic equipment and computer readable storage medium
US7450756B2 (en) Method and apparatus for incorporating iris color in red-eye correction
US8411159B2 (en) Method of detecting specific object region and digital camera
EP3697079A1 (en) Image capturing method and apparatus, and terminal
CN110072078B (en) Monitoring camera, control method of monitoring camera, and storage medium
EP3624438B1 (en) Exposure control method, and electronic device
CN108513069B (en) Image processing method, image processing device, storage medium and electronic equipment
CN109618102B (en) Focusing processing method and device, electronic equipment and storage medium
CN108401110B (en) Image acquisition method and device, storage medium and electronic equipment
CN110213491B (en) Focusing method, device and storage medium
US20170126966A1 (en) Photography method using gaze detection
CN107295261B (en) Image defogging method and device, storage medium and mobile terminal
CN110276730B (en) Image processing method and device and electronic equipment
US8064655B2 (en) Face image detection device, face image detection method and imaging apparatus
CN114500837B (en) Shooting method and device and electronic equipment
CN112153291B (en) Photographing method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant