CN106131441A - Photographic method and device, electronic equipment - Google Patents

Photographic method and device, electronic equipment Download PDF

Info

Publication number
CN106131441A
CN106131441A CN201610805130.1A CN201610805130A CN106131441A CN 106131441 A CN106131441 A CN 106131441A CN 201610805130 A CN201610805130 A CN 201610805130A CN 106131441 A CN106131441 A CN 106131441A
Authority
CN
China
Prior art keywords
mist elimination
value
view data
default
parameter preset
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.)
Granted
Application number
CN201610805130.1A
Other languages
Chinese (zh)
Other versions
CN106131441B (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610805130.1A priority Critical patent/CN106131441B/en
Publication of CN106131441A publication Critical patent/CN106131441A/en
Application granted granted Critical
Publication of CN106131441B publication Critical patent/CN106131441B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • G06T5/73
    • 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/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages

Abstract

The disclosure is directed to a kind of photographic method and device, electronic equipment.Described photographic method includes: obtain view data;Determine the value of parameter preset in default mist elimination algorithm;Value according to described parameter preset also uses described default mist elimination algorithm, and described view data is carried out mist elimination process;In response to photographing instruction, the view data obtained after processing according to mist elimination, generate image file.Owing in the photo that user takes, the visibility of object (such as: sky) is not fixing, can finally take the visibility of the object of photo according to practical situation regulation, so that user is taken a picture, the visibility of middle object visibility desired with user is consistent.

Description

Photographic method and device, electronic equipment
Technical field
It relates to technical field of image processing, particularly relate to a kind of photographic method and device, electronic equipment.
Background technology
Under the weather condition such as mist, haze, the suspended material in air makes visibility reduce, and has influence at this type of weather bar The picture quality of photo captured under part.To this end, propose image mist elimination technology, to remove the weather conditions pair such as above-mentioned mist, haze The impact of the picture quality taken, the visibility of the object in enhancing image.
In the related, image mist elimination technology can apply on all kinds of electronic equipment with camera function.Typically Ground, image mist elimination technology is to utilize the mist elimination algorithm (such as: dark channel prior algorithm) preset to process view data, with root According to the view data obtained after processing to generate image file.But, in the related, for default mist elimination algorithm Speech, the value of its parameter preset comprised is typically the fixed value preset, the parameter preset that above-mentioned mist elimination algorithm and algorithm comprise Fixed value is pre-written in the memory space of electronic equipment.When taking pictures, by reading preset algorithm from memory space And the fixed value of parameter preset that algorithm comprises, view data is carried out mist elimination process.The default ginseng comprised due to mist elimination algorithm The value of number is fixing, and during taking pictures, regardless of the haze degree of weather, the object in the photo finally taken has Fixing visibility, this can cause the visibility of object in being taken a picture with the desired visibility of user not to a certain extent Symbol.Such as, under severe haze weather, the state of the sky in the photo that user takes " vast clear sky " really.
Summary of the invention
For overcoming problem present in correlation technique, disclosure embodiment provides a kind of photographic method and device, electronics to set Standby, to regulate the visibility of taken a picture middle object as required.
First aspect according to disclosure embodiment, it is provided that a kind of photographic method, including:
Obtain view data;
Determine the value of parameter preset in default mist elimination algorithm;
Value according to described parameter preset also uses described default mist elimination algorithm, carries out described view data at mist elimination Reason;
In response to photographing instruction, the view data obtained after processing according to mist elimination, generate image file.
Second aspect according to disclosure embodiment, it is provided that a kind of camera arrangement, including:
Acquiring unit, is used for obtaining view data;
Determine unit, for determining the value of the parameter preset in default mist elimination algorithm;
Processing unit, is used for the value according to described parameter preset and uses described default mist elimination algorithm, to described picture number According to carrying out mist elimination process;
Signal generating unit, in response to photographing instruction, the view data obtained after processing according to mist elimination, generates image literary composition Part.
The third aspect according to disclosure embodiment, it is provided that a kind of electronic equipment, including:
Processor;
For storing the memorizer of processor executable;
Described processor is configured to:
Obtain view data;
Determine the value of parameter preset in default mist elimination algorithm;
Value according to described parameter preset also uses described default mist elimination algorithm, carries out described view data at mist elimination Reason;
In response to photographing instruction, the view data obtained after processing according to mist elimination, generate image file.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect:
During taking pictures, in order to view data to be carried out the value of the parameter preset in the default mist elimination algorithm of mist elimination process It is not fixed value, but needs to determine according to practical situation the value of parameter preset in above-mentioned default mist elimination algorithm, subsequently, profit By the value of above-mentioned default mist elimination algorithm with the described parameter preset determined, described view data is carried out mist elimination process.Above-mentioned During, in the photo that user takes, the visibility of object (such as: sky) is not fixing, can regulate according to practical situation Taking the visibility of the object of photo eventually, so that user is taken a picture, the visibility of middle object is desired with user regards Degree of opinion is consistent.
It should be appreciated that it is only exemplary and explanatory, not that above general description and details hereinafter describe The disclosure can be limited.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet the enforcement of the present invention Example, and for explaining the principle of the present invention together with description.
Figure 1A is the flow chart according to the photographic method shown in an exemplary embodiment;
Figure 1B is a kind of scene graph according to the photographic method shown in an exemplary embodiment;
Fig. 1 C is the another kind of scene graph according to the photographic method shown in an exemplary embodiment;
Fig. 2 is the flow chart according to the photographic method shown in another exemplary embodiment;
Fig. 3 is according to the stream that view data carries out in the photographic method shown in an exemplary embodiment mist elimination process step Cheng Tu;
Fig. 4 is the block diagram according to the camera arrangement shown in an exemplary embodiment;
Fig. 5 is the block diagram according to the camera arrangement shown in another exemplary embodiment;
Fig. 6 is the block diagram according to the camera arrangement shown in further example embodiment;
Fig. 7 is the structural representation according to a kind of electronic equipment shown in an exemplary embodiment.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the present invention.On the contrary, they are only with the most appended The example of the apparatus and method that some aspects that described in detail in claims, the present invention are consistent.
Figure 1A is the flow chart according to the photographic method shown in an exemplary embodiment, and Figure 1B is according to an exemplary enforcement A kind of scene graph of the photographic method exemplified, Fig. 1 C is the another kind of field according to the photographic method shown in an exemplary embodiment Jing Tu.The method can be applied on the electronic equipment (such as: mobile phone, computer, camera etc.) with camera function.Wherein take pictures It is also called photograph, is to use the equipment with camera function recorded by the image of object and carry out the process preserved.Such as figure Shown in 1A, above-mentioned photographic method comprises the steps 101~104, wherein:
In a step 101, view data is obtained.
In one embodiment, the process obtaining view data may include that the object being photographed passes at image through lens The upper imaging of sensor (such as CCD or COMS), i.e. obtains the optical signal of object by imageing sensor.Imageing sensor by light- Electricity conversion converts optical signals to the signal of telecommunication, and hereafter, the signal of telecommunication becomes after being processed by analog to digital conversion circuit and may be used for follow-up going The view data that mist processes.Certainly, the processing procedure of described view data can also include other kinds of data handling procedure, As: filtering, denoising etc..
In a step 102, the value of parameter preset in default mist elimination algorithm is determined.
In one embodiment, described default mist elimination algorithm can include but not limited to: based on dark channel prior (Dark Channel Prior) mist elimination algorithm, based on adaptive histogram equalization (Adaptive histgram Equalization/AHE) mist elimination algorithm.Wherein, for mist elimination algorithm based on dark channel prior, corresponding recovery Formula can be such that
J ( x ) = I ( x ) - A max ( t ( x ) , t 0 ) + A ;
Wherein, J (x) is the view data without mist to be asked, and I (x) is the view data having mist, the default ginseng in this algorithm Number may include that absorbance t (x), global atmosphere light component A.Wherein, the value of above-mentioned parameter preset can be derived by corresponding Formula calculates, and, the value of above-mentioned parameter preset can be adjusted according to practical situation.
Mist elimination algorithm based on adaptive histogram equalization (AHE), is that one is carried by histogrammic redistribution The computer image processing technology of the contrast of hi-vision.Usually, the image taken under the conditions of haze weather, its contrast Can be relatively low, by promoting the contrast of image, so that the visibility of the object in image strengthens.Sum it up, above-mentioned directly The mist elimination algorithm of side's figure equalization (AHE) is also to comprise one or more parameter preset (such as: CutLimit parameter, Contrast Parameter etc.), and by carrying out assignment for these parameter presets, realize mist elimination processing procedure.When the value of above-mentioned parameter changes, The mist elimination treatment effect finally given can also change accordingly.It should be noted that about the mist elimination algorithm of the above-mentioned type, be all Technology well-known to those skilled in the art, therefore the most no longer this is described in detail.
In step 103, according to the value of described parameter preset and use described default mist elimination algorithm, to described view data Carry out mist elimination process.
View data typically can comprise the color value corresponding with each pixel in image, and described color value can be by red (R), green (G), blue (B) trichromatic intensity level (0~255) forms.Described mist elimination processing procedure can be to go according to default Mist algorithm, is adjusted correspondingly, after finally giving process the color value of each pixel in the view data having mist View data.
At step 104, in response to photographing instruction, the view data obtained after processing according to mist elimination, image file is generated.
Photographing instruction can be to control the instruction that the image of object is recorded by camera arrangement, and user can pass through physics Or virtual startup button, trigger photographing instruction.The view data obtained after finally processing according to mist elimination generates figure Picture file (such as: BMP form, jpeg format etc.) also preserves.While generating image file, it is also possible to will be with image file pair The image answered shows on the screen of described electronic equipment, checks for user.
At present, the visibility of the object during user is generally not desirable to the photo taken in the weather of severe haze is too high (such as: sky is blue sky and white cloud), and under the weather of slight haze, user wish the visibility of the photo taken present almost without The state (i.e. visibility is the highest) of mist.In view of the foregoing, user is during taking pictures, for the weather bar of severe haze Part, the value e.g. a1 of certain parameter preset A in the default mist elimination algorithm determined, so, utilize above-mentioned default mist elimination algorithm And according to value a1 of parameter preset A, the view data obtained is carried out mist elimination process, the object in the image that may finally obtain Visibility general (can be the best with the situation of degree of specific gravity haze, in image or a certain degree of haze can be seen that there is).Example again As, for the weather condition of slight haze, the value e.g. a2 (a1 of certain parameter preset A in the default mist elimination algorithm determined ≠ a2), then carry out mist elimination processing procedure, the visibility of the object in final shot image can be the state almost without mist.When So, in above-mentioned scene needed for the visibility of objects in images taken can be determined by user, user can be by taking pictures Specific operation on equipment realizes.
In the present embodiment, user is during taking pictures, in order to view data to carry out the default mist elimination algorithm of mist elimination process In the value of parameter preset be not fixed value, but need to determine presetting in above-mentioned default mist elimination algorithm according to practical situation The value of parameter, subsequently, utilizes above-mentioned default mist elimination algorithm and described view data is entered by the value of the described parameter preset determined Row mist elimination processes.In above process, in the photo that user takes, the visibility of object (such as: sky) is not fixing, can Finally take the visibility of the object of photo according to practical situation regulation, so that user is taken a picture, middle object regards Degree of opinion visibility desired with user is consistent.
On the other hand, in a scenario, if the regarding of the object in the photo taken under the weather condition of severe haze Seeing and spend height, this certainly will need the color value to pixel each in view data to make bigger change, and this is the easiest Cause the picture distortion (i.e. image is untrue or subregion unintelligible etc.) finally taken.The present embodiment can be to a certain extent Avoid causing the probability of the image fault finally taken because mist elimination treatment effect fixes.
In one embodiment, above-mentioned steps 102 may include that
According to default mist elimination grade, determine parameter preset corresponding with described mist elimination grade in default mist elimination algorithm Value.Wherein, described mist elimination grade can be preset before taking pictures by user, or the image preview during taking pictures Time, select corresponding mist elimination grade.On camera arrangement, parameter preset in mist elimination grade and mist elimination algorithm can be previously stored with The mapping relations of value, thus, the mist elimination grade set according to user, camera arrangement can be according to the mist elimination grade prestored With the mapping relations of the value of parameter preset in mist elimination algorithm, read the default reference corresponding with the mist elimination grade currently set Value.
As shown in Figure 1B, in an exemplary scene, after opening the camera function of the equipment with camera function, Can show an image preview area 11 on screen, the said equipment can pass through lens and image sensing device, image procossing The object in photographic head front is presented in above-mentioned image preview area 11 by unit etc..During preview, user can be led to Cross a function button 12 to switch being turned on and off of image mist elimination function.After image mist elimination function is opened, user is final The image taken is the image after corresponding mist elimination processes.When mist elimination function is in opening, can be at screen Position of specifying show one in order to regulate the control (such as: button, slider bar etc.) of mist elimination grade.As a example by slider bar, Yong Huke With by clicking on the removable icon 13 in slider bar, and slide along preset path, thus realize the tune of mist elimination grade Whole.Wherein, each on above-mentioned slider bar specifies position all to represent a kind of mist elimination grade.Along with user's tune to mist elimination grade Joint, can be by the image shows that obtained by the mist elimination process action corresponding with selected mist elimination grade in image preview area 11 In so that user by image effect after real time inspection mist elimination and contrasts, determine any go fog effect be from The desired effect of body.
In another embodiment, above-mentioned steps 102 may include that
According to default target image, determine the value of parameter preset in default mist elimination algorithm.
Described target image can be default image template, the visibility of the object on these image templates phase not to the utmost With.Such as, including the image module of three kinds of skies, the visibility of the sky in these three image module is respectively as follows: height, in, low. On camera arrangement, the mapping relations of the value of parameter preset in target image and mist elimination algorithm can be previously stored with, thus, root The target image selected according to user, camera arrangement can be according to parameter preset in the target image prestored and mist elimination algorithm The mapping relations of value, read the value of the default reference corresponding with the target image currently set.It addition, it is noted that Above-mentioned target image is in addition to default image template, it is also possible to be an image file arbitrarily choosing in camera of user.
As shown in Figure 1 C, in the scene of another exemplary, after the mist elimination function opening camera, user can be one Target image is selected as required in setting the page 21.For target image, can carry out drawing according to the type of the element comprised Point, the type of described element may include that " sky ", " mountain ", " trees " etc..Further, for each type, one or many is preset The individual target image 22 selected for user, such as: for " sky ", may include that day empty template 1 and sky empty template 2 two kinds is different The target image of visibility, user can select according to actual needs.
In another embodiment, above-mentioned steps 102 may include that
Feature based on described view data, determines the value of parameter preset in default mist elimination algorithm.
The feature of described view data may include that the contrast of view data, view data distribution on the histogram Situation, is analyzed view data by corresponding algorithm, obtains features described above, required determining according to features described above The value of parameter preset.It is to say, during taking pictures, user can select mist elimination grade or target image, but By camera arrangement according to the feature of the view data having mist got, come it is determined that to having which kind of mist elimination mist image is made at Reason.For example, if according to the contrast of view data, identifying present weather conditions is severe haze, then can determine that The value of a kind of parameter preset, so that the visibility of image is general (it can be seen that have a certain degree of in the photo finally taken Mist);If identifying present weather conditions is slight haze, then can determine that the value of another kind of parameter preset, so that finally The visibility of image the highest (almost without mist) in the photo taken.
In one embodiment, the target image that described basis is preset, determine the value of parameter preset in default mist elimination algorithm, May include that
Determine the type of the element comprised in described target image;
Choose the first view data belonging to described type in described view data;
Calculate the value of the average color difference of the view data of described first view data and described target image;Described default ginseng Number includes described average color difference.
In one embodiment, the described value according to described parameter preset use described default mist elimination algorithm, to described figure As data carry out mist elimination process, including:
Value according to described average color difference also utilizes and presets mist elimination algorithm, each in the described view data got The color value of pixel is adjusted.
In one embodiment, above-mentioned steps 103 may include that
Value utilization according to described average color difference preset mist elimination algorithm, in the first view data belonging to described type The color value of each pixel be adjusted;
Value according to described average color difference determines reference color difference;
According to described reference color difference and utilize and preset mist elimination algorithm, every in the view data being not belonging to described type The color value of individual pixel is adjusted.
In one embodiment, if described target image includes that at least two, described reference color difference may is that and each mesh In the value of the average color difference that logo image is corresponding one or the meansigma methods of the value of the average color difference corresponding with each target image.
Specifically how to realize information search, refer to subsequent embodiment.
So far, by determining the value of the parameter preset in above-mentioned default mist elimination algorithm according to practical situation, subsequently, in utilization The value of the described parameter preset stating default mist elimination algorithm and determine carries out mist elimination process to described view data so that user claps In the photo gone out, the visibility of object (such as: sky) is not fixing, can finally take photo according to practical situation regulation The visibility of object.
Fig. 2 is the flow chart according to the photographic method shown in another exemplary embodiment.The method can be applied to be had On the electronic equipment (such as: mobile phone, computer, camera etc.) of camera function.As in figure 2 it is shown, above-mentioned photographic method includes walking as follows Rapid 201~206, wherein:
In step 201, view data is obtained.
Step 201 is referred to the content of step 101 in the embodiment shown in above-mentioned Figure 1A, is the most no longer repeated.
In step 202., the type of the element comprised in default target image is determined.
As above, described in an embodiment, user can set the effect that mist elimination processes by the way of selecting target image. After the target image that user sets, camera arrangement can determine the value of default mist elimination algorithm according to target image.Finally, use In the target image that the visibility of the objects in images that family is taken needs with user sets, the visibility of object keeps consistent.
In one embodiment, the type of the element that the target image that user selects comprises, need the side by elemental recognition Formula determines.As a example by concrete scene, user have selected the image of sky of oneself shooting as target image, hereafter, Camera arrangement is by being analyzed above-mentioned target image, it may be determined that going out the type of element that the image that user selects comprises is " sky ".Wherein, in a practical situation, the target image that possible user selects is not entirely " sky ", also includes other yuan Element (such as: mountain), to this end, be as the criterion with the type of the element of accounting maximum in a subgoal image, determines corresponding with target image Type.
In step 203, the first view data belonging to described type in described view data is chosen.
For the view data having mist currently got, a lot of element, such as: sky, mountain, trees wherein may be comprised. Usually, need to identify in pending view data, belong to first view data of " sky " type, and select with user The visibility of " sky " be as the criterion, pending the first view data belonging to " sky " type is processed.For often A kind of element, can judge its affiliated type by the average color of all pixels that calculating belongs to this element.
It should be noted that above-mentioned pending view data refers to: the collection of the color value (RGB) corresponding with each pixel Closing Q1, the first view data of said extracted is then subset Q2 of this set Q1, say, that be the portion in a width complete image Divide the set of the color value of pixel.
In step 204, the average color difference of the view data of described first view data and described target image is calculated Value;Wherein, described parameter preset includes described average color difference.
For having mist image, be the equal of haze composition, the face to each pixel in a sub-picture The color of one layer of haze composition is added, say, that haze composition has made equal color to the color value of each pixel on color The change of difference.Calculate haze to image in after the value of chromatism brought of each pixel, just can enter according to this value of chromatism Row compensates, thus recovers the image without haze composition.
Continue as a example by above-mentioned scene, it is assumed that the type of the element that the target image that user selects comprises is " sky ", then The first view data (set Q2) belonging to " sky " type in pending view data can be extracted, then can be by dividing Do not obtain the color value of each pixel, and calculate the average color of each pixel.Wherein, if calculated target image In the average color of each pixel be a, the average color of each pixel in calculated first view data is b, then Value=| a-b | of average color difference X of the view data of the first view data and described target image can be calculated.
In step 205, value utilization according to described average color difference preset mist elimination algorithm, to the described image got The color value of each pixel in data is adjusted.
For the image that a pair has haze, haze composition makes in image the color value of each pixel with identical color Difference is increased or decreased, such as: in the case of having haze, " black " that be likely to result in image is the most black, causes in image " in vain " is the whitest.That is, the color value of black is " #000000 ", and pure white color value is: " #FFFFFF ", haze may be such that The color value of above-mentioned black makees the increase of corresponding aberration so that above-mentioned pure white color value makees the reduction of corresponding aberration.In view of upper Stating situation, mist elimination processing procedure is substantially: according to default mist elimination algorithm and the value of above-mentioned calculated average color difference, a side Face, plus the value of above-mentioned average color difference on the basis of the color value of some pixel in the view data got, on the other hand, In the view data got, on the basis of the color value of some pixel, deduct the value of above-mentioned average color difference, thus finally give View data after mist elimination process.
In step 206, in response to photographing instruction, the view data obtained after processing according to mist elimination, image file is generated.
In the present embodiment, the target image set according to user, determine the value of default mist elimination algorithm and to view data Carry out mist elimination process, so that object in the target image of the visibility of the objects in images finally taken and user's setting Visibility is basically identical, so that the image during taking pictures goes fog effect to regulate, to meet user's expectation, promotes and uses Family is experienced.
Fig. 3 is according to the stream that view data carries out in the photographic method shown in an exemplary embodiment mist elimination process step Cheng Tu.Based on the embodiment described in above-mentioned Fig. 2, the above-mentioned value according to parameter preset also uses described default mist elimination algorithm, to institute State view data and carry out the step of mist elimination process, may include that
In step 301, value utilization according to average color difference preset mist elimination algorithm, to the first figure belonging to described type As the color value of each pixel in data is adjusted.
In step 302, reference color difference is determined according to the value of average color difference.
In one embodiment, if described target image includes that at least two, described reference color difference may is that and each mesh In the value of the average color difference that logo image is corresponding one or the meansigma methods of the value of the average color difference corresponding with each target image.
In step 303, mist elimination algorithm is preset, to the picture number being not belonging to described type according to reference color difference utilization The color value of each pixel according to is adjusted.
With exemplary scene, said process being described, it (can be default that user can select the image of one secondary " sky " Template in one, it is also possible to be user free or shooting sky) as target image, after this, camera arrangement can To identify in pending view data, belong to the view data of " sky " type, and belong to other types (such as: " tree Wood ", " mountain ", " people " etc.) view data.After identifying above-mentioned various types of view data, typically can will belong to The view data of " sky " type, carries out mist elimination process according to " sky " in the target image that user selects and (i.e. treats at mist elimination The visibility of " sky " of reason needs basically identical with the visibility of " sky " in target image).But, in an embodiment In, for belonging to other kinds of view data, mist elimination process can not be carried out according to the visibility of above-mentioned " sky ".Example As, for belonging to the view data of " people " type, can average by pending " sky " and " sky " in target image The value of aberration is multiplied by a predetermined coefficient (between 0~1), obtains reference color difference, and is as the criterion with this reference color difference, right The view data belonging to " people " type carries out mist elimination process.
In some scene, user can have selected at least two target image simultaneously, such as: user selects one to belong to The target image of " sky " type, another kind is belonging to the target image of " mountain " type.Typically, for belonging to " sky " type Pending view data, can according to the visibility of the above-mentioned target image belonging to " sky " type to make mist elimination process, In like manner, for belonging to the pending view data of " mountain " type, can be according to the above-mentioned target image belonging to " mountain " type Visibility is made mist elimination and is processed.And for belonging to other kinds of view data, then need to carry out according to a reference color difference Mist elimination processes.Wherein, if the pending view data that the target image of " sky " type will be belonged to belong to " sky " type Average color difference be defined as X1, by the pending view data that belongs to the target image of " mountain " type and belong to " mountain " type Average color difference is defined as X2.Then, in one embodiment, in order to belonging to the reference color that other kinds of view data processes Difference X3=(X1+X2)/2.It is to say, with the average of the average color difference corresponding with at least two target image for reference to aberration Value.In another embodiment, above-mentioned reference color difference can be appointing in the average color difference corresponding with at least two target image Anticipate one, such as: but maximum in multiple average color difference values, minima, intermediate value etc..
It is noted that in other embodiments, user, on the basis of setting above-mentioned target image, concurrently sets Mist grade, so, during carrying out mist elimination process, can combine mist elimination based on the visibility of object in target image Grade, carries out mist elimination process to pending view data.For example, target image and pending picture number are being calculated Which kind of after the value of the average color difference between according to, can determine according to mist elimination grade with the value of the above-mentioned average color difference of proportional compensation. According to the difference of mist elimination grade, aforementioned proportion can be between 1%~100%.For example, it is possible to according to above-mentioned average color difference The 80% of value compensates.
Fig. 4 is the block diagram according to the camera arrangement shown in an exemplary embodiment.This camera arrangement may include that
Acquiring unit 41, is used for obtaining view data;
Determine unit 42, for determining the value of the parameter preset in default mist elimination algorithm;
Processing unit 43, is used for the value according to described parameter preset and uses described default mist elimination algorithm, to described image Data carry out mist elimination process;
Signal generating unit 44, in response to photographing instruction, the view data obtained after processing according to mist elimination, generates image literary composition Part.
In one embodiment, described determine that unit 42 may be used for:
According to default mist elimination grade, determine parameter preset corresponding with described mist elimination grade in default mist elimination algorithm Value;
In another embodiment, described determine that unit 42 may be used for:
According to default target image, determine the value of parameter preset in default mist elimination algorithm;
In another embodiment, described determine that unit 42 may be used for:
Feature based on described view data, determines the value of parameter preset in default mist elimination algorithm.
Fig. 5 is the block diagram according to the camera arrangement shown in another exemplary embodiment.The embodiment introduced at above-mentioned Fig. 4 On the basis of, described determine that unit 42 may include that
Type determination unit 421, for determining the type of the element comprised in described target image;
Data decimation subelement 422, for choosing the first view data belonging to described type in described view data;
Computation subunit 423, for calculating the average of the view data of described first view data and described target image The value of aberration;Described parameter preset includes described average color difference.
In one embodiment, described processing unit 43 may be used for:
Value according to described average color difference also utilizes and presets mist elimination algorithm, each in the described view data got The color value of pixel is adjusted.
Fig. 6 is the block diagram according to the camera arrangement shown in further example embodiment.In the enforcement that above-mentioned Fig. 4, Fig. 5 introduce On the basis of example, described processing unit 43 may include that
First processes subelement 431, presets mist elimination algorithm, to belonging to for the value according to described average color difference utilization The color value stating each pixel in the first view data of type is adjusted;
Reference value determines subelement 432, for determining reference color difference according to the value of described average color difference;
Second processes subelement 433, for presetting mist elimination algorithm, to being not belonging to according to described reference color difference utilization The color value stating each pixel in the view data of type is adjusted.About the device in above-described embodiment, wherein each Module performs the concrete mode of operation and has been described in detail in about the embodiment of the method, will not do in detail herein Illustrate explanation.
For device embodiment, owing to it corresponds essentially to embodiment of the method, so relevant part sees method in fact The part executing example illustrates.Device embodiment described above is only schematically, wherein illustrates as separating component Unit can be or may not be physically separate, the parts shown as unit can be or may not be Physical location, i.e. may be located at a place, or can also be distributed on multiple NE.Can be according to the actual needs Select some or all of module therein to realize the purpose of disclosure scheme.Those of ordinary skill in the art are not paying wound In the case of the property made work, i.e. it is appreciated that and implements.
Fig. 7 is the structural representation according to a kind of electronic equipment shown in an exemplary embodiment.Such as, electronic equipment 700 can be the terminal unit with camera function.
With reference to Fig. 7, electronic equipment 700 can include following one or more assembly: processes assembly 702, memorizer 704, Power supply module 706, multimedia groupware 708, audio-frequency assembly 710, the interface 712 of input/output (I/O), sensor cluster 714, And communications component 716.
Processing assembly 702 and generally control the integrated operation of electronic equipment 700, such as with display, call, data are led to The operation that letter, camera operation and record operation are associated.Treatment element 702 can include that one or more processor 720 is held Row instruction, to complete all or part of step of above-mentioned method.Additionally, process assembly 702 can include one or more mould Block, it is simple to process between assembly 702 and other assemblies is mutual.Such as, processing component 702 can include multi-media module, with Facilitate multimedia groupware 708 and process between assembly 702 mutual.
Memorizer 704 is configured to store various types of data to support the operation at equipment 700.Showing of these data Example includes any application program for operation on electronic equipment 700 or the instruction of method, message, picture etc..Memorizer 704 Can be realized, such as static random access memory by any kind of volatibility or non-volatile memory device or combinations thereof Device (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), can compile Journey read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, disk or CD.
The various assemblies that power supply module 706 is electronic equipment 700 provide electric power.Electric power assembly 706 can include power supply pipe Reason system, one or more power supplys, and other generate, manage and distribute, with for electronic equipment 700, the assembly that electric power is associated.
The screen of one output interface of offer that multimedia groupware 708 is included between electronic equipment 700 and user.One In a little embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive the input signal from user.Touch panel includes one or more touch sensing Device is with the gesture on sensing touch, slip and touch panel.Touch sensor can not only sense touch or the limit of sliding action Boundary, but also detect the persistent period relevant to touch or slide and pressure.In certain embodiments, multimedia groupware 708 include a front-facing camera and/or post-positioned pick-up head.When equipment 700 is in operator scheme, such as screening-mode or video screen module During formula, front-facing camera and/or post-positioned pick-up head can receive the multi-medium data of outside.Each front-facing camera and rearmounted take the photograph As head can be a fixing optical lens system or has focal length and optical zoom ability.
Audio-frequency assembly 710 is configured to output and/or input audio signal.Such as, audio-frequency assembly 710 includes a Mike Wind (MIC), when electronic equipment 700 is in operator scheme, during such as call model, logging mode and speech recognition mode, mike It is configured to receive external audio signal.The audio signal received can be further stored at memorizer 704 or via logical Letter assembly 716 sends.In certain embodiments, audio-frequency assembly 710 also includes a speaker, is used for exporting audio signal.
I/O interface 712 provides interface for processing between assembly 702 and peripheral interface module, above-mentioned peripheral interface module can To be keyboard, put striking wheel, button etc..These buttons may include but be not limited to: home button, volume button, start button and lock Set button.
Sensor cluster 714 includes one or more sensor, for providing the state of various aspects for electronic equipment 700 Assessment.Such as, what sensor cluster 714 can detect equipment 700 opens/closed mode, the relative localization of assembly, such as group Part is display and the keypad of electronic equipment 700, and sensor cluster 714 can also detect electronic equipment 700 or electronic equipment The position change of 700 1 assemblies, the presence or absence that user contacts with electronic equipment 700, electronic equipment 700 orientation or add Speed/slow down and the variations in temperature of electronic equipment 700.Sensor cluster 714 can include proximity transducer, is configured to not have The existence of object near detection when having any physical contact.Sensor cluster 714 can also include optical sensor, such as CMOS or Ccd image sensor, for using in imaging applications.In certain embodiments, this sensor cluster 714 can also include adding Velocity sensor, gyro sensor, Magnetic Sensor, distance-sensor, pressure transducer or temperature sensor.
Communications component 716 is configured to facilitate the communication of wired or wireless mode between electronic equipment 700 and other equipment. Electronic equipment 700 can access wireless network based on communication standard, such as WIFI, 2G or 3G, or combinations thereof.Show at one In example embodiment, communication component 716 receives the broadcast singal from external broadcasting management system or broadcast via broadcast channel Relevant information.In one exemplary embodiment, communication component 716 also includes near-field communication (NFC) module, to promote that short distance is led to Letter.Such as, can be based on RF identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) Technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, electronic equipment 700 can be by one or more application specific integrated circuits (ASIC), number Word signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components realize, be used for performing said method.
In the exemplary embodiment, a kind of non-transitory computer-readable recording medium including instruction, example are additionally provided As included the memorizer 704 of instruction, above-mentioned instruction can have been performed said method by the processor 720 of electronic equipment 700.This In embodiment, described processor 720 can be configured to: obtains view data;Determine the parameter preset in default mist elimination algorithm Value;Value according to described parameter preset also uses described default mist elimination algorithm, and described view data is carried out mist elimination process;Ring Should be in photographing instruction, the view data obtained after processing according to mist elimination, generate image file.Such as, non-transitory computer can Reading storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
Those skilled in the art, after considering description and putting into practice disclosure disclosed herein, will readily occur to its of the disclosure Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modification, purposes or Person's adaptations is followed the general principle of the disclosure and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques means.Description and embodiments is considered only as exemplary, and the true scope of the disclosure and spirit are by following Claim is pointed out.
It should be appreciated that the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and And various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.

