CN108600631A - Image processing method, device, computer readable storage medium and electronic equipment - Google Patents

Image processing method, device, computer readable storage medium and electronic equipment Download PDF

Info

Publication number
CN108600631A
CN108600631A CN201810466604.3A CN201810466604A CN108600631A CN 108600631 A CN108600631 A CN 108600631A CN 201810466604 A CN201810466604 A CN 201810466604A CN 108600631 A CN108600631 A CN 108600631A
Authority
CN
China
Prior art keywords
light efficiency
image
model
light
pending image
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
CN201810466604.3A
Other languages
Chinese (zh)
Other versions
CN108600631B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810466604.3A priority Critical patent/CN108600631B/en
Publication of CN108600631A publication Critical patent/CN108600631A/en
Application granted granted Critical
Publication of CN108600631B publication Critical patent/CN108600631B/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/90
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation

Abstract

This application involves a kind of image processing method, device, computer readable storage medium and electronic equipments.The method includes:It obtains electronic equipment and acquires geographical location residing when pending image and corresponding acquisition moment;Obtaining light efficiency according to the geographical location and acquisition moment enhances model, and the light efficiency enhancing model is the model for simulating light variation;Enhance model according to the light efficiency and light efficiency enhancing processing is carried out to the pending image.Above-mentioned image processing method, device, computer readable storage medium and electronic equipment can improve the accuracy of image procossing.

Description

