CN107743224B - Method and system for reminding dirtiness of lens, readable storage medium and mobile terminal - Google Patents

Method and system for reminding dirtiness of lens, readable storage medium and mobile terminal Download PDF

Info

Publication number
CN107743224B
CN107743224B CN201710917187.5A CN201710917187A CN107743224B CN 107743224 B CN107743224 B CN 107743224B CN 201710917187 A CN201710917187 A CN 201710917187A CN 107743224 B CN107743224 B CN 107743224B
Authority
CN
China
Prior art keywords
lens
reminding
gray
value
target
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
CN201710917187.5A
Other languages
Chinese (zh)
Other versions
CN107743224A (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.)
Qiku Internet Technology Shenzhen Co Ltd
Original Assignee
Qiku Internet Technology Shenzhen 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 Qiku Internet Technology Shenzhen Co Ltd filed Critical Qiku Internet Technology Shenzhen Co Ltd
Priority to CN201710917187.5A priority Critical patent/CN107743224B/en
Publication of CN107743224A publication Critical patent/CN107743224A/en
Application granted granted Critical
Publication of CN107743224B publication Critical patent/CN107743224B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/52Details of telephonic subscriber devices including functional features of a camera

Abstract

The invention provides a method and a system for reminding dirtiness of a lens, a readable storage medium and a mobile terminal, wherein the method comprises the following steps: acquiring a target gray value of a preset area in a current shot image, wherein the current shot image is shot through the lens; acquiring a target exposure value in the current shot image; judging whether the target gray value is within a gray threshold range corresponding to the target exposure value; if not, sending a prompt to prompt the user that the lens is dirty. The method and the system for reminding the dirt of the lens, the readable storage medium and the mobile terminal can automatically identify whether the lens is dirty or not, and can automatically remind a user under the condition that the dirt exists, so that the user does not need to frequently check whether the lens is dirty or not, the experience is good, and the identification precision is high.

Description