Claims (13)

1. a photographic method, it is characterised in that including:
Obtain view data;
Determine the value of parameter preset in default mist elimination algorithm;
Value according to described parameter preset also uses described default mist elimination algorithm, and described view data is carried out mist elimination process;
In response to photographing instruction, the view data obtained after processing according to mist elimination, generate image file.
Method the most according to claim 1, it is characterised in that the described parameter preset determined in default mist elimination algorithm Value, including:
According to default mist elimination grade, determine the value of parameter preset corresponding with described mist elimination grade in default mist elimination algorithm;Or,
According to default target image, determine the value of parameter preset in default mist elimination algorithm;Or,
Feature based on described view data, determines the value of parameter preset in default mist elimination algorithm.
Method the most according to claim 2, it is characterised in that described parameter preset includes described average color difference, described According to default target image, determine the value of parameter preset in default mist elimination algorithm, including:
Determine the type of the element comprised in described target image;
Choose the first view data belonging to described type in described view data;
Calculate the value of the average color difference of the view data of described first view data and described target image.
Method the most according to claim 3, it is characterised in that the described value according to described parameter preset also uses described pre- If mist elimination algorithm, described view data is carried out mist elimination process, including:
Value utilization according to described average color difference preset mist elimination algorithm, to each pixel in the described view data got Color value be adjusted.
Method the most according to claim 3, it is characterised in that the described value according to described parameter preset also uses described pre- If mist elimination algorithm, described view data is carried out mist elimination process, including:
Value according to described average color difference also utilizes and presets mist elimination algorithm, every in the first view data belonging to described type The color value of individual pixel is adjusted;
Value according to described average color difference determines reference color difference;
Mist elimination algorithm is preset, to each picture in the view data being not belonging to described type according to described reference color difference utilization The color value of element is adjusted.
Method the most according to claim 5, it is characterised in that if described target image includes at least two, described reference Value of chromatism is: in the value of the average color difference corresponding with each target image one or corresponding with each target image average The meansigma methods of the value of aberration.
Method the most according to claim 1, it is characterised in that described default mist elimination algorithm includes: based on dark channel prior Mist elimination algorithm or mist elimination algorithm based on adaptive histogram equalization;With described mist elimination algorithm based on dark channel prior Corresponding parameter preset includes: absorbance, global atmosphere light component.
8. a camera arrangement, it is characterised in that including:
Acquiring unit, is used for obtaining view data;
Determine unit, for determining the value of the parameter preset in default mist elimination algorithm;
Processing unit, is used for the value according to described parameter preset and uses described default mist elimination algorithm, entering described view data Row mist elimination processes;
Signal generating unit, in response to photographing instruction, the view data obtained after processing according to mist elimination, generating image file.
Device the most according to claim 8, it is characterised in that described determine unit for:
According to default mist elimination grade, determine the value of parameter preset corresponding with described mist elimination grade in default mist elimination algorithm;Or,
According to default target image, determine the value of parameter preset in default mist elimination algorithm;Or,
Feature based on described view data, determines the value of parameter preset in default mist elimination algorithm.
Device the most according to claim 9, it is characterised in that described parameter preset includes described average color difference, described really Cell includes:
Type determination unit, for determining the type of the element comprised in described target image;
Data decimation subelement, for choosing the first view data belonging to described type in described view data;
Computation subunit, for calculating the average color difference of the view data of described first view data and described target image Value.
11. devices according to claim 10, it is characterised in that described processing unit is used for:
Value utilization according to described average color difference preset mist elimination algorithm, to each pixel in the described view data got Color value be adjusted.
12. devices according to claim 10, it is characterised in that described processing unit includes:
First processes subelement, presets mist elimination algorithm, to belonging to described type for the value according to described average color difference utilization The first view data in the color value of each pixel be adjusted;
Reference value determines subelement, for determining reference color difference according to the value of described average color difference;
Second processes subelement, for presetting mist elimination algorithm, to being not belonging to described type according to described reference color difference utilization View data in the color value of each pixel be adjusted.
13. 1 kinds of electronic equipments, it is characterised in that including:
Processor;
For storing the memorizer of processor executable;
Described processor is configured to:
Obtain view data;
Determine the value of parameter preset in default mist elimination algorithm;
Value according to described parameter preset also uses described default mist elimination algorithm, and described view data is carried out mist elimination process;
In response to photographing instruction, the view data obtained after processing according to mist elimination, generate image file.
CN201610805130.1A 2016-09-06 2016-09-06 Photographing method and device and electronic equipment Active CN106131441B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610805130.1A CN106131441B (en) 2016-09-06 2016-09-06 Photographing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610805130.1A CN106131441B (en) 2016-09-06 2016-09-06 Photographing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN106131441A true CN106131441A (en) 2016-11-16
CN106131441B CN106131441B (en) 2020-06-02