Image processing method, device, computer readable storage medium and electronic equipment
Technical field
This application involves field of computer technology, more particularly to a kind of image processing method, device, computer-readable deposit Storage media and electronic equipment.
Background technology
Intelligent terminal can obtain image, and handle image, and image is made more to be bonded the demand of user and aesthetic.Example Such as, intelligent terminal can obtain picture from network, directly can also acquire picture by camera.Intelligent terminal gets figure As after, user can also carry out different processing according to the demand of oneself.For example, carrying out U.S. face, white balance, brightness to picture The processing such as adjusting.
Invention content
A kind of image processing method of the embodiment of the present application offer, device, computer readable storage medium and electronic equipment, can To improve the accuracy of image procossing.
A kind of image processing method, including:
It obtains electronic equipment and acquires geographical location residing when pending image and corresponding acquisition moment;
Obtaining light efficiency according to the geographical location and acquisition moment enhances model, and the light efficiency enhancing model is simulation light The model of variation;
Enhance model according to the light efficiency and light efficiency enhancing processing is carried out to the pending image.
A kind of image processing apparatus, including:
Image capture module, for obtaining geographical location residing when electronic equipment acquires pending image, and it is corresponding The acquisition moment;
Model acquisition module enhances model, the light efficiency for obtaining light efficiency according to the geographical location and acquisition moment Enhancing model is the model for simulating light variation;
Light efficiency enhances module, is carried out at light efficiency enhancing to the pending image for enhancing model according to the light efficiency Reason.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor Following steps are realized when row:
It obtains electronic equipment and acquires geographical location residing when pending image and corresponding acquisition moment;
Obtaining light efficiency according to the geographical location and acquisition moment enhances model, and the light efficiency enhancing model is simulation light The model of variation;
Enhance model according to the light efficiency and light efficiency enhancing processing is carried out to the pending image.
A kind of electronic equipment, including memory and processor store computer-readable instruction in the memory, described When instruction is executed by the processor so that the processor executes following steps:
It obtains electronic equipment and acquires geographical location residing when pending image and corresponding acquisition moment;
Obtaining light efficiency according to the geographical location and acquisition moment enhances model, and the light efficiency enhancing model is simulation light The model of variation;
Enhance model according to the light efficiency and light efficiency enhancing processing is carried out to the pending image.
Above-mentioned image processing method, device, computer readable storage medium and electronic equipment can be acquired in electronic equipment The geographical location residing for electronic equipment and acquisition moment are obtained when pending image, and go to obtain according to geographical location and acquisition moment It takes light efficiency to enhance model, model is enhanced according to light efficiency to carry out light efficiency enhancing processing to pending image.Electronic equipment exists in this way When carrying out light efficiency enhancing processing, different processing can be carried out according to different positions and moment, improved at image The accuracy of reason.
Description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is the applied environment figure of image processing method in one embodiment;
Fig. 2 is the flow chart of image processing method in one embodiment;
Fig. 3 is the flow chart of image processing method in another embodiment;
Fig. 4 is the schematic diagram that light efficiency enhances model in one embodiment;
Fig. 5 is the flow chart of image processing method in another embodiment;
Fig. 6 is the flow chart of image processing method in another embodiment;
Fig. 7 is the structural schematic diagram of image processing apparatus in one embodiment;
Fig. 8 is the schematic diagram of image processing circuit in one embodiment.
Specific implementation mode
It is with reference to the accompanying drawings and embodiments, right in order to make the object, technical solution and advantage of the application be more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
It is appreciated that term " first " used in this application, " second " etc. can be used to describe herein various elements, But these elements should not be limited by these terms.These terms are only used to distinguish first element and another element.Citing comes It says, in the case where not departing from scope of the present application, the first client can be known as the second client, and similarly, can incite somebody to action Second client is known as the first client.First client and the second client both client, but it is not same visitor Family end.
Fig. 1 is the applied environment figure of image processing method in one embodiment.As shown in Figure 1, being wrapped in the applied environment figure Containing electronic equipment 104.Camera can be installed on electronic equipment 104, pending image 102 is then acquired by camera.When When electronic equipment 104 acquires pending image 102, electronic equipment 104 can be obtained and acquire ground residing when pending image 102 Manage position and corresponding acquisition moment.Then obtaining light efficiency according to geographical location and acquisition moment enhances model, which increases Strong model is the model for simulating light variation.Electronic equipment 104 is allow to enhance model to pending image according to the light efficiency 102 carry out light efficiency enhancing processing.Wherein, electronic equipment 102 can be for inputting user information and exporting handling result Equipment, such as can be PC, mobile terminal, personal digital assistant, wearable electronic etc..
Fig. 2 is the flow chart of image processing method in one embodiment.As shown in Fig. 2, the image processing method includes step Rapid 202 to step 206.Wherein:
Step 202, when acquisition electronic equipment acquires geographical location residing when pending image and corresponding acquisition It carves.
In one embodiment, camera can be installed, to acquire figure by the camera of installation on electronic equipment Picture.The quantity for the camera installed on electronic equipment and the installation site of camera are herein without limiting.For example, can be with One camera is installed on the front panel of electronic equipment, two cameras are overleaf installed on panel, camera can be with It is installed on the inside of electronic equipment in a manner of embedded, camera is then opened by way of rotating or sliding.Specifically, electric Front camera and rear camera can be installed, front camera and rear camera can be obtained from different visual angles in sub- equipment Take image, general front camera that can obtain image from the positive visual angle of electronic equipment, rear camera can be set from electronics Standby back side visual angle obtains image.
The upper layer application of electronic equipment can initiate the instruction of acquisition image to camera, when electronic equipment detects image When acquisition instructions, camera can be controlled and acquire pending image.After electronic equipment collects pending image, it can immediately obtain and work as Preceding residing geographical location, and acquire the acquisition moment of the pending image.Specifically, the geographical location of electronic equipment can be with But the methods of being not limited by GPS (Global Positioning System, global positioning system), network address is determined Position.When electronic equipment is when acquiring pending image, acquisition can be used as at the time of acquiring current by the clock of electronic equipment Moment.Such as it can be by System.currentTimeMillis () function come when obtaining system in android system It carves.
Electronic equipment is after obtaining pending image, geographical location when can will acquire the pending image and acquisition Moment is stored together with pending image.The pending image of acquisition can be passed between different electronic equipments It is defeated, as long as receiving pending image in this way, when will can obtain geographical location and the acquisition when acquiring the pending image It carves, and pending image is handled according to the geographical location of acquisition and acquisition moment.
Step 204, obtaining light efficiency according to geographical location and acquisition moment enhances model, and light efficiency enhancing model is simulation light The model of variation.
User's scene during shooting is often extremely complex, and the light of especially photographed scene is complicated and changeable, And user can not change photographed scene in shooting process, therefore the effect that user wants can only be reached by post-processing Fruit.Pending image refers to the image for needing to carry out light efficiency enhancing processing, and light efficiency is a kind of image enhancement of analog light source effect Processing.After light source sends out light, light can be around diffused centered on light source, and the intensity of light can with light The increase of source distance and weaken.For example, light source effect can have different type, including natural light, stage light applications, film studio light, glue Piece light, rim(ming) light and other effects.
When shooting photo, when location and shooting time difference, in environment the light luminance of natural light and Direction is also different.For example, light when noon takes pictures can be stronger, the light of shooting can be than dark at dusk.When same Between when different longitude and latitude is shot, the direction of light is also different.It, can be with so when the image to shooting is handled Geographical location when according to acquisition image and acquisition moment, to carry out different processing to the image of acquisition.For example, can basis Longitude and latitude when acquiring image and at the time of acquisition, extrapolates direction and the intensity of sunlight, thus can be according to sunlight Direction and intensity to image add different directions and intensity light effects.
Light efficiency enhancing model be simulate light variation model, by the light efficiency enhance model can to pending image into Row light efficiency enhancing is handled.Specifically, light efficiency enhancing model can simulate the change curves such as the direction of light, power, by this Light efficiency enhances model to image addition different directions and strong and weak light.Bat can be extrapolated according to geographical location and acquisition moment The parameters such as the direction of natural light, power when taking the photograph image, then build corresponding light according to parameters such as the direction of natural light, powers Effect enhancing model, and model is enhanced according to the light efficiency of acquisition, image is handled.Make pending image according to the position of acquisition With the difference of time, different treatment effects is showed.
Step 206, model is enhanced according to light efficiency and light efficiency enhancing processing is carried out to pending image.
Light efficiency enhancing processing refers to that the processing of light effects is added to image.Specifically, pending image is by several pictures The two-dimensional pixel matrix that vegetarian refreshments is constituted, each pixel have corresponding pixel value.Therefore light efficiency enhancing model, root can be obtained The light efficiency of pixel in image is calculated according to light efficiency enhancing model enhances coefficient.It, can basis after calculating light efficiency enhancing coefficient Light efficiency enhances coefficient and carries out light efficiency enhancing processing to each pixel in pending image.It can specifically be enhanced by light efficiency and be It is several pending image to be overlapped or the mode of product carries out light efficiency enhancing processing.It is understood that the pixel in image The value range of value is generally [0,255], therefore the pixel value of the pending image after being handled by light efficiency enhancing cannot More than 255.
For example, it is assumed that pending image is H0(x, y), it is P (x, y) that light efficiency, which enhances model, then is carried out by stacked system Pending image H (x, y) after light efficiency enhancing processing can be expressed as H (x, y)=(1+P (x, y)) H0(x, y) passes through The mode of product carries out light efficiency enhancing, and treated that pending image can be expressed as H (x, y)=P (x, y) H0(x,y).It can With understanding, light efficiency enhancing processing, which can also be, otherwise to be realized, is not limited herein.
It specifically, can also be to each in pending image when carrying out light efficiency enhancing processing to pending image A Color Channel does different processing.Model can be enhanced by light efficiency, difference is carried out to each Color Channel in pending image Processing, specifically can according to the light efficiency of acquisition enhance model calculate the corresponding RGB triple channels of each pixel light efficiency enhance Coefficient carries out light efficiency enhancing processing to the RGB triple channels of each pixel respectively further according to light efficiency enhancing coefficient.To each channel After the light efficiency enhancing processing for carrying out varying strength, obtained image light efficiency enhancing effect can be the same.For example, the RGB tri- obtained In the corresponding light efficiency enhancing coefficient in channel, the corresponding light efficiency enhancing coefficient in the channels R is more than the light efficiency enhancing system of the channels G and channel B Number, then after enhancing coefficient to the progress light efficiency enhancing processing of pending image according to the light efficiency of acquisition, obtained light efficiency enhances The relatively pending image of image is exactly the effect of inclined feux rouges.
It is understood that electronic equipment is when passing through camera collection image, it is possible to understand that pass through electronic equipment It is positioned to being presently in position, and obtains the acquisition moment.The pending image of acquisition does not need to carry out light efficiency increasing immediately Strength is managed, and the geographical location of acquisition and acquisition moment can be performed in accordance with storage by electronic equipment with pending image.It is needing When carrying out light efficiency enhancing processing, light efficiency enhancing processing is carried out to pending image further according to geographical location and acquisition moment.Example Such as, equipment 1 can acquire pending image, and obtain geographical location and acquisition moment simultaneously.Equipment 1 can be waited for collected Processing image, geographical location and acquisition moment are sent to equipment 2 simultaneously, and equipment 2 is further according to the geographical location and acquisition received Moment carries out light efficiency enhancing processing to pending image.
The image processing method that above-described embodiment provides can obtain electronics when electronic equipment acquires pending image and set Standby residing geographical location and acquisition moment, and go to obtain light efficiency enhancing model with the moment is acquired according to geographical location, according to light Effect enhancing model to carry out light efficiency enhancing processing to pending image.Electronic equipment is when progress light efficiency enhancing is handled in this way It waits, different processing can be carried out according to different positions and moment, improve the accuracy of image procossing.
Fig. 3 is the flow chart of image processing method in another embodiment.As shown in figure 3, the image processing method includes Step 302 is to step 308.Wherein:
Step 302, ambient brightness value when electronic equipment acquires pending image is obtained.
Ambient brightness value is used to indicate the brightness of electronic equipment local environment.Ambient brightness value is bigger, indicates electronic equipment Local environment it is brighter.Ambient brightness value can be calculated according to the pending image of acquisition.For example, can obtain The gray value of each pixel in pending image is taken, the average value of the gray value of all pixels point is counted, according to the ash of statistics Spend mean value calculation ambient brightness value.Ambient brightness value can also be obtained by ambient light sensor, herein without limit It is fixed.For example, when electronic equipment detects the shooting instruction for acquiring pending image, starts ambient light sensor and works, And the ambient brightness value of current environment is acquired by ambient light sensor.
By taking android system as an example, sensor manager service can be obtained first in system Android Then SensorManager is called the service of light sensor by the sensor management service, that is, passed through SensorManager.getDefaultSensor (Sensor.TYPE_LIGHT) is transferred.Then it can note in systems Volume and monitoring light sensor, to obtain the ambient brightness value of light sensor return.
Step 304, it if ambient brightness value is less than the first luminance threshold, obtains electronic equipment and acquires pending image when institute The geographical location at place and corresponding acquisition moment.
In one embodiment, the bright-dark degree of environment when judging to acquire pending image according to ambient brightness value, to sentence It is disconnected whether to need to add light efficiency to pending image.When ambient brightness value is less than the first luminance threshold, it is believed that electronic equipment institute Locate environment than dark, then needs the pending image light efficiency enhancing processing to acquiring under the present circumstances.For example, taking pictures in outdoor When, if environment residing for electronic equipment is the cloudy day, then can according to residing for electronic equipment geographical location and the acquisition moment, To carry out light efficiency enhancing processing.
Step 306, determine that light efficiency enhances direction according to geographical location and acquisition moment, enhancing direction according to light efficiency determines light Imitate strength model.
Geographical location residing for electronic equipment can be indicated by longitude and latitude.Electronic equipment can be according to the ground of acquisition It reason position and acquires the moment and extrapolates the direction of naturally light, to determine the light efficiency of addition according to the direction of natural light Direction.For example, when taking pictures at noon, sunlight is irradiated from surface, then can add from surface to image Add light efficiency;When taking pictures in the afternoon, sunlight is irradiated from oblique upper, then light can be added to image from oblique upper Effect.Electronic equipment can prestore geographical location, the correspondence at acquisition moment and light efficiency enhancing direction, then according to acquisition Geographical location and the acquisition moment determine that corresponding light efficiency enhances direction.
Specifically, electronic equipment is after extrapolating the direction of ambient light according to geographical location and acquisition moment, it is also necessary to The orientation of electronic equipment is obtained, and determines that light efficiency enhances direction according to the direction of ambient light and the orientation of electronic equipment.For example, When environment light direction is identical, if the direction difference of electronic equipment, the influence for the light that subject receives in the environment is different. It can determine that electronic equipment is in frontlighting or backlight environment according to the direction of ambient light and the orientation of electronic equipment, to add Add different light efficiencies.
It is understood that influence light because being known as light source, the direction of propagation, light intensity and light color etc..Light efficiency Enhancing model can simulate the change curve of light, can also simulate different light source centers, the direction of propagation, power and color Light.After determining light efficiency enhancing direction, direction can be enhanced according to light efficiency to determine that light efficiency enhances model, to basis Light efficiency enhances model to add the light effects of different directions.It can also determine the parameters such as light intensity, light color, and according to The corresponding light efficiency of the parameter acquirings image such as light intensity, light color enhances model, to the different strong and weak, colors of image addition Light efficiency.
The propagation of light is the critical dimensions around centered on light source.As long as therefore mobile light source position, so that it may with Change the direction of light.Electronic equipment can pre-define a light efficiency enhancing reference model, which enhances reference model can To be using any point in space as the model of light source.After determining light efficiency enhancing direction, the mobile pre-defined light efficiency increases The light source center of strong reference model, you can change radiation direction.Specifically, direction can be enhanced according to light efficiency and determines light source center Point, and light efficiency enhancing model is built according to the light source center point.
In one embodiment, light efficiency enhancing model can be built according to dimensional gaussian distribution function.It obtains first Dimensional gaussian distribution function, then using above-mentioned light source center point as the structure light efficiency enhancing of the maximum point of dimensional gaussian distribution function Model.It is understood that above-mentioned light source center point can be the pixel in pending image, can also be pending image Any point in space in addition.It is as follows to obtain dimensional gaussian distribution function:
Wherein, (x, y) indicates the two-dimensional coordinate of any pixel point in pending image, and d is constant.Above-mentioned function be with (0,0) it is the dimensional gaussian distribution function of maximum point, then the light efficiency enhancing model obtained according to central pixel point is will be upper It states dimensional gaussian distribution function and carries out displacement, the maximum point of above-mentioned dimensional gaussian distribution function is moved to light source center point Position can be obtained light efficiency enhancing model.Assuming that central pixel point is (xo,yo), then the light efficiency enhancing model obtained can table It is shown as:
In obtained light efficiency enhancing model, central pixel point (xo,yo) be just maximum point, i.e., in central pixel point (xo, yo) obtain light efficiency enhancing FACTOR Po(x, y) is maximum.Can adjust light efficiency according to above-mentioned constant d enhances the intensity of coefficient.
Fig. 4 is the schematic diagram that light efficiency enhances model in one embodiment.As shown in figure 4, waiting locating in light efficiency enhancing model The resolution ratio for managing image is 50*50, and the coordinate value of central pixel point 402 is (25,25).It can be seen that the central pixel point 402 Corresponding light efficiency enhancing coefficient is maximum, in pending image the corresponding light efficiency enhancing coefficient of other pixels with center pixel It puts the increase of 402 distance and reduces, the remoter pixel with a distance from central pixel point 402, corresponding light efficiency enhances coefficient It is smaller.
Step 308, coefficient is enhanced according to the corresponding light efficiency of each pixel in the pending image of light efficiency enhancing model acquisition, And coefficient is enhanced according to light efficiency, light efficiency enhancing processing is carried out to each pixel in pending image.
In embodiment provided by the present application, light efficiency enhancing model can simulate the variation of light, then enhanced according to light efficiency Model can calculate the light efficiency enhancing coefficient of each pixel in pending image.Light efficiency enhancing coefficient is clicked through to each pixel The parameter of row light efficiency enhancing processing.Position usually remoter from light source position, light attenuation are more.Correspondingly, pending figure The pixel remoter from central pixel point with a distance from as in, it is smaller that light efficiency enhances coefficient, can be with according to the light efficiency of acquisition enhancing coefficient Light efficiency enhancing processing is carried out to each pixel.
Pending image is a two-dimensional pixel dot matrix, can be using the most lower left corner pixel of pending image as origin Coordinate system is established, the pixel in pending image can be indicated by a two-dimensional coordinate.Increased according to above-mentioned light efficiency Strong model can obtain the light efficiency enhancing coefficient of each pixel in pending image, directly by the corresponding coordinate of each pixel It is brought into above-mentioned light efficiency enhancing model, obtains the light efficiency enhancing coefficient of pixel.Enhance coefficient by obtained light efficiency to treat The each pixel handled in image carries out light efficiency enhancing processing.
In one embodiment, model can also be enhanced according to light efficiency, adjusts the intensity of light efficiency.Then obtain light efficiency enhancing mould The step of type, can specifically include:
Step 502, determine that light efficiency enhances direction according to geographical location and acquisition moment.
Step 504, light efficiency intensity factor is obtained, light efficiency intensity factor is the parameter for influencing light efficiency enhancing processing intensity.
In embodiment provided by the present application, the light efficiency processing intensity of light efficiency enhancing model can be adjusted, according to light Effect intensity factor can be adjusted to enhancing the light efficiency strength factor that model obtains according to light efficiency.That is light efficiency intensity factor takes Value is different, and the light efficiency strength factor of the corresponding each pixel obtained is different.Specifically, light efficiency intensity factor, root can be obtained Obtaining light efficiency according to light efficiency intensity factor and light efficiency enhancing direction enhances model, which is to influence light efficiency enhancing processing The parameter of intensity.Light efficiency enhancing processing is carried out to pending image, the brightness of pending image can be improved.Assuming that waiting locating It is brighter to manage image, then if carrying out light efficiency enhancing processing to pending image again, will result in pending image and seriously lose Very, therefore the intensity that light efficiency enhancing is handled can be adjusted according to the brightness of pending image.
It is understood that the time of shooting image is different, the intensity of sunlight is also different.For example, morning Sunlight is than milder, and midday sun light is than stronger.Light efficiency intensity factor above-mentioned in this way can be carried out according to the acquisition moment It obtains, the different acquisition moment, corresponding light efficiency intensity factor was different, increased to carry out different degrees of light efficiency to shooting image It manages strength.Specifically, electronic equipment can preset light efficiency intensity factor and acquire the correspondence at moment, can according to the acquisition moment To obtain corresponding light efficiency intensity factor.Light efficiency intensity factor can also be carried out according to the brightness for the pending image that shooting obtains It calculates, the intensity of light efficiency processing can be thus adjusted according to the image taken, prevents image from being lost because brightness is excessively high Very.
Step 506, direction is enhanced according to light efficiency and light efficiency intensity factor obtains light efficiency and enhances model.
Light source center point can be determined by enhancing direction according to light efficiency, then can be adjusted at light efficiency according to light efficiency intensity factor The intensity of reason.Specifically, according to light source center point and light efficiency intensity factor, the light of simulation different directions and intensity can be built Light efficiency enhance model, and according to the light efficiency of structure enhance model come to pending image carry out light efficiency enhancing processing.
In embodiment provided by the present application, light efficiency color factor can also be obtained, which can influence The color of the light of addition.Specifically, when adding the light efficiency of different colours, to the light of each Color Channel in pending image Effect enhancing coefficient is different.Obtaining light efficiency according to light efficiency color factor enhances model, can be obtained by light efficiency enhancing model and wait locating Managing the light efficiency of each Color Channel in image enhances coefficient, and enhances coefficient to each color in pending image according to light efficiency Channel carries out light efficiency enhancing processing.For example, the time of shooting image is different, the color of ambient light can be variant, midday sun Light is partially white, and some sunlight of dusk is partially redder, thus can obtain light efficiency color factor according to the acquisition moment.
User can also according to different needs be adjusted the color of light efficiency, direction and intensity, not limit herein. For example, user can adjust the color of light efficiency by electronic equipment, the intensity of light efficiency can also be adjusted, to add different face The light efficiency of color and intensity.Specifically, user can input triggering command by electronic equipment, and electronic equipment is obtained according to triggering command Light efficiency is taken to enhance one or more in direction, light efficiency intensity factor and light efficiency color factor, and enhance direction, light according to light efficiency Effect intensity factor and light efficiency color factor in it is one or more come build light efficiency enhance model.
In one embodiment, according to image obtain light efficiency intensity factor when, obtain light efficiency intensity factor the step of it is specific May include:
Step 602, the brightness value for obtaining each pixel in pending image is obtained according to brightness value from pending image Take reference image vegetarian refreshments.
Brightness value can indicate the bright-dark degree of pixel in pending image, if the brightness value of pixel is too big, Illustrate that the pixel is excessively bright.The higher pixel of brightness value is influenced bigger by light efficiency enhancing processing.Therefore work as pixel Brightness value it is relatively high when, it is necessary to correspondingly reduce light efficiency enhancing processing intensity.It specifically, can be according to the bright of pixel Angle value chooses reference image vegetarian refreshments, and obtains light efficiency intensity factor according to the brightness value of reference image vegetarian refreshments.Reference image vegetarian refreshments is general It is the bigger pixel of brightness value, then specifically corresponding brightness in pending image can be worth maximum pixel as reference Pixel;Or corresponding brightness value in pending image is more than to the pixel of the second luminance threshold, as with reference to pixel.
Step 604, light efficiency intensity factor is obtained according to the corresponding brightness value of reference image vegetarian refreshments.
Reference image vegetarian refreshments is the higher pixel of brightness in pending image, higher referring generally to the brightness value of pixel, To avoid image excessive distortion, the intensity of light efficiency enhancing processing will be lower.Specifically, the brightness value of reference image vegetarian refreshments is higher, Light efficiency intensity factor will be smaller.Electronic equipment can pre-set pair of the brightness value and light efficiency intensity factor of reference image vegetarian refreshments It should be related to, corresponding light efficiency intensity factor can be obtained according to the brightness value of reference image vegetarian refreshments.For example, by bright in pending image The maximum pixel of angle value be used as with reference to pixel when, so that it may with obtained according to the maximum brightness value corresponding light efficiency intensity because Son.When corresponding brightness value in pending image to be more than to the pixel of the second luminance threshold as with reference to pixel, so that it may with The average brightness for calculating reference image vegetarian refreshments obtains corresponding light efficiency intensity factor further according to average brightness.
The image processing method that above-described embodiment provides can obtain electronics when electronic equipment acquires pending image and set Standby residing geographical location and acquisition moment, and go to obtain light efficiency enhancing model with the moment is acquired according to geographical location, according to light Effect enhancing model to carry out light efficiency enhancing processing to pending image.Electronic equipment is when progress light efficiency enhancing is handled in this way It waits, different processing can be carried out according to different positions and moment, improve the accuracy of image procossing.
It should be understood that although each step in the flow chart of Fig. 2,3,5,6 is shown successively according to the instruction of arrow, But these steps are not the inevitable sequence indicated according to arrow to be executed successively.Unless expressly state otherwise herein, these There is no stringent sequences to limit for the execution of step, these steps can execute in other order.Moreover, in Fig. 2,3,5,6 At least part step may include multiple sub-steps either these sub-steps of multiple stages or stage be not necessarily Synchronization executes completion, but can execute at different times, and the execution sequence in these sub-steps or stage also need not Be so carry out successively, but can with other steps either the sub-step of other steps or at least part in stage in turn or Person alternately executes.
Fig. 7 is the structural schematic diagram of image processing apparatus in one embodiment.As shown in fig. 7, the image processing apparatus 700 Enhance module 706 including image capture module 702, model acquisition module 704 and light efficiency.Wherein:
Image capture module 702, for obtaining geographical location residing when electronic equipment acquires pending image and right The acquisition moment answered.
Model acquisition module 704 enhances model, the light for obtaining light efficiency according to the geographical location and acquisition moment Effect enhancing model is the model for simulating light variation.
Light efficiency enhances module 706, and light efficiency enhancing is carried out to the pending image for enhancing model according to the light efficiency Processing.
The image processing apparatus that above-described embodiment provides can obtain electronics when electronic equipment acquires pending image and set Standby residing geographical location and acquisition moment, and go to obtain light efficiency enhancing model with the moment is acquired according to geographical location, according to light Effect enhancing model to carry out light efficiency enhancing processing to pending image.Electronic equipment is when progress light efficiency enhancing is handled in this way It waits, different processing can be carried out according to different positions and moment, improve the accuracy of image procossing.
In one embodiment, image capture module 702 is additionally operable to obtain ring when electronic equipment acquires pending image Border brightness value;If the ambient brightness value is less than the first luminance threshold, obtain residing when the electronic equipment pending image of acquisition Geographical location and the corresponding acquisition moment.
In one embodiment, model acquisition module 704 determines that light efficiency enhances according to the geographical location and acquisition moment Direction enhances direction according to the light efficiency and determines light efficiency strength model.
In one embodiment, model acquisition module 704 determines that light efficiency enhances according to the geographical location and acquisition moment Direction;Light efficiency intensity factor is obtained, the light efficiency intensity factor is the parameter for influencing light efficiency enhancing processing intensity;According to the light Effect enhancing direction and light efficiency intensity factor, which obtain light efficiency, enhances model.
In one embodiment, model acquisition module 704 obtains the brightness value of each pixel in pending image, according to The brightness value obtains reference image vegetarian refreshments from the pending image;It is obtained according to the corresponding brightness value of the reference image vegetarian refreshments Light efficiency intensity factor.
In one embodiment, corresponding brightness in the pending image is worth maximum pixel by model acquisition module 704 Point is as with reference to pixel;Or corresponding brightness value in the pending image is more than to the pixel of the second luminance threshold, as Reference image vegetarian refreshments.
In one embodiment, light efficiency enhancing module 706 enhances the model acquisition pending image according to the light efficiency In the corresponding light efficiency of each pixel enhance coefficient, and coefficient is enhanced to each picture in the pending image according to the light efficiency Vegetarian refreshments carries out light efficiency enhancing processing.
The division of modules is only used for for example, in other embodiments, can will scheme in above-mentioned image processing apparatus As processing unit is divided into different modules as required, to complete all or part of function of above-mentioned image processing apparatus.
The embodiment of the present application also provides a kind of computer readable storage mediums.One or more is executable comprising computer The non-volatile computer readable storage medium storing program for executing of instruction, when the computer executable instructions are executed by one or more processors When so that the processor executes the image processing method of above-described embodiment offer.
A kind of computer program product including instruction, when run on a computer so that computer executes above-mentioned The image processing method that embodiment provides.
The embodiment of the present application also provides a kind of electronic equipment.Above-mentioned electronic equipment includes image processing circuit, at image Managing circuit can utilize hardware and or software component to realize, it may include define ISP (Image Signal Processing, figure As signal processing) the various processing units of pipeline.Fig. 8 is the schematic diagram of image processing circuit in one embodiment.Such as Fig. 8 institutes Show, for purposes of illustration only, only showing the various aspects with the relevant image processing techniques of the embodiment of the present application.
As shown in figure 8, image processing circuit includes ISP processors 840 and control logic device 850.Imaging device 810 captures Image data handled first by ISP processors 840, ISP processors 840 to image data analyzed with capture can be used for really The image statistics of fixed and/or imaging device 810 one or more control parameters.Imaging device 810 may include thering is one The camera of a or multiple lens 812 and imaging sensor 814.Imaging sensor 814 may include colour filter array (such as Bayer filters), imaging sensor 814 can obtain the luminous intensity captured with each imaging pixel of imaging sensor 814 and wavelength Information, and the one group of raw image data that can be handled by ISP processors 840 is provided.Sensor 820 (such as gyroscope) can be based on passing The parameter (such as stabilization parameter) of the image procossing of acquisition is supplied to ISP processors 840 by 820 interface type of sensor.Sensor 820 Interface can utilize SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imager framework) interface, The combination of other serial or parallel camera interfaces or above-mentioned interface.
In addition, raw image data can be also sent to sensor 820 by imaging sensor 814, sensor 820 can be based on passing 820 interface type of sensor is supplied to ISP processors 840 or sensor 820 to deposit raw image data raw image data It stores up in video memory 830.
ISP processors 840 handle raw image data pixel by pixel in various formats.For example, each image pixel can Bit depth with 8,10,12 or 14 bits, ISP processors 840 can carry out raw image data at one or more images Reason operation, statistical information of the collection about image data.Wherein, image processing operations can be by identical or different bit depth precision It carries out.
ISP processors 840 can also receive image data from video memory 830.For example, 820 interface of sensor will be original Image data is sent to video memory 830, and the raw image data in video memory 830 is available to ISP processors 840 It is for processing.Video memory 830 can be independent special in a part, storage device or electronic equipment for memory device With memory, and it may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving from 814 interface of imaging sensor or from 820 interface of sensor or from video memory 830 When raw image data, ISP processors 840 can carry out one or more image processing operations, such as time-domain filtering.Treated schemes As data can be transmitted to video memory 830, to carry out other processing before shown.ISP processors 840 can also be from Video memory 830 receives processing data, is carried out in original domain and in RGB and YCbCr color spaces to the processing data Image real time transfer.Image data that treated may be output to display 880, so that user watches and/or by graphics engine Or GPU (Graphics Processing Unit, graphics processor) is further processed.In addition, the output of ISP processors 840 It also can be transmitted to video memory 830, and display 880 can read image data from video memory 830.In one embodiment In, video memory 830 can be configured as realizing one or more frame buffers.In addition, the output of ISP processors 840 can be sent out Encoder/decoder 870 is given, so as to encoding/decoding image data.The image data of coding can be saved, and be shown in It is decompressed before in 880 equipment of display.
ISP processors 840 handle image data the step of include:To image data carry out VFE (Video Front End, Video front) it handles and CPP (Camera Post Processing, camera post-processing) processing.At the VFE of image data Reason may include the contrast for correcting image data or brightness, change the illumination conditions data recorded in a digital manner, to picture number According to compensate processing (such as white balance, automatic growth control, γ correction etc.), image data is filtered.To figure As the CPP processing of data may include zooming in and out image, provide preview frame and record frame to each path.Wherein, CPP can make Preview frame and record frame are handled with different codecs.Treated that image data can be transmitted to light efficiency for ISP processors 840 Processing module 860, to carry out light efficiency enhancing processing to image before shown.Wherein, light efficiency processing module 860 can be to move CPU (Central Processing Unit, central processing unit), GPU or coprocessor etc. in dynamic terminal.Light efficiency processing module 860 treated that data can be transmitted to encoder/decoder 870, so as to encoding/decoding image data.The image data of coding It can be saved, and decompressed before being shown in 880 equipment of display.Wherein, light efficiency processing module 860 may be additionally located at coding Between device/decoder 870 and display 880, i.e., light efficiency enhancing module 860 carries out light efficiency enhancing processing to the image being imaged. Above-mentioned encoder/decoder 870 can be CPU, GPU or coprocessor etc. in mobile terminal.
The statistical data that ISP processors 840 determine, which can be transmitted, gives control logic device Unit 850.For example, statistical data can wrap Include the image sensings such as automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 812 shadow correction of lens 814 statistical information of device.Control logic device 850 may include the processor and/or micro-control that execute one or more routines (such as firmware) Device processed, one or more routines according to the statistical data of reception, can determine control parameter and the ISP processing of imaging device 810 The control parameter of device 840.For example, the control parameter of imaging device 810 may include 820 control parameter of sensor (such as gain, expose The time of integration of photocontrol), camera flash control parameter, 812 control parameter of lens (such as focus or zoom focal length) or The combination of these parameters.ISP control parameters may include for automatic white balance and color adjustment (for example, during RGB processing) 812 shadow correction parameter of gain level and color correction matrix and lens.
Image processing method as described above can be realized with image processing techniques in Fig. 8.
Used in this application may include to any reference of memory, storage, database or other media is non-volatile And/or volatile memory.Suitable nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), Electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include arbitrary access Memory (RAM), it is used as external cache.By way of illustration and not limitation, RAM is available in many forms, such as It is static RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM).
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously Cannot the limitation to the application the scope of the claims therefore be interpreted as.It should be pointed out that for those of ordinary skill in the art For, under the premise of not departing from the application design, various modifications and improvements can be made, these belong to the guarantor of the application Protect range.Therefore, the protection domain of the application patent should be determined by the appended claims.