Method and system for reminding dirtiness of lens, readable storage medium and mobile terminal
Technical Field
The invention relates to a method and a system for reminding dirtiness of a lens, a readable storage medium and a mobile terminal.
Background
With the increasing living standard of people, mobile terminals, such as mobile phones, tablets, computers, cameras, etc., are becoming popular. Almost all current intelligent devices integrate a camera lens to realize the camera function of the device.
At present, some electronic manufacturers often receive complaints that the photographing effect of users on mobile terminals produced by the electronic manufacturers is poor, and in the complaints, a great part of the complaints is caused by the fact that the camera lens is dirty, but the quality of the camera lens is not a problem, so that great troubles are caused to the users and the manufacturers.
Among the prior art, in order to solve above-mentioned problem, the producer tells the user to pay attention to the dirtiness on the clean camera lens at any time usually for the user has to frequently look over whether the camera lens is dirty or not, leads to user experience poor, and the artificial judgement that has the dirtiness to the camera lens simultaneously, it is inaccurate, the precision is poor.
Disclosure of Invention
Based on this, the present invention provides a method and a system for reminding a user of a dirty lens, a readable storage medium and a mobile terminal, so as to automatically determine whether the lens is dirty or not, thereby realizing automatic reminding of the user when the lens is dirty.
The method for reminding the dirtiness of the lens according to the embodiment of the invention comprises the following steps:
acquiring a target gray value of a preset area in a current shot image, wherein the current shot image is shot through the lens;
acquiring a target exposure value of the current shot image; and
judging whether the target gray value is within a gray threshold range corresponding to the target exposure value;
if not, sending out reminding information to remind a user that the lens is dirty.
In addition, the method for reminding the lens of being dirty according to the above embodiment of the present invention may further have the following additional technical features:
further, the preset region is a hair region, and the step of obtaining the target gray value of the preset region in the current shot image includes:
extracting the hair area in the current shot image according to a face recognition algorithm;
and calculating the average value of the gray values of all the pixel points in the hair area to obtain the target gray value.
Further, the step of determining whether the target gray-scale value is within a gray-scale threshold range corresponding to the target exposure value includes:
inquiring the gray threshold range corresponding to the target exposure value in a mapping table according to the target exposure value;
and judging whether the target gray value is within the gray threshold range.
Further, before the lens leaves factory, the method further includes:
respectively acquiring a preset number of test images shot by the lens under a plurality of shooting scenes;
respectively acquiring an exposure value of each test image and a gray value of the preset area in each test image to obtain an exposure value range of a shot image of the lens under each shooting scene and a gray value range of the preset area;
and taking the gray value range as the gray threshold range corresponding to the exposure value range, and pre-storing the gray value range and the gray threshold range together as the information of the corresponding shooting scene in the mapping table.
Further, the lens is installed on the mobile terminal, and the step of sending out the reminding information includes:
and acquiring preset reminding information, and displaying the preset reminding information on a display screen of the mobile terminal in a pop-up frame mode.
Further, a triggering display icon is arranged in the reminding frame where the preset reminding information is located, and after the step of displaying the preset reminding information on the display screen of the mobile terminal in a frame popping mode, the method further comprises the following steps of:
when a click signal of the trigger display icon is received, acquiring dirt processing information, and displaying the dirt processing information below the preset reminding information, wherein the dirt processing information comprises an operation step for guiding a user to process dirt of the lens;
and adjusting the size of the reminding frame so that the dirt processing information is displayed in the reminding frame.
Further, after the step of sending out the reminding information, the method further comprises the following steps:
recording the current time for sending the reminding information, and calculating the time interval from the last time for sending the reminding information;
and automatically sending the reminding information every time interval.
The dirty reminding system of a camera lens according to the embodiment of the invention comprises:
the gray value acquisition module is used for acquiring a target gray value of a preset area in a current shot image, and the current shot image is shot through the lens;
an exposure value acquisition module for acquiring a target exposure value in the current shot image;
the gray value judging module is used for judging whether the target gray value is located in a gray threshold range corresponding to the target exposure value; and
and the reminding module is used for sending reminding information to remind a user that the lens is dirty when the target gray value is judged not to be within the gray threshold range.
The invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the method for reminding the lens of being dirty as described above.
The invention further provides a mobile terminal, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the method for reminding the dirty lens.
According to the method, the system, the readable storage medium and the mobile terminal for reminding the lens of the dirt, the gray threshold range of the preset area in the shot image is preset when the lens is not dirty in each shooting scene, the target exposure value of the current shot image of the lens and the target gray value of the preset area are obtained in real time, the current shot scene of the lens is matched through the target exposure value, the gray threshold range of the shot image when the lens is not dirty is obtained according to the current shot scene, whether the target gray value is in the obtained gray threshold range or not is judged, if yes, the lens is not dirty and the reminding is not sent, otherwise, the lens is dirty and the reminding is automatically sent, so that the user is reminded that the lens is dirty. Therefore, the method and the system for reminding the dirt of the lens, the readable storage medium and the mobile terminal can automatically identify whether the dirt exists in the lens and automatically remind a user when the dirt exists, so that the user does not need to frequently check whether the lens is dirty, the experience is good, and the identification precision is high.
Drawings
Fig. 1 is a flowchart of a method for reminding a dirty lens in a first embodiment of the present invention;
fig. 2 is a flowchart of a lens contamination reminding method according to a second embodiment of the present invention;
FIG. 3 is an illustration of a reminder message box display in a second embodiment of the present invention;
fig. 4 is an explanatory diagram showing stain treatment information in a second embodiment of the present invention;
fig. 5 is a flowchart of a method for reminding a lens of being dirty according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of a lens contamination reminding system according to a fourth embodiment of the present invention.
Description of the main element symbols:
gray value acquisition module 11 Exposure value acquisition module 12
Gray value judging module 13 Reminding module 14
Hair region extraction unit 111 Gray value acquisition unit 112
Reminding unit 141 Hidden information display unit 142
Reminding frame adjusting unit 143 Time calculation module 18
Threshold range query ticketYuan 131 Gray value judging unit 132
Test image acquisition module 15 Test image processing module 16
Information prestoring module 17
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Several embodiments of the invention are presented in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like as used herein are for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1, a method for reminding a lens of being dirty according to a first embodiment of the present invention is shown, including steps S01 to S03.
And step S01, shooting the image through the lens, and acquiring the target gray value of the preset area in the current shot image.
The preset area is a designated area preset for lens contamination identification and analysis, in this embodiment, the lens takes an image of the head of a person, and the designated area may be a face area, a hair area, or the like. When the hair area is selected as the preset area, the hair area is acquired with a target gray value every time an image is shot for subsequent dirt identification analysis. In other embodiments, the target gray-scale value may be obtained by querying information of the captured image.
In step S02, a target exposure value in the current captured image is acquired.
Wherein the exposure value can be obtained by the existing image processing algorithm. In some embodiments, the exposure value may also be obtained by means of querying information of the captured image.
Step S03, determining whether the target gray-level value is within the gray-level threshold range corresponding to the target exposure value.
And under the shooting scene corresponding to the target exposure value, the gray threshold range is a normal fluctuation range of the gray value of the preset area in the shot image when the lens is not polluted.
It should be noted that the exposure value directly reflects the shooting scene of the shot image, and the gray scale value range of the preset area has a certain difference in the shot images in different shooting scenes (such as outdoor, indoor, dark light, etc.). Just because a certain corresponding relation exists between the exposure value and the gray value range in a specific shooting scene, the shooting scene of the current shooting image can be matched through the target exposure value, and then the gray threshold range corresponding to the shooting scene is obtained.
In specific implementation, before shipping or under the condition that it is determined that the lens is not dirty, the exposure value of each image shot by the lens in different shooting scenes and the gray value of the preset region may be respectively collected in advance through experiments to obtain the specific exposure value range of the image shot by the lens in each shooting scene and the gray value range of the preset region.
Therefore, whether the lens is dirty or not can be judged by judging whether the target gray value is in the gray threshold range corresponding to the target exposure value or not.
When it is determined in the step S03 that the target gray-level value is within the gray-level threshold range corresponding to the target exposure value, indicating that the lens is not dirty, the monitoring is continued, and when it is determined in the step S03 that the target gray-level value is not within the gray-level threshold range corresponding to the target exposure value, indicating that the lens is dirty, the step S04 is executed.
And step S04, sending out a reminding message to remind the user that the lens is dirty.
The sending mode of the reminding information includes but is not limited to pop-up frame display, language broadcast, short message notification, vibration reminding and the like.
In summary, in the method for reminding the dirtiness of the lens in the above embodiment of the present invention, the gray threshold range of the preset region in the shot image is preset when the lens is not dirtiness in each shot scene, the target exposure value of the current shot image of the lens and the target gray value of the preset region are obtained in real time, the current shot scene of the current shot image is matched through the target exposure value, the gray threshold range of the shot image when the lens is not dirtiness is obtained according to the current shot scene, and then it is determined whether the target gray value is within the obtained gray threshold range, if so, the lens is dirtiness, the reminding is not sent, otherwise, the lens is dirtiness, and the reminding is automatically sent to remind the user that the lens is dirtiness. Therefore, the method for reminding the dirtiness of the lens can automatically identify whether the lens is dirtiness or not and can automatically remind a user when the dirtiness exists, so that the user does not need to frequently check whether the lens is dirtiness or not, the experience is good, and the identification precision is high.
Referring to fig. 2, a method for reminding a lens of being dirty according to a second embodiment of the present invention is shown, in which the lens is installed in a mobile terminal, and the method for reminding a lens of being dirty includes steps S11 to S17.
And step S11, extracting the hair area in the current shot image according to a face recognition algorithm.
Wherein the current shot image is shot through the lens.
In the present embodiment, a hair region is used as an analysis region for subsequent lens contamination, but it should be understood that the present invention is not limited to using only a hair region as an analysis region, and for example, in other embodiments, a skin color region may be used as an analysis region.
And step S12, calculating the average value of the gray values of each pixel point in the hair area to obtain a target gray value.
In step S13, a target exposure value in the current captured image is acquired.
Step S14, according to the target exposure value, querying a mapping table for a gray threshold range corresponding to the target exposure value.
And the gray level threshold range is a normal fluctuation range of the gray level value of the hair area in the shot image under the shooting scene corresponding to the target exposure value when the lens is not dirty.
In specific implementation, before the lens leaves the factory, the method for reminding the contamination of the lens may further include:
respectively acquiring a preset number of test images shot by the lens under a plurality of shooting scenes;
respectively acquiring an exposure value of each test image and a gray value of a hair area in each test image to obtain an exposure value range and a gray value range of the hair area of the shot image of the lens under each shooting scene;
and taking the gray value range as the gray threshold range corresponding to the exposure value range, and pre-storing the gray value range and the gray threshold range together as the information of the corresponding shooting scene in the mapping table.
Therefore, specifically, according to the target exposure value, the step of querying the mapping table for the gray threshold range corresponding to the target exposure value may be specifically implemented as follows: firstly, a target exposure value range containing the target exposure value is inquired in the mapping table, and then a gray threshold value range corresponding to the target exposure value range is inquired in the mapping table, so that the gray threshold value range corresponding to the target exposure value is obtained.
It is understood that, before the lens leaves the factory, the mapping table may be stored in the mobile terminal, so as to directly query the grayscale threshold range on the mapping table in the following.
Step S15, determining whether the target grayscale value is within the grayscale threshold range.
When it is determined in the step S15 that the target grayscale value is within the grayscale threshold range, the monitoring is not performed, and when it is determined in the step S15 that the target grayscale value is not within the grayscale threshold range, which indicates that the lens is dirty, steps S16 to S18 are performed.
And step S16, acquiring preset reminding information, and displaying the preset reminding information on a display screen of the mobile terminal in a pop-up frame mode.
In this embodiment, the reminding information is sent by adopting a pop-up frame display mode, that is, the preset reminding information is generated in the reminding frame and is displayed on the display screen of the mobile terminal.
And a trigger display icon (such as an arrow at the lower right of the reminding frame in fig. 3) is arranged in the reminding frame where the preset reminding information is located.
Please refer to fig. 3, which shows an effect diagram of the display of the reminding message box in the present embodiment.
Step S17, when receiving the click signal of the trigger display icon, acquiring contamination processing information, and displaying the contamination processing information below the preset reminder information, where the contamination processing information includes an operation step for instructing a user to process contamination of the lens.
Step S18, adjusting the size of the reminder frame so that the contamination processing information is displayed in the reminder frame.
It can be understood that the boundary point coordinates of the dirty processing information are obtained, and then the boundary point coordinates of the reminding frame are correspondingly adjusted according to the boundary point coordinates, so that the boundary point coordinates of the dirty processing information are located within the boundary of the reminding frame, and the size adjustment of the reminding frame is realized.
Referring to fig. 4, an effect diagram of displaying the contamination processing information in the present embodiment is shown.
Compared with the method for reminding the dirtiness of the lens in the first embodiment, the method for reminding the dirtiness of the lens in the embodiment also has the operation guidance reminding for processing the dirtiness of the lens, so that a user can be guided to process the lens more professionally, and the experience is further improved.
Referring to fig. 5, a method for reminding a lens of being dirty according to a third embodiment of the present invention is shown, in which the lens is installed in a mobile terminal, and the method for reminding a lens of being dirty includes steps S21 to S27.
And step S21, extracting the hair area in the current shot image according to a face recognition algorithm.
Wherein the current shot image is shot through the lens.
Step S22, calculating an average value of the gray values of each pixel point in the hair region to obtain the target gray value.
In step S23, a target exposure value in the current captured image is acquired.
Step S24, according to the target exposure value, querying the gray threshold range corresponding to the target exposure value in a mapping table.
And the gray level threshold range is a normal fluctuation range of the gray level value of the hair area in the shot image under the shooting scene corresponding to the target exposure value when the lens is not dirty.
In specific implementation, before the lens leaves the factory, the method for reminding the contamination of the lens further includes:
respectively acquiring a preset number of test images shot by the lens under a plurality of shooting scenes;
respectively acquiring an exposure value of each test image and a gray value of a hair area in each test image to obtain an exposure value range and a gray value range of the hair area of the shot image of the lens under each shooting scene;
and taking the gray value range as the gray threshold range corresponding to the exposure value range, and pre-storing the gray value range and the gray threshold range together as the information of the corresponding shooting scene in the mapping table.
Step S25, determining whether the target grayscale value is within the grayscale threshold range.
When the step S25 determines that the target gray-level value is within the gray-level threshold range, the monitoring is continued, and when the step S25 determines that the target gray-level value is not within the gray-level threshold range, the steps S26 to S28 are performed.
And step S26, sending out a reminding message to remind the user that the lens is dirty.
The sending mode of the reminding information includes but is not limited to pop-up frame display, language broadcast, short message notification, vibration reminding and the like.
Step S27, recording the current time for sending the reminding information, and calculating the time interval from the last time for sending the reminding information;
and step S28, automatically sending out the reminding information at intervals of the time interval.
The step of automatically sending the reminding every time interval comprises the step of automatically sending the reminding information every other time interval from the current time of sending the reminding so as to regularly remind a user of cleaning the shot.
Compared with the method for reminding the dirtiness of the lens in the first embodiment, the method for reminding the dirtiness of the lens in the present embodiment also has the beneficial effect of regularly reminding the user to clean the lens.
Another aspect of the present invention further provides a system for reminding a dirty lens, referring to fig. 6, which shows a system for reminding a dirty lens according to a fourth embodiment of the present invention, including:
the gray value obtaining module 11 is configured to obtain a target gray value of a preset area in a current captured image, where the current captured image is captured through the lens;
an exposure value obtaining module 12 for obtaining a target exposure value in the current shot image;
a gray value determining module 13, configured to determine whether the target gray value is within a gray threshold range corresponding to the target exposure value;
and the reminding module 14 is configured to send out reminding information to remind a user that the lens is dirty when it is determined that the target gray value is not within the gray threshold range corresponding to the target exposure value.
Further, the preset region is a hair region, and the gray value obtaining module 11 includes:
a hair region extracting unit 111, configured to extract the hair region in the current captured image according to a face recognition algorithm;
the gray value obtaining unit 112 is configured to perform average calculation on the gray value of each pixel point in the hair region to obtain the target gray value.
Further, the gray value determining module 13 includes:
a threshold range searching unit 131, configured to search, according to the target exposure value, the gray threshold range corresponding to the target exposure value in a mapping table;
the gray-level determining unit 132 determines whether the target gray-level value is within the gray-level threshold range.
Further, before the lens leaves the factory, the system for reminding the contamination of the lens further comprises:
a test image obtaining module 15, configured to obtain a preset number of test images shot by the lens in multiple shooting scenes, respectively;
the test image processing module 16 is configured to obtain an exposure value of each test image and a gray value of the preset region in each test image, so as to obtain an exposure value range of an image shot by the lens in each shooting scene and a gray value range of the preset region;
and the information pre-storing module 17 is configured to take the gray value range as the gray threshold range corresponding to the exposure value range, and pre-store the gray value range and the gray threshold range together as the information of the corresponding shooting scene in the mapping table.
Further, the lens is installed on the mobile terminal, and the reminding module 14 includes:
the reminding unit 141 is configured to obtain preset reminding information, and display the preset reminding information on a display screen of the mobile terminal in a pop-up frame manner.
Further, a triggering display icon is arranged in the reminding frame where the preset reminding information is located, and the reminding module 14 further comprises:
a hidden information display unit 142, configured to, when receiving a click signal of the trigger display icon, acquire contamination processing information and display the contamination processing information below the preset reminding information, where the contamination processing information includes an operation step for instructing a user to process contamination of the lens;
the reminding frame adjusting unit 143 adjusts the size of the reminding frame so that the contamination processing information is displayed in the reminding frame.
Further, the dirty reminding system of camera lens still includes:
a time calculation module 18, configured to record a current time for sending the reminder, and calculate a time interval between sending the reminder and the last time;
and the reminder module 14 automatically issues the reminder at each of the time intervals.
The invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the method for reminding the lens of being dirty as described above.
The invention further provides a mobile terminal, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the method for reminding the dirty lens.
Those of skill in the art will understand that the logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be viewed as implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
The embodiment of the invention also discloses:
A1. a method for reminding that a lens is dirty comprises the following steps:
calculating a target gray value of a preset area in a current shot image, wherein the current shot image is shot through the lens;
calculating a target exposure value of the current shot image;
judging whether the target gray value is within a gray threshold range corresponding to the target exposure value;
if not, sending out reminding information to remind a user that the lens is dirty.
A2. According to the method for reminding the dirtiness of the lens in a1, the preset area is a hair area, and the step of calculating the target gray-scale value of the preset area in the current shot image comprises the following steps:
extracting the hair area in the current shot image according to a face recognition algorithm;
and calculating the average value of the gray values of all the pixel points in the hair area to obtain the target gray value.
A3. According to the method for reminding the dirtiness of the lens as described in a1, the step of determining whether the target gray-level value is within the gray-level threshold range corresponding to the target exposure value comprises:
inquiring the gray threshold range corresponding to the target exposure value in a mapping table according to the target exposure value;
and judging whether the target gray value is within the gray threshold range.
A4. The method for reminding the dirtiness of the lens according to a3, before the lens leaves factory, further comprising:
respectively acquiring a preset number of test images shot by the lens under a plurality of shooting scenes;
respectively calculating an exposure value of each test image and a gray value of the preset area in each test image to obtain an exposure value range of the shot image of the lens under each shooting scene and a gray value range of the preset area;
and taking the gray value range as the gray threshold range corresponding to the exposure value range, and pre-storing the gray value range and the gray threshold range together as the information of the corresponding shooting scene in the mapping table.
A5. The method for reminding the dirtiness of the lens according to the a1, wherein the lens is installed on a mobile terminal, and the step of sending out the reminding information comprises the following steps:
and acquiring preset reminding information, and displaying the preset reminding information on a display screen of the mobile terminal in a pop-up frame mode.
A6. According to the method for reminding the dirtiness of the lens in a5, a triggering display icon is arranged in a reminding frame where the preset reminding information is located, and after the step of displaying the preset reminding information on a display screen of the mobile terminal in a pop-up frame mode, the method further comprises the following steps:
when a click signal of the trigger display icon is received, acquiring dirt processing information, and displaying the dirt processing information below the preset reminding information, wherein the dirt processing information comprises an operation step for guiding a user to process dirt of the lens;
and adjusting the size of the reminding frame so that the dirt processing information is displayed in the reminding frame.
A7. The method for reminding the dirtiness of the lens according to a1, wherein the step of sending out the reminding information further comprises the following steps:
recording the current time for sending the reminding information, and calculating the time interval from the last time for sending the reminding information;
and automatically sending the reminding information every time interval.
B8. A lens smudging reminding system comprising:
the gray value calculation module is used for calculating a target gray value of a preset area in a current shot image, and the current shot image is shot through the lens;
the exposure value calculation module is used for calculating a target exposure value in the current shot image;
the gray value judging module is used for judging whether the target gray value is located in a gray threshold range corresponding to the target exposure value;
and the reminding module is used for sending reminding information to remind a user that the lens is dirty when the target gray value is judged not to be within the gray threshold range.
C9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the method for reminding a lens of soiling according to any one of a 1-a 7.
D10. A mobile terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method for alerting of soiling of a lens as claimed in any one of a 1-a 7 when executing the program.

