CN106412457B - A kind of image processing method and mobile terminal - Google Patents

A kind of image processing method and mobile terminal Download PDF

Info

Publication number
CN106412457B
CN106412457B CN201610927813.4A CN201610927813A CN106412457B CN 106412457 B CN106412457 B CN 106412457B CN 201610927813 A CN201610927813 A CN 201610927813A CN 106412457 B CN106412457 B CN 106412457B
Authority
CN
China
Prior art keywords
image
mobile terminal
gray
pixel
brightness
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610927813.4A
Other languages
Chinese (zh)
Other versions
CN106412457A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201610927813.4A priority Critical patent/CN106412457B/en
Publication of CN106412457A publication Critical patent/CN106412457A/en
Application granted granted Critical
Publication of CN106412457B publication Critical patent/CN106412457B/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/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals

Abstract

The present invention provides a kind of image processing method and mobile terminal, wherein and this method is applied to the mobile terminal with camera and flash lamp, this method comprises: under the conditions of obtaining flash lighting, the first image captured by the camera of mobile terminal;Greyscale transform process is carried out to the first image according to pre-set greyscale transformation function, obtains uniform second image of brightness of image, wherein greyscale transformation function is used to carry out greyscale transformation to image, to adjust brightness of image.Image processing method and mobile terminal provided in an embodiment of the present invention, enable to the brightness of image shot in the case of light filling uniform, solve the problems, such as that shadow phenomenon occurs in image edge, promote user and take pictures experience.

Description