Family

ID=57271423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610805130.1A Active CN106131441B (en) 2016-09-06 2016-09-06 Photographing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN106131441B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107317969A (en) * 2017-07-27 2017-11-03 广东欧珀移动通信有限公司 Image defogging method, device, computer can storage medium and mobile terminals
CN107317971A (en) * 2017-07-27 2017-11-03 广东欧珀移动通信有限公司 Image defogging processing method, device, storage medium and mobile terminal
CN107317967A (en) * 2017-07-27 2017-11-03 广东欧珀移动通信有限公司 Image processing method, device, mobile terminal and computer-readable recording medium
CN107424135A (en) * 2017-07-27 2017-12-01 广东欧珀移动通信有限公司 Image processing method, device, computer-readable recording medium and computer equipment
CN107464224A (en) * 2017-07-27 2017-12-12 广东欧珀移动通信有限公司 Image defogging processing method, device, storage medium and mobile terminal
CN107464225A (en) * 2017-07-27 2017-12-12 广东欧珀移动通信有限公司 Image processing method, device, computer-readable recording medium and mobile terminal
CN107564047A (en) * 2017-09-12 2018-01-09 北京小米移动软件有限公司 Image processing method and device, electronic equipment and computer-readable recording medium
CN109598259A (en) * 2019-01-02 2019-04-09 浙江理工大学 A kind of wild animal dynamic trace monitoring system and method
CN110796610A (en) * 2019-09-29 2020-02-14 百度在线网络技术(北京)有限公司 Image defogging method, device and equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090092870A (en) * 2008-02-28 2009-09-02 포항공과대학교 산학협력단 Method for checking error of slab administration number marking device by using digital image processing
CN104123700A (en) * 2014-06-18 2014-10-29 深圳市金立通信设备有限公司 Electronic equipment
CN105809647A (en) * 2016-03-31 2016-07-27 北京奇虎科技有限公司 Automatic defogging photographing method, device and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090092870A (en) * 2008-02-28 2009-09-02 포항공과대학교 산학협력단 Method for checking error of slab administration number marking device by using digital image processing
CN104123700A (en) * 2014-06-18 2014-10-29 深圳市金立通信设备有限公司 Electronic equipment
CN105809647A (en) * 2016-03-31 2016-07-27 北京奇虎科技有限公司 Automatic defogging photographing method, device and equipment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107317969A (en) * 2017-07-27 2017-11-03 广东欧珀移动通信有限公司 Image defogging method, device, computer can storage medium and mobile terminals
CN107317971A (en) * 2017-07-27 2017-11-03 广东欧珀移动通信有限公司 Image defogging processing method, device, storage medium and mobile terminal
CN107317967A (en) * 2017-07-27 2017-11-03 广东欧珀移动通信有限公司 Image processing method, device, mobile terminal and computer-readable recording medium
CN107424135A (en) * 2017-07-27 2017-12-01 广东欧珀移动通信有限公司 Image processing method, device, computer-readable recording medium and computer equipment
CN107464224A (en) * 2017-07-27 2017-12-12 广东欧珀移动通信有限公司 Image defogging processing method, device, storage medium and mobile terminal
CN107464225A (en) * 2017-07-27 2017-12-12 广东欧珀移动通信有限公司 Image processing method, device, computer-readable recording medium and mobile terminal
CN107464225B (en) * 2017-07-27 2020-05-12 Oppo广东移动通信有限公司 Image processing method, image processing device, computer-readable storage medium and mobile terminal
CN107564047A (en) * 2017-09-12 2018-01-09 北京小米移动软件有限公司 Image processing method and device, electronic equipment and computer-readable recording medium
CN107564047B (en) * 2017-09-12 2020-10-20 北京小米移动软件有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN109598259A (en) * 2019-01-02 2019-04-09 浙江理工大学 A kind of wild animal dynamic trace monitoring system and method
CN110796610A (en) * 2019-09-29 2020-02-14 百度在线网络技术(北京)有限公司 Image defogging method, device and equipment and storage medium