Claims (8)

1. A method for reminding that a lens is dirty is characterized by comprising the following steps:
acquiring a target gray value of a preset area in a current shot image, wherein the current shot image is shot through the lens, the preset area is any one of a face area, a hair area or a skin color area, and the preset area is identified by a face identification algorithm;
acquiring a target exposure value of the current shot image; and
judging whether the target gray value is within a gray threshold range corresponding to the target exposure value;
if not, sending out reminding information to remind a user that the lens is dirty;
wherein the step of judging whether the target gray-scale value is within the gray-scale threshold range corresponding to the target exposure value comprises:
according to the target exposure value, inquiring the gray threshold range corresponding to the target exposure value in a mapping table, wherein the gray threshold range is a normal fluctuation range of the gray value of the preset area in the shot image when the lens is not dirty;
judging whether the target gray value is within the gray threshold range;
wherein, before the lens leaves factory or in case of confirming that the lens is not dirty, the method further comprises:
respectively acquiring a preset number of test images shot by the lens under a plurality of shooting scenes;
respectively acquiring an exposure value of each test image and a gray value of the preset area in each test image to obtain an exposure value range of a shot image of the lens under each shooting scene and a gray value range of the preset area;
and taking the gray value range as the gray threshold range corresponding to the exposure value range, and pre-storing the gray value range and the gray threshold range together as the information of the corresponding shooting scene in the mapping table.
2. The method for reminding the dirtiness of the lens as claimed in claim 1, wherein the preset area is a hair area, and the step of obtaining the target gray-scale value of the preset area in the current shot image comprises:
extracting the hair area in the current shot image according to a face recognition algorithm;
and calculating the average value of the gray values of all the pixel points in the hair area to obtain the target gray value.
3. The method for reminding the dirtiness of the lens according to claim 1, wherein the lens is mounted on the mobile terminal, and the step of sending the reminding information comprises:
and acquiring preset reminding information, and displaying the preset reminding information on a display screen of the mobile terminal in a pop-up frame mode.
4. The method for reminding the dirtiness of the lens as claimed in claim 3, wherein the reminding frame where the preset reminding information is located is provided with a triggering display icon, and after the step of displaying the preset reminding information on the display screen of the mobile terminal in a pop-up frame manner, the method further comprises:
when a click signal of the trigger display icon is received, acquiring dirt processing information, and displaying the dirt processing information below the preset reminding information, wherein the dirt processing information comprises an operation step for guiding a user to process dirt of the lens;
and adjusting the size of the reminding frame so that the dirt processing information is displayed in the reminding frame.
5. A method for reminding of lens contamination according to claim 1, further comprising, after the step of sending out the reminding message:
recording the current time for sending the reminding information, and calculating the time interval from the last time for sending the reminding information;
and automatically sending the reminding information every time interval.
6. A dirty reminder system of camera lens, characterized in that includes:
the gray value acquisition module is used for acquiring a target gray value of a preset area in a current shot image, and the current shot image is shot through the lens;
an exposure value acquisition module for acquiring a target exposure value in the current shot image;
the gray value judging module is used for judging whether the target gray value is located in a gray threshold range corresponding to the target exposure value; and
and the reminding module is used for sending reminding information to remind a user that the lens is dirty when the target gray value is judged not to be within the gray threshold range.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
8. A mobile terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-5 when executing the program.
CN201710917187.5A 2017-09-30 2017-09-30 Method and system for reminding dirtiness of lens, readable storage medium and mobile terminal Active CN107743224B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710917187.5A CN107743224B (en) 2017-09-30 2017-09-30 Method and system for reminding dirtiness of lens, readable storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710917187.5A CN107743224B (en) 2017-09-30 2017-09-30 Method and system for reminding dirtiness of lens, readable storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN107743224A CN107743224A (en) 2018-02-27
CN107743224B true CN107743224B (en) 2020-04-17