Claims (10)

1. a kind of image processing method, which is characterized in that including:
It obtains electronic equipment and acquires geographical location residing when pending image and corresponding acquisition moment;
Obtaining light efficiency according to the geographical location and acquisition moment enhances model, and the light efficiency enhancing model is simulation light variation Model;
Enhance model according to the light efficiency and light efficiency enhancing processing is carried out to the pending image.
2. according to the method described in claim 1, it is characterized in that, the acquisition electronic equipment acquire pending image when it is residing Geographical location and the corresponding acquisition moment, including:
Obtain ambient brightness value when electronic equipment acquires pending image;
If the ambient brightness value is less than the first luminance threshold, obtains electronic equipment and acquire geography residing when pending image Position and corresponding acquisition moment.
3. according to the method described in claim 1, it is characterized in that, described obtain light according to the geographical location and acquisition moment Effect enhancing model, including:
Determine that light efficiency enhances direction according to the geographical location and acquisition moment, enhancing direction according to the light efficiency determines that light efficiency is strong Spend model.
4. according to the method described in claim 1, it is characterized in that, described obtain light according to the geographical location and acquisition moment Effect enhancing model, including:
Determine that light efficiency enhances direction according to the geographical location and acquisition moment;
Light efficiency intensity factor is obtained, the light efficiency intensity factor is the parameter for influencing light efficiency enhancing processing intensity;
Enhance direction according to the light efficiency and light efficiency intensity factor obtains light efficiency and enhances model.
5. according to the method described in claim 4, it is characterized in that, the acquisition light efficiency intensity factor, including:
The brightness value for obtaining each pixel in pending image obtains ginseng according to the brightness value from the pending image Examine pixel;
Light efficiency intensity factor is obtained according to the corresponding brightness value of the reference image vegetarian refreshments.
6. according to the method described in claim 5, it is characterized in that, it is described according to the brightness value from the pending image Reference image vegetarian refreshments is obtained, including:
Corresponding brightness in the pending image is worth maximum pixel as with reference to pixel;Or
Corresponding brightness value in the pending image is more than to the pixel of the second luminance threshold, as with reference to pixel.
7. method according to any one of claim 1 to 6, which is characterized in that described to enhance model according to the light efficiency Light efficiency enhancing processing is carried out to the pending image, including:
Enhance coefficient, and root according to the corresponding light efficiency of each pixel in the light efficiency enhancing model acquisition pending image Enhance coefficient according to the light efficiency and light efficiency enhancing processing is carried out to each pixel in the pending image.
8. a kind of image processing apparatus, which is characterized in that including:
Image capture module, for obtaining geographical location residing when electronic equipment acquires pending image and corresponding adopting Collect the moment;
Model acquisition module enhances model, the light efficiency enhancing for obtaining light efficiency according to the geographical location and acquisition moment Model is the model for simulating light variation;
Light efficiency enhances module, and light efficiency enhancing processing is carried out to the pending image for enhancing model according to the light efficiency.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt The method as described in any one of claim 1 to 7 is realized when processor executes.
10. a kind of electronic equipment, including memory and processor, computer-readable instruction is stored in the memory, it is described When instruction is executed by the processor so that the processor executes the method as described in any one of claim 1 to 7.
CN201810466604.3A 2018-05-16 2018-05-16 Image processing method, image processing device, computer-readable storage medium and electronic equipment Active CN108600631B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810466604.3A CN108600631B (en) 2018-05-16 2018-05-16 Image processing method, image processing device, computer-readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810466604.3A CN108600631B (en) 2018-05-16 2018-05-16 Image processing method, image processing device, computer-readable storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN108600631A true CN108600631A (en) 2018-09-28
CN108600631B CN108600631B (en) 2021-03-12