A kind of image processing method and mobile terminal
Technical field
The present invention relates to field of communication technology, a kind of image processing method and mobile terminal are particularly related to.
Background technique
In current mobile phone photograph, in order to make up dark situation daylighting deficiency problem, often use flash lamp for clap Take the photograph light filling.The luminous of flash lamp is approximately Lambertian radiation, and light emitting angle is too big, for the camera of limited angle, light source Utilization rate is insufficient, currently, most of is that Fresnel Lenses is added in front of the light-emitting surface of flash lamp to carry out optically focused, to improve flash lamp Light emitting angle excessively disperse and imaging region luminance shortage problem.But since Fresnel Lenses is while optically focused, irradiation The intensity distribution of degree is (on the vertical center line that center is normally at Fresnel Lenses) constantly weakened around from central point, This light filling effect that flash lamp is formed is that central area brightness is high, and deviates that center is remoter, and light filling amount is fewer.As a result, Camera shooting institute at image will appear shadow phenomenon in image border, and sensitive volume is especially especially on four far from center angle Deficiency forms apparent luminance contrast.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of image processing method and mobile terminal, with solve it is existing There is the problem of shadow phenomenon in bring of taking pictures in the case of light compensating lamp light filling imaging edge.
In a first aspect, the embodiment of the present invention provides a kind of image processing method, applied to camera and flash lamp Mobile terminal, this method comprises:
Under the conditions of obtaining flash lighting, the first image captured by the camera of mobile terminal;
First image is subjected to greyscale transform process according to pre-set greyscale transformation function, it is uniform to obtain brightness of image The second image, wherein greyscale transformation function be used for image carry out greyscale transformation, to adjust brightness of image.
Second aspect, the embodiment of the present invention provide a kind of mobile terminal, which has camera and flash lamp, should Mobile terminal includes:
First obtains module, under the conditions of obtaining flash lighting, the first figure captured by the camera of mobile terminal Picture;
First processing module, for carrying out at greyscale transformation the first image according to pre-set greyscale transformation function Reason, obtains uniform second image of brightness of image, wherein greyscale transformation function is used to carry out greyscale transformation to image, to adjust Brightness of image.
Image processing method and mobile terminal provided in an embodiment of the present invention, by being moved under the conditions of acquisition flash lighting First image captured by the camera of terminal;First image is subjected to greyscale transformation according to pre-set greyscale transformation function Processing, obtains uniform second image of brightness of image, wherein greyscale transformation function is used to carry out greyscale transformation to image, to adjust Section brightness of image is able to solve image edge and shadow phenomenon occurs so that the brightness of image shot in the case of light filling is uniform The problem of, it promotes user and takes pictures experience.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, needed in being described below to the embodiment of the present invention Attached drawing to be used is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, For those of ordinary skill in the art, without any creative labor, it can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 shows the flow charts for the image processing method that the embodiment of the present invention one provides;
Fig. 2 a indicates the flow chart of image processing method provided by Embodiment 2 of the present invention;
Fig. 2 b indicates a kind of flow chart of step 205 in image processing method provided by Embodiment 2 of the present invention;
Fig. 2 c indicates another flow chart of step 205 in image processing method provided by Embodiment 2 of the present invention;
Fig. 3 indicates the ash that pixel on third gray level image is obtained in image processing method provided by Embodiment 2 of the present invention The schematic diagram of angle value;
Fig. 4 indicates the flow chart for the image processing method that the embodiment of the present invention three provides;
Fig. 5 indicates a kind of structural block diagram for the mobile terminal that the embodiment of the present invention four provides;
Fig. 6 indicates a kind of structural block diagram for the mobile terminal that the embodiment of the present invention five provides;
Fig. 7 indicates a kind of structural block diagram for the mobile terminal that the embodiment of the present invention six provides.
Specific embodiment
To keep the technical problem to be solved in the present invention, technical solution and advantage clearer, below in conjunction with attached drawing and tool Body embodiment is described in detail.
Embodiment one
Referring to Figure 1, the flow chart for the image processing method that the embodiment of the present invention one provides is shown, the present invention is real It applies example one and a kind of image processing method is provided, applied to the mobile terminal with camera and flash lamp, this method may include Following steps:
Step 101, under the conditions of obtaining flash lighting, the first image captured by the camera of mobile terminal.
In the step, when mobile terminal shooting, locating ambient brightness is insufficient, and flash lamp starting is being dodged at this point, obtaining Under light lamp lighting condition, image captured by the camera of mobile terminal, i.e. the first image.Wherein, the starting of flash lamp can be with The control starting when detecting current environment brightness lower than a preset threshold by mobile terminal, can also be by user according to using need Ask starting.In addition, the situation that flash lighting is shot is opened in the case where shooting local environment brightness sufficiency, this Embodiment is equally applicable.
Step 102, the first image is subjected to greyscale transform process according to pre-set greyscale transformation function, obtains image Second image of brightness uniformity, wherein greyscale transformation function is used to carry out greyscale transformation to image, to adjust brightness of image.
In the step, it is previously provided with greyscale transformation function, which reflects each pixel on shooting image Corresponding relationship between the gray value of point and gray value needed for meeting brightness, for carrying out greyscale transformation to image, to adjust The brightness of image of captured image under the conditions of flash lighting.Here, by by the first image captured by camera according to Greyscale transformation function carries out greyscale transform process and obtains the second image, so that the figure shot under the conditions of flash lighting Image brightness is uniform, avoids image edge and shadow phenomenon occurs.
In addition, in actual use, due to being to scheme according to greyscale transform process of the greyscale transformation function to the first image As carrying out before imaging, therefore, the second image obtained after processing can retain highlights domain and dim light area on first image The details in domain, so as to the operation of other later images processing.
Wherein, since in actual photographed, there may be deviations for ambient brightness when shooting every time, therefore, to image It carries out needing ambient brightness factor when considering shooting when greyscale transform process.In some alternative embodiments, in step 101, under the conditions of obtaining flash lighting, the step of the first image captured by the camera of mobile terminal after, step 102, First image is subjected to greyscale transform process according to pre-set greyscale transformation function, obtains uniform second figure of brightness of image Before the step of picture, this method can also include: first environment brightness when obtaining camera shooting;According to pre-set ring The corresponding relationship of border brightness and gain level determines the first gain level corresponding with first environment brightness;According to the first gain Grade determines greyscale transformation function corresponding with the first gain level.
In addition, under normal circumstances, flash lamp for shooting the light filling effect of image, by shooting main body apart from camera away from From influence, when the image that shoots under the conditions of to flash lighting as a result, carries out greyscale transform process, equally by shooting main body away from It is influenced with a distance from camera.In some alternative embodiments, mobile under the conditions of obtaining flash lighting in step 101 After the step of first image captured by the camera of terminal, step 102, the first image is become according to pre-set gray scale Before the step of exchange the letters number carries out greyscale transform process, obtains brightness of image uniform second image, this method can also include: Focusing information when camera shooting is obtained, and first distance value of the shooting main body apart from camera is determined according to focusing information; According to the corresponding relationship of pre-set distance value and gain level, the second gain level corresponding with first distance value is determined; According to the second gain level, greyscale transformation function corresponding with the second gain level is determined.
In practical applications, it can be taken into account when carrying out greyscale transform process to the first image that shooting obtains and consider above-mentioned ring The distance factor of border luminance factor and shooting main body distance camera shooting, so as to avoid directly carrying out greyscale transformation to the first image Handle the problem for bringing border area noise excessively obvious.
The image processing method that the embodiment of the present invention one provides, under the conditions of obtaining flash lighting, mobile terminal First image captured by camera;First image is subjected to greyscale transform process according to pre-set greyscale transformation function, Obtain uniform second image of brightness of image, wherein greyscale transformation function is used to carry out greyscale transformation to image, to adjust image Brightness is able to solve image edge and the problem of shadow phenomenon occurs so that the brightness of image shot in the case of light filling is uniform, User is promoted to take pictures experience.
Embodiment two
Fig. 2 a is referred to, shows the flow chart of image processing method provided by Embodiment 2 of the present invention, the present invention Embodiment two provides a kind of image processing method, and applied to the mobile terminal with camera and flash lamp, this method be can wrap Include following steps:
Step 201, under the conditions of obtaining flash lighting, the first image captured by the camera of mobile terminal.
In the step, when mobile terminal shooting, locating ambient brightness is insufficient, and flash lamp starting is being dodged at this point, obtaining Under light lamp lighting condition, image captured by the camera of mobile terminal, i.e. the first image.Wherein, the starting of flash lamp can be with Started automatically by mobile terminal when detecting current environment brightness lower than a preset threshold, it can also be by user according to using need Ask starting.In addition, the situation that flash lighting is shot is opened in the case where shooting local environment brightness sufficiency, this Embodiment is equally applicable.
Step 202, first environment brightness when camera shooting is obtained.
Step 203, according to the corresponding relationship of pre-set ambient brightness and gain level, determining and first environment brightness Corresponding first gain level.
Step 204, according to the first gain level, greyscale transformation function corresponding with the first gain level is determined.
In above-mentioned steps, be previously provided with the corresponding relationship of ambient brightness and gain level, due to shooting environmental it is bright The increase of degree, shooting can gradually be weakened at dark angle (shadow) phenomenon of image, it is therefore, when ambient brightness is bigger, then corresponding Gain level is bigger, and when ambient brightness is smaller, then corresponding gain level is smaller.Wherein, it is contemplated that operation possibility can be The corresponding relationship of multiple predetermined luminance ranges Yu multiple gain levels is preset, specifically, where determining first environment brightness The first predetermined luminance range, and obtain corresponding first gain level.Wherein, which reflects shooting image Corresponding relationship between gray value needed for going up the gray value of each pixel and meeting brightness, for carrying out gray scale change to image It changes, to adjust the brightness of image of captured image under the conditions of flash lighting.In addition, ambient brightness when for shooting, it can To be obtained based on prior art detection, not limited here using sensor devices such as the photosensitive sensors configured on mobile terminal It is fixed.In addition, it should be noted that, the ambient brightness in the embodiment of the present invention refers to outside locating for mobile terminal (surrounding) ring The brightness in border, for the embodiment of the present invention, it can be understood as, the brightness of ambient enviroment when not opening flash lighting.
Step 205, the first image is subjected to greyscale transform process according to pre-set greyscale transformation function, obtains image Second image of brightness uniformity.
In the step, by the way that the first image captured by camera is carried out greyscale transform process according to greyscale transformation function And the second image is obtained, so that the brightness of image shot under the conditions of flash lighting is uniform, avoids image edge and go out Existing shadow phenomenon, and the balance between luminance uniformity and noise can be taken into account.In addition, in actual use, due to basis Greyscale transformation function to the greyscale transform process of the first image is carried out before image is imaged, therefore, the obtained after processing Two images can retain the details in highlights domain and low light region on first image.
Wherein, b referring to fig. 2, in some alternative embodiments, step 205, by the first image according to pre-set The step of greyscale transformation function carries out greyscale transform process, obtains brightness of image uniform second image may include:
Step 2051, the first image is converted into the first gray level image, and obtains the of each pixel of the first gray level image One gray value, and, each pixel is at a distance from the first gray level image center;
Step 2052, according to the first gray value and distance, according to greyscale transformation function by each pixel of the first gray level image First gray value of point is transformed to corresponding second gray value respectively, obtains transformed second gray level image;
Step 2053, it is RGB image by the second greyscale image transitions, obtains the second image.
Here, the first image and the second image are the image of rgb format, and the first image is transformed to the first grayscale image first Picture, first gray level image can be HSI image;Then the pixel data of each pixel of the first gray level image, i.e., first are obtained Gray value, and, distance of each pixel relative to picture centre;The first gray value then according to each pixel and away from From, according to greyscale transformation function by the first gray value of pixel each on the first gray level image be transformed to it is corresponding meet it is bright Gray value (i.e. the second gray value) needed for degree, obtains the second gray level image.Wherein, it is being by second greyscale image transitions RGB image, so that treated, image is consistent with the picture format before processing, will not be to the image of the other forms in later period Processing causes additional effect.
Alternatively, c referring to fig. 2, in some alternative embodiments, step 205, by the first image according to pre-set The step of greyscale transformation function carries out greyscale transform process, obtains brightness of image uniform second image may include:
Step 2054, the transformational relation based on gray level image and RGB image carries out conversion process to greyscale transformation function, Transforming function transformation function after being converted;
Step 2055, the first pixel data of each pixel of the first image is obtained, and, in each pixel and the first image The distance of the heart;
Step 2056, according to the first pixel data and distance, according to the transforming function transformation function after conversion to each picture of the first image First pixel data of vegetarian refreshments is converted, and the second image is obtained.
Here, the first image and the second image are the image of rgb format, first by greyscale transformation function according to gray level image Conversion process is carried out with the transformational relation of RGB image, obtains the transforming function transformation function suitable for RGB image;Then the first image is obtained The pixel data of each pixel, i.e. the first pixel data, and, distance of each pixel relative to picture centre;Further according to each The first pixel data and distance of pixel, according to the transforming function transformation function after conversion process by the of pixel each on the first image One transforming pixel data be it is corresponding meet brightness needed for pixel data, obtain the second image.Wherein, to the first figure When as progress greyscale transform process and picture format is had not been changed, the image procossing of the other forms in later period will not be impacted.
In addition, in some alternative embodiments, step 201, under the conditions of obtaining flash lighting, mobile terminal is taken the photograph Before the step of the first image as captured by head, this method may also comprise the following steps::
In default ambient brightness and flash lamp starting, the third image of camera shooting standard white plate is obtained.
Here, dark surrounds can be referred to as in the default ambient brightness for being lower than a predetermined luminance threshold value first, and used Under conditions of flash lighting, the image that standard white plate obtains most original, i.e. third image are shot by camera.Wherein, In embodiments of the present invention, which can need according to actual design or empirical value determines, be not construed as limiting here.
Third image is converted into third gray level image.
Here, third image is converted into gray level image, i.e. third gray level image, in order to each picture in subsequent acquisition image The Luminance Distribution of vegetarian refreshments.
Using the center of third gray level image as the center of circle, determining multiple concentric circles with circle center distance different radii are obtained every The gray value of multiple pixels on one concentric circle, and the gray value for calculating pixel on each concentric circle is equal Value.
Here, it referring to Fig. 3, in advance using the center of third gray level image (label 30 in Fig. 3) as the center of circle, divides multiple and different Then the concentric circles of radius, distance radius are obtained on third gray level image, the multiple and different radiuses in range image center by R1~Rn The gray value of multiple pixels on the circumference of concentric circles, i.e., respectively on each concentric circle of acquisition distance radius R1~Rn The gray value of multiple pixels, and according to the gray value of multiple pixels on each concentric circles, it calculates on each concentric circle The gray value mean value of pixel obtained respectively as the corresponding gray value calibration value of pixel on each concentric circle with this The corresponding Luminance Distribution of radius.
According to default gray value, gray value mean value and respective radius, fitting obtains greyscale transformation function.
Here, which indicates the corresponding gray value of image for meeting brightness requirement, in general, meeting brightness requirement Image on each pixel gray value it is identical.The default gray value can first pass through multiple groups experimental data in advance and obtain, can also root It is preset according to historical experience.Specifically, default gray value, gray value mean value and respective radius are depicted as line chart, then Fitting obtains greyscale transformation function.
Furthermore it is possible to by third image according to the greyscale transformation function carry out greyscale transformation with to the greyscale transformation function into Row debugging optimization, after repeatedly debugging optimization, is obtaining final greyscale transformation function.
Image processing method provided by Embodiment 2 of the present invention, under the conditions of obtaining flash lighting, mobile terminal First image captured by camera;Obtain first environment brightness when camera shooting;According to pre-set ambient brightness With the corresponding relationship of gain level, the first gain level corresponding with first environment brightness is determined;According to the first gain level, really Fixed greyscale transformation function corresponding with the first gain level;First image is subjected to ash according to pre-set greyscale transformation function Conversion process is spent, uniform second image of brightness of image is obtained, so that the brightness of image shot in the case of light filling is uniform, energy It enough solves the problems, such as that shadow phenomenon occurs in image edge, and the balance between luminance uniformity and noise can be taken into account, promoted User takes pictures experience.
Embodiment three
Referring to fig. 4, the flow chart for the image processing method that the embodiment of the present invention three provides is shown, the present invention is implemented Example three provides a kind of image processing method, applied to the mobile terminal with camera and flash lamp, this method may include with Lower step:
Step 401, under the conditions of obtaining flash lighting, the first image captured by the camera of mobile terminal.
In the step, when mobile terminal shooting, locating ambient brightness is insufficient, and flash lamp starting is being dodged at this point, obtaining Under light lamp lighting condition, image captured by the camera of mobile terminal, i.e. the first image.Wherein, the starting of flash lamp can be with Started automatically by mobile terminal when detecting current environment brightness lower than a preset threshold, it can also be by user according to using need Ask starting.In addition, the situation that flash lighting is shot is opened in the case where shooting local environment brightness sufficiency, this Embodiment is equally applicable.
Step 402, focusing information when camera shooting is obtained, and shooting main body distance camera shooting is determined according to focusing information The first distance value of head.
Step 403, according to the corresponding relationship of pre-set distance value and gain level, determination is corresponding with first distance value The second gain level.
Step 404, according to the second gain level, greyscale transformation function corresponding with the second gain level is determined.
In above-mentioned steps, it is previously provided with the corresponding relationship of distance value and gain level of the shooting main body apart from camera. In view of operation possibility, the corresponding relationship of distance value and gain level of the shooting main body apart from camera be can be set to The corresponding relationship of multiple pre-determined distance value ranges and multiple gain levels, specifically, by determining the where first distance value One pre-determined distance value range, determines corresponding second gain level.Wherein, which reflects each on shooting image The gray value of pixel and meet the corresponding relationship between gray value needed for brightness, which is used to carry out image Greyscale transformation, to adjust the brightness of image of captured image under the conditions of flash lighting.
Step 405, the first image is subjected to greyscale transform process according to pre-set greyscale transformation function, obtains image Second image of brightness uniformity.
In the step, by the way that the first image captured by camera is carried out greyscale transform process according to greyscale transformation function And the second image is obtained, so that the brightness of image shot under the conditions of flash lighting is uniform, avoids image edge and go out Existing shadow phenomenon, and the balance between luminance uniformity and noise can be taken into account.In addition, in actual use, due to basis Greyscale transformation function to the greyscale transform process of the first image is carried out before image is imaged, therefore, the obtained after processing Two images can retain the details in highlights domain and low light region on first image.
Wherein, in some alternative embodiments, step 405, by the first image according to pre-set greyscale transformation The step of function carries out greyscale transform process, obtains brightness of image uniform second image may include: to convert the first image For the first gray level image, and the first gray value of each pixel of the first gray level image is obtained, and, each pixel and the first gray scale The distance of picture centre;According to the first gray value and distance, according to greyscale transformation function by each pixel of the first gray level image The first gray value be transformed to corresponding second gray value respectively, obtain transformed second gray level image;By the second grayscale image As being converted to RGB image, the second image is obtained.
Here, the first image and the second image are the image of rgb format, and the first image is transformed to the first grayscale image first Picture, first gray level image can be HSI image;Then the pixel data of each pixel of the first gray level image, i.e., first are obtained Gray value, and, distance of each pixel relative to picture centre;The first gray value then according to each pixel and away from From, according to greyscale transformation function by the first gray value of pixel each on the first gray level image be transformed to it is corresponding meet it is bright Gray value (i.e. the second gray value) needed for degree, obtains the second gray level image.Wherein, it is being by second greyscale image transitions RGB image, so that treated, image is consistent with the picture format before processing, will not be to the image of the other forms in later period Processing causes additional effect.
Alternatively, in some alternative embodiments, step 405, by the first image according to pre-set greyscale transformation The step of function carries out greyscale transform process, obtains brightness of image uniform second image may include: based on gray level image with The transformational relation of RGB image carries out conversion process to greyscale transformation function, the transforming function transformation function after being converted;Obtain the first figure As the first pixel data of each pixel, and, each pixel is at a distance from the first picture centre;According to the first pixel data with And distance, it is converted according to first pixel data of the transforming function transformation function after conversion to each pixel of the first image, obtains second Image.
Here, the first image and the second image are the image of rgb format, first by greyscale transformation function according to gray level image Conversion process is carried out with the transformational relation of RGB image, obtains the transforming function transformation function suitable for RGB image;Then the first image is obtained The pixel data of each pixel, i.e. the first pixel data, and, distance of each pixel relative to picture centre;Further according to each The first pixel data and distance of pixel, according to the transforming function transformation function after conversion process by the of pixel each on the first image One transforming pixel data be it is corresponding meet brightness needed for pixel data, obtain the second image.Wherein, to the first figure When as progress greyscale transform process and picture format is had not been changed, the image procossing of the other forms in later period will not be impacted.
In addition, in some alternative embodiments, step 401, under the conditions of obtaining flash lighting, mobile terminal is taken the photograph Before the step of the first image as captured by head, this method may also comprise the following steps::
In default ambient brightness and flash lamp starting, the third image of camera shooting standard white plate is obtained.
Here, dark surrounds can be referred to as in the default ambient brightness for being lower than a predetermined luminance threshold value first, and used Under conditions of flash lighting, the image that standard white plate obtains most original, i.e. third image are shot by camera.Wherein, In embodiments of the present invention, which can need according to actual design or empirical value determines, be not construed as limiting here.
Third image is converted into third gray level image.
Here, third image is converted into gray level image, i.e. third gray level image, in order to each picture in subsequent acquisition image The Luminance Distribution of vegetarian refreshments.
Using the center of third gray level image as the center of circle, determining multiple concentric circles with circle center distance different radii are obtained every The gray value of multiple pixels on one concentric circle, and the gray value for calculating pixel on each concentric circle is equal Value.
Here, in advance using the center of third gray level image as the center of circle, the concentric circles of multiple and different radiuses is divided, is then obtained On third gray level image, the multiple and different radiuses in range image center at multiple pixels on circumference gray value, and according to The gray value of multiple pixels on each concentric circles calculates the gray value mean value of the pixel on each concentric circle, as The corresponding gray value calibration value of pixel on each concentric circle, obtains the corresponding Luminance Distribution of each radius with this.
According to default gray value, gray value mean value and respective radius, fitting obtains greyscale transformation function.
Here, which indicates the corresponding gray value of image for meeting brightness requirement, in general, meeting brightness requirement Image on each pixel gray value it is identical.The default gray value can first pass through multiple groups experimental data in advance and obtain, can also root It is preset according to historical experience.Specifically, default gray value, gray value mean value and respective radius are depicted as line chart, then Fitting obtains greyscale transformation function.
Furthermore it is possible to by third image according to the greyscale transformation function carry out greyscale transformation with to the greyscale transformation function into Row debugging optimization, after repeatedly debugging optimization, is obtaining final greyscale transformation function.
The image processing method that the embodiment of the present invention three provides is taken the photograph by mobile terminal under the conditions of obtaining flash lighting The first image as captured by head;Obtain camera shooting when focusing information, and according to focusing information determine shooting main body away from First distance value from camera;According to the corresponding relationship of pre-set distance value and gain level, determining and first distance It is worth corresponding second gain level;According to the second gain level, greyscale transformation function corresponding with the second gain level is determined;It will First image carries out greyscale transform process according to pre-set greyscale transformation function, obtains uniform second figure of brightness of image Picture is able to solve image edge and the problem of shadow phenomenon occurs so that the brightness of image shot in the case of light filling is uniform, and And the balance between luminance uniformity and noise can be taken into account, it promotes user and takes pictures experience.
Example IV
Fig. 5 is referred to, shows a kind of structural block diagram for the mobile terminal that the embodiment of the present invention four provides, the present invention Example IV provides a kind of mobile terminal 500, is able to achieve the details of image processing method of the embodiment one into embodiment three, and Reach identical effect.The mobile terminal 500 has camera and flash lamp, which may include: the first acquisition Module 501 and first processing module 502.
First obtains module 501, under the conditions of obtaining flash lighting, first captured by the camera of mobile terminal Image;
First processing module 502, for the first image to be carried out greyscale transformation according to pre-set greyscale transformation function Processing, obtains uniform second image of brightness of image, wherein greyscale transformation function is used to carry out greyscale transformation to image, to adjust Save brightness of image.
In some alternative embodiments, which can also include: the second acquisition module, the first determination Module and the second determining module.
Second obtains module, for obtaining first environment brightness when camera shooting;
First determining module determines and for the corresponding relationship according to pre-set ambient brightness and gain level Corresponding first gain level of one ambient brightness;
Second determining module, for determining greyscale transformation letter corresponding with the first gain level according to the first gain level Number.
In some alternative embodiments, which can also include: that third obtains module, third determines Module and the 4th determining module.
Third obtains module, determines shooting master for obtaining focusing information when camera shooting, and according to focusing information First distance value of the body apart from camera;
Third determining module determines and first for the corresponding relationship according to pre-set distance value and gain level Corresponding second gain level of distance value;
4th determining module, for determining greyscale transformation letter corresponding with the second gain level according to the second gain level Number.
In some alternative embodiments, first processing module 502 may include: first processing units, second processing Unit and third processing unit.
First processing units for the first image to be converted to the first gray level image, and obtain each picture of the first gray level image First gray value of vegetarian refreshments, and, each pixel is at a distance from the first gray level image center;
The second processing unit, for according to the first gray value and distance, according to greyscale transformation function by the first grayscale image As the first gray value of each pixel is transformed to corresponding second gray value respectively, transformed second gray level image is obtained;
Third processing unit obtains the second image for being RGB image by the second greyscale image transitions.
In some alternative embodiments, first processing module 502 may include: fourth processing unit, the 5th acquisition Unit and the 6th processing unit.
Fourth processing unit turns greyscale transformation function for the transformational relation based on gray level image and RGB image Change processing, the transforming function transformation function after being converted;
5th acquiring unit, for obtaining the first pixel data of each pixel of the first image, and, each pixel and The distance of one picture centre;
6th processing unit is used for according to the first pixel data and distance, according to the transforming function transformation function after conversion to first First pixel data of each pixel of image is converted, and the second image is obtained.
In some alternative embodiments, the mobile terminal 500 can also include: the 4th acquisition module, conversion module, Second processing module and fitting module.
4th obtains module, for obtaining camera and shooting reference white in default ambient brightness and flash lamp starting The third image of plate;
Conversion module, for third image to be converted to third gray level image;
Second processing module, for using the center of third gray level image as the center of circle, determining and circle center distance different radii Multiple concentric circles, obtain the gray value of multiple pixels on each concentric circle, and calculate on each concentric circle The gray value mean value of pixel;
Fitting module, for according to gray value, gray value mean value and respective radius is preset, fitting to obtain greyscale transformation letter Number.
The image processing method that the embodiment of the present invention four provides, under the conditions of obtaining flash lighting, mobile terminal First image captured by camera;First image is subjected to greyscale transform process according to pre-set greyscale transformation function, Obtain uniform second image of brightness of image, wherein greyscale transformation function is used to carry out greyscale transformation to image, to adjust image Brightness is able to solve image edge and the problem of shadow phenomenon occurs so that the brightness of image shot in the case of light filling is uniform, User is promoted to take pictures experience.
Embodiment five
Fig. 6 is a kind of structural block diagram for the mobile terminal that the embodiment of the present invention five provides.Mobile terminal 700 shown in fig. 6 It include: at least one processor 701, memory 702, at least one network interface 704 and other users interface 703.It is mobile whole Various components in end 700 are coupled by bus system 705.It is understood that bus system 705 is for realizing these components Between connection communication.Bus system 705 further includes power bus, control bus and state letter in addition to including data/address bus Number bus.But for the sake of clear explanation, various buses are all designated as bus system 705 in Fig. 6.
Wherein, user interface 703 may include display, keyboard or pointing device (for example, mouse, trace ball (trackball), touch-sensitive plate or touch screen etc..
It is appreciated that the memory 702 in the embodiment of the present invention can be volatile memory or nonvolatile memory, It or may include both volatile and non-volatile memories.Wherein, nonvolatile memory can be read-only memory (Read- Only Memory, ROM), programmable read only memory (Programmable ROM, PROM), the read-only storage of erasable programmable Device (Erasable PROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or Flash memory.Volatile memory can be random access memory (Random Access Memory, RAM), be used as external high Speed caching.By exemplary but be not restricted explanation, the RAM of many forms is available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), double data speed synchronous dynamic RAM (Double Data Rate SDRAM, DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), synchronized links Dynamic random access memory (Synchlink DRAM, SLDRAM) and direct rambus random access memory (Direct Rambus RAM, DRRAM).The memory 702 of system and method described herein is intended to include but is not limited to these and arbitrarily its It is suitble to the memory of type.
In some embodiments, memory 702 stores following element, executable modules or data structures, or Their subset of person or their superset: operating system 7021 and application program 7022.
Wherein, operating system 7021 include various system programs, such as ccf layer, core library layer, driving layer etc., are used for Realize various basic businesses and the hardware based task of processing.Application program 7022 includes various application programs, such as shows Controller, media player (Media Player), browser (Browser) etc., for realizing various applied business.Realize this The program of inventive embodiments method may be embodied in application program 7022.
In embodiments of the present invention, by the program or instruction of calling memory 702 to store, specifically, can be application The program or instruction stored in program 7022, under the conditions of processor 701 is used to obtain flash lighting, the camera of mobile terminal The first captured image;First image is subjected to greyscale transform process according to pre-set greyscale transformation function, obtains figure Uniform second image of image brightness, wherein greyscale transformation function is used to carry out greyscale transformation to image, to adjust brightness of image.
The method that the embodiments of the present invention disclose can be applied in processor 701, or be realized by processor 701. Processor 701 may be a kind of IC chip, the processing capacity with signal.During realization, the above method it is each Step can be completed by the integrated logic circuit of the hardware in processor 701 or the instruction of software form.Above-mentioned processing Device 701 can be general processor, digital signal processor (Digital Signal Processor, DSP), dedicated integrated electricity Road (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present invention.It is general Processor can be microprocessor or the processor is also possible to any conventional processor etc..In conjunction with institute of the embodiment of the present invention The step of disclosed method, can be embodied directly in hardware decoding processor and execute completion, or with the hardware in decoding processor And software module combination executes completion.Software module can be located at random access memory, and flash memory, read-only memory may be programmed read-only In the storage medium of this fields such as memory or electrically erasable programmable memory, register maturation.The storage medium is located at The step of memory 702, processor 701 reads the information in memory 702, completes the above method in conjunction with its hardware.
It is understood that embodiments described herein can with hardware, software, firmware, middleware, microcode or its Combination is to realize.For hardware realization, processing unit be may be implemented in one or more specific integrated circuit (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing appts (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general processor, In controller, microcontroller, microprocessor, other electronic units for executing herein described function or combinations thereof.
For software implementations, it can be realized herein by executing the module (such as process, function etc.) of function described herein The technology.Software code is storable in memory and is executed by processor.Memory can in the processor or It is realized outside processor.
Optionally, processor 701 is also used under the conditions of obtaining flash lighting, captured by the camera of mobile terminal After first image, the first image is subjected to greyscale transform process according to pre-set greyscale transformation function, it is bright to obtain image It spends before uniform second image, obtains first environment brightness when camera shooting;According to pre-set ambient brightness with The corresponding relationship of gain level determines the first gain level corresponding with first environment brightness;According to the first gain level, determine Greyscale transformation function corresponding with the first gain level.
Optionally, processor 701 is also used under the conditions of obtaining flash lighting, captured by the camera of mobile terminal After first image, the first image is subjected to greyscale transform process according to pre-set greyscale transformation function, it is bright to obtain image Spend before uniform second image, obtain camera shooting when focusing information, and according to focusing information determine shooting main body away from First distance value from camera;According to the corresponding relationship of pre-set distance value and gain level, determining and first distance It is worth corresponding second gain level;According to the second gain level, greyscale transformation function corresponding with the second gain level is determined.
Processor 701 is also used to be converted to the first image the first gray level image, and obtains each pixel of the first gray level image First gray value of point, and, each pixel is at a distance from the first gray level image center;According to the first gray value and distance, The first gray value of each pixel of the first gray level image is transformed to corresponding second gray value respectively according to greyscale transformation function, Obtain transformed second gray level image;It is RGB image by the second greyscale image transitions, obtains the second image.
Processor 701 is also used to the transformational relation based on gray level image and RGB image, converts to greyscale transformation function Processing, the transforming function transformation function after being converted;Obtain the first pixel data of each pixel of the first image, and, each pixel with The distance of first picture centre;It is each to the first image according to the transforming function transformation function after conversion according to the first pixel data and distance First pixel data of pixel is converted, and the second image is obtained.
Processor 701 is also used to obtain camera in default ambient brightness and flash lamp starting and shoot standard white plate Third image;Third image is converted into third gray level image;Using the center of third gray level image as the center of circle, the determining and center of circle Multiple concentric circles apart from different radii, obtain the gray value of multiple pixels on each concentric circle, and calculate each The gray value mean value of pixel on concentric circle;According to default gray value, gray value mean value and respective radius, it is fitted To greyscale transformation function.
Mobile terminal 700 can be realized each process that mobile terminal is realized in previous embodiment, to avoid repeating, here It repeats no more.
Mobile terminal provided in an embodiment of the present invention, under the conditions of obtaining flash lighting, the camera of mobile terminal The first captured image;First image is subjected to greyscale transform process according to pre-set greyscale transformation function, obtains figure Uniform second image of image brightness, wherein greyscale transformation function is used to carry out greyscale transformation to image, to adjust brightness of image, So that the brightness of image shot in the case of light filling is uniform, it is able to solve image edge and the problem of shadow phenomenon occurs, is promoted User takes pictures experience.
Embodiment six
Fig. 7 is a kind of structural block diagram for the mobile terminal that the embodiment of the present invention six provides.Specifically, the mobile end in Fig. 7 End 800 can be mobile phone, tablet computer, personal digital assistant (Personal Digital Assistant, PDA) or vehicle-mounted Computer etc..
Mobile terminal 800 in Fig. 7 includes radio frequency (Radio Frequency, RF) circuit 810, memory 820, input Unit 830, display unit 840, processor 860, voicefrequency circuit 870, WiFi (Wireless Fidelity) module 880 and electricity Source 890.
Wherein, input unit 830 can be used for receiving the number or character information of user's input, and generation and mobile terminal The related signal input of 800 user setting and function control.Specifically, in the embodiment of the present invention, which can To include touch panel 831.Touch panel 831, also referred to as touch screen collect the touch operation of user on it or nearby (for example user uses the operations of any suitable object or attachment on touch panel 831 such as finger, stylus), and according to preparatory The formula of setting drives corresponding attachment device.Optionally, touch panel 831 may include touch detecting apparatus and touch controller Two parts.Wherein, the touch orientation of touch detecting apparatus detection user, and touch operation bring signal is detected, by signal Send touch controller to;Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, The processor 860 is given again, and can be received order that processor 860 is sent and be executed.Furthermore, it is possible to using resistance-type, The multiple types such as condenser type, infrared ray and surface acoustic wave realize touch panel 831.In addition to touch panel 831, input unit 830 can also include other input equipments 832, other input equipments 832 can include but is not limited to physical keyboard, function key One of (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. are a variety of.
Wherein, display unit 840 can be used for showing information input by user or be supplied to the information and movement of user The various menu interfaces of terminal 800.Display unit 840 may include display panel 841, optionally, can use LCD or organic hair The forms such as optical diode (Organic Light-Emitting Diode, OLED) configure display panel 841.
It should be noted that touch panel 831 can cover display panel 841, touch display screen is formed, when the touch display screen is examined After measuring touch operation on it or nearby, processor 860 is sent to determine the type of touch event, is followed by subsequent processing device 860 provide corresponding visual output according to the type of touch event in touch display screen.
Touch display screen includes Application Program Interface viewing area and common control viewing area.The Application Program Interface viewing area And arrangement mode of the common control viewing area does not limit, can be arranged above and below, left-right situs etc. can distinguish two it is aobvious Show the arrangement mode in area.The Application Program Interface viewing area is displayed for the interface of application program.Each interface can be with The interface elements such as the icon comprising at least one application program and/or widget desktop control.The Application Program Interface viewing area Or the empty interface not comprising any content.This commonly uses control viewing area for showing the higher control of utilization rate, for example, Application icons such as button, interface number, scroll bar, phone directory icon etc. are set.
Wherein processor 860 is the control centre of mobile terminal 800, utilizes various interfaces and connection whole mobile phone Various pieces, by running or executing the software program and/or module that are stored in first memory 821, and calling storage Data in second memory 822 execute the various functions and processing data of mobile terminal 800, thus to mobile terminal 800 Carry out integral monitoring.Optionally, processor 860 may include one or more processing units.
In embodiments of the present invention, by call store the first memory 821 in software program and/or module and/ Or the data in the second memory 822, under the conditions of processor 860 is used to obtain flash lighting, the camera of mobile terminal The first captured image;First image is subjected to greyscale transform process according to pre-set greyscale transformation function, obtains figure Uniform second image of image brightness, wherein greyscale transformation function is used to carry out greyscale transformation to image, to adjust brightness of image.
Optionally, processor 860 is also used under the conditions of obtaining flash lighting, captured by the camera of mobile terminal After first image, the first image is subjected to greyscale transform process according to pre-set greyscale transformation function, it is bright to obtain image It spends before uniform second image, obtains first environment brightness when camera shooting;According to pre-set ambient brightness with The corresponding relationship of gain level determines the first gain level corresponding with first environment brightness;According to the first gain level, determine Greyscale transformation function corresponding with the first gain level.
Optionally, processor 860 is also used under the conditions of obtaining flash lighting, captured by the camera of mobile terminal After first image, the first image is subjected to greyscale transform process according to pre-set greyscale transformation function, it is bright to obtain image Spend before uniform second image, obtain camera shooting when focusing information, and according to focusing information determine shooting main body away from First distance value from camera;According to the corresponding relationship of pre-set distance value and gain level, determining and first distance It is worth corresponding second gain level;According to the second gain level, greyscale transformation function corresponding with the second gain level is determined.
Optionally, processor 860 is also used to be converted to the first image the first gray level image, and obtains the first gray level image First gray value of each pixel, and, each pixel is at a distance from the first gray level image center;According to the first gray value and First gray value of each pixel of the first gray level image is transformed to corresponding second ash according to greyscale transformation function by distance respectively Angle value obtains transformed second gray level image;It is RGB image by the second greyscale image transitions, obtains the second image.
Optionally, processor 860 is also used to the transformational relation based on gray level image and RGB image, to greyscale transformation function Carry out conversion process, the transforming function transformation function after being converted;The first pixel data of each pixel of the first image is obtained, and, respectively Pixel is at a distance from the first picture centre;According to the first pixel data and distance, according to the transforming function transformation function after conversion to First pixel data of each pixel of one image is converted, and the second image is obtained.
Optionally, processor 860 is also used to obtain camera in default ambient brightness and flash lamp starting and shoot standard The third image of white board;Third image is converted into third gray level image;Using the center of third gray level image as the center of circle, determine With multiple concentric circles of circle center distance different radii, the gray value of multiple pixels on each concentric circle is obtained, and is counted Calculate the gray value mean value of the pixel on each concentric circle;According to default gray value, gray value mean value and respective radius, Fitting obtains greyscale transformation function.
As it can be seen that mobile terminal provided in an embodiment of the present invention, under the conditions of obtaining flash lighting, mobile terminal is taken the photograph The first image as captured by head;First image is subjected to greyscale transform process according to pre-set greyscale transformation function, is obtained To uniform second image of brightness of image, wherein greyscale transformation function is used to carry out greyscale transformation to image, bright to adjust image Degree, so that the brightness of image shot in the case of light filling is uniform, is able to solve image edge and the problem of shadow phenomenon occurs, mention User is risen to take pictures experience.
It should be noted that in inventive embodiments, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In embodiment provided herein, it should be understood that disclosed device and method can pass through others Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of device or unit It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, ROM, RAM, magnetic or disk etc. are various can store program code Medium.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.

Claims (10)

1. a kind of image processing method, applied to the mobile terminal with camera and flash lamp, which is characterized in that the method Include:
Under the conditions of obtaining flash lighting, the first image captured by the camera of mobile terminal;
The first image is subjected to greyscale transform process according to pre-set greyscale transformation function, it is uniform to obtain brightness of image The second image, wherein the greyscale transformation function be used for image carry out greyscale transformation, to adjust brightness of image;
It is described obtain the flash lighting under the conditions of, the step of the first image captured by the camera of mobile terminal before, The method also includes:
In default ambient brightness and flash lamp starting, the third image of camera shooting standard white plate is obtained;
The third image is converted into third gray level image;
Using the center of the third gray level image as the center of circle, determining multiple concentric circles with the circle center distance different radii are obtained The gray value of multiple pixels on each concentric circle is taken, and calculates the ash of the pixel on each concentric circle Angle value mean value;
According to default gray value, the gray value mean value and respective radius, fitting obtains the greyscale transformation function.
2. the method according to claim 1, wherein under the conditions of the acquisition flash lighting, mobile terminal Camera captured by the first image the step of after, it is described by the first image according to pre-set greyscale transformation letter Before the step of number carries out greyscale transform process, obtains brightness of image uniform second image, the method also includes:
Obtain first environment brightness when camera shooting;
According to the corresponding relationship of pre-set ambient brightness and gain level, corresponding with the first environment brightness the is determined One gain level;
According to first gain level, greyscale transformation function corresponding with first gain level is determined.
3. the method according to claim 1, wherein under the conditions of the acquisition flash lighting, mobile terminal Camera captured by the first image the step of after, it is described by the first image according to pre-set greyscale transformation letter Before the step of number carries out greyscale transform process, obtains brightness of image uniform second image, the method also includes:
Focusing information when camera shooting is obtained, and determines shooting main body apart from the camera shooting according to the focusing information The first distance value of head;
According to the corresponding relationship of pre-set distance value and gain level, determine that corresponding with first distance value second increases Beneficial grade;
According to second gain level, greyscale transformation function corresponding with second gain level is determined.
4. the method according to claim 1, wherein it is described by the first image according to pre-set gray scale The step of transforming function transformation function carries out greyscale transform process, obtains brightness of image uniform second image include:
The first image is converted into the first gray level image, and obtains the first gray scale of each pixel of the first gray level image Value, and, each pixel is at a distance from first gray level image center;
According to first gray value and distance, according to the greyscale transformation function by each pixel of the first gray level image The first gray value be transformed to corresponding second gray value respectively, obtain transformed second gray level image;
It is RGB image by second greyscale image transitions, obtains second image.
5. the method according to claim 1, wherein it is described by the first image according to pre-set gray scale The step of transforming function transformation function carries out greyscale transform process, obtains brightness of image uniform second image include:
Transformational relation based on gray level image and RGB image carries out conversion process to the greyscale transformation function, after obtaining conversion Transforming function transformation function;
The first pixel data of each pixel of the first image is obtained, and, each pixel and the first image center Distance;
According to first pixel data and distance, according to the transforming function transformation function after the conversion to each pixel of the first image First pixel data of point is converted, and second image is obtained.
6. a kind of mobile terminal, the mobile terminal has camera and flash lamp, which is characterized in that the mobile terminal packet It includes:
First obtains module, under the conditions of obtaining flash lighting, the first image captured by the camera of mobile terminal;
First processing module, for carrying out at greyscale transformation the first image according to pre-set greyscale transformation function Reason, obtains uniform second image of brightness of image, wherein and the greyscale transformation function is used to carry out greyscale transformation to image, with Adjust brightness of image;
The mobile terminal further include:
4th obtains module, in default ambient brightness and flash lamp starting, obtaining camera shooting standard white plate Third image;
Conversion module, for the third image to be converted to third gray level image;
Second processing module, for using the center of the third gray level image as the center of circle, determining different from the circle center distance half Multiple concentric circles of diameter, obtain the gray value of multiple pixels on each concentric circle, and calculate each concentric circles The gray value mean value of pixel on circumference;
Fitting module, for according to gray value, the gray value mean value and respective radius is preset, fitting to obtain the gray scale and becomes Exchange the letters number.
7. mobile terminal according to claim 6, which is characterized in that the mobile terminal further include:
Second obtains module, for obtaining first environment brightness when camera shooting;
First determining module, it is determining with described for the corresponding relationship according to pre-set ambient brightness and gain level Corresponding first gain level of one ambient brightness;
Second determining module, for determining that gray scale corresponding with first gain level becomes according to first gain level Exchange the letters number.
8. mobile terminal according to claim 6, which is characterized in that the mobile terminal further include:
Third obtains module, for obtaining focusing information when camera shooting, and is determined and is clapped according to the focusing information Take the photograph first distance value of the main body apart from the camera;
Third determining module determines and described first for the corresponding relationship according to pre-set distance value and gain level Corresponding second gain level of distance value;
4th determining module, for determining that gray scale corresponding with second gain level becomes according to second gain level Exchange the letters number.
9. mobile terminal according to claim 6, which is characterized in that the first processing module includes:
First processing units for the first image to be converted to the first gray level image, and obtain first gray level image First gray value of each pixel, and, each pixel is at a distance from first gray level image center;
The second processing unit, for according to first gray value and distance, according to the greyscale transformation function by described the First gray value of each pixel of one gray level image is transformed to corresponding second gray value respectively, obtains transformed second gray scale Image;
Third processing unit obtains second image for being RGB image by second greyscale image transitions.
10. mobile terminal according to claim 6, which is characterized in that the first processing module includes:
Fourth processing unit turns the greyscale transformation function for the transformational relation based on gray level image and RGB image Change processing, the transforming function transformation function after being converted;
5th acquiring unit, for obtaining the first pixel data of each pixel of the first image, and, each pixel and institute State the distance of the first picture centre;
6th processing unit is used for according to first pixel data and distance, according to the transforming function transformation function pair after the conversion First pixel data of each pixel of the first image is converted, and second image is obtained.
CN201610927813.4A 2016-10-31 2016-10-31 A kind of image processing method and mobile terminal Active CN106412457B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610927813.4A CN106412457B (en) 2016-10-31 2016-10-31 A kind of image processing method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610927813.4A CN106412457B (en) 2016-10-31 2016-10-31 A kind of image processing method and mobile terminal

Publications (2)

Publication Number Publication Date
CN106412457A CN106412457A (en) 2017-02-15
CN106412457B true CN106412457B (en) 2019-03-05

Family

ID=58013285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610927813.4A Active CN106412457B (en) 2016-10-31 2016-10-31 A kind of image processing method and mobile terminal

Country Status (1)

Country Link
CN (1) CN106412457B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222686A (en) * 2017-06-30 2017-09-29 维沃移动通信有限公司 A kind for the treatment of method and apparatus of view data
CN111031255B (en) * 2018-10-09 2021-07-27 科沃斯机器人股份有限公司 Method, device and storage medium for light supplement
CN110800283A (en) * 2018-12-29 2020-02-14 深圳市大疆创新科技有限公司 Panoramic image generation method, panoramic image generation device and unmanned aerial vehicle
CN111314618B (en) * 2020-03-17 2021-09-28 Tcl移动通信科技(宁波)有限公司 Shooting method, shooting device, storage medium and mobile terminal
CN112487835B (en) * 2020-11-17 2022-07-12 支付宝(杭州)信息技术有限公司 Method, device, equipment and system for detecting light spot of light supplementing lamp of code scanning equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1750603A (en) * 2004-09-14 2006-03-22 奥林巴斯株式会社 Image processing apparatus, image recording apparatus, and image processing method
CN102314673A (en) * 2011-08-02 2012-01-11 中国科学院长春光学精密机械与物理研究所 Self-adapting image enhancement method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8218868B2 (en) * 2007-06-13 2012-07-10 Sensors Unlimited, Inc. Method and apparatus for enhancing images

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1750603A (en) * 2004-09-14 2006-03-22 奥林巴斯株式会社 Image processing apparatus, image recording apparatus, and image processing method
CN102314673A (en) * 2011-08-02 2012-01-11 中国科学院长春光学精密机械与物理研究所 Self-adapting image enhancement method

Also Published As

Publication number Publication date
CN106412457A (en) 2017-02-15

Similar Documents

Publication Publication Date Title
CN106412457B (en) A kind of image processing method and mobile terminal
US10978006B2 (en) User terminal device and method for adjusting luminance thereof
CN107295195B (en) A kind of fingerprint identification method and mobile terminal
US11289053B2 (en) Method for correcting brightness of display panel and apparatus for correcting brightness of display panel
CN106131341B (en) A kind of photographic method and mobile terminal
CN108475171B (en) Electronic device with flexible display and method for operating an electronic device
CN106657806B (en) A kind of exposure method and mobile terminal
CN106060419B (en) A kind of photographic method and mobile terminal
CN105976760B (en) A kind of brightness adjusting method and mobile terminal of terminal screen
CN106713780A (en) Control method for flash lamp and mobile terminal
US20150222880A1 (en) Apparatus and method for capturing image in electronic device
CN106101569A (en) A kind of method of light filling of taking pictures and mobile terminal
CN105847674A (en) Preview image processing method based on mobile terminal, and mobile terminal therein
CN107454330B (en) A kind of image processing method, mobile terminal and computer readable storage medium
CN107037659B (en) A kind of sheen lamp control method and mobile terminal
CN106454085B (en) A kind of image processing method and mobile terminal
CN107566723B (en) A kind of image pickup method, mobile terminal and computer readable storage medium
CN106131398B (en) A kind of image browsing method and mobile terminal
CN106357961A (en) Photographing method and mobile terminal
CN107392148A (en) A kind of fingerprint detection method and mobile terminal
CN107172346A (en) A kind of weakening method and mobile terminal
CN107026982B (en) A kind of photographic method and mobile terminal of mobile terminal
CN106855744B (en) A kind of screen display method and mobile terminal
CN106357989A (en) Brightness adjustment method and mobile terminal
CN107678983A (en) A kind of acquisition methods and mobile terminal of camera module data

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