CN108234970A - A kind of image processing method, terminal and computer readable storage medium - Google Patents
A kind of image processing method, terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN108234970A CN108234970A CN201810007958.1A CN201810007958A CN108234970A CN 108234970 A CN108234970 A CN 108234970A CN 201810007958 A CN201810007958 A CN 201810007958A CN 108234970 A CN108234970 A CN 108234970A
- Authority
- CN
- China
- Prior art keywords
- pixel
- image
- channel
- pending
- values
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/10—Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
Abstract
The embodiment of the invention discloses a kind of image processing method, wherein, the method includes:Obtain the pending image shot by filming apparatus;Obtain the corresponding base image of filming apparatus;The first pixel in base image carries out green channel compensation deals to the second pixel in pending image;Wherein, the distance between the distance between optical center of the first pixel and base image and the optical center of the second pixel and pending image are equal.The embodiment of the invention also discloses a kind of terminal and computer readable storage mediums.By implementing said program, green channel compensation can be carried out to image.
Description
Technical field
The present invention relates to a kind of field of terminal technology more particularly to image processing method, terminal and computer-readable storages
Medium.
Background technology
With the popularization and application of the development of mobile communication technology, particularly mobile network and intelligent terminal, mobile Internet
Field development is swift and violent.The function of intelligent terminal is not simple for meeting connecting each other for people, and daily as people already
Highly important amusement equipment in life.
At present, camera function has become the essential function of intelligent terminal, and people can record excellent anywhere or anytime
Moment.When being shot using terminal, image is stored according to pixel, and each pixel includes four sub-pixels, i.e. a red
Sub-pixel R, a blue subpixels B and two green sub-pixels Gr and Gb.
Due to sensor devices manufacturing process and circuit etc. in camera, Gr sub-pixels and Gb in the image of shooting
There may be differences for the numerical value of pixel, grid labyrinth phenomenon will occur, this phenomenon can be described as green imbalance (Green
Imbalance)。
At present, there is an urgent need for a kind of image processing methods compensated to green imbalance problem.
Invention content
In view of this, an embodiment of the present invention is intended to provide a kind of image processing method, terminal and computer-readable storage mediums
Matter can compensate the green imbalance problem in image, so as to promote the quality of image.
What the technical solution of the embodiment of the present invention was realized in:
In a first aspect, the embodiment of the present invention provides a kind of image processing method, the method includes:
Obtain the pending image shot by filming apparatus;
Obtain the corresponding base image of the filming apparatus;
The first pixel in the base image carries out green channel to the second pixel in the pending image
Compensation deals;
Wherein, it the distance between optical center of first pixel and the base image and second pixel and described treats
It is equal to handle the distance between the optical center of image.
Second aspect, the embodiment of the present invention provide a kind of image processing method, the method includes:
Obtain pending image;It determines whether the uneven deviation compensation coefficient of the pixel in pending image is more than to preset
Imbalance endure threshold value;If there is uneven deviation compensation coefficient in pending image is more than the picture that imbalance endures threshold value
Element carries out the balanced compensated processing of green channel to the pixel;Wherein, the uneven deviation compensation coefficient of any pixel is according to institute
The Gr channel values and Gb channel values for stating pixel are calculated.
The third aspect, the embodiment of the present invention provide a kind of terminal, and the terminal includes at least:Memory, communication bus and
Processor, wherein:
The memory, for storing image processing program;
The communication bus, the connection communication being used to implement between processor and memory;
The processor, for performing the image processing program stored in memory, to realize following steps:
Obtain the pending image shot by filming apparatus;
Obtain the corresponding base image of the filming apparatus;
The first pixel in the base image carries out green channel to the second pixel in the pending image
Compensation deals;
Wherein, it the distance between optical center of first pixel and the base image and second pixel and described treats
It is equal to handle the distance between the optical center of image.
Fourth aspect, the embodiment of the present invention provide a kind of terminal, and the terminal includes at least:Memory, communication bus and
Processor, wherein:
The memory, for storing image processing program;
The communication bus, the connection communication being used to implement between processor and memory;
The processor, for performing the image processing program stored in memory, to realize following steps:
Obtain pending image;It determines whether the uneven deviation compensation coefficient of the pixel in pending image is more than to preset
Imbalance endure threshold value;If there is uneven deviation compensation coefficient in pending image is more than the picture that imbalance endures threshold value
Element carries out the balanced compensated processing of green channel to the pixel;Wherein, the uneven deviation compensation coefficient of any pixel is according to institute
The Gr channel values and Gb channel values for stating pixel are calculated.
5th aspect, the embodiment of the present invention provide a kind of computer readable storage medium, the computer-readable storage medium
Image processing program is stored in matter, described image processing routine realizes image processing method as described above when being executed by processor
The step of.
A kind of image processing method, terminal and the computer readable storage medium that the embodiment of the present invention is provided, wherein,
The pending image shot by filming apparatus is obtained first;Then the corresponding base image of the filming apparatus is obtained;Further according to
The first pixel in the base image carries out green channel compensation deals to the second pixel in the pending image;This
Inventive embodiments provide a kind of method that green channel imbalance in image compensates.
Description of the drawings
A kind of hardware architecture diagram of Fig. 1 mobile terminals of each embodiment to realize the present invention;
Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention;
Fig. 3 is the schematic diagram of the sub-pixel of pixel;
Fig. 4 A are the schematic diagram one in the presence of the image of green energy imbalance;
Fig. 4 B are the schematic diagram two in the presence of the image of green energy imbalance;
Fig. 5 is the flow diagram one of image processing method provided in an embodiment of the present invention;
Fig. 6 is the schematic diagram for the image that image processing method provided in an embodiment of the present invention is applied to after compensation deals;
Fig. 7 is the flow diagram two of image processing method provided in an embodiment of the present invention;
Fig. 8 is the flow diagram three of image processing method provided in an embodiment of the present invention;
Fig. 9 is the flow diagram four of image processing method provided in an embodiment of the present invention;
Figure 10 is the structure diagram one of terminal provided in an embodiment of the present invention;
Figure 11 is the structure diagram two of terminal provided in an embodiment of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, using for representing that the suffix of such as " module ", " component " or " unit " of element is only
Be conducive to the explanation of the present invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix
Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention can include such as mobile phone, tablet
Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable
The shiftings such as media player (Portable Media Player, PMP), navigation device, wearable device, Intelligent bracelet, pedometer
The dynamic fixed terminals such as terminal and number TV, desktop computer.
It will be illustrated by taking mobile terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to special
For moving except the element of purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, a kind of hardware architecture diagram of its mobile terminal of each embodiment to realize the present invention, the shifting
Dynamic terminal 100 can include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit
103rd, A/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit
108th, the components such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1
Mobile terminal structure does not form the restriction to mobile terminal, and mobile terminal can be included than illustrating more or fewer components,
Either combine certain components or different components arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receive and send messages or communication process in, signal sends and receivees, specifically, by base station
Downlink information receive after, handled to processor 110;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101
Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, it penetrates
Frequency unit 101 can also communicate with network and other equipment by radio communication.Above-mentioned wireless communication can use any communication
Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications
System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code
Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division
Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division-Synchronous Code
Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division
Duplexing-Long Term Evolution, frequency division duplex long term evolution) and TDD-LTE (Time Division
Duplexing-Long Term Evolution, time division duplex long term evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102
Sub- mail, browsing webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Fig. 1 shows
Go out WiFi module 102, but it is understood that, and must be configured into for mobile terminal is not belonging to, it completely can be according to need
It to be omitted in the range for the essence for not changing invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100
Formula, speech recognition mode, broadcast reception mode when under isotypes, it is that radio frequency unit 101 or WiFi module 102 are received or
The audio data stored in memory 109 is converted into audio signal and exports as sound.Moreover, audio output unit 103
The relevant audio output of specific function performed with mobile terminal 100 can also be provided (for example, call signal receives sound, disappears
Breath receives sound etc.).Audio output unit 103 can include loud speaker, buzzer etc..
A/V input units 104 are used to receive audio or video signal.A/V input units 104 can include graphics processor
(Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode
Or the static images or the image data of video obtained in image capture mode by image capture apparatus (such as camera) carry out
Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited
Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike
Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042
Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can
To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model.
Microphone 1042 can implement various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition)
The noise generated during frequency signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies
Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein, ambient light sensor can be according to environment
The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear
Display panel 1061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general
For three axis) size of acceleration, size and the direction of gravity are can detect that when static, can be used to identify the application of mobile phone posture
(such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.;
The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer,
The other sensors such as hygrometer, thermometer, infrared ray sensor, details are not described herein.
Display unit 106 is used to show by information input by user or be supplied to the information of user.Display unit 106 can wrap
Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode may be used
Display panel 1061 is configured in forms such as (Organic Light-Emitting Diode, OLED).
User input unit 107 can be used for receiving the number inputted or character information and generation and the use of mobile terminal
The key signals input that family is set and function control is related.Specifically, user input unit 107 may include touch panel 1071 with
And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect user on it or neighbouring touch operation
(for example user uses any suitable objects such as finger, stylus or attachment on touch panel 1071 or in touch panel 1071
Neighbouring operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detection
Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band
The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it
Contact coordinate is converted into, then gives processor 110, and the order that processor 110 is sent can be received and performed.It in addition, can
To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel
1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap
It includes but is not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, operating lever etc.
It is one or more, do not limit herein specifically.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or
After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing
The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel
1061 be the component independent as two to realize the function that outputs and inputs of mobile terminal, but in certain embodiments, it can
The function that outputs and inputs of mobile terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not done herein specifically
It limits.
Interface unit 108 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example,
External device (ED) can include wired or wireless head-band earphone port, external power supply (or battery charger) port, wired or nothing
Line data port, memory card port, the port for device of the connection with identification module, audio input/output (I/O) end
Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number
It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with
For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storage software program and various data.Memory 109 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
Audio data, phone directory etc.) etc..In addition, memory 109 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 110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection
A part is stored in storage by running or performing the software program being stored in memory 109 and/or module and call
Data in device 109 perform the various functions of mobile terminal and processing data, so as to carry out integral monitoring to mobile terminal.Place
Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated
Device is managed, wherein, the main processing operation system of application processor, user interface and application program etc., modem processor is main
Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111
Can be logically contiguous by power-supply management system and processor 110, so as to realize management charging by power-supply management system, put
The functions such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
For the ease of understanding the embodiment of the present invention, below to the communications network system that is based on of mobile terminal of the present invention into
Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention, the communication network system
The LTE system united as universal mobile communications technology, the LTE system include the UE (User Equipment, the use that communicate connection successively
Family equipment) 201, E-UTRAN (Evolved UMTS Terrestrial Radio Access Network, evolved UMTS lands
Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation
204。
Specifically, UE201 can be above-mentioned terminal 100, and details are not described herein again.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning
Journey (backhaul) (such as X2 interface) is connect with other eNodeB2022, and eNodeB2021 is connected to EPC203,
ENodeB2021 can provide the access of UE201 to EPC203.
EPC203 can include MME (Mobility Management Entity, mobility management entity) 2031, HSS
(Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way,
Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and
Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and
The control node of signaling, provides carrying and connection management between EPC203.HSS2032 is all to manage for providing some registers
Such as the function of home location register (not shown) etc, and some are preserved in relation to use such as service features, data rates
The dedicated information in family.All customer data can be sent by SGW2034, and PGW2035 can provide the IP of UE 201
Address is distributed and other functions, and PCRF2036 is business data flow and the strategy of IP bearing resources and charging control strategic decision-making
Point, it selects and provides available strategy and charging control decision with charge execution function unit (not shown) for strategy.
IP operation 204 can include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia
System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art it is to be understood that the present invention not only
Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with
And following new network system etc., it does not limit herein.Based on above-mentioned mobile terminal hardware configuration and communications network system, carry
Go out each embodiment of the method for the present invention.
It, can not when passing through camera collection image due to sensor devices manufacturing process and circuit etc. in camera
The meeting avoided generates some image informations not being consistent with true picture.For example, the color of each pixel and bright in image
The information such as degree are determined by the value of the sub-pixel in each pixel.One pixel can include four sub-pixels, and Fig. 3 is pixel
Sub-pixel schematic diagram, as shown in figure 3, each pixel can include a red sub-pixel R, a blue subpixels B and
Two green sub-pixels Gr and Gb.When the channel value of two green sub-pixels is there are during larger difference, on image it is possible that
Grid labyrinth phenomenon, this phenomenon are properly termed as green uneven (Green Imbalance), and Fig. 4 A are uneven in the presence of green
The schematic diagram one of the image of phenomenon.Fig. 4 B are the schematic diagram two in the presence of the image of green energy imbalance.The embodiment of the present invention carries
The technical solution of confession can compensate, and then can promote the quality of image the unbalanced pixel of green in image.
The embodiment of the present invention provides a kind of image processing method, and Fig. 5 is image processing method provided in an embodiment of the present invention
Flow diagram one, as shown in figure 5, the method may include following steps:
Step S501 obtains the pending image shot by filming apparatus.
In embodiments of the present invention, the executive agent of the embodiment of the present invention can be mobile terminal, such as mobile phone, personal electricity
The equipment that brain, camera, video camera etc. or server etc. have image-capable.
In embodiments of the present invention, pending image can be shot by the filming apparatus of a certain type.Filming apparatus example
Such as can be that camera, the video camera of mobile terminal have the equipment of shooting function.Form for example can be with RAW forms.It waits to locate
Reason image can be complete in a certain frame in the image in all or part of region in single photo or video image
Portion or the image of subregion.
Step S502 obtains the corresponding base image of filming apparatus.
In embodiments of the present invention, base image can be shot by the filming apparatus identical with acquiring pending image
Or capture apparatus photographs from same type.The base image for example can be in the capture apparatus or be somebody's turn to do
Before the capture apparatus manufacture of type, it is preset on filming apparatus or presets on mobile terminals, if filming apparatus is corresponding
Base image is stored on filming apparatus, then mobile terminal can obtain the corresponding foundation drawing of the filming apparatus from filming apparatus
Picture.
In embodiments of the present invention, base image can be to be set with pending image using identical or close zoom magnification
The image shot in the case of putting.Illustratively, the image that base image can be shot in the non-zoom of filming apparatus.For another example,
The image using the setting of various zoom magnifications can be directed to, filming apparatus is obtained respectively and is shot under the setting of corresponding zoom magnification
Base image.
In embodiments of the present invention, it should be noted that the image using the shooting of the same or similar capture apparatus has
The distribution character of green channel ratio being closer to.The green channel ratio of any pixel can be the Gr channel values of the pixel
With the ratio of Gb channel values.In other embodiment of the embodiment of the present invention, in the system for the color-values that pixel is defined using RGB
In, the channel value range of Gr channel values and Gb channel values is 0 to 255.
In embodiments of the present invention, can utilize with the distribution character of the expected green channel ratio of pending image compared with
Processing is compensated to the green channel imbalance problem in pending image for close base image.With in pending image
Pixel for for the second pixel, green channel ratio and the second picture in pending image of the first pixel in base image
The green channel ratio of element, can meet the following conditions:It is being treated when position of first pixel in base image with the second pixel
When position in processing image is identical, the difference between the green channel ratio of the first pixel and the green channel ratio of the second pixel
Value can be less than preset deviation threshold.That is, before compensation, the imbalance of the green channel of the second pixel it is horizontal with
The uneven level of green of first pixel is closer to.
In embodiments of the present invention, it is described to obtain the corresponding base image of the filming apparatus, it can include:Described in acquisition
Base image, wherein, the green channel ratio of the first pixel in the base image and base described in first pixel distance
The optical center of plinth image is proportional.In base image, the distance of the optical center of pixel distance image is more remote, the green of the pixel
Channel ratio is usually bigger.In other embodiments of the present invention, in base image, pending image is this is obtained by filming apparatus
Original image in, the increasing velocity of the green channel ratio of pixel can be than the increase of the distance of the optical center of pixel distance image
Speed is faster.
In embodiments of the present invention, it is described to obtain the corresponding base image of the filming apparatus, it can also include:Obtain by
The base image of filming apparatus shooting, the color-values of any pixel in the base image and institute in the base image
There is the difference between the average value of the color-values of pixel to be less than preset first threshold value.Wherein, all pixels in the base image
Color-values average value not equal to white color-values.
For example, when in advance using filming apparatus acquisition base image, a shooting can be preset in the lab
Scene can set a tablet in the photographed scene, can be painted in advance on the tablet upper berth lastblock painting canvas, the painting canvas
Pure color is made as, to be virtually free from apparent aberration, positive shooting is then carried out to the photographed scene by filming apparatus, is led to
Cross the distance between adjustment filming apparatus and painting canvas so that the image of painting canvas takes the view-finder of entire capture apparatus.Painting canvas
Color can be non-white except arbitrary pure color, illustratively, can be red, orange, yellow, green, cyan, blue,
Purple, piece red, grass green, purplish blue color, brown, black etc..In other embodiments of the present invention, when acquiring base image,
It can also be judged as the aberration on the painting canvas of reference object everywhere using vitta card, illustratively, in image everywhere
Color in a vitta.
It should be noted that the distribution situation of the green channel ratio of pixel in base image and picture in pending image
The distribution situation of the green channel ratio of element is closer to, and base image can serve as carrying out green channel to pending image
The reference picture of compensation deals.
It is logical to carry out green to the second pixel in pending image for step S503, the first pixel in base image
Road compensation deals.
Wherein, it the distance between optical center of first pixel and the base image and second pixel and described treats
It is equal to handle the distance between the optical center of image.
In embodiments of the present invention, position of first pixel in the base image can be with second pixel
Position in the pending image is identical.The green channel ratio of the first identical pixel of position and the green of the second pixel
Difference between channel ratio can be less than preset deviation threshold.It then can be according to the identical pixel in position in base image
Green channel ratio, in pending image carry out green channel compensation deals.
In one example, first pixel in the base image, to second in the pending image
Pixel carries out green channel compensation deals, can include:
The compensation of the offset and Gb channels of the Gr channels of the second pixel is determined according to the green channel ratio of the first pixel
Value.Illustratively, if the green channel ratio of the first pixel is more than 1, the offset of the Gr channels of the second pixel is negative,
Such as -2, ratio is bigger, and the amplitude of adjustment can be bigger, such as -10.
In another example, first pixel in the base image, in the pending image
Two pixels carry out green channel compensation deals, can include:According to the green channel ratio of first pixel, described treat is determined
Handle the offset of Gr channel values of the second pixel and/or the offset of Gb channel values in image;According to second pixel
The offset of Gr channel values and/or the offset of Gb channel values, determine the Gr channels of second pixel after the compensation
Value and Gb channel values;Wherein, the green channel ratio of any pixel for the pixel Gr channel values and Gb channel values it
Between ratio.
In embodiments of the present invention, if the green channel ratio of the first pixel is more than 1, i.e., in the Gr of the point in base image
Value is bigger than Gb channel value, then the offset that can determine the Gr channel values of the second pixel in pending image is negative, that is, is subtracted
Small Gr channel values.If the green channel ratio of the first pixel is bigger, the offset of the Gr channel values of the second pixel is smaller, that is, subtracts
Small amplitude bigger.In other embodiments of the present invention, when pixel distance optical center is more remote, green channel ratio is bigger, then Gr leads to
The adjustment amplitude of road value is bigger.In other embodiments of the present invention, when the green channel ratio of the first pixel is more than 1, may be used also
Using the offset of the Gr channel values of the second pixel in determining pending image as negative, the offset of Gb channels is positive number, i.e.,
While Gr channel values are reduced, increase Gb channel values.
In embodiments of the present invention, if the green channel ratio of the first pixel is less than 1, i.e., in the Gr of the point in base image
Value is smaller than Gb channel value, then the offset that can determine the Gr channel values of the second pixel in pending image is positive number, that is, is subtracted
Small Gr channel values.
In other embodiments of the present invention, first pixel in the base image, to the pending figure
The second pixel as in carries out green channel compensation deals, can include:
According to the uneven deviation compensation coefficient GIC of first pixel, the imbalance of the second pixel after compensation is determined
The correction value of deviation compensation coefficient GIC values;According to the correction of the uneven deviation compensation coefficient GIC values of the second pixel after compensation
Value, determines the offset of Gr channel values of the second pixel and/or the offset of Gb channel values in the pending image;According to
The offset of the Gr channel values of second pixel and/or the offset of Gb channel values, determine described second after the compensation
The Gr channel values of pixel and Gb channel values;
Wherein, the uneven deviation compensation coefficient GIC of any pixel can basis
It is calculated.
Illustratively, the correction value GICR2-GICR0 of the uneven deviation compensation coefficient GIC2 of the second pixel can basis
The uneven deviation compensation coefficient GIC1 and imbalance of first pixel are still determined by threshold value GIC0 using following formula:
Later, it is possible to the Gr channel values of the second pixel and the offset of Gb channel values are assured that out according to GIC2.
Fig. 6 is the schematic diagram for the image that image processing method provided in an embodiment of the present invention is applied to after compensation deals.Such as
Shown in Fig. 6, the maze lattice phenomenon in the image after compensation substantially weakens.
In other embodiments of the present invention, first pixel in the base image, to the pending figure
The second pixel as in carries out green channel compensation deals, can also include:Determine each second in the pending image
The uneven deviation compensation coefficient of pixel;Deviation compensation coefficient uneven in the pending image is more than preset imbalance
The second pixel for enduring threshold value is determined as the second pixel to be compensated;Green channel is carried out to second pixel to be compensated to put down
Weighing apparatus compensation deals;Wherein, the uneven deviation compensation coefficient of any pixel is according to the Gr channel values of the pixel and Gb channel values
It is calculated.
Wherein, uneven deviation compensation (Green Imbalance Compensation) coefficient GIC roots of any pixel
According toIt is calculated.
In embodiments of the present invention, the pending image shot by filming apparatus is obtained first;Then the shooting is obtained
The corresponding base image of device;Further according to the first pixel in the base image, to the second picture in the pending image
Element carries out green channel compensation deals;Wherein, the distance between optical center of first pixel and the base image with it is described
The distance between the optical center of second pixel and the pending image is equal, enabling uneven to the green in pending image
Weighing apparatus problem compensates processing.As it can be seen that technical solution provided in an embodiment of the present invention be capable of providing it is a kind of to image carry out green
The processing method of channel compensation.
In embodiments of the present invention, using the above scheme, using the capture apparatus of same type shooting base image with
Pending image can have a distribution character of more approximate green channel ratio, thus can be in base image the
One pixel carries out the balanced compensated processing of green channel to the second pixel in pending image, and this mode can ensure at compensation
The accuracy of reason, at the same time it can also promote the speed of compensation deals.
In embodiments of the present invention, using the above scheme, especially with the pure color of non-white or it is closer to pure color
Reference object obtain base image, to pending image carry out the balanced compensated processing of green channel, due to the foundation drawing of pure color
Green channel distribution proportion as in is more simple to be embodied since the green of the hardware reason generation of capture apparatus is uneven
The problem of phenomenon, and shield some factors due to green channel energy imbalance normal caused by heterochromia so that
The shadow for the realistic colour of reference object in image can be reduced for the balanced compensated processing of the green channel of pending image
It rings.So as to ensure that the quality of image while the green energy imbalance in mitigating pending image.
The embodiment of the present invention also provides a kind of image processing method, and Fig. 7 is image processing method provided in an embodiment of the present invention
The flow diagram two of method.As shown in fig. 7, the step of embodiment of the present invention, can also include:
Step S701 obtains the pending image shot by filming apparatus.
Wherein, the step is similar with S501.
Step S702 obtains the corresponding base image of filming apparatus.
Wherein, the step is similar with S502.
Step S703 determines the uneven deviation compensation coefficient of each second pixel in pending image.
In embodiments of the present invention, the uneven deviation compensation coefficient of any pixel according to the Gr channel values of the pixel and
Gb channel values are calculated.
For example, the uneven deviation compensation coefficient GIC of any pixel according to
It is calculated.
In embodiments of the present invention, GIC values in image are generally in the range of 0 to 1.
Step S704, that deviation compensation coefficient uneven in pending image is more than that preset imbalance endures threshold value
Two pixels are determined as the second pixel to be compensated.
In embodiments of the present invention, the uneven setting for enduring threshold value can be according to the green energy imbalance in image
The degree of tolerance setting, which can be the numerical value between 0 to 1, and it is bigger that imbalance endures threshold value, then only to green uneven
More serious pixel carries out the balanced compensated processing of green, and it is smaller that imbalance endures threshold value, then will be to image Green imbalance
The pixel of lesser extent also carries out the balanced compensated processing of green.Illustratively, it can be 0.5 that imbalance, which endures threshold value,.
Step S705 carries out the balanced compensated processing of green channel to the second pixel to be compensated.
Wherein, treat supplement the second pixel carry out green channel it is balanced compensated processing in embodiment illustrated in fig. 4 to each
A second pixel carries out that the step of green channel balanced compensated processing is similar, and details are not described herein again.
In embodiments of the present invention, by determining that the uneven deviation of each second pixel in the pending image is mended
Repay coefficient;Deviation compensation coefficient uneven in the pending image is endured to the second pixel of threshold value more than preset imbalance
It is determined as the second pixel to be compensated;The balanced compensated processing of green channel is carried out to second pixel to be compensated;Wherein, appoint
The uneven deviation compensation coefficient of one pixel is calculated according to the Gr channel values and Gb channel values of the pixel.Due to imbalance
Enduring the setting of threshold value can be set according to the degree of tolerance to the green energy imbalance in image, so as to according to green
The more serious pixel of energy imbalance compensates processing, and reduction is needed to compensate the quantity of the pixel of processing, be promoted green
The quality of image is promoted while the speed of chrominance channel compensation deals.
The other technologies solution details and technique effect of the embodiment of the present invention can refer to the related description in other embodiment.
The embodiment of the present invention also provides a kind of image processing method, and Fig. 8 is image processing method provided in an embodiment of the present invention
The flow diagram three of method.As shown in figure 8, the step of embodiment of the present invention, can also include:
Step S801 obtains pending image.
Wherein, the step is similar with S501.
Step S802, determines whether the uneven deviation compensation coefficient of the pixel in pending image is more than preset injustice
Weighing apparatus endures threshold value.
Wherein, the uneven deviation compensation coefficient of any pixel is calculated according to the Gr channel values and Gb channel values of the pixel
It obtains.For example, the uneven deviation compensation coefficient GIC of any pixel according to
It is calculated.
In embodiments of the present invention, GIC values in image are generally in the range of 0 to 1.
Step S803, if there is uneven deviation compensation coefficient in pending image is more than the picture that imbalance endures threshold value
Element carries out the balanced compensated processing of green channel to the pixel.
In embodiments of the present invention, the uneven setting for enduring threshold value can be according to the green energy imbalance in image
The degree of tolerance setting, which can be the numerical value between 0 to 1, and it is bigger that imbalance endures threshold value, then only to green uneven
More serious pixel carries out the balanced compensated processing of green, and it is smaller that imbalance endures threshold value, then will be to image Green imbalance
The pixel of lesser extent also carries out the balanced compensated processing of green.Illustratively, it can be 0.5 that imbalance, which endures threshold value,.
In embodiments of the present invention, may be used in the following manner to determine the Gr channel values of the second pixel that needs compensate and
Gb channel values compensate.In one example, when the GIC of the first pixel endures threshold value more than imbalance, second can be adjusted
The Gr channel values of pixel, until the GIC values of the second pixel are less than threshold value.In another example, it is more than not in the GIC of the first pixel
Balance endures threshold value, and when Gr channel values are more than Gb channel values, can also be directly by the setting of the Gr channel values of the second pixel and Gb
Channel value is identical, alternatively, the Gb channel values setting by the second pixel is identical with Gr channel values.In another example, in the first picture
The GIC of element is more than imbalance when enduring threshold value, can also adjust the Gb channel values of the second pixel, until the GIC of the second pixel
Value is less than threshold value.
In embodiments of the present invention, by obtaining pending image first, the pixel in pending image is then determined
Whether uneven deviation compensation coefficient more than preset imbalance endures threshold value, is mended if there is uneven deviation in pending image
It repays coefficient and is more than the pixel that imbalance endures threshold value, then the balanced compensated processing of green channel is carried out to the pixel;Wherein, it is any
The uneven deviation compensation coefficient of pixel is calculated according to the Gr channel values and Gb channel values of the pixel.Since imbalance is born
Set and can be set according to the degree of tolerance of the green energy imbalance in image by threshold value, so as to according to green not
The more serious pixel of equilibrium appearance compensates processing, and reduction needs to compensate the quantity of the pixel of processing, promotes green
The quality of image is promoted while the speed of channel compensation processing.
The other technologies solution details and technique effect of the embodiment of the present invention can refer to the related description in other embodiment.
In embodiments of the present invention, green channel compensation deals are carried out to pending image, in the following manner can also be taken.
In one example, the Gr channel values of the first pixel that can be in base image and Gb channel values, to pending
The Gr channel values and Gb channel values of the second pixel in image compensate;Wherein, the green of second pixel after compensation
Channel offset value is less than preset green channel deviation desired value;The green channel deviation of any pixel is Gr in the pixel
Difference between channel value and Gb channel values.
In embodiments of the present invention, the Gr channel values of first pixel in the base image and Gb channels
Value, compensates the Gr channel values and Gb channel values of the second pixel in the pending image, can include:It is treated to described
The Gr channel values and Gb channel values of the second pixel in processing image compensate, and the green of second pixel after compensation is led to
It is corresponding green logical that difference between road deviation and the green channel deviation of first pixel is less than first pixel
Road deviation desired value.
Wherein, the corresponding green channel deviation desired value of the first pixel can be with the optical center of the first pixel distance base image
Distance it is proportional.Illustratively, when the distance of the optical center of the first pixel distance base image is bigger, the first pixel corresponds to
Green channel deviation desired value can be bigger, the distance of the optical center of the first pixel distance base image is got over hour, the first pixel
Corresponding green channel deviation desired value can be smaller.
The other technologies solution details and technique effect of the embodiment of the present invention can refer to the related description in other embodiment.
The embodiment of the present invention also provides a kind of image processing method, and Fig. 9 is image processing method provided in an embodiment of the present invention
The flow diagram four of method, as shown in figure 9, the step of embodiment of the present invention can include:
Step S901 for each pixel in pending image, judges whether Gr and Gb channel differences are excessive.
Wherein, the whether excessive criterion of Gr and Gb channel differences is
More than or equal to threshold value, then judge that Gr and Gb channel differences are excessive.
Step S902 if difference is excessive, determines to need to be modified processing to the pixel in pending image.
Wherein, it would be desirable to which the pixel for being modified processing adds in pixel point set to be compensated.
Step S903 shoots pure color figure.
In embodiments of the present invention, the pure color by being shot with obtaining the capture apparatus of the pending same or like model of image
Figure, the pure color figure is similar to the base image described in preceding embodiment, i.e., the color-values of any pixel in described pure color figure and
Difference in the base image between the average value of the color-values of all pixels is less than preset first threshold value.Wherein, it is described pure
The average value of the color-values of all pixels is not equal to the color-values of white in chromatic graph.
For example, when in advance using filming apparatus acquisition base image, a shooting can be preset in the lab
Scene can set a tablet in the photographed scene, can be painted in advance on the tablet upper berth lastblock painting canvas, the painting canvas
Pure color is made as, to be virtually free from apparent aberration, positive shooting is then carried out to the photographed scene by filming apparatus, is led to
Cross the distance between adjustment filming apparatus and painting canvas so that the image of painting canvas takes the view-finder of entire capture apparatus.Painting canvas
Color can be non-white except arbitrary pure color, illustratively, can be red, orange, yellow, green, cyan, blue,
Purple, piece red, grass green, purplish blue color, brown, black etc..In other embodiments of the present invention, when acquiring pure color figure, make
It can also be judged for the aberration on the painting canvas of reference object everywhere using vitta card, illustratively, in image everywhere
Color is in a vitta.
It should be noted that the distribution situation of the green channel ratio of pixel in pure color figure and pixel in pending image
The distribution situation of green channel ratio be closer to, pure color figure can serve as carrying out green channel compensation to pending image
The reference picture of processing.
Step S904 traverses pure color figure, calculates the GIC values of each pixel.
Wherein, GIC can basisIt calculates.
Step S905 is more remote from optical center, and GIC is bigger, then needs to compensate.
Wherein, distance dependent of the green channel ratio of each pixel in image usually with pixel distance optical center.Optical center
Such as can be the center of image, can be the geometric center of image illustratively.Pixel distance light in pure color figure
When the heart is more remote, GIC values are usually bigger, then the identical pixel in the position in pending image needs to carry out green channel compensation.Show
Example property, the Gr channel values that the pixel compensated is needed in pending image are revised as consistent with Gb channel values.It is of the invention real
It applies the other technologies solution details of example and technique effect can refer to related description in other embodiment.
The embodiment of the present invention provides a kind of terminal, and Figure 10 provides the structure diagram one of terminal for the embodiment of the present invention, such as
Shown in Figure 10, the terminal 1000 includes at least:Processor 1001, memory 1002, interface 1003 and bus 1004, wherein:
The memory 1002, for storing image processing program;
The bus 1004, the connection communication being used to implement between processor and memory;
The processor 1001, for performing the image processing program stored in memory, to realize following steps:
Obtain the pending image shot by filming apparatus;Obtain the corresponding base image of the filming apparatus;According to described
The first pixel in base image carries out green channel compensation deals to the second pixel in the pending image;Wherein, institute
State the distance between optical center of the first pixel and the base image and second pixel and the optical center of the pending image
The distance between it is equal.
In embodiments of the present invention, position of first pixel in the base image and second pixel are in institute
The position stated in pending image can be identical.
In embodiments of the present invention, it is described to obtain the corresponding base image of the filming apparatus, it can include:Described in acquisition
Base image, wherein, the green channel ratio of the first pixel in the base image and base described in first pixel distance
The optical center of plinth image is proportional.
In embodiments of the present invention, it is described to obtain the corresponding base image of the filming apparatus, it can include:It obtains by institute
The base image of filming apparatus shooting is stated, the color-values of any pixel in the base image in the base image with owning
Difference between the average value of the color-values of pixel is less than preset first threshold value;Wherein, all pixels in the base image
The average value of color-values is not equal to the color-values of white.
In embodiments of the present invention, first pixel in the base image, in the pending image
The second pixel carry out green channel compensation deals, can include:According to the green channel ratio of first pixel, institute is determined
State the offset of the Gr channel values of the second pixel in pending image and/or the offset of Gb channel values;Wherein, it is any described
Ratio of the green channel ratio of pixel between the Gr channel values of the pixel and Gb channel values.
In embodiments of the present invention, first pixel in the base image, in the pending image
The second pixel carry out green channel compensation deals, can include:Determine each second pixel in the pending image
Uneven deviation compensation coefficient;Deviation compensation coefficient uneven in the pending image is endured into threshold more than preset imbalance
Second pixel of value is determined as the second pixel to be compensated;It is balanced compensated that green channel is carried out to second pixel to be compensated
Processing;Wherein, the uneven deviation compensation coefficient of any pixel is calculated according to the Gr channel values and Gb channel values of the pixel
It arrives.
In other embodiments of the present invention, interface can be used for obtaining complete image or pending figure from filming apparatus
Picture.Capture apparatus, the camera of terminal image, the image example of acquisition can also be frame by frame acquired in terminal including camera etc.
Such as can be the 1st frame, the 2nd frame ... ..., (N-1) frame, nth frame etc..
It should be noted that the description of Yi Shang terminal embodiment, the description with above method embodiment is similar, is had
The similar advantageous effect with embodiment of the method, therefore do not repeat.It is thin for the technology not disclosed in terminal embodiment of the present invention
Section, please refers to the description of the method for the present invention embodiment and understands.
The embodiment of the present invention provides a kind of terminal, and Figure 11 is the structure diagram two of terminal provided in an embodiment of the present invention,
As shown in figure 11, the terminal 1100 includes at least:Processor 1101, memory 1102, interface 1103 and bus 1104,
In:The memory 1102, for storing image processing program;The bus 1104, be used to implement processor and memory it
Between connection communication;The processor 1101, for performing the image processing program stored in memory, to realize following walk
Suddenly:Obtain pending image;Determine the pixel in pending image uneven deviation compensation coefficient whether be more than it is preset not
Balance endures threshold value;If there is uneven deviation compensation coefficient in pending image is more than the pixel that imbalance endures threshold value, right
The pixel carries out the balanced compensated processing of green channel;Wherein, the uneven deviation compensation coefficient of any pixel is according to the picture
The Gr channel values and Gb channel values of element are calculated.For example, the uneven deviation compensation coefficient GIC of any pixel according toIt is calculated.The other technologies solution details and skill of the embodiment of the present invention
Art effect can refer to the related description in other embodiment.
The embodiment of the present invention provides a kind of computer readable storage medium, and the computer-readable recording medium storage has one
A or multiple programs, one or more of programs can be performed by one or more processor, to realize following steps:
Obtain the pending image shot by filming apparatus;Obtain the corresponding base image of the filming apparatus;According to institute
The first pixel in base image is stated, green channel compensation deals are carried out to the second pixel in the pending image;Wherein,
The distance between optical center of first pixel and the base image and second pixel and the light of the pending image
The distance between heart is equal.
It should be noted that one or more program in the embodiment of the present invention can be that figure is carried out in other embodiment
As the image processing program used during processing.
The embodiment of the present invention provides a kind of computer readable storage medium, and the computer-readable recording medium storage has one
A or multiple programs, one or more of programs can be performed by one or more processor, to realize following steps:
Obtain pending image;It determines whether the uneven deviation compensation coefficient of the pixel in pending image is more than to preset
Imbalance endure threshold value;If there is uneven deviation compensation coefficient in pending image is more than the picture that imbalance endures threshold value
Element carries out the balanced compensated processing of green channel to the pixel;Wherein, the uneven deviation compensation coefficient of any pixel is according to institute
The Gr channel values and Gb channel values for stating pixel are calculated.
It should be noted that one or more program in the embodiment of the present invention can be that figure is carried out in other embodiment
As the image processing program used during processing.
It should be noted that the description of Yi Shang computer readable storage medium, the description with above method embodiment is class
As, there is the advantageous effect similar with embodiment of the method, therefore do not repeat.For computer readable storage medium of the present invention
The technical detail not disclosed in embodiment please refers to the description of the method for the present invention embodiment and understands.
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 elements, and
And it further includes other elements that are not explicitly listed or further includes intrinsic for this process, method, article or device institute
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this
Also there are other identical elements in the process of element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
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 of the present invention substantially in other words does the prior art
Going out the part of contribution can be embodied in the form of software product, which is stored in a storage medium
In (such as ROM/RAM, magnetic disc, CD), used including some instructions so that a station terminal equipment (can be mobile phone, computer takes
Business device, air conditioner or the network equipment etc.) perform each described method of embodiment of the present invention.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagram
The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided
The processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that the instruction performed by computer or the processor of other programmable data processing devices is generated for real
The device of function specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction generation being stored in the computer-readable memory includes referring to
Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or
The function of being specified in multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps are performed on calculation machine or other programmable devices to generate computer implemented processing, so as in computer or
The instruction offer performed on other programmable devices is used to implement in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair
The equivalent structure or equivalent flow shift that bright specification and accompanying drawing content are made directly or indirectly is used in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of image processing method, which is characterized in that the method includes:
Obtain the pending image shot by filming apparatus;
Obtain the corresponding base image of the filming apparatus;
The first pixel in the base image carries out green channel compensation to the second pixel in the pending image
Processing;
Wherein, the distance between optical center of first pixel and the base image and second pixel and described pending
The distance between optical center of image is equal.
2. method as described in claim 1, which is characterized in that position of first pixel in the base image with
Position of second pixel in the pending image is identical.
3. the method as described in claim 1, which is characterized in that described to obtain the corresponding base image of the filming apparatus, packet
It includes:
Obtain the base image that is shot by the filming apparatus, the color-values of any pixel in the base image and the base
Difference in plinth image between the average value of the color-values of all pixels is less than preset first threshold value;
Wherein, the average value of the color-values of all pixels is not equal to white color-values in the base image.
4. the method as described in claim 1, which is characterized in that first pixel in the base image, to institute
The second pixel stated in pending image carries out green channel compensation deals, including:
According to the green channel ratio of first pixel, the Gr channel values of the second pixel in the pending image are determined
The offset of offset and/or Gb channel values;
According to the offset of the Gr channel values of second pixel and/or the offset of Gb channel values, after determining the compensation
The Gr channel values of second pixel and Gb channel values;
Wherein, ratio of the green channel ratio of any pixel between the Gr channel values of the pixel and Gb channel values.
5. the method as described in claim 1, which is characterized in that first pixel in the base image, to institute
The second pixel stated in pending image carries out green channel compensation deals, including:
Determine the uneven deviation compensation coefficient of each second pixel in the pending image;
The second pixel that deviation compensation coefficient uneven in the pending image is endured to threshold value more than preset imbalance is true
It is set to the second pixel to be compensated;
The balanced compensated processing of green channel is carried out to second pixel to be compensated;
Wherein, the uneven deviation compensation coefficient of any pixel is calculated according to the Gr channel values and Gb channel values of the pixel
It arrives.
6. method as described in claim 6, which is characterized in that the uneven deviation compensation coefficient GIC of any pixel according toIt is calculated.
7. a kind of image processing method, which is characterized in that the method includes:
Obtain pending image;
Determine whether the uneven deviation compensation coefficient of the pixel in pending image more than preset imbalance endures threshold value;
If there is uneven deviation compensation coefficient in pending image is more than the pixel that imbalance endures threshold value, to the pixel into
The balanced compensated processing of row green channel;
Wherein, the uneven deviation compensation coefficient of any pixel is calculated according to the Gr channel values and Gb channel values of the pixel
It arrives.
8. a kind of terminal, which is characterized in that the terminal includes at least:Memory, communication bus and processor, wherein:
The memory, for storing image processing program;
The communication bus, the connection communication being used to implement between processor and memory;
The processor, for performing the image processing program stored in memory, to realize following steps:
Obtain the pending image shot by filming apparatus;
Obtain the corresponding base image of the filming apparatus;
The first pixel in the base image carries out green channel compensation to the second pixel in the pending image
Processing;
Wherein, the distance between optical center of first pixel and the base image and second pixel and described pending
The distance between optical center of image is equal.
9. a kind of terminal, which is characterized in that the terminal includes at least:Memory, communication bus and processor, wherein:
The memory, for storing image processing program;
The communication bus, the connection communication being used to implement between processor and memory;
The processor, for performing the image processing program stored in memory, to realize following steps:
Obtain pending image;
Determine whether the uneven deviation compensation coefficient of the pixel in pending image more than preset imbalance endures threshold value;
If there is uneven deviation compensation coefficient in pending image is more than the pixel that imbalance endures threshold value, to the pixel into
The balanced compensated processing of row green channel;
Wherein, the uneven deviation compensation coefficient of any pixel is calculated according to the Gr channel values and Gb channel values of the pixel
It arrives.
10. a kind of computer readable storage medium, which is characterized in that be stored at image on the computer readable storage medium
Program is managed, the image procossing as described in any one of claim 1 to 7 is realized when described image processing routine is executed by processor
The step of method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810007958.1A CN108234970B (en) | 2018-01-04 | 2018-01-04 | Image processing method, terminal and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810007958.1A CN108234970B (en) | 2018-01-04 | 2018-01-04 | Image processing method, terminal and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108234970A true CN108234970A (en) | 2018-06-29 |
CN108234970B CN108234970B (en) | 2021-05-21 |
Family
ID=62643154
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810007958.1A Active CN108234970B (en) | 2018-01-04 | 2018-01-04 | Image processing method, terminal and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108234970B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111736237A (en) * | 2020-07-31 | 2020-10-02 | 上海眼控科技股份有限公司 | Radiation fog detection method and device, computer equipment and readable storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1835599A (en) * | 2005-02-07 | 2006-09-20 | 三星电子株式会社 | Method and apparatus for processing a bayer-pattern color digital image signal |
CN101371592A (en) * | 2006-01-19 | 2009-02-18 | 高通股份有限公司 | Method and apparatus for adaptive and self-calibrated sensor green channel gain balancing |
CN100563302C (en) * | 2007-08-22 | 2009-11-25 | 北京中星微电子有限公司 | A kind of bad point self-adapted grid noise elimination device and method |
CN102547162A (en) * | 2010-09-30 | 2012-07-04 | 苹果公司 | Image signal processor line buffer configuration for processing raw image data |
CN102625055A (en) * | 2011-01-31 | 2012-08-01 | 英属开曼群岛商恒景科技股份有限公司 | Digital imaging device and image processing method thereof |
CN103002230A (en) * | 2011-09-09 | 2013-03-27 | 联咏科技股份有限公司 | Adaptive pixel compensating method |
CN103646387A (en) * | 2013-12-16 | 2014-03-19 | 威海华菱光电股份有限公司 | Method and device for image correction |
CN104202583A (en) * | 2014-08-07 | 2014-12-10 | 华为技术有限公司 | Image processing device and method |
CN104717474A (en) * | 2013-12-16 | 2015-06-17 | 瑞昱半导体股份有限公司 | Image processing method and module |
CN105530500A (en) * | 2014-09-29 | 2016-04-27 | 安凯(广州)微电子技术有限公司 | Method and device for color data green balance processing |
-
2018
- 2018-01-04 CN CN201810007958.1A patent/CN108234970B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1835599A (en) * | 2005-02-07 | 2006-09-20 | 三星电子株式会社 | Method and apparatus for processing a bayer-pattern color digital image signal |
CN101371592A (en) * | 2006-01-19 | 2009-02-18 | 高通股份有限公司 | Method and apparatus for adaptive and self-calibrated sensor green channel gain balancing |
CN100563302C (en) * | 2007-08-22 | 2009-11-25 | 北京中星微电子有限公司 | A kind of bad point self-adapted grid noise elimination device and method |
CN102547162A (en) * | 2010-09-30 | 2012-07-04 | 苹果公司 | Image signal processor line buffer configuration for processing raw image data |
CN102625055A (en) * | 2011-01-31 | 2012-08-01 | 英属开曼群岛商恒景科技股份有限公司 | Digital imaging device and image processing method thereof |
CN103002230A (en) * | 2011-09-09 | 2013-03-27 | 联咏科技股份有限公司 | Adaptive pixel compensating method |
CN103646387A (en) * | 2013-12-16 | 2014-03-19 | 威海华菱光电股份有限公司 | Method and device for image correction |
CN104717474A (en) * | 2013-12-16 | 2015-06-17 | 瑞昱半导体股份有限公司 | Image processing method and module |
CN104202583A (en) * | 2014-08-07 | 2014-12-10 | 华为技术有限公司 | Image processing device and method |
CN105530500A (en) * | 2014-09-29 | 2016-04-27 | 安凯(广州)微电子技术有限公司 | Method and device for color data green balance processing |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111736237A (en) * | 2020-07-31 | 2020-10-02 | 上海眼控科技股份有限公司 | Radiation fog detection method and device, computer equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108234970B (en) | 2021-05-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107728770A (en) | Screen luminance of terminal method of adjustment, mobile terminal and computer-readable recording medium | |
CN107438163A (en) | A kind of photographic method, terminal and computer-readable recording medium | |
CN107302663A (en) | A kind of brightness of image method of adjustment, terminal and computer-readable recording medium | |
CN107093418A (en) | A kind of screen display method, computer equipment and storage medium | |
CN108269230A (en) | Certificate photo generation method, mobile terminal and computer readable storage medium | |
CN107690065A (en) | A kind of white balance correcting, device and computer-readable recording medium | |
CN107730462A (en) | A kind of image processing method, terminal and computer-readable recording medium | |
CN107680060A (en) | A kind of image distortion correction method, terminal and computer-readable recording medium | |
CN107067842A (en) | Colour method of adjustment, mobile terminal and storage medium | |
CN107291334A (en) | A kind of icon font color determines method and apparatus | |
CN108198146A (en) | A kind of noise-reduction method, equipment and computer readable storage medium | |
CN108170817A (en) | Differentiation video acquiring method, device and the readable storage medium storing program for executing of photo main body | |
CN107506163A (en) | Adjust method, terminal and the computer-readable recording medium of screen display | |
CN108200352A (en) | A kind of method, terminal and storage medium for reconciling picture luminance | |
CN108200421A (en) | A kind of white balancing treatment method, terminal and computer readable storage medium | |
CN109348137A (en) | Mobile terminal camera control method, device, mobile terminal and storage medium | |
CN107040723A (en) | A kind of imaging method based on dual camera, mobile terminal and storage medium | |
CN108810264A (en) | A kind of brightness adjusting method and terminal, computer readable storage medium | |
CN112188708B (en) | Music accompaniment method and device based on mobile terminal and terminal equipment | |
CN107239205A (en) | A kind of photographic method, mobile terminal and storage medium | |
CN108234761A (en) | Adjusting method, device and computer readable storage medium under radio frequency interference | |
CN107707821A (en) | Modeling method and device, bearing calibration, terminal, the storage medium of distortion parameter | |
CN107295270A (en) | Determination method, device, terminal and the computer-readable recording medium of a kind of image brightness values | |
CN108879842A (en) | Charge control method, mobile terminal and computer readable storage medium | |
CN108022227A (en) | A kind of black and white background photo acquisition methods, device and computer-readable recording medium |
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 |