Family

ID=63631332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810466604.3A Active CN108600631B (en) 2018-05-16 2018-05-16 Image processing method, image processing device, computer-readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN108600631B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109712177A (en) * 2018-12-25 2019-05-03 Oppo广东移动通信有限公司 Image processing method, device, electronic equipment and computer readable storage medium
CN111178118A (en) * 2018-11-13 2020-05-19 浙江宇视科技有限公司 Image acquisition processing method and device and computer readable storage medium
CN112511737A (en) * 2020-10-29 2021-03-16 维沃移动通信有限公司 Image processing method and device, electronic equipment and readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101532881A (en) * 2009-04-03 2009-09-16 合肥工业大学 Single factor atmospheric polarization modeling method based on Rayleigh scattering
KR101066734B1 (en) * 2010-06-21 2011-09-21 중앙대학교 산학협력단 Method and apparatus for texture segmentation based on multi-scale entropy profile
CN102999890A (en) * 2011-09-09 2013-03-27 苏州普达新信息技术有限公司 Method for dynamically calibrating image light intensity on basis of environmental factors
CN103632351A (en) * 2013-12-16 2014-03-12 武汉大学 All-weather traffic image enhancement method based on brightness datum drift
CN106557617A (en) * 2016-10-27 2017-04-05 北京航空航天大学 A kind of clear sky fixed-wing solar energy unmanned plane energy production power estimation method
CN107682685A (en) * 2017-10-30 2018-02-09 广东欧珀移动通信有限公司 White balancing treatment method and device, electronic installation and computer-readable recording medium
CN107689031A (en) * 2016-08-03 2018-02-13 天津慧医谷科技有限公司 Color restoration method based on illumination compensation in tongue picture analysis
CN107767348A (en) * 2017-09-27 2018-03-06 重庆大学 Single width tunnel image quick enhancement method based on imaging model constraint

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101532881A (en) * 2009-04-03 2009-09-16 合肥工业大学 Single factor atmospheric polarization modeling method based on Rayleigh scattering
KR101066734B1 (en) * 2010-06-21 2011-09-21 중앙대학교 산학협력단 Method and apparatus for texture segmentation based on multi-scale entropy profile
CN102999890A (en) * 2011-09-09 2013-03-27 苏州普达新信息技术有限公司 Method for dynamically calibrating image light intensity on basis of environmental factors
CN103632351A (en) * 2013-12-16 2014-03-12 武汉大学 All-weather traffic image enhancement method based on brightness datum drift
CN107689031A (en) * 2016-08-03 2018-02-13 天津慧医谷科技有限公司 Color restoration method based on illumination compensation in tongue picture analysis
CN106557617A (en) * 2016-10-27 2017-04-05 北京航空航天大学 A kind of clear sky fixed-wing solar energy unmanned plane energy production power estimation method
CN107767348A (en) * 2017-09-27 2018-03-06 重庆大学 Single width tunnel image quick enhancement method based on imaging model constraint
CN107682685A (en) * 2017-10-30 2018-02-09 广东欧珀移动通信有限公司 White balancing treatment method and device, electronic installation and computer-readable recording medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111178118A (en) * 2018-11-13 2020-05-19 浙江宇视科技有限公司 Image acquisition processing method and device and computer readable storage medium
CN111178118B (en) * 2018-11-13 2023-07-21 浙江宇视科技有限公司 Image acquisition processing method, device and computer readable storage medium
CN109712177A (en) * 2018-12-25 2019-05-03 Oppo广东移动通信有限公司 Image processing method, device, electronic equipment and computer readable storage medium
CN112511737A (en) * 2020-10-29 2021-03-16 维沃移动通信有限公司 Image processing method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN108600631B (en) 2021-03-12