Also Published As

Publication number Publication date
CN106131441B (en) 2020-06-02

Similar Documents

Publication Publication Date Title
CN106131441A (en) Photographic method and device, electronic equipment
CN111462268B (en) Image reconstruction method and device, electronic equipment and storage medium
CN109379572B (en) Image conversion method, image conversion device, electronic equipment and storage medium
CN109671106B (en) Image processing method, device and equipment
CN109829863B (en) Image processing method and device, electronic equipment and storage medium
KR101727169B1 (en) Method and apparatus for generating image filter
CN108154465B (en) Image processing method and device
CN104463775A (en) Device and method for achieving depth-of-field effect of image
CN105472239A (en) Photo processing method and photo processing device
CN105763812A (en) Intelligent photographing method and device
CN106603917A (en) Shooting device and method
CN106331504A (en) Shooting method and device
CN107730448B (en) Beautifying method and device based on image processing
KR102545408B1 (en) Method and apparatus for detecting occluded image and medium
CN111340731A (en) Image processing method and device, electronic equipment and storage medium
CN105528765A (en) Method and device for processing image
US11222235B2 (en) Method and apparatus for training image processing model, and storage medium
CN105208284A (en) Photographing reminding method and device
CN112634160A (en) Photographing method and device, terminal and storage medium
CN104506770A (en) Method and device for photographing image
CN106982327A (en) Image processing method and device
CN106469446B (en) Depth image segmentation method and segmentation device
CN114143471B (en) Image processing method, system, mobile terminal and computer readable storage medium
US20220230283A1 (en) Method and device for processing image, and storage medium
CN111507131B (en) Living body detection method and device, electronic equipment and storage medium

Legal Events

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