Family

ID=61236523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710917187.5A Active CN107743224B (en) 2017-09-30 2017-09-30 Method and system for reminding dirtiness of lens, readable storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN107743224B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650503B (en) * 2018-04-28 2020-08-21 努比亚技术有限公司 Camera fault determination method and device and computer readable storage medium
CN108898592A (en) * 2018-06-22 2018-11-27 北京小米移动软件有限公司 Prompt method and device, the electronic equipment of camera lens degree of fouling
CN108668080B (en) * 2018-06-22 2020-09-08 北京小米移动软件有限公司 Method and device for prompting degree of dirt of lens and electronic equipment
CN110889801B (en) * 2018-08-16 2023-10-20 九阳股份有限公司 Camera decontamination optimization method of smoke kitchen system and smoke kitchen system
CN109389075B (en) * 2018-09-29 2024-03-19 佛山市云米电器科技有限公司 Intelligent smoke machine lens fuzzy self-checking method
CN109584217B (en) * 2018-11-15 2022-09-02 常州大学 Automatic judging method for monitoring camera lens pollution
CN110572636B (en) * 2019-07-23 2020-08-04 RealMe重庆移动通信有限公司 Camera contamination detection method and device, storage medium and electronic equipment
CN110855976B (en) * 2019-10-08 2022-03-11 南京云计趟信息技术有限公司 Camera abnormity detection method and device and terminal equipment
CN110766679B (en) * 2019-10-25 2022-09-06 普联技术有限公司 Lens contamination detection method and device and terminal equipment
CN112351168A (en) * 2020-10-21 2021-02-09 惠州市德赛西威智能交通技术研究院有限公司 Camera laser self-cleaning device and system
CN112422959A (en) * 2020-11-11 2021-02-26 珠海格力电器股份有限公司 Lens pollution detection method, system, equipment and storage medium
CN112911280B (en) * 2021-02-04 2022-03-01 广东小天才科技有限公司 Lens state detection method and device, electronic equipment and storage medium
CN113240672A (en) * 2021-06-21 2021-08-10 广州文远知行科技有限公司 Lens pollutant detection method, device, equipment and storage medium
CN117287728B (en) * 2023-11-27 2024-02-09 山东佰洁智能电器有限公司 Induction cooker control system and method based on Internet of things

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4611899B2 (en) * 2006-01-12 2011-01-12 アルパイン株式会社 Camera lens dirt detection device and image display system
CN103929598B (en) * 2014-04-30 2018-04-27 信利光电股份有限公司 A kind of automatic explosion method and camera module detection method
CN104240235B (en) * 2014-08-26 2017-08-25 北京君正集成电路股份有限公司 It is a kind of to detect the method and system that camera is blocked
CN105611188B (en) * 2015-12-23 2019-06-04 北京奇虎科技有限公司 Camera occlusion detection method and device based on automatic exposure
CN106572349B (en) * 2016-11-18 2019-04-12 维沃移动通信有限公司 A kind of detection method and mobile terminal of camera cleannes

