Camera lens condition detection method and deviceTechnical field
The present invention relates to the image processing techniques of communication technical field, more particularly to a kind of camera lens state-detection sideMethod and device.
Background technology
With the convenience that the fast development of intelligent terminal and mobile device are taken pictures, mobile phone photograph has become peopleNetwork social intercourse new lover, therefore, the requirement of the camera system of mobile phone to photographic quality also more and more higher, andThe guarantee of photographic quality is except by sensor (sensor) and image processor (ISP, Image SignalProcessor) the debugging optimization of performance is outer, it is also necessary to consider from photographer's angle, such as camera lens surfaceWhether without spot, shooting environmental.
In existing technology, camera developer considers the various usage scenarios of user as far as possible, and algorithm is examinedConsider the pattern of full-automatic adaptive scene, most of technology is all based on objective weather, light, environment etc.The specific aim processing made detection and carried out.Therefore, prior art have ignored the artificial pollution of camera lens and causeShooting photographic quality decline.That is, because mobile phone is often hand held, the camera lens of camera is notEvitable to be influenceed by sweat stain and greasy dirt, camera lens spot often allows the video or photographic quality of shootingDimness, texture obscure, if running into lighting source (such as LED advertisement board, car light, street lamp etc.)Halation can also become big, and at this time the existing full-automatic photographic quality shot of taking pictures is still very poor.
The content of the invention
To solve existing technical problem, the embodiment of the present invention provide a kind of camera lens condition detection method andDevice, the automatic detection to camera lens state can be realized, it is determined that prompting user is handled during camera lens exception,Improve the quality of shooting photo.
To reach above-mentioned purpose, the technical proposal of the invention is realized in this way:
In a first aspect, the embodiment of the present invention provides a kind of camera lens condition detection method, method includes:
Determine that characteristic information meets the target block of the first preparatory condition from each block of capture images;
Obtain the first monochrome information and fisrt feature information of the target block;
According to first monochrome information and fisrt feature information, determine whether camera lens is abnormal;
Determine to prompt user to be handled during the camera lens exception.
It is described according to first monochrome information and fisrt feature information in such scheme, determine that camera lens isNo exception, including:
According to the corresponding relation between default monochrome information and characteristic information, it is determined that believing with first brightnessSecond feature information corresponding to breath;
Calculate the difference of the fisrt feature information and the second feature information;
Judge whether the difference meets the second preparatory condition;
If, it is determined that the camera lens is abnormal;Otherwise determine that the camera lens is normal.
In such scheme, methods described also includes:
Obtain atmospheric visibility information;
It is described to determine whether camera lens is abnormal according to first monochrome information and fisrt feature information, including:
According to the atmospheric visibility information, first monochrome information and fisrt feature information, it is determined that describedWhether camera lens is abnormal.
In such scheme, it is described determination the camera lens exception when prompting user handled after, the sideMethod also includes:
According to the corresponding relation between the monochrome information and nonlinear compensation information obtained in advance, it is determined that with it is describedNonlinear compensation information corresponding to first monochrome information;
According to the nonlinear compensation information, nonlinear compensation processing is carried out to the capture images.
In such scheme, pair between monochrome information and nonlinear compensation information that the basis obtains in advanceIt should be related to, it is determined that nonlinear compensation information corresponding with first monochrome information, including:
According to the corresponding relation between first monochrome information and brightness degree, it is determined that with first brightnessBrightness degree corresponding to information;
According to the corresponding relation between the brightness degree and gamma correction information obtained in advance, it is determined that with it is described brightSpend gamma correction information corresponding to grade.
Second aspect, the embodiments of the invention provide a kind of camera lens condition checkout gear, device includes:
Detection module, for determining that characteristic information meets the first preparatory condition from each block of capture imagesTarget block;
Acquisition module, for obtaining the first monochrome information and fisrt feature information of the target block;
Judge module, for according to first monochrome information and fisrt feature information, determining whether camera lens is differentOften;
First respond module, prompting user is handled during for determining the camera lens exception.
In such scheme, the judge module, it is specifically used for:
According to the corresponding relation between default monochrome information and characteristic information, it is determined that believing with first brightnessSecond feature information corresponding to breath;
Calculate the difference of the fisrt feature information and the second feature information;
Judge whether the difference meets the second preparatory condition;
If, it is determined that the camera lens is abnormal;Otherwise determine that the camera lens is normal.
In such scheme, the judge module, it is specifically used for:
Obtain atmospheric visibility information;
It is described to determine whether camera lens is abnormal according to first monochrome information and fisrt feature information, including:
According to the atmospheric visibility information, first monochrome information and fisrt feature information, it is determined that describedWhether camera lens is abnormal.
In such scheme, described device also includes:
Second respond module, according to the corresponding pass between the monochrome information obtained in advance and nonlinear compensation informationSystem, it is determined that nonlinear compensation information corresponding with first monochrome information;
According to the nonlinear compensation information, nonlinear compensation processing is carried out to the capture images.
In such scheme, second respond module, it is specifically used for:
According to the corresponding relation between first monochrome information and brightness degree, it is determined that with first brightnessBrightness degree corresponding to information;
According to the corresponding relation between the brightness degree and gamma correction information obtained in advance, it is determined that with it is described brightSpend gamma correction information corresponding to grade.
In the embodiment of the present invention, by determining that characteristic information meets that first is pre- from each block of capture imagesIf the target block of condition, the first monochrome information and fisrt feature information based on target block determine that camera lens isNo exception, it is determined that prompting user is handled during camera lens exception, the automatic detection to camera lens state is realized,It is determined that prompting user is handled or by the nonlinear compensation to capture images, avoided during camera lens exceptionThe picture distortion caused by camera lens spot/scratch, in this way, the quality of shooting photo can be improved.
Brief description of the drawings
Fig. 1 is a kind of optional schematic flow sheet of camera lens condition detection method in the embodiment of the present invention;
Fig. 2 is another optional schematic flow sheet of camera lens condition detection method in the embodiment of the present invention;
Fig. 3 is a kind of optional structural representation of camera lens condition checkout gear in the embodiment of the present invention;
Fig. 4 is a kind of optional schematic diagram of LUT table storage formats in the embodiment of the present invention;
Fig. 5 is another optional schematic flow sheet of camera lens condition detection method in the embodiment of the present invention;
Fig. 6 is another optional structural representation of camera lens condition checkout gear in the embodiment of the present invention;
Fig. 7 is another optional structural representation of camera lens condition checkout gear in the embodiment of the present invention.
Embodiment
In various embodiments of the present invention:Camera lens condition checkout gear is true from each block of capture imagesDetermine the target block that characteristic information meets the first preparatory condition, obtain the first monochrome information and the of target blockOne characteristic information, according to the first monochrome information and fisrt feature information, determine whether camera lens is abnormal, determines mirrorPrompting user is handled when abnormal.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clearChu, it is fully described by.
Embodiment one
A kind of camera lens condition detection method is present embodiments provided, can apply to because user is abnormal to camera lens (such asCamera lens has the factors such as spot/scratch) ignore and may cause shooting photographic quality decline scene in;This realityIt can be camera lens condition checkout gear to apply an executive agent for camera lens condition detection method, and camera lens state-detection fillsPutting can be implemented using following manner, such as:Implement in mobile terminal, photographing device or monitoring deviceThe component of camera lens condition checkout gear, it can also be coupled in mobile terminal, photographing device or monitoring device sideMode implement the component of camera lens condition checkout gear, wherein, photographing device can be for example camera, take the photographCamera, DV etc. have/the equipment of camera function of taking pictures.
Fig. 1 is a kind of optional schematic flow sheet of camera lens condition detection method in the embodiment of the present invention;Such as figureShown in 1, camera lens condition detection method includes:
Step 101:Determine that characteristic information meets the mesh of the first preparatory condition from each block of capture imagesMark block.
Capture images, such as can be that the camera lenses of the mobile terminals such as mobile phone, notebook, tablet personal computer is capturedImage;Characteristic information for reflection shooting image quality characteristic parameter, for example, it may be acutance (with it is sharpSpend closely related aberration), brightness and contrast, noise, the embodiment of the present invention is not specific to this to be limited.
The target block of first preparatory condition can be the area of contrast value and sharpness value maximum in the capture imagesBlock, the size of block is according to the self-defined determination of reference standard image;Can be by frequency to the sharpness value of capture imagesDomain scope calculates, and computational methods are according to ISO12233 criterion calculation spatial frequencys, image sharpness MTF50Or MTF50P spatial frequency represents;Picture contrast can centered on grey scale pixel value and surrounding 4 it is nearSquare sum of the difference of adjacent grey scale pixel value, divided by the number of above quadratic term, the embodiment of the present invention to this simultaneouslyDo not limit specifically.
Step 102:Obtain the first monochrome information and fisrt feature information of target block.
First monochrome information can be the first brightness degree corresponding to the first brightness value, the first brightness value, thisEmbodiment is not specific to this to be limited.
Fisrt feature information can be used for the parameter that picture characteristics is described for acutance, contrast etc. or willElement, the present embodiment is not specific to this to be limited.
Step 103:According to the first monochrome information and fisrt feature information, determine whether camera lens is abnormal.
A kind of feasible implementation of step 103 includes:According to default monochrome information and characteristic information itBetween corresponding relation, it is determined that second feature information corresponding with the first monochrome information;Calculate fisrt feature informationWith the difference of second feature information;Judge whether difference meets the second preparatory condition;If, it is determined that camera lensIt is abnormal;Otherwise determine that camera lens is normal.
Here, camera lens can include extremely:Camera lens have the factors such as spot, camera lens are scraped off, camera lens is blocked/State;Above-mentioned second preparatory condition can be preset threshold value or difference range.Second feature information can beAcutance, contrast, the present embodiment is not specific to this to be limited, and determines that second feature information process is:ChooseSharp-featured object is mark domain picture, obtains sharpness value, contrast of the mark domain picture under different brightness valuesValue, brightness value is identified as index, brightness value and sharpness value, the mapping relations of contrast value is established, depositsStore up as association index table.
Another feasible implementation of step 103 includes:After a kind of above-mentioned feasible implementation alsoIncluding:Obtain atmospheric visibility information;According to atmospheric visibility information, the first monochrome information and fisrt featureInformation, determine whether camera lens is abnormal.
It is above-mentioned according to atmospheric visibility information, the first monochrome information and fisrt feature information, whether determine camera lensA kind of abnormal feasible implementation includes:Obtain atmospheric visibility information;Determining atmospheric visibility value isIt is no to be higher than preparatory condition;When atmospheric visibility value is higher than three preparatory conditions, camera lens exception is determined.
Above-mentioned 3rd preparatory condition can be preset atmospheric visibility threshold value, current atmospheric visibility with it is presetThe difference range of atmospheric visibility value, the present embodiment are not limited specifically this.Visibility of air information is for exampleThe haze detector that can be installed by mobile terminal, which detects, to be obtained, and can also be received and serviced by mobile terminalThe atmospheric visibility information acquisition that device is sent, the present embodiment are not limited this.
Step 104:Determine to prompt user to be handled during camera lens exception.
Camera lens condition detection method can be real-time detector lens shape automatically when taking pictures every time in example in real time of the inventionState;Can also preset a doze output, when determining camera lens exception, start doze output, it is determined thatWhen doze output exceeds preset threshold wake-up value, the function of camera lens state automatic detection is closed.
The embodiment of the present invention is obtained full by the detection of characteristic information in each block to camera lens capture imagesThe first monochrome information and fisrt feature information of the target block of the first preparatory condition of foot, and according to the first brightnessInformation and fisrt feature information, determine whether camera lens is abnormal, determine to prompt user to be handled during camera lens exception,Avoid because user it is abnormal to camera lens ignore caused by shooting photographic quality decline, in this way, can improveUser shoots the quality of photo.
Embodiment two
The present embodiment is based on embodiment one, can apply to wish whether have without the advance detector lens of userSpot/scratch, or user be not thorough to camera lens spot/scratch processing, and camera lens condition checkout gear is caught to it automaticallyThe image correction obtained, improve in the scene for shooting photographic quality.
Detection of the camera lens condition checkout gear to camera lens state can be detected in real time according to user's request or the cycleProperty detection, the present embodiment do not limited this.
Fig. 2 is another optional schematic flow sheet of camera lens condition detection method in the embodiment of the present invention;FigureAfter method pair shown in 2 determines that prompting user is handled during camera lens exception, capture images are modifiedImplementation process is supplemented, and this method includes:
Step 201:According to the corresponding relation between the monochrome information and nonlinear compensation information obtained in advance,It is determined that nonlinear compensation information corresponding with the first monochrome information.
The feasible implementation of step 201 can be it is following any one:
Mode 1, according to the corresponding relation between the first monochrome information and brightness degree, it is determined that with the first brightnessBrightness degree corresponding to information;According to the corresponding pass between the brightness degree obtained in advance and gamma correction informationSystem, it is determined that gamma correction information corresponding with brightness degree.
After determining camera lens exception, detect that user does not respond to extremely to camera lens or camera lens still has exceptionWhen, obtain the first monochrome information and fisrt feature information of target block;According to the first monochrome information, searchConcordance list corresponding to first monochrome information, determine the first gamma school in concordance list corresponding to the first monochrome informationPositive information;Wherein, the first concordance list is used to indicate that predetermined luminance information has with what gamma correction information was establishedThe association index table of mapping relations;
Mode 2, according to the corresponding relation between the first monochrome information and brightness degree, it is determined that with the first brightnessBrightness degree corresponding to information;According to the corresponding relation between the brightness degree and characteristic information obtained in advance,It is determined that second feature information corresponding with brightness degree;Calculate the difference of fisrt feature information and second feature informationValue;According to the corresponding relation between the difference and gamma correction information obtained in advance, it is determined that corresponding with differenceSecond gamma correction information.
After determining camera lens exception, detect that user does not respond to extremely to camera lens or camera lens still has exceptionWhen, obtain the first monochrome information and fisrt feature information of target block;According to the first monochrome information, it is determined thatBrightness degree corresponding to the monochrome information of target block;According to brightness degree, the is searched corresponding to brightness degreeTwo concordance lists, determine the gamma correction information in the second concordance list corresponding to brightness degree;Wherein, the second ropeDraw table and be used for the pass with mapping relations for indicating that different predetermined luminance grades are established with default gamma correction informationJoin concordance list;
Mode 3, according to the corresponding relation between the first monochrome information and brightness degree, it is determined that with the first brightnessBrightness degree corresponding to information;According to the corresponding relation between the brightness degree and characteristic information obtained in advance,It is determined that second feature information corresponding with brightness degree;Calculate the difference of fisrt feature information and second feature informationValue;According to the corresponding relation between the difference and gamma correction information obtained in advance, it is determined that corresponding with differenceSecond gamma correction information.
After determining camera lens exception, detect that user does not respond to extremely to camera lens or camera lens still has exceptionWhen, obtain the first monochrome information and fisrt feature information of target block;According to monochrome information, brightness is determinedBrightness degree corresponding to information;According to brightness degree, the 3rd concordance list corresponding to brightness degree is searched, it is determined thatSharpness value and contrast value in 3rd concordance list corresponding to brightness degree;Wherein, the 3rd concordance list is used to refer toShow the tool that sharpness value, contrast value and the predetermined luminance grade of different predetermined luminance grade subscript domain pictures are establishedThere is the association index table of mapping relations;Sharpness value and contrast value are determined from each block of capture images mostBig block is target block, obtains the sharpness value and contrast value of target block, and by the sharp of target blockAngle value and contrast value are matched with the sharpness value in corresponding 3rd concordance list and contrast value, calculate meshMark the sharpness value and contrast value and sharpness value and the difference of contrast value in the 3rd concordance list of block;According toDifference, the 4th concordance list corresponding to lookup difference, determines the gamma correction in the 4th concordance list corresponding to differenceInformation, wherein, the 4th concordance list, which is used to indicating that difference and gamma correction information to establish, has mapping relationsAssociation index table.
Really usual practice such as can be 3 meters or so ribs of selected distance when it is determined that camera lens is clean to above-mentioned mark domain pictureThe clearly demarcated object in angle is shooting condition, and using at different brightnesses, clapping, a series of contrasts are strong, corner angle pointIn the scene of the photo of bright object, the selection of brightness can be by adjusting luminance gain, regulation exposure compensatingObtain, the present embodiment is not specific to this to be limited.
Step 202:According to nonlinear compensation information, nonlinear compensation processing is carried out to capture images.
Nonlinear compensation information can be default gamma value, by carrying out gamma correction compensation to capture imagesThe difference of color of image caused by camera lens spot/damage.
The camera lens condition detection method of the embodiment of the present invention, camera lens condition checkout gear are bright according to what is obtained in advanceThe corresponding relation spent between information and nonlinear compensation information, it is determined that corresponding with the first monochrome information non-linearCompensated information, according to nonlinear compensation information, carry out nonlinear compensation processing automatic to capture images, avoidInput picture and the difference of output image color, so as to avoiding because user ignores the inspection to camera lens stateSurvey, or camera lens is not wiped clean, or the decline for having photographic quality caused by scratch of camera lens, improve and catchObtain picture quality.
Embodiment three
The present embodiment is based on embodiment one, can apply to wish terminal device camera lens have spot orDuring damage, user's wiped clean is prompted, and is modified to taking a picture, in the scene for improving photographic quality.
Camera lens condition checkout gear provided by the invention, be a kind of prompting of terminal device camera lens stain andThe system of amendment, it is divided into corresponding nextport hardware component NextPort part and software section.
Hardware components, except the related module of the camera module of existing mobile phone (including camera module,Image processor, audio, light emitting diode (LCD, Light Emitting Diode) display, storage are singleMember etc.) outside, it is also necessary to increase special modulation transfer functions (MTF, Modulation in the image processorTransfer Function) computing unit, to facilitate the spatial frequency for calculating correlation, and then to imageAcutance is assessed.Camera module includes camera lens, motor and imaging sensor, image processor be in order toThe image real time transfer to capturing is completed, includes the benefit of camera lens shadow correction (LSC, lens shading)Repay, colour correction, color conversion, the module such as gamma (gamma) correction.LCD is then in order to which preview is caughtThe image frame grasped.Memory cell is then to realize the storage to last photo.
Software section, the camera lens of no pollution, shot under certain distance under (3m or so) different brightnessTypical scene acutance and contrast be organized into table and stored, the scene requirement contrast is strong, and ribAngle is clearly more demarcated.The table sorted out can be stored according to certain format, as display look-up table (LUT,Look-Up-Table) use.As long as user in use, holding when mobile phone goes to take a picture that (distance is similarly3m or so), mobile phone will detect that the region that contrast is higher under current scene automatically, and select the regionBy the MTF computing units in graphics processing unit, corresponding sharpness value is obtained, is gone with reference to current brightnessPreprepared LUT is searched, if current acutance or contrast value are less than the certain model of value in LUTEnclose, it is believed that acutance and contrast decline the prompting for seriously, sending camera lens pollution, remind user's wiped clean.If user could not wipe in time, software increases contrast to lift vision automatically by modification gammaClear sense, while exposure is adjusted to reduce the halation at the light that camera lens spot is brought, to reach amendment spotBring the counter productive of photo.
The present embodiment provides a kind of camera lens condition checkout gear, for the spot of camera lens to be detected and reminded,Referring to Fig. 3, the device includes:
1st, primary processor 301:It is the access points (AP, Access Point) in mobile phone, is applied toThe request of response image processor, while shown to LCD, memory cell data read-write, audio system promptingSound is sent in the scene of the corresponding command.
2nd, image processor 302:For by picture signal carry out image color space conversion, color correction,In the scene of the processing such as gamma correction, noise reduction.
3rd, camera lens and module 303:With with the light of clapped scene is converted into the scene of picture signal.
4th, LCD shows 304:For by the scene of treated data preview.
5th, audio output 305:Sent for the process of taking pictures in the scene of prompt tone.
6th, memory cell 306:For in the scene that is compressed treated data.
MTF computing units, in image processor, naturally it is also possible to which pure software is realized, why is placed onIt is because hardware calculates faster in image processor, it is ensured that real-time.Need in advance in camera lensOn the premise of clean, at different brightnesses, clap that a series of contrasts are strong, the photo of sharp-featured object.The region comprising the object corner angle calculates MTF in selected photo, obtains MTF50 as sharpness value, according toCurrent brightness value, sharpness value, contrast etc. are organized into LUT tables by form below, are stored in memory cell,For software transfer.LUT table storage formats are as shown in Figure 4:Such as data 1_1 can representative luminance value Lux,Or the index value of exposure meter, data 1_2 can represent the MTF50 values that MTF computing units are drawn, the numberDrawing for value can try to achieve spatial frequency according to IS012233 by extracting edge and carry out Fourier transformation,And find out the numerical value at spatial frequency 50;Data 1_3 can be contrast value.It can be represented in LUT tablesThe corresponding relation of brightness value and gamma correction;Or represent corresponding with the brightness value sharpness value of brightness value, rightThan the corresponding relation of angle value;Or represent gamma correction and difference (sharpness value of target block, contrast value andDefault sharpness value, the difference of contrast value) corresponding relation, the present embodiment is not specific to this to be limited.
Software processing flow, referring to Fig. 5, the camera lens condition detection method of the present embodiment includes:
Step 501:When using mobile phone, opening camera, alignment surrounding certain distance (such as 3m) or soObject;
Step 502:At this moment mobile phone meeting automatic detection takes the photograph the region of contrast and acutance maximum in picture, areaThe size in domain can be previously set.
Step 503:MTF computing units in following image processor can calculate the clearly demarcated area in edge automaticallyThe MTF50 values and contrast value at some edge in domain, the calculating of the value can according to ISO12233 standards,Spatial frequency is calculated by Fourier transformation, and then obtains MTF50.It is corresponding right to obtain simultaneouslyCompare angle value.
Step 504:It is contaminated before by the MTF50 values and contrast value that are obtained in above-mentioned steps and notCamera lens LUT at different brightnesses be compared, judge whether difference is more than certain threshold value, if so, holdingRow step 505;Otherwise step 510 is performed.
Step 505:When the acutance (MTF50) in LUT and contrast value and current MTF50 andWhen whether the difference of contrast value is more than certain threshold value, when more than certain threshold value, step 506 is performed, otherwisePerform step 511.
Step 506:Judge current weather, PM2.5 detectors that can be by mobile phone or real-time connectionThe weather forecast of net obtains;When weather is haze, directly skips for the step of prompting and correcting, performStep 511, step 507 is otherwise performed.
Step 507:When weather is good, then it can determine whether that camera lens pollutes, audio sends suggestion voice or LCDUpper ejection signal language;
Step 508:Determine whether user wipes clean, when user wipes but does not wipe clean or does not respond, holdRow step 509;Otherwise step 511 is performed.
Step 509:At this moment built-in, tried gamma and exposure value can be used, improves photoContrast, improve picture quality.
Step 510:Walk common flow of taking pictures.
Step 511:Finally photo is preserved.So far, the software of the prompting of camera lens spot and update the system finishes.
On 509 links, can specifically implement by following scheme, can be by the gained under present intensityThe difference of MTF50 and contrast value and response in LUT is divided into multiple grades, is corresponded under each gradeOne group of preprepared gamma, the gamma are arranged from high to low according to the difference of contrast, are often selectedOne grade, corresponding one group of gamma, after user selects gamma, LCD meeting live previews, Yong HuxuanGo out the preferable photo of effect.The adjustment of exposure can be adjusted according to the amended picture brightness changes of gammaIt is whole, after such as selecting a certain grade, picture is found than dark, at this moment suitably appropriate manually can increase light exposure,Make picture brightness moderate, can also be exposed according to the lamp sources such as car light, street lamp, selection region emphasis to adjust.
The embodiment of the present invention can also be applied in following scenes:
Scene 1, user are on outdoor daytime, clearly demarcated containing corner angle in the picture captured as long as opening camera,The stronger tree limb of contrast, light pole, electric pole, or guideboard edge etc., it is possible to be using thisSystem goes to judge whether camera lens is contaminated or do not wipe clean, and does not wipe clean also equally using we if wipedMethod is especially corrected to taking a picture, to ensure shooting effect.
Scene 2, special weather, such as haze weather, can be forecast or mobile phone by network real-time weatherDust detector, after certain threshold value is reached, camera lens pollution prompting function is closed automatically.In addition,The scene of dark can not use camera lens pollution to remind the function.
Mobile phone camera camera lens spot update the system is applied equally to camera lens by sharp thing in the embodiment of the present inventionScratch caused by scraping, scratch equally can also cause photographic quality to decline.It can reach scratch using the systemPrompting and amendment.
User of the embodiment of the present invention can also one, band can be put into the small card of wallet, the card black and white is half-and-halfSegmentation, half is black, and half is white, can be placed in one meter of distant positions of camera during use.Equally can be using thisSystem reaches the purpose of pollution prompting and amendment.
The embodiment of the present invention is found pre- by obtaining the brightness value of capture images target block according to brightness valueThe gamma correction information first set, the regulation to capture images contrast is realized, exposed in combination with adjustmentTo reduce the halation at the light that camera lens spot brings, the photographic quality of shooting is improved.
Example IV
Fig. 6 is another optional structural representation of camera lens state detection process device in the embodiment of the present invention;The camera lens state detection process device that the present embodiment provides, including:
Detection module 601, for determining that characteristic information meets that first is default from each block of capture imagesThe target block of condition;
Acquisition module 602, for obtaining the first monochrome information and fisrt feature information of target block;
Judge module 603, for according to the first monochrome information and fisrt feature information, determining whether camera lens is differentOften;
First respond module 604, prompting user is handled during for determining camera lens exception.
The embodiment of the present invention, by determining that characteristic information meets that first is default from each block of capture imagesThe target block of condition, the first monochrome information and fisrt feature information of target block are obtained, it is bright according to firstInformation and fisrt feature information are spent, determines whether camera lens is abnormal, determines to prompt at user during camera lens exceptionReason, so as to avoid real-time detection of the user to camera lens state, prevent from causing in camera lens exception capturedPhotographic quality declines, and realizes the automatic detection to camera lens state, in this way, the quality of shooting photo can be improved.
On the basis of above-described embodiment, judge module 603, it is specifically used for:According to default monochrome informationCorresponding relation between characteristic information, it is determined that second feature information corresponding with the first monochrome information;CalculateThe difference of fisrt feature information and second feature information;Judge whether difference meets the second preparatory condition;If so,Then determine that camera lens is abnormal;Otherwise determine that camera lens is normal.
On the basis of above-described embodiment, judge module 603, it is specifically used for:Obtain atmospheric visibility information;Institute determines whether camera lens is abnormal according to the first monochrome information and fisrt feature information, including:According to air energyDegree of opinion information, the first monochrome information and fisrt feature information, determine whether camera lens is abnormal.
On the basis of above-described embodiment, Fig. 7 is the another of camera lens condition checkout gear in the embodiment of the present inventionThe optional structural representation of kind, the camera lens condition checkout gear shown in Fig. 7 also include detection module 601, obtainedModulus block 602, judge module 603, the first respond module 604, and these modules also have above-mentioned implementationRespective action described in example, meanwhile, the camera lens condition checkout gear shown in Fig. 7 also includes:
Second respond module 605, according to pair between the monochrome information and nonlinear compensation information obtained in advanceIt should be related to, it is determined that nonlinear compensation information corresponding with the first monochrome information;According to nonlinear compensation information,Nonlinear compensation processing is carried out to capture images.
On the basis of above-described embodiment, the second respond module 605, it is specifically used for:Believed according to the first brightnessCorresponding relation between breath and brightness degree, it is determined that brightness degree corresponding with the first monochrome information;According to pre-Corresponding relation between the brightness degree and gamma correction information that first obtain, it is determined that gal corresponding with brightness degreeHorse control information.
In actual applications, detection module 601, acquisition module 602, judge module 603, first respond mouldBlock 604, the second respond module 605 can by the central processing unit (CPU) positioned at communicating number processing unit,Microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA)Deng realization.
Embodiment five
The present embodiment records a kind of computer-readable medium, can be ROM (for example, read-only storage,FLASH memory, transfer device etc.), magnetic storage medium (for example, tape, disc driver etc.),Optical storage medium (for example, CD-ROM, DVD-ROM, paper card, paper tape etc.) and other are knownThe program storage of type;Computer executable instructions are stored with computer-readable medium, work as execute instructionWhen, cause at least one computing device to include following operation:
Determine that characteristic information meets the target block of the first preparatory condition from each block of capture images;
Obtain the first monochrome information and fisrt feature information of target block;
According to the first monochrome information and fisrt feature information, determine whether camera lens is abnormal;
Determine to prompt user to be handled during camera lens exception.
To sum up, the embodiment of the present invention, determine that feature is believed from each block of capture images by detection moduleBreath meets the target block of the first preparatory condition;Acquisition module obtains the first monochrome information and the of target blockOne characteristic information;Judge module determines whether camera lens is abnormal according to the first monochrome information and fisrt feature information;First respond module determines to prompt user to be handled during camera lens exception, due to the automatic detection to camera lens state,Simultaneously it is determined that prompting user is handled during camera lens exception, avoid user and ignoring the scene of camera lens stateUnder shot, improve user shoot photo quality.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or meterCalculation machine program product.Therefore, the present invention can use hardware embodiment, software implementation or combine software andThe form of the embodiment of hardware aspect.Moreover, the present invention can use wherein includes calculating in one or moreThe computer-usable storage medium of machine usable program code (includes but is not limited to magnetic disk storage and optical storageDevice etc.) on the form of computer program product implemented.
The present invention is produced with reference to method according to embodiments of the present invention, equipment (system) and computer programThe flow chart and/or block diagram of product describes.It should be understood that can by computer program instructions implementation process figure and/Or each flow and/or square frame and flow and/or square frame in flow chart and/or block diagram in block diagramCombination.These computer program instructions can be provided to all-purpose computer, special-purpose computer, embedded processingMachine or the processor of other programmable data processing devices are to produce a machine so that by computer or itsThe instruction of the computing device of his programmable data processing device produce for realizing in one flow of flow chart orThe device for the function of being specified in one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devicesIn the computer-readable memory to work in a specific way so that be stored in the computer-readable memoryInstruction produces the manufacture for including command device, and the command device is realized in one flow of flow chart or multiple streamsThe function of being specified in one square frame of journey and/or block diagram or multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices, madeObtain and series of operation steps performed on computer or other programmable devices to produce computer implemented processing,So as to which the instruction performed on computer or other programmable devices is provided for realizing in one flow of flow chartOr specified in one square frame of multiple flows and/or block diagram or multiple square frames function the step of.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the protection model of the present inventionEnclose.