Similar Documents

Publication Publication Date Title
CN107948519B (en) Image processing method, device and equipment
CN108805103A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN108734676A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN110149482A (en) Focusing method, device, electronic equipment and computer readable storage medium
US11431915B2 (en) Image acquisition method, electronic device, and non-transitory computer readable storage medium
CN108712608B (en) Terminal equipment shooting method and device
CN108012080A (en) Image processing method, device, electronic equipment and computer-readable recording medium
CN107948538B (en) Imaging method, imaging device, mobile terminal and storage medium
CN108055452A (en) Image processing method, device and equipment
CN110213494B (en) Photographing method and device, electronic equipment and computer readable storage medium
CN109191403A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN108810418A (en) Image processing method, device, mobile terminal and computer readable storage medium
CN108616700B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN108717530A (en) Image processing method, device, computer readable storage medium and electronic equipment
CN110536068A (en) Focusing method and device, electronic equipment, computer readable storage medium
CN108024054A (en) Image processing method, device and equipment
CN110290323A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN108198152A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN108419022A (en) Control method, control device, computer readable storage medium and computer equipment
CN107800971B (en) Auto-exposure control processing method, device and the equipment of pan-shot
CN107509044A (en) Image combining method, device, computer-readable recording medium and computer equipment
WO2020029679A1 (en) Control method and apparatus, imaging device, electronic device and readable storage medium
CN108804658A (en) Image processing method and device, storage medium, electronic equipment
CN110121031A (en) Image-pickup method and device, electronic equipment, computer readable storage medium
CN108600631A (en) Image processing method, device, computer readable storage medium and electronic equipment

Legal Events

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