CN107846583A - A kind of image shadow compensating method and mobile terminal - Google Patents

A kind of image shadow compensating method and mobile terminal Download PDF

Info

Publication number
CN107846583A
CN107846583A CN201711025551.3A CN201711025551A CN107846583A CN 107846583 A CN107846583 A CN 107846583A CN 201711025551 A CN201711025551 A CN 201711025551A CN 107846583 A CN107846583 A CN 107846583A
Authority
CN
China
Prior art keywords
regions
sub
value
subregion
characteristic
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
CN201711025551.3A
Other languages
Chinese (zh)
Other versions
CN107846583B (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 CN201711025551.3A priority Critical patent/CN107846583B/en
Publication of CN107846583A publication Critical patent/CN107846583A/en
Application granted granted Critical
Publication of CN107846583B publication Critical patent/CN107846583B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/646Circuits for processing colour signals for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters
    • 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
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control

Abstract

The present invention, which provides a kind of image shadow compensating method and mobile terminal, wherein method, to be included:Divide an image into N number of subregion;Obtain the characteristic value per sub-regions;According to the matching relationship of default characteristic value and offset data, it is determined that the target compensation data to match with the characteristic values of every sub-regions;According to the target compensation data of every sub-regions, shadow compensation is carried out to every sub-regions respectively;Wherein, N is the integer more than 1.The embodiment of the present invention divides an image into N number of subregion, and carries out shadow compensation to every sub-regions for offset data corresponding to the acquisition per sub-regions respectively, can effectively lift the color rendition degree of accuracy of image.

Description

A kind of image shadow compensating method and mobile terminal
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of image shadow compensating method and mobile terminal.
Background technology
Mobile terminal (such as smart mobile phone, tablet personal computer etc.) is respectively provided with camera function, and image bat is being carried out using camera Refraction during taking the photograph due to light can cause the decay of energy, by refraction angle caused by the light of eyeglass diverse location not Together, therefore to easily cause captured image difference subregion brightness inconsistent.In view of the above-mentioned problems, typically use shade (shading) mode of compensation, at present, a kind of scheme are to be capped frosted glass under a kind of standard sources (such as TL84 light sources) to clap Original image (RawData) is taken the photograph, then calculates the shadow compensation data under the brightness;Another scheme is in multiple different light sources The lower frosted glass of capping respectively shoots multiple original images, then calculates the moon of every original image under its corresponding light source respectively Shadow offset data.In the prior art can the compensating parameter adjustment shooting according to corresponding to obtaining the light source situation residing for shooting image Image.
However, in shooting image, shooting environmental may include a variety of light sources, if only in shooting environmental A kind of light source corresponding to compensating parameter to carry out shadow compensation to image, be likely to result in the image after compensation produce it is local There is the problem of color is inconsistent in image after color error ratio or compensation.It can be seen that existing image shadow compensation mode color It is not high to reduce the degree of accuracy.
The content of the invention
The embodiment of the present invention provides a kind of image shadow compensating method and mobile terminal, cloudy to solve image in the prior art The problem of shadow compensation way color rendition degree of accuracy is not high.
In order to solve the above-mentioned technical problem, the present invention is realized in:A kind of image shadow compensating method, including:
Divide an image into N number of subregion;
Obtain the characteristic value per sub-regions;
According to the matching relationship of default characteristic value and offset data, it is determined that match with the characteristic values of every sub-regions Target compensation data;
According to the target compensation data of every sub-regions, shadow compensation is carried out to every sub-regions respectively;
Wherein, N is the integer more than 1.
In a first aspect, the embodiments of the invention provide a kind of image shadow compensating method, including:
Divide an image into N number of subregion;
Obtain the characteristic value per sub-regions;
According to the matching relationship of default characteristic value and offset data, it is determined that match with the characteristic values of every sub-regions Target compensation data;
According to the target compensation data of every sub-regions, shadow compensation is carried out to every sub-regions respectively;
Wherein, N is the integer more than 1.
Second aspect, the embodiments of the invention provide a kind of mobile terminal, including:
Division module, for dividing an image into N number of subregion;
Acquisition module, for obtaining the characteristic value of every sub-regions;
Determining module, for the matching relationship according to default characteristic value and offset data, it is determined that the spy with each region The target compensation data that value indicative matches;
Compensating module, for according to the target compensation data per sub-regions, carrying out shade benefit to every sub-regions respectively Repay;
Wherein, N is the integer more than 1.
The third aspect, the embodiments of the invention provide another mobile terminal, including processor, memory, is stored in institute The computer program that can be run on memory and on the processor is stated, when the computer program is by the computing device The step of realizing above-mentioned image shadow compensating method.
Fourth aspect, the embodiments of the invention provide a kind of computer-readable recording medium, the computer-readable storage Computer program is stored with medium, the computer program realizes above-mentioned image shadow compensating method when being executed by processor Step.
So, the embodiment of the present invention divides an image into N number of subregion, and is directed to respectively per sub-regions corresponding to acquisition Offset data carries out shadow compensation to every sub-regions, can effectively lift the color rendition degree of accuracy of image.
Brief description of the drawings
Fig. 1 is one of flow chart of image shadow compensating method provided in an embodiment of the present invention;
Fig. 2 is one of sub-zone dividing schematic diagram provided in an embodiment of the present invention;
Fig. 3 is the two of sub-zone dividing schematic diagram provided in an embodiment of the present invention;
Fig. 4 is the two of the flow chart of image shadow compensating method provided in an embodiment of the present invention;
Fig. 5 is one of structure chart of mobile terminal provided in an embodiment of the present invention;
Fig. 6 is the two of the structure chart of mobile terminal provided in an embodiment of the present invention;
Fig. 7 is the three of the structure chart of mobile terminal provided in an embodiment of the present invention;
Fig. 8 is the four of the structure chart of mobile terminal provided in an embodiment of the present invention;
Fig. 9 is the five of the structure chart of mobile terminal provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, rather than whole embodiments.Based on this hair Embodiment in bright, those of ordinary skill in the art's every other implementation acquired under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
Referring to Fig. 1, Fig. 1 is a kind of flow chart of image shadow compensating method provided in an embodiment of the present invention, side's figure Picture shadow compensating method is applied to a mobile terminal, as shown in figure 1, comprising the following steps:
Step 101, N number of subregion is divided an image into, wherein, N is the integer more than 1.
In the step, methods described divides an image into N number of subregion, wherein, N is the integer more than 1, i.e. methods described Divide an image at least two subregions.Described image can be the image that the mobile terminal is shot under current scene, It can also be the image for having completed shooting.Methods described can divide an image into N number of sub-district using super-pixel segmentation mode Domain, such as adjacent and color, brightness or the similar pixel of texture can be divided into a sub-regions.It should be noted that Methods described divides an image at least two subregions, and the present invention is not limited specifically the number of subregion in an image Fixed, for example, the image 200 shown in Fig. 2 can be divided into the first subregion 201 and the second subregion by methods described 202, the image 300 shown in Fig. 3 can also be divided into the 3rd subregion 301, the 4th subregion 302 and the 5th by methods described Subregion 303.
Step 102, the characteristic value for obtaining every sub-regions.
In the step, methods described obtains the characteristic value per sub-regions, and the characteristic value can be based on each sub-district The brightness value and color temperature value in domain determine or the brightness value based on every sub-regions, color temperature value and subregion size determine.
Specifically, methods described can obtain the brightness value and color temperature value of every sub-regions, be then based on every sub-regions Brightness value and color temperature value generation be characteristic value per sub-regions per characteristic vector corresponding to sub-regions.Methods described also may be used To obtain brightness value, color temperature value and subregion size per sub-regions, brightness value, the color temperature value of every sub-regions are then based on It is the characteristic value per sub-regions to generate characteristic vector corresponding to every sub-regions with subregion size.
For example, for the image shown in Fig. 2, methods described can obtain the brightness value and color of the first subregion 201 Temperature value, is then based on the brightness value of first subregion 201 and color temperature value generates characteristic vector corresponding to first subregion 201 For the characteristic value of first subregion 201.Methods described obtains the brightness value and color temperature value of the second subregion 202, is then based on It is second sub-district that the brightness value and color temperature value of second subregion 202, which generate characteristic vector corresponding to second subregion 202, The characteristic value in domain 202.The light sensor inspection set when methods described can obtain shooting described image on the mobile terminal The data measured, the data then detected according to light sensor determine the brightness value per sub-regions, and methods described can obtain Take the sub-pixel value (i.e. rgb value) of the pixel of every sub-regions and then true according to the sub-pixel value of the pixel of every sub-regions The color temperature value of the fixed subregion.In embodiments of the present invention, the brightness value per sub-regions is equal for the brightness of the subregion Value.
Step 103, the matching relationship according to default characteristic value and offset data, it is determined that the characteristic value with every sub-regions The target compensation data to match.
In the step, methods described according to the matching relationship of default characteristic value and offset data, it is determined that with each sub-district The target compensation data that the characteristic value in domain matches.The matching relationship of the default characteristic value and offset data can include more Matching relationship between individual characteristic value and multigroup offset data, wherein, a characteristic value matches with one group of offset data.The side Method can be searched and the characteristic value phase per sub-regions according to the characteristic value of every sub-regions from the default matching relationship The target compensation data of matching.
It is understood that when methods described searches offset data from the default matching relationship, can allow to deposit In default error, for example, when the ambient brightness of a certain subregion is 250lux (lux degree), color temperature value includes 1/3 He 2/3, if in the default matching relationship include with the ambient brightness character pair value, it is bright that methods described can search environment Spend includes offset data corresponding to 1/3 and 2/3 characteristic value for 250lux ± N, color temperature value, and wherein N is less than or equal to institute The data of default error are stated, the default error can be that user sets according to the requirement to image shadow compensation reduction degree, Can be system default, the embodiment of the present invention is not especially limited to this.
The default matching relationship can be stored in the mobile terminal, can also be stored in server, when described pre- If matching relationship when being stored in the mobile terminal, methods described can be directly according to the characteristic value per sub-regions from described The target compensation data of matching are obtained in the default matching relationship of mobile terminal storage.When the default matching relationship stores In server, methods described can characteristic value based on every sub-regions, the characteristic value that generation carries per sub-regions obtains Take request and sent to the server, the server receives the characteristic value of the basis per sub-regions after obtaining request The target compensation data per sub-regions are obtained from default matching relationship, and are sent to the mobile terminal per sub-regions Target compensation data.
Methods described can set the matching relationship based on the image shot under multiple different environment.For example, Methods described can be capped frosted glass under Same Scene and shoot an image Raw1, and is not added with frosted glass and shoots an image Raw2, wherein, Raw1 and Raw2 shooting angle are consistent.Methods described can obtain image Raw2 brightness value and color temperature value is made For Raw2 characteristic value, and shadow compensation data are produced according to image Raw1 related data, then record and described image The offset data of Raw2 characteristic value matching is the offset data according to caused by described image Raw1.By that analogy, methods described Different images can be shot under multiple different environment, and record multiple different characteristic values and its corresponding compensation number According to.
It is understood that do not have to compensate number corresponding to the characteristic value of certain sub-regions when in the default matching relationship According to when, i.e., methods described searches corresponding to the brightness value and color temperature value of certain sub-regions compensation in the default matching relationship During data failure, methods described can obtain compensation corresponding to the subregion according to the mode of the default matching relationship of above-mentioned setting Data.In some embodiments of the invention, methods described can be by the characteristic value of the subregion and matched offset data It is convenient to search next time added in the default matching relationship.It is understood that when the default matching relationship is deposited In server end, the mobile terminal can send the characteristic value of the subregion and matched benefit to the server for storage Data are repaid, so as to default matching relationship described in the server update.So, it is stored in service for default matching relationship The situation at device end, server end can collect the offset data under the different scenes that multiple different mobile terminals are sent, data Can more comprehensively, the more convenient offset data for finding matching.
Every sub-regions are carried out shadow compensation by step 104, the target compensation data according to every sub-regions respectively.
In the step, methods described is carried out cloudy to every sub-regions respectively according to the target compensation data per sub-regions Shadow compensates.In some embodiments of the invention, methods described is according to the target compensation data per sub-regions, respectively to each sub-district After domain carries out shadow compensation, AWB is carried out to the image after shadow compensation and (Automatic white balance, put down in vain automatically Weighing apparatus) processing before computing, AWB computings further then are carried out to image.
In the present embodiment, methods described divides an image into N number of subregion, and is directed to obtain per sub-regions respectively and corresponds to Offset data to every sub-regions carry out shadow compensation, can effectively lift the color rendition degree of accuracy of image.
Alternatively, the characteristic value obtained per sub-regions, including:
Obtain the brightness value and color temperature value per sub-regions;
Brightness value and color temperature value based on every sub-regions, generate characteristic vector corresponding to per sub-regions;
Wherein, the characteristic value is the characteristic vector, each characteristic vector include corresponding subregion brightness value and Color temperature value.
In the embodiment, the characteristic value per sub-regions is the spy of the brightness value and color temperature value that include every sub-regions Sign vector, the mode that methods described obtains the characteristic value per sub-regions can be specifically:Obtain the brightness value per sub-regions And color temperature value, the brightness value and color temperature value of every sub-regions are then based on, generates characteristic vector corresponding to per sub-regions.It is i.e. every Characteristic value corresponding to sub-regions is the characteristic vector of the brightness value and color temperature value that include the subregion.
So, methods described can determine the offset data of matching to every according to the brightness value and color temperature value of every sub-regions Sub-regions carry out shadow compensation, can effectively lift the color rendition degree of accuracy of image.
Alternatively, the characteristic value obtained per sub-regions, including:
Obtain brightness value, color temperature value and the subregion size per sub-regions;
Brightness value, color temperature value and subregion size based on every sub-regions, generate per feature corresponding to sub-regions to Amount;
Wherein, the characteristic value is the characteristic vector, and the subregion that each characteristic vector includes corresponding subregion is big Small, brightness value and color temperature value.
In the embodiment, the characteristic value per sub-regions is to include the brightness value, color temperature value and area of every sub-regions The characteristic vector of domain size, the mode that methods described obtains the characteristic value per sub-regions can be specifically:Obtain each sub-district Brightness value, color temperature value and the area size in domain, the brightness value, color temperature value and area size of every sub-regions are then based on, generated Characteristic vector corresponding to per sub-regions.Characteristic value corresponding to i.e. per sub-regions is to include brightness value, the colour temperature of the subregion The characteristic vector of value and area size.
Methods described can determine the compensation number of matching according to the brightness value, color temperature value and area size of every sub-regions According to, and shadow compensation is carried out to every sub-regions, so, methods described further determines the compensation number of matching according to area size According to the matching precision that can improve offset data, so as to effectively lift the color rendition degree of accuracy of image.
Alternatively, the brightness value per sub-regions is the luminance mean value per sub-regions.
In the embodiment, the brightness value per sub-regions is the luminance mean value per sub-regions.In such manner, it is possible in pin Every sub-regions are carried out to reduce the difference between pixel during shadow compensation, so as to effectively improve the color rendition of image The degree of accuracy.
Alternatively, the color temperature value per sub-regions includes:R1/G1 and B1/G1;
Or the color temperature value per sub-regions includes:R1/B1 and G1/B1;
Or the color temperature value per sub-regions includes:G1/R1 and B1/R1;
Wherein, R1 is the R value summations of all pixels point in a sub-regions, and G1 is all pixels point in a sub-regions G value summations, B1 are the B value summations of all pixels point in a sub-regions.
In the embodiment, the color temperature value per sub-regions can include:R1/G1 and B1/G1, it can also include:R1/ B1 and G1/B1, it can also include:G1/R1 and B1/R1.Wherein R1 be a sub-regions in all pixels point R value summations, G1 For the G value summations of all pixels point in a sub-regions, B1 is the B value summations of all pixels point in a sub-regions.
So, the ratio between the sub-pixel value summation of all pixels point of a sub-regions can accurately reflect the sub-district The colour temperature in domain, so as to determine more accurately offset data according to the colour temperature of the subregion.
Alternatively, it is described to divide an image into N number of subregion, including:
Using super-pixel segmentation mode, N number of subregion is divided an image into.
In the embodiment, methods described uses super-pixel segmentation mode, divides an image into N number of subregion so that color, Brightness or the similar pixel of texture are divided into a sub-regions, then use same group of offset data for the subregion again Shadow compensation is carried out, the color rendition degree of accuracy of image can be effectively improved.
Referring to Fig. 4, Fig. 4 is the flow chart of another image shadow compensating method provided in an embodiment of the present invention, the side Method is applied to a mobile terminal, as shown in figure 4, comprising the following steps:
Step 401, N number of subregion is divided an image into, wherein, N is the integer more than 1.
Step 402, the characteristic value for obtaining every sub-regions.
The step 401 and step 402 are identical with the step 101 in the embodiment shown in Fig. 1 of the present invention and step 102, Here is omitted.
Step 403, for every sub-regions, in the characteristic value prestored, search the characteristic value with the subregion Between error be less than the target signature that variance between first threshold or the characteristic value of the subregion is less than Second Threshold Value.
Step 404, by offset data corresponding to each object feature value be defined as and per sub-regions characteristic value phase The target compensation data matched somebody with somebody.
In the embodiment, when methods described searches offset data from the default matching relationship, it can allow to exist Error.For example, when the not corresponding characteristic value with the characteristic value of a certain subregion in the default matching relationship, institute The method of stating can search has error offset data corresponding less than the object feature value of predetermined threshold value between the characteristic value Target compensation data as the subregion.It is understood that methods described can be looked into from the default matching relationship It is object feature value to look for the characteristic value that corresponding error is less than the first threshold respectively of each value in the characteristic value, Variance between the characteristic value can also be searched from the default matching relationship it is less than the characteristic value of Second Threshold and is Object feature value, the embodiment of the present invention are not especially limited to this.So, methods described can be looked into by the way of fuzzy matching Offset data is looked for, lookup speed can be effectively improved.
Every sub-regions are carried out shadow compensation by step 405, the target compensation data according to every sub-regions respectively.
The step 405 is identical with the step 104 in the embodiment shown in Fig. 1 of the present invention, and here is omitted.
In the embodiment of the present invention, described image shadow compensating method divides an image into N number of subregion, and respectively for every Sub-regions calculate characteristic value, and then offset data carries out shadow compensation to every sub-regions according to corresponding to obtaining characteristic value, The color rendition degree of accuracy of image can effectively be lifted.
Referring to Fig. 5, Fig. 5 is a kind of structure chart of mobile terminal provided in an embodiment of the present invention, as shown in figure 5, mobile whole End 500 includes:
Division module 501, for dividing an image into N number of subregion;
Acquisition module 502, for obtaining the characteristic value of every sub-regions;
Determining module 503, for the matching relationship according to default characteristic value and offset data, it is determined that with each region The target compensation data that characteristic value matches;
Compensating module 504, for according to the target compensation data per sub-regions, carrying out shade to every sub-regions respectively Compensation;
Wherein, N is the integer more than 1.
Alternatively, referring to Fig. 6, Fig. 6 is the structure chart of another mobile terminal provided in an embodiment of the present invention, such as Fig. 6 institutes Show, the acquisition module 502, including:
First acquisition unit 5021, for obtaining the brightness value and color temperature value of every sub-regions;
First generation unit 5022, for brightness value and color temperature value based on every sub-regions, generate per sub-regions pair The characteristic vector answered;
Wherein, the characteristic value is the characteristic vector, each characteristic vector include corresponding subregion brightness value and Color temperature value.
Alternatively, referring to Fig. 7, Fig. 7 is the structure chart of another mobile terminal provided in an embodiment of the present invention, such as Fig. 7 institutes Show, the acquisition module 502, including:
Second acquisition unit 5023, for obtaining the brightness value, color temperature value and subregion size of every sub-regions;
Second generation unit 5024, it is every for the brightness value based on every sub-regions, color temperature value and subregion size, generation Characteristic vector corresponding to sub-regions;
Wherein, the characteristic value is the characteristic vector, and the subregion that each characteristic vector includes corresponding subregion is big Small, brightness value and color temperature value.
Alternatively, referring to Fig. 8, Fig. 8 is the structure chart of another mobile terminal provided in an embodiment of the present invention, such as Fig. 8 institutes Show, the determining module 503, including:
Searching unit 5031, for for every sub-regions, in the characteristic value prestored, searching and the subregion Characteristic value between error be less than variance between first threshold or the characteristic value of the subregion and be less than Second Threshold Object feature value;
Determining unit 5032, for offset data corresponding to each object feature value to be defined as and the spy per sub-regions The target compensation data that value indicative matches.
Alternatively, the brightness value per sub-regions is the luminance mean value per sub-regions.
Alternatively, the color temperature value per sub-regions includes:R1/G1 and B1/G1;
Or the color temperature value per sub-regions includes:R1/B1 and G1/B1;
Or the color temperature value per sub-regions includes:G1/R1 and B1/R1;
Wherein, R1 is the R value summations of all pixels point in a sub-regions, and G1 is all pixels point in a sub-regions G value summations, B1 are the B value summations of all pixels point in a sub-regions.
Alternatively, the division module 501, is specifically used for:
Using super-pixel segmentation mode, N number of subregion is divided an image into.
Mobile terminal 500 provided in an embodiment of the present invention can realize that mobile terminal is real in Fig. 1 and Fig. 4 embodiment of the method Existing each process, to avoid repeating, is repeated no more here.
In the embodiment of the present invention, the mobile terminal divides an image into N number of subregion, and is directed to respectively per sub-regions Offset data corresponding to acquisition carries out shadow compensation to every sub-regions, can effectively lift the color rendition degree of accuracy of image.
Fig. 9 is a kind of hardware architecture diagram for the mobile terminal for realizing each embodiment of the present invention, the mobile terminal 900 Including but not limited to:It is radio frequency unit 901, mixed-media network modules mixed-media 902, audio output unit 903, input block 904, sensor 905, aobvious Show the parts such as unit 906, user input unit 907, interface unit 908, memory 909, processor 910 and power supply 911. It will be understood by those skilled in the art that the mobile terminal structure shown in Fig. 9 does not form the restriction to mobile terminal, it is mobile whole End can be included than illustrating more or less parts, either combine some parts or different parts arrangement.In the present invention In embodiment, mobile terminal includes but is not limited to mobile phone, tablet personal computer, notebook computer, palm PC, car-mounted terminal, can worn Wear equipment and pedometer etc..
Wherein, processor 910, it is used for:
Divide an image into N number of subregion;
Obtain the characteristic value per sub-regions;
According to the matching relationship of default characteristic value and offset data, it is determined that match with the characteristic values of every sub-regions Target compensation data;
According to the target compensation data of every sub-regions, shadow compensation is carried out to every sub-regions respectively;
Wherein, N is the integer more than 1.
Optionally, characteristic value of the acquisition that the processor 910 performs per sub-regions, including:
Obtain the brightness value and color temperature value per sub-regions;
Brightness value and color temperature value based on every sub-regions, generate characteristic vector corresponding to per sub-regions;
Wherein, the characteristic value is the characteristic vector, each characteristic vector include corresponding subregion brightness value and Color temperature value.
Optionally, characteristic value of the acquisition that the processor 910 performs per sub-regions, including:
Obtain brightness value, color temperature value and the subregion size per sub-regions;
Brightness value, color temperature value and subregion size based on every sub-regions, generate per feature corresponding to sub-regions to Amount;
Wherein, the characteristic value is the characteristic vector, and the subregion that each characteristic vector includes corresponding subregion is big Small, brightness value and color temperature value.
Optionally, the matching relationship according to default characteristic value and offset data that the processor 910 performs, it is determined that with The target compensation data that characteristic value per sub-regions matches, including:
For every sub-regions, in the characteristic value prestored, the mistake between the characteristic value of the subregion is searched The variance that difference is less than between first threshold or the characteristic value of the subregion is less than the object feature value of Second Threshold;
The target that offset data corresponding to each object feature value is defined as matching with the characteristic value per sub-regions Offset data.
Optionally, the brightness value per sub-regions is the luminance mean value per sub-regions.
Optionally, the color temperature value per sub-regions includes:R1/G1 and B1/G1;
Or the color temperature value per sub-regions includes:R1/B1 and G1/B1;
Or the color temperature value per sub-regions includes:G1/R1 and B1/R1;
Wherein, R1 is the R value summations of all pixels point in a sub-regions, and G1 is all pixels point in a sub-regions G value summations, B1 are the B value summations of all pixels point in a sub-regions.
Optionally, what the processor 910 performed divides an image into N number of subregion, including:
Using super-pixel segmentation mode, N number of subregion is divided an image into.
In the embodiment of the present invention, mobile terminal divides an image into N number of subregion, and is directed to is obtained per sub-regions respectively Corresponding offset data carries out shadow compensation to every sub-regions, can effectively lift the color rendition degree of accuracy of image.
It should be understood that in the embodiment of the present invention, radio frequency unit 901 can be used for receiving and sending messages or communication process in, signal Reception and transmission, specifically, by from base station downlink data receive after, handled to processor 910;In addition, will be up Data are sent to base station.Generally, radio frequency unit 901 includes but is not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 901 can also by wireless communication system and network and other set Standby communication.
Mobile terminal has provided the user wireless broadband internet by mixed-media network modules mixed-media 902 and accessed, and such as helps user to receive Send e-mails, browse webpage and access streaming video etc..
Audio output unit 903 can be receiving by radio frequency unit 901 or mixed-media network modules mixed-media 902 or in memory 909 It is sound that the voice data of storage, which is converted into audio signal and exported,.Moreover, audio output unit 903 can also be provided and moved The audio output for the specific function correlation that dynamic terminal 900 performs is (for example, call signal receives sound, message sink sound etc. Deng).Audio output unit 903 includes loudspeaker, buzzer and receiver etc..
Input block 904 is used to receive audio or video signal.Input block 904 can include graphics processor (Graphics Processing Unit, GPU) 9041 and microphone 9042, graphics processor 9041 is in video acquisition mode Or the static images or the view data of video obtained in image capture mode by image capture apparatus (such as camera) are carried out Reason.Picture frame after processing may be displayed on display unit 906.Picture frame after the processing of graphics processor 9041 can be deposited Storage is transmitted in memory 909 (or other storage mediums) or via radio frequency unit 901 or mixed-media network modules mixed-media 902.Mike Wind 9042 can receive sound, and can be voice data by such acoustic processing.Voice data after processing can be The form output of mobile communication base station can be sent to via radio frequency unit 901 by being converted in the case of telephone calling model.
Mobile terminal 900 also includes at least one sensor 905, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 9061, and proximity transducer can close when mobile terminal 900 is moved in one's ear Display panel 9061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axles) size of acceleration, size and the direction of gravity are can detect that when static, available for identification mobile terminal posture (ratio Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);Pass Sensor 905 can also include fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, wet Meter, thermometer, infrared ray sensor etc. are spent, will not be repeated here.
Display unit 906 is used for the information for showing the information inputted by user or being supplied to user.Display unit 906 can wrap Display panel 9061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configures display panel 9061.
User input unit 907 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal The key signals input that family is set and function control is relevant.Specifically, user input unit 907 include contact panel 9071 and Other input equipments 9072.Contact panel 9071, also referred to as touch-screen, collect touch operation of the user on or near it (for example user uses any suitable objects or annex such as finger, stylus on contact panel 9071 or in contact panel 9071 Neighbouring operation).Contact panel 9071 may include both touch detecting apparatus and touch controller.Wherein, touch detection Device detects the touch orientation of user, and detects the signal that touch operation is brought, and transmits a signal to touch controller;Touch control Device processed receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 910, receiving area Manage the order that device 910 is sent and performed.It is furthermore, it is possible to more using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Type realizes contact panel 9071.Except contact panel 9071, user input unit 907 can also include other input equipments 9072.Specifically, other input equipments 9072 can include but is not limited to physical keyboard, function key (such as volume control button, Switch key etc.), trace ball, mouse, action bars, will not be repeated here.
Further, contact panel 9071 can be covered on display panel 9061, when contact panel 9071 is detected at it On or near touch operation after, send processor 910 to determine the type of touch event, be followed by subsequent processing device 910 according to touch The type for touching event provides corresponding visual output on display panel 9061.Although in fig.9, contact panel 9071 and display Panel 9061 is the part independent as two to realize the input of mobile terminal and output function, but in some embodiments In, can be integrated by contact panel 9071 and display panel 9061 and realize input and the output function of mobile terminal, it is specific this Place does not limit.
Interface unit 908 is the interface that external device (ED) is connected with mobile terminal 900.For example, external device (ED) can include Line or wireless head-band earphone port, external power source (or battery charger) port, wired or wireless FPDP, storage card end Mouth, port, audio input/output (I/O) port, video i/o port, earphone end for connecting the device with identification module Mouthful etc..Interface unit 908 can be used for receive the input (for example, data message, electric power etc.) from external device (ED) and One or more elements that the input received is transferred in mobile terminal 900 can be used in the He of mobile terminal 900 Data are transmitted between external device (ED).
Memory 909 can be used for storage software program and various data.Memory 909 can mainly include storing program area And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Voice data, phone directory etc.) etc..In addition, memory 909 can include high-speed random access memory, can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 910 is the control centre of mobile terminal, utilizes each of various interfaces and the whole mobile terminal of connection Individual part, by running or performing the software program and/or module that are stored in memory 909, and call and be stored in storage Data in device 909, the various functions and processing data of mobile terminal are performed, so as to carry out integral monitoring to mobile terminal.Place Reason device 910 may include one or more processing units;Preferably, processor 910 can integrate application processor and modulatedemodulate is mediated Device is managed, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is main Handle radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 910.
Mobile terminal 900 can also include the power supply 911 (such as battery) to all parts power supply, it is preferred that power supply 911 Can be logically contiguous by power-supply management system and processor 910, so as to realize management charging by power-supply management system, put The function such as electricity and power managed.
In addition, mobile terminal 900 includes some unshowned functional modules, will not be repeated here.
Preferably, the embodiment of the present invention also provides a kind of mobile terminal, including processor 910, memory 909, is stored in On memory 909 and the computer program that can be run on the processor 910, the computer program are performed by processor 910 Each process of the above-mentioned image shadow compensating method embodiments of Shi Shixian, and identical technique effect can be reached, to avoid repeating, Here repeat no more.
The embodiment of the present invention also provides a kind of computer-readable recording medium, and meter is stored with computer-readable recording medium Calculation machine program, the computer program realize each process of above-mentioned image shadow compensating method embodiment when being executed by processor, And identical technique effect can be reached, to avoid repeating, repeat no more here.Wherein, described computer-readable recording medium, Such as read-only storage (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, letter Claim RAM), magnetic disc or CD etc..
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal (can be mobile phone, computer, service Device, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by scope of the claims.

Claims (16)

  1. A kind of 1. image shadow compensating method, applied to mobile terminal, it is characterised in that methods described includes:
    Divide an image into N number of subregion;
    Obtain the characteristic value per sub-regions;
    According to the matching relationship of default characteristic value and offset data, it is determined that the target to match with the characteristic values of every sub-regions Offset data;
    According to the target compensation data of every sub-regions, shadow compensation is carried out to every sub-regions respectively;
    Wherein, N is the integer more than 1.
  2. 2. image shadow compensating method according to claim 1, it is characterised in that the feature obtained per sub-regions Value, including:
    Obtain the brightness value and color temperature value per sub-regions;
    Brightness value and color temperature value based on every sub-regions, generate characteristic vector corresponding to per sub-regions;
    Wherein, the characteristic value is the characteristic vector, and each characteristic vector includes the brightness value and colour temperature of corresponding subregion Value.
  3. 3. image shadow compensating method according to claim 1, it is characterised in that the feature obtained per sub-regions Value, including:
    Obtain brightness value, color temperature value and the subregion size per sub-regions;
    Brightness value, color temperature value and subregion size based on every sub-regions, generate characteristic vector corresponding to per sub-regions;
    Wherein, the characteristic value is the characteristic vector, and each characteristic vector includes the subregion size, bright of corresponding subregion Angle value and color temperature value.
  4. 4. image shadow compensating method according to claim 1, it is characterised in that described according to default characteristic value and benefit The matching relationship of data is repaid, it is determined that the target compensation data to match with the characteristic values of every sub-regions, including:
    For every sub-regions, in the characteristic value prestored, the error searched between the characteristic value of the subregion is small Variance between first threshold or the characteristic value of the subregion is less than the object feature value of Second Threshold;
    The target compensation that offset data corresponding to each object feature value is defined as matching with the characteristic value per sub-regions Data.
  5. 5. according to Claims 2 or 3 described image shadow compensating method, it is characterised in that the brightness value per sub-regions For the luminance mean value of every sub-regions.
  6. 6. according to Claims 2 or 3 described image shadow compensating method, it is characterised in that
    The color temperature value per sub-regions includes:R1/G1 and B1/G1;
    Or the color temperature value per sub-regions includes:R1/B1 and G1/B1;
    Or the color temperature value per sub-regions includes:G1/R1 and B1/R1;
    Wherein, R1 is the R value summations of all pixels point in a sub-regions, and G1 is the G values of all pixels point in a sub-regions Summation, B1 are the B value summations of all pixels point in a sub-regions.
  7. 7. image shadow compensating method according to claim 1, it is characterised in that described to divide an image into N number of sub-district Domain, including:
    Using super-pixel segmentation mode, N number of subregion is divided an image into.
  8. A kind of 8. mobile terminal, it is characterised in that including:
    Division module, for dividing an image into N number of subregion;
    Acquisition module, for obtaining the characteristic value of every sub-regions;
    Determining module, for the matching relationship according to default characteristic value and offset data, it is determined that the characteristic value with each region The target compensation data to match;
    Compensating module, for according to the target compensation data per sub-regions, carrying out shadow compensation to every sub-regions respectively;
    Wherein, N is the integer more than 1.
  9. 9. mobile terminal according to claim 8, it is characterised in that the acquisition module, including:
    First acquisition unit, for obtaining the brightness value and color temperature value of every sub-regions;
    First generation unit, for brightness value and color temperature value based on every sub-regions, generate feature corresponding to per sub-regions Vector;
    Wherein, the characteristic value is the characteristic vector, and each characteristic vector includes the brightness value and colour temperature of corresponding subregion Value.
  10. 10. mobile terminal according to claim 8, it is characterised in that the acquisition module, including:
    Second acquisition unit, for obtaining the brightness value, color temperature value and subregion size of every sub-regions;
    Second generation unit, for the brightness value based on every sub-regions, color temperature value and subregion size, generate per sub-regions Corresponding characteristic vector;
    Wherein, the characteristic value is the characteristic vector, and each characteristic vector includes the subregion size, bright of corresponding subregion Angle value and color temperature value.
  11. 11. the mobile terminal according to claim 9 or 10, it is characterised in that the determining module, including:
    Searching unit, for for every sub-regions, in the characteristic value prestored, searching the characteristic value with the subregion Between error be less than the target signature that variance between first threshold or the characteristic value of the subregion is less than Second Threshold Value;
    Determining unit, for offset data corresponding to each object feature value to be defined as and the characteristic value phase per sub-regions The target compensation data matched somebody with somebody.
  12. 12. the mobile terminal according to claim 9 or 10, it is characterised in that the brightness value per sub-regions is every The luminance mean value of sub-regions.
  13. 13. the mobile terminal according to claim 9 or 10, it is characterised in that
    The color temperature value per sub-regions includes:R1/G1 and B1/G1;
    Or the color temperature value per sub-regions includes:R1/B1 and G1/B1;
    Or the color temperature value per sub-regions includes:G1/R1 and B1/R1;
    Wherein, R1 is the R value summations of all pixels point in a sub-regions, and G1 is the G values of all pixels point in a sub-regions Summation, B1 are the B value summations of all pixels point in a sub-regions.
  14. 14. mobile terminal according to claim 8, it is characterised in that the division module, be specifically used for:
    Using super-pixel segmentation mode, N number of subregion is divided an image into.
  15. 15. a kind of mobile terminal, it is characterised in that including processor, memory is stored on the memory and can be described The computer program run on processor, the computer program are realized during the computing device as in claim 1 to 7 The step of image shadow compensating method described in any one.
  16. 16. a kind of computer-readable recording medium, it is characterised in that be stored with computer on the computer-readable recording medium Program, the image shadow compensation as any one of claim 1 to 7 is realized when the computer program is executed by processor The step of method.
CN201711025551.3A 2017-10-27 2017-10-27 Image shadow compensation method and mobile terminal Active CN107846583B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711025551.3A CN107846583B (en) 2017-10-27 2017-10-27 Image shadow compensation method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711025551.3A CN107846583B (en) 2017-10-27 2017-10-27 Image shadow compensation method and mobile terminal

Publications (2)

Publication Number Publication Date
CN107846583A true CN107846583A (en) 2018-03-27
CN107846583B CN107846583B (en) 2020-09-01

Family

ID=61680761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711025551.3A Active CN107846583B (en) 2017-10-27 2017-10-27 Image shadow compensation method and mobile terminal

Country Status (1)

Country Link
CN (1) CN107846583B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246405A (en) * 2018-11-01 2019-01-18 明基智能科技(上海)有限公司 The method of adjustment and its system of the uniformity of image tone
CN111447354A (en) * 2019-10-23 2020-07-24 泰州市海陵区一马商务信息咨询有限公司 Intelligent adjustment type camera shooting platform
CN113259556A (en) * 2021-05-06 2021-08-13 深圳市中诺通讯有限公司 Method, device and equipment for eliminating brightness difference and color difference in different areas and storage medium
CN114666497A (en) * 2022-02-28 2022-06-24 青岛海信移动通信技术股份有限公司 Imaging method, terminal device, storage medium, and program product
CN114936981A (en) * 2022-06-10 2022-08-23 重庆尚优科技有限公司 Code registration system is swept in place based on cloud platform

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114202496A (en) * 2020-09-02 2022-03-18 苏州科瓴精密机械科技有限公司 Image shadow detection method, system, image segmentation device and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281389A (en) * 2010-06-11 2011-12-14 三星电子株式会社 Apparatus and method for creating lens shading compensation table suitable for photography environment
CN103369202A (en) * 2012-04-01 2013-10-23 联咏科技股份有限公司 Method for compensating local lens shadow
CN104104946A (en) * 2014-07-30 2014-10-15 广东欧珀移动通信有限公司 Method and electronic equipment for consistence correction of camera
CN104284169A (en) * 2013-07-08 2015-01-14 三星泰科威株式会社 White balance method for shading compensation, and apparatus applied to the same
CN105100550A (en) * 2014-04-21 2015-11-25 展讯通信(上海)有限公司 Shadow correction method and device and imaging system
US20160133229A1 (en) * 2014-11-07 2016-05-12 Panasonic Intellectual Property Management Co., Ltd. Signal processing device and signal processing method
CN106506905A (en) * 2016-10-20 2017-03-15 湖南国科微电子股份有限公司 Camera lens shadow correction method
CN106507081A (en) * 2016-10-12 2017-03-15 成都西纬科技有限公司 A kind of image processing method and device
CN106921837A (en) * 2015-12-25 2017-07-04 北京展讯高科通信技术有限公司 Camera module group lens shadow compensating method and device, image-signal processor
CN107222681A (en) * 2017-06-30 2017-09-29 维沃移动通信有限公司 The processing method and mobile terminal of a kind of view data

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281389A (en) * 2010-06-11 2011-12-14 三星电子株式会社 Apparatus and method for creating lens shading compensation table suitable for photography environment
CN103369202A (en) * 2012-04-01 2013-10-23 联咏科技股份有限公司 Method for compensating local lens shadow
CN104284169A (en) * 2013-07-08 2015-01-14 三星泰科威株式会社 White balance method for shading compensation, and apparatus applied to the same
CN105100550A (en) * 2014-04-21 2015-11-25 展讯通信(上海)有限公司 Shadow correction method and device and imaging system
CN104104946A (en) * 2014-07-30 2014-10-15 广东欧珀移动通信有限公司 Method and electronic equipment for consistence correction of camera
US20160133229A1 (en) * 2014-11-07 2016-05-12 Panasonic Intellectual Property Management Co., Ltd. Signal processing device and signal processing method
CN106921837A (en) * 2015-12-25 2017-07-04 北京展讯高科通信技术有限公司 Camera module group lens shadow compensating method and device, image-signal processor
CN106507081A (en) * 2016-10-12 2017-03-15 成都西纬科技有限公司 A kind of image processing method and device
CN106506905A (en) * 2016-10-20 2017-03-15 湖南国科微电子股份有限公司 Camera lens shadow correction method
CN107222681A (en) * 2017-06-30 2017-09-29 维沃移动通信有限公司 The processing method and mobile terminal of a kind of view data

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246405A (en) * 2018-11-01 2019-01-18 明基智能科技(上海)有限公司 The method of adjustment and its system of the uniformity of image tone
CN109246405B (en) * 2018-11-01 2021-04-20 明基智能科技(上海)有限公司 Method and system for adjusting uniformity of image tone
CN111447354A (en) * 2019-10-23 2020-07-24 泰州市海陵区一马商务信息咨询有限公司 Intelligent adjustment type camera shooting platform
CN113259556A (en) * 2021-05-06 2021-08-13 深圳市中诺通讯有限公司 Method, device and equipment for eliminating brightness difference and color difference in different areas and storage medium
CN114666497A (en) * 2022-02-28 2022-06-24 青岛海信移动通信技术股份有限公司 Imaging method, terminal device, storage medium, and program product
CN114666497B (en) * 2022-02-28 2024-03-15 青岛海信移动通信技术有限公司 Imaging method, terminal device and storage medium
CN114936981A (en) * 2022-06-10 2022-08-23 重庆尚优科技有限公司 Code registration system is swept in place based on cloud platform

Also Published As

Publication number Publication date
CN107846583B (en) 2020-09-01

Similar Documents

Publication Publication Date Title
CN107665697B (en) A kind of adjusting method and mobile terminal of screen intensity
CN107846583A (en) A kind of image shadow compensating method and mobile terminal
CN107580184A (en) A kind of image pickup method and mobile terminal
CN107908383A (en) A kind of screen color method of adjustment, device and mobile terminal
CN109688322B (en) Method and device for generating high dynamic range image and mobile terminal
CN107592466A (en) A kind of photographic method and mobile terminal
CN107665698A (en) Ambient light intensity compensation method and device
CN107566730A (en) A kind of panoramic picture image pickup method and mobile terminal
CN109068116B (en) Image processing method and device based on supplementary lighting, mobile terminal and storage medium
CN107734260A (en) A kind of image processing method and mobile terminal
CN107682639B (en) A kind of image processing method, device and mobile terminal
CN107977652A (en) The extracting method and mobile terminal of a kind of screen display content
CN109361867A (en) A kind of filter processing method and mobile terminal
CN107895352A (en) A kind of image processing method and mobile terminal
CN108989678A (en) A kind of image processing method, mobile terminal
CN108600546A (en) A kind of environment light detection method and mobile terminal
CN108259743A (en) Panoramic picture image pickup method and electronic equipment
CN107566749A (en) Image pickup method and mobile terminal
CN108320263A (en) A kind of method, device and mobile terminal of image procossing
CN110213485A (en) A kind of image processing method and terminal
CN107886321A (en) A kind of method of payment and mobile terminal
CN107623818A (en) A kind of image exposure method and mobile terminal
CN107864336A (en) A kind of image processing method, mobile terminal
CN108564613A (en) A kind of depth data acquisition methods and mobile terminal
CN109727212A (en) A kind of image processing method and mobile terminal

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