Also Published As

Publication number Publication date
CN107743224A (en) 2018-02-27

Similar Documents

Publication Publication Date Title
CN107743224B (en) Method and system for reminding dirtiness of lens, readable storage medium and mobile terminal
US9619708B2 (en) Method of detecting a main subject in an image
CN105279487B (en) Method and system for screening beauty tools
CN108418920B (en) Intelligent terminal and control method thereof
US10943357B2 (en) Video based indoor leak detection
CN108416235B (en) The anti-peeping method, apparatus of display interface, storage medium and terminal device
EP3819863A1 (en) Learning data collection device, learning data collection system, and learning data collection method
CN110706150A (en) Image processing method, image processing device, electronic equipment and storage medium
EP3196758B1 (en) Image classification method and image classification apparatus
CN110059666B (en) Attention detection method and device
CN110572636B (en) Camera contamination detection method and device, storage medium and electronic equipment
JP2007265125A (en) Content display
CN107645925B (en) System and method for measuring hair diameter
CN107346419B (en) Iris recognition method, electronic device, and computer-readable storage medium
CN106297734B (en) Screen brightness adjusting method and device for electronic terminal
CN111368698B (en) Main body identification method, main body identification device, electronic equipment and medium
CN110363036B (en) Code scanning method and device based on wire controller and code scanning system
CN107368783B (en) Living iris detection method, electronic device, and computer-readable storage medium
CN110677580B (en) Shooting method, shooting device, storage medium and terminal
US20180205877A1 (en) Information processing apparatus, information processing method, system, and non-transitory computer-readable storage medium
CN108769521B (en) Photographing method, mobile terminal and computer readable storage medium
CN111325731A (en) Installation detection method and device of remote control device
CN104978566A (en) Picture processing method and terminal
US20230104061A1 (en) Methods and apparatuses for determining statuses of positions on shelves, shelves and non-transitory computer-readable storage media
CN114463358A (en) Screen projection display method and device, electronic equipment and readable storage medium

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