CN108234970B - Image processing method, terminal and computer readable storage medium - Google Patents

Image processing method, terminal and computer readable storage medium Download PDF

Info

Publication number
CN108234970B
CN108234970B CN201810007958.1A CN201810007958A CN108234970B CN 108234970 B CN108234970 B CN 108234970B CN 201810007958 A CN201810007958 A CN 201810007958A CN 108234970 B CN108234970 B CN 108234970B
Authority
CN
China
Prior art keywords
pixel
image
value
channel
processed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810007958.1A
Other languages
Chinese (zh)
Other versions
CN108234970A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201810007958.1A priority Critical patent/CN108234970B/en
Publication of CN108234970A publication Critical patent/CN108234970A/en
Application granted granted Critical
Publication of CN108234970B publication Critical patent/CN108234970B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention discloses an image processing method, wherein the method comprises the following steps: acquiring an image to be processed photographed by a photographing device; acquiring a basic image corresponding to a shooting device; according to the first pixel in the basic image, performing green channel compensation processing on a second pixel in the image to be processed; wherein the distance between the first pixel and the optical center of the base image is equal to the distance between the second pixel and the optical center of the image to be processed. The embodiment of the invention also discloses a terminal and a computer readable storage medium. By implementing the above scheme, the green channel compensation can be performed on the image.

Description

Image processing method, terminal and computer readable storage medium
Technical Field
The present invention relates to the field of terminal technologies, and in particular, to an image processing method, a terminal, and a computer-readable storage medium.
Background
With the development of mobile communication technology, especially the popularization and application of mobile networks and intelligent terminals, the field of mobile internet is developed rapidly. The intelligent terminal has long been an important entertainment device in people's daily life instead of simply meeting the mutual connection of people.
At present, the photographing function becomes an indispensable function of an intelligent terminal, and people can record wonderful moments anytime and anywhere. In photographing with the terminal, images are stored in pixels, each of which includes four subpixels, i.e., one red subpixel R, one blue subpixel B, and two green subpixels Gr and Gb.
Due to the manufacturing process and the circuit of the photosensitive device in the camera, there may be a difference in the values of the Gr sub-pixel and the Gb sub-pixel in the captured image, and a lattice maze phenomenon will occur, which may be referred to as Green Imbalance (Green Imbalance).
At present, an image processing method for compensating the green imbalance problem is needed.
Disclosure of Invention
In view of the above, embodiments of the present invention are directed to an image processing method, a terminal and a computer readable storage medium, which can compensate for a green imbalance problem in an image, thereby improving the quality of the image.
The technical scheme of the embodiment of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an image processing method, where the method includes:
acquiring an image to be processed photographed by a photographing device;
acquiring a basic image corresponding to the shooting device;
according to the first pixel in the basic image, performing green channel compensation processing on a second pixel in the image to be processed;
wherein a distance between the first pixel and the optical center of the base image is equal to a distance between the second pixel and the optical center of the image to be processed.
In a second aspect, an embodiment of the present invention provides an image processing method, where the method includes:
acquiring an image to be processed; determining whether an imbalance deviation compensation coefficient of a pixel in an image to be processed is larger than a preset imbalance tolerance threshold value; if a pixel with an unbalance deviation compensation coefficient larger than an unbalance tolerance threshold exists in the image to be processed, performing green channel balance compensation processing on the pixel; and calculating the unbalance deviation compensation coefficient of any pixel according to the Gr channel value and the Gb channel value of the pixel.
In a third aspect, an embodiment of the present invention provides a terminal, where the terminal at least includes: a memory, a communication bus, and a processor, wherein:
the memory is used for storing an image processing program;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is used for executing the image processing program stored in the memory so as to realize the following steps:
acquiring an image to be processed photographed by a photographing device;
acquiring a basic image corresponding to the shooting device;
according to the first pixel in the basic image, performing green channel compensation processing on a second pixel in the image to be processed;
wherein a distance between the first pixel and the optical center of the base image is equal to a distance between the second pixel and the optical center of the image to be processed.
In a fourth aspect, an embodiment of the present invention provides a terminal, where the terminal at least includes: a memory, a communication bus, and a processor, wherein:
the memory is used for storing an image processing program;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is used for executing the image processing program stored in the memory so as to realize the following steps:
acquiring an image to be processed; determining whether an imbalance deviation compensation coefficient of a pixel in an image to be processed is larger than a preset imbalance tolerance threshold value; if a pixel with an unbalance deviation compensation coefficient larger than an unbalance tolerance threshold exists in the image to be processed, performing green channel balance compensation processing on the pixel; and calculating the unbalance deviation compensation coefficient of any pixel according to the Gr channel value and the Gb channel value of the pixel.
In a fifth aspect, the present invention provides a computer-readable storage medium, on which an image processing program is stored, and when the image processing program is executed by a processor, the image processing program implements the steps of the image processing method as described above.
An embodiment of the invention provides an image processing method, a terminal and a computer readable storage medium, wherein, firstly, an image to be processed shot by a shooting device is obtained; then acquiring a basic image corresponding to the shooting device; performing green channel compensation processing on a second pixel in the image to be processed according to the first pixel in the basic image; the embodiment of the invention provides a method for compensating imbalance of a green channel in an image.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention;
fig. 2 is a diagram of a communication network system architecture according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a sub-pixel of a pixel;
FIG. 4A is a first diagram of an image with green imbalance;
FIG. 4B is a diagram illustrating a second image with green imbalance;
fig. 5 is a first flowchart illustrating an image processing method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an image after compensation processing by the image processing method according to the embodiment of the present invention;
FIG. 7 is a second flowchart illustrating an image processing method according to an embodiment of the present invention;
fig. 8 is a third schematic flowchart of an image processing method according to an embodiment of the present invention;
fig. 9 is a fourth schematic flowchart of an image processing method according to an embodiment of the present invention;
fig. 10 is a first schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems. Based on the above mobile terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
Due to the manufacturing process and the circuit of the photosensitive device in the camera, when the camera collects images, image information which is not consistent with real images is inevitably generated. For example, the information of color and brightness of each pixel in the image is determined by the values of the sub-pixels in each pixel. One pixel may include four sub-pixels, and fig. 3 is a schematic view of the sub-pixels of the pixel, and each pixel may include one red sub-pixel R, one blue sub-pixel B, and two green sub-pixels Gr and Gb, as shown in fig. 3. When there is a large difference between the channel values of the two Green sub-pixels, a lattice maze phenomenon may occur on the image, and this phenomenon may be referred to as Green Imbalance (Green Imbalance), and fig. 4A is a first schematic diagram of the image with the Green Imbalance phenomenon. FIG. 4B is a diagram illustrating a second image with green imbalance. According to the technical scheme provided by the embodiment of the invention, the pixels with unbalanced green color in the image can be compensated, so that the quality of the image can be improved.
An embodiment of the present invention provides an image processing method, and fig. 5 is a first flowchart illustrating the image processing method according to the embodiment of the present invention, and as shown in fig. 5, the method may include the following steps:
in step S501, an image to be processed captured by a capturing device is acquired.
In the embodiment of the present invention, the execution subject of the embodiment of the present invention may be a mobile terminal, such as a mobile phone, a personal computer, a camera, a video camera, or the like, or may be an apparatus with image processing capability, such as a server.
In an embodiment of the invention, the image to be processed may be captured by some type of capturing device. The photographing device may be, for example, a camera, a video camera, or other equipment having a photographing function of the mobile terminal. The format may be, for example, RAW format. The image to be processed may be an image of all or a part of the area in a single photo, or may be an image of all or a part of the area in a certain frame in a video image.
And step S502, acquiring a basic image corresponding to the shooting device.
In the embodiment of the invention, the basic image can be shot by the same shooting device as the image to be processed is collected, or can be shot from the same type of shooting equipment. The basic image may be preset on the photographing device or on the mobile terminal before the photographing apparatus or the type of photographing apparatus leaves the factory, and if the basic image corresponding to the photographing device is stored on the photographing device, the mobile terminal may obtain the basic image corresponding to the photographing device from the photographing device.
In an embodiment of the present invention, the base image may be an image taken with the same or close zoom factor setting as the image to be processed. Illustratively, the base image may be an image taken when the camera is not zoomed. For another example, the base images captured by the capturing device at the corresponding zoom factor settings may be obtained for images at various zoom factor settings, respectively.
In the embodiment of the present invention, it should be noted that images captured by the same or similar capturing devices have distribution characteristics of relatively close green channel ratios. The green channel ratio of any pixel can be the ratio of the Gr channel value to the Gb channel value of that pixel. In other embodiments of the present invention, in a system that defines color values of pixels using RGB, the range of the channel values of the Gr channel value and the Gb channel value is 0 to 255.
In the embodiment of the invention, the base image which is closer to the distribution characteristic of the expected green channel ratio of the image to be processed can be used for compensating the green channel imbalance problem in the image to be processed. Taking the pixel in the image to be processed as the second pixel as an example, the green channel ratio of the first pixel in the base image and the green channel ratio of the second pixel in the image to be processed may satisfy the following condition: when the position of the first pixel in the base image is the same as the position of the second pixel in the image to be processed, a difference between the green channel ratio of the first pixel and the green channel ratio of the second pixel may be smaller than a preset deviation threshold. That is, the imbalance level of the green channel of the second pixel is closer to the green imbalance level of the first pixel before compensation.
In an embodiment of the present invention, the acquiring a base image corresponding to the shooting device may include: and acquiring the basic image, wherein the green channel ratio of a first pixel in the basic image is in a direct proportion relation with the distance of the first pixel from the optical center of the basic image. In the base image, the farther a pixel is from the optical center of the image, the greater the green channel ratio for that pixel is typically. In other embodiments of the present invention, in an original image obtained by a camera, such as a base image or a to-be-processed image, the increasing speed of the green channel ratio of a pixel may be faster than the increasing speed of the distance of the pixel from the optical center of the image.
In an embodiment of the present invention, the acquiring a base image corresponding to the shooting device may further include: acquiring a basic image shot by the shooting device, wherein the difference value between the color value of any pixel in the basic image and the average value of the color values of all pixels in the basic image is smaller than a preset first threshold value. Wherein an average of the color values of all pixels in the base image is not equal to the color value of white.
For example, when using shooting device to gather basic image in advance, can predetermine a shooting scene in the laboratory, can set up a flat board in this shooting scene, lay a canvas on this flat board, can draw in advance for the pure color on this canvas to there is not obvious colour difference with the naked eye observation can, then openly shoot this shooting scene by shooting device, through the distance between adjustment shooting device and the canvas for the image of canvas fills up whole shooting equipment's the frame of looking up. The color of the canvas may be any pure color other than white, and may be, for example, red, orange, yellow, green, cyan, blue, purple, maroon, turquoise, tibetan blue, brown, black, etc. In other embodiments of the present invention, when acquiring the base image, color differences at various places on the canvas as the shooting object may also be determined by using a color bar card, and exemplarily, colors at various places in the image may be within one color bar.
It should be noted that, the distribution of the green channel ratios of the pixels in the base image is closer to the distribution of the green channel ratios of the pixels in the image to be processed, and the base image can be used as a reference image for performing green channel compensation processing on the image to be processed.
Step S503, according to the first pixel in the basic image, performing green channel compensation processing on the second pixel in the image to be processed.
Wherein a distance between the first pixel and the optical center of the base image is equal to a distance between the second pixel and the optical center of the image to be processed.
In an embodiment of the present invention, a position of the first pixel in the base image may be the same as a position of the second pixel in the image to be processed. The difference between the green channel ratios of the first and second pixels having the same position may be smaller than a preset deviation threshold. Then, according to the green channel ratio of the pixel points with the same position in the basic image, the green channel compensation processing can be performed on the image to be processed.
In an example, the performing, according to a first pixel in the base image, a green channel compensation process on a second pixel in the image to be processed may include:
and determining the compensation value of the Gr channel and the compensation value of the Gb channel of the second pixel according to the green channel ratio of the first pixel. Illustratively, if the green channel ratio of the first pixel is greater than 1, the compensation value for the Gr channel of the second pixel is negative, e.g., -2, and the larger the ratio, the larger the adjustment magnitude may be, e.g., -10.
In another example, the performing, according to the first pixel in the base image, green channel compensation processing on the second pixel in the image to be processed may include: determining a compensation value of a Gr channel value and/or a compensation value of a Gb channel value of a second pixel in the image to be processed according to the green channel ratio of the first pixel; determining the compensated Gr channel value and the Gb channel value of the second pixel according to the compensation value of the Gr channel value and/or the compensation value of the Gb channel value of the second pixel; and the green channel ratio of any pixel is the ratio between the Gr channel value and the Gb channel value of the pixel.
In the embodiment of the present invention, if the green channel ratio of the first pixel is greater than 1, that is, the Gr value at the point in the base image is greater than the Gb channel value, it may be determined that the compensation value of the Gr channel value of the second pixel in the image to be processed is a negative number, that is, the Gr channel value is decreased. If the green channel ratio of the first pixel is larger, the compensation value of the Gr channel value of the second pixel is smaller, that is, the reduction amplitude is larger. In other embodiments of the present invention, the farther the pixel is from the optical center, the larger the green channel ratio is, the larger the adjustment amplitude of the Gr channel value is. In other embodiments of the present invention, when the green channel ratio of the first pixel is greater than 1, it may further be determined that the compensation value of the Gr channel value of the second pixel in the image to be processed is a negative number, and the compensation value of the Gb channel is a positive number, that is, the Gr channel value is decreased and the Gb channel value is increased at the same time.
In the embodiment of the present invention, if the green channel ratio of the first pixel is less than 1, that is, the Gr value at the point in the base image is smaller than the Gb channel value, it may be determined that the compensation value of the Gr channel value of the second pixel in the image to be processed is a positive number, that is, the Gr channel value is decreased.
In other embodiments of the present invention, the performing, according to the first pixel in the base image, green channel compensation processing on the second pixel in the image to be processed may include:
determining a correction value of the compensated unbalanced deviation compensation coefficient GIC value of the second pixel according to the unbalanced deviation compensation coefficient GIC of the first pixel; determining a compensation value of a Gr channel value and/or a compensation value of a Gb channel value of a second pixel in the image to be processed according to the corrected value of the compensated unbalance deviation compensation coefficient GIC value of the second pixel; determining the compensated Gr channel value and the Gb channel value of the second pixel according to the compensation value of the Gr channel value and/or the compensation value of the Gb channel value of the second pixel;
wherein the imbalance deviation compensation coefficient GIC of any one of the pixels can be determined according to
Figure BDA0001539286940000131
And (4) calculating.
For example, the correction values GIC 2-GIC 0 of the imbalance deviation compensation coefficient GIC2 of the second pixel may be determined according to the imbalance deviation compensation coefficient GIC1 and the imbalance still threshold GIC0 of the first pixel using the following formula:
Figure BDA0001539286940000132
then, the compensation values for the Gr channel value and the Gb channel value of the second pixel can be determined from the GIC 2.
Fig. 6 is a schematic diagram of an image after compensation processing by the image processing method according to the embodiment of the present invention. As shown in fig. 6, the maze pattern phenomenon in the compensated image is greatly reduced.
In other embodiments of the present invention, the performing green channel compensation processing on a second pixel in the image to be processed according to a first pixel in the base image may further include: determining an unbalance deviation compensation coefficient of each second pixel in the image to be processed; determining a second pixel of the image to be processed, wherein the imbalance deviation compensation coefficient of the second pixel is larger than a preset imbalance tolerance threshold value, as a second pixel to be compensated; performing green channel balance compensation processing on the second pixel to be compensated; and calculating the unbalance deviation compensation coefficient of any pixel according to the Gr channel value and the Gb channel value of the pixel.
Wherein the Imbalance Compensation (Green impedance Compensation) coefficient GIC of any pixel is determined according to the pixel value
Figure BDA0001539286940000141
And (4) calculating.
In the embodiment of the invention, firstly, an image to be processed shot by a shooting device is obtained; then acquiring a basic image corresponding to the shooting device; performing green channel compensation processing on a second pixel in the image to be processed according to the first pixel in the basic image; the distance between the first pixel and the optical center of the basic image is equal to the distance between the second pixel and the optical center of the image to be processed, so that the green imbalance problem in the image to be processed can be compensated. Therefore, the technical scheme provided by the embodiment of the invention can provide a processing method for performing green channel compensation on the image.
In the embodiment of the invention, by adopting the scheme, the basic image shot by the shooting equipment of the same type and the image to be processed can have the distribution characteristic of a green channel ratio which is relatively similar, so that the green channel balance compensation processing can be carried out on the second pixel in the image to be processed according to the first pixel in the basic image, the accuracy of the compensation processing can be ensured, and meanwhile, the speed of the compensation processing can be increased.
In the embodiment of the invention, by adopting the above scheme, especially, the non-white pure color or the shooting object which is relatively close to the pure color is adopted to obtain the basic image, and the green channel balance compensation processing is performed on the image to be processed, because the green channel distribution proportion in the pure color basic image simply represents the problem of the green imbalance phenomenon generated due to the hardware of the shooting equipment, some factors of the normal green channel imbalance phenomenon caused by color difference are shielded, so that the influence on the real color of the shooting object in the image can be reduced for the green channel balance compensation processing of the image to be processed. Therefore, the quality of the image is ensured while the phenomenon of green imbalance in the image to be processed is reduced.
The embodiment of the invention further provides an image processing method, and fig. 7 is a flow diagram illustrating the image processing method provided by the embodiment of the invention. As shown in fig. 7, the steps of the embodiment of the present invention may further include:
in step S701, an image to be processed captured by the capturing device is acquired.
Wherein the step is similar to S501.
Step S702, a base image corresponding to the photographing device is acquired.
Wherein the step is similar to S502.
In step S703, the imbalance deviation compensation coefficient of each second pixel in the image to be processed is determined.
In the embodiment of the invention, the imbalance deviation compensation coefficient of any pixel is obtained by calculation according to the Gr channel value and the Gb channel value of the pixel.
For example, the imbalance offset compensation coefficient GIC of any pixel is based on
Figure BDA0001539286940000151
And (4) calculating.
In the embodiment of the present invention, the range of the GIC value in the image is generally 0 to 1.
In step S704, the second pixel in the image to be processed whose imbalance deviation compensation coefficient is greater than the preset imbalance tolerance threshold is determined as the second pixel to be compensated.
In the embodiment of the present invention, the setting of the imbalance tolerance threshold may be set according to a tolerance degree of a green imbalance phenomenon in the image, the threshold may be a value between 0 and 1, the larger the imbalance tolerance threshold is, the more serious the green imbalance is, the green balance compensation processing is performed only on the pixel, and the smaller the imbalance tolerance threshold is, the less the green balance compensation processing is performed on the pixel, the less the green imbalance degree is, in the image. Illustratively, the imbalance tolerance threshold may be 0.5.
Step S705, performing green channel balance compensation processing on the second pixel to be compensated.
The step of performing the green channel balance compensation on the second pixels to be compensated is similar to the step of performing the green channel balance compensation on each second pixel in the embodiment shown in fig. 4, and details thereof are omitted here.
In the embodiment of the invention, the unbalance deviation compensation coefficient of each second pixel in the image to be processed is determined; determining a second pixel of the image to be processed, wherein the imbalance deviation compensation coefficient of the second pixel is larger than a preset imbalance tolerance threshold value, as a second pixel to be compensated; performing green channel balance compensation processing on the second pixel to be compensated; and calculating the unbalance deviation compensation coefficient of any pixel according to the Gr channel value and the Gb channel value of the pixel. Because the setting of threshold value can be according to the degree setting of enduring to the green unbalance phenomenon in the image to can compensate according to the comparatively serious pixel of green unbalance phenomenon and handle, reduce the quantity of the pixel that needs to compensate and handle, promote the quality of image when promoting the speed that green channel compensation was handled.
Other technical scheme details and technical effects of the embodiment of the invention can refer to the relevant descriptions in other embodiments.
The embodiment of the invention further provides an image processing method, and fig. 8 is a third schematic flow chart of the image processing method provided by the embodiment of the invention. As shown in fig. 8, the steps of the embodiment of the present invention may further include:
step S801, acquiring an image to be processed.
Wherein the step is similar to S501.
Step S802, determining whether an imbalance deviation compensation coefficient of a pixel in the image to be processed is greater than a preset imbalance tolerance threshold.
And calculating the unbalance deviation compensation coefficient of any pixel according to the Gr channel value and the Gb channel value of the pixel. For example, the imbalance offset compensation coefficient GIC of any pixel is based on
Figure BDA0001539286940000161
And (4) calculating.
In the embodiment of the present invention, the range of the GIC value in the image is generally 0 to 1.
In step S803, if there is a pixel in the to-be-processed image whose imbalance deviation compensation coefficient is greater than the imbalance tolerance threshold, a green channel balance compensation process is performed on the pixel.
In the embodiment of the present invention, the setting of the imbalance tolerance threshold may be set according to a tolerance degree of a green imbalance phenomenon in the image, the threshold may be a value between 0 and 1, the larger the imbalance tolerance threshold is, the more serious the green imbalance is, the green balance compensation processing is performed only on the pixel, and the smaller the imbalance tolerance threshold is, the less the green balance compensation processing is performed on the pixel, the less the green imbalance degree is, in the image. Illustratively, the imbalance tolerance threshold may be 0.5.
In the embodiment of the present invention, the Gr channel value and the Gb channel value of the second pixel determined to need compensation may be compensated in the following manner. In an example, when the GIC of the first pixel is greater than the imbalance tolerance threshold, the Gr channel value of the second pixel may be adjusted until the GIC value of the second pixel is less than the threshold. In another example, when the GIC of the first pixel is greater than the imbalance tolerance threshold and the Gr channel value is greater than the Gb channel value, the Gr channel value of the second pixel can also be set to be the same as the Gb channel value directly, or the Gb channel value of the second pixel can be set to be the same as the Gr channel value. In yet another example, when the GIC of the first pixel is greater than the imbalance tolerance threshold, the Gb channel value of the second pixel can also be adjusted until the GIC value of the second pixel is less than the threshold.
In the embodiment of the invention, an image to be processed is obtained firstly, then whether an unbalance deviation compensation coefficient of a pixel in the image to be processed is larger than a preset unbalance tolerance threshold value or not is determined, and if the pixel with the unbalance deviation compensation coefficient larger than the unbalance tolerance threshold value exists in the image to be processed, green channel balance compensation processing is carried out on the pixel; and calculating the unbalance deviation compensation coefficient of any pixel according to the Gr channel value and the Gb channel value of the pixel. Because the setting of threshold value can be according to the degree setting of enduring to the green unbalance phenomenon in the image to can compensate according to the comparatively serious pixel of green unbalance phenomenon and handle, reduce the quantity of the pixel that needs to compensate and handle, promote the quality of image when promoting the speed that green channel compensation was handled.
Other technical scheme details and technical effects of the embodiment of the invention can refer to the relevant descriptions in other embodiments.
In the embodiment of the present invention, the following manner may also be adopted to perform the green channel compensation processing on the image to be processed.
In an example, the Gr channel value and the Gb channel value of the second pixel in the image to be processed may be compensated according to the Gr channel value and the Gb channel value of the first pixel in the base image; the compensated green channel deviation value of the second pixel is smaller than a preset green channel deviation expected value; the green channel deviation value of any pixel is the difference between the Gr channel value and the Gb channel value in the pixel.
In this embodiment of the present invention, the compensating, according to the Gr channel value and the Gb channel value of the first pixel in the base image, the Gr channel value and the Gb channel value of the second pixel in the image to be processed may include: and compensating the Gr channel value and the Gb channel value of a second pixel in the image to be processed, wherein the difference between the green channel deviation value of the second pixel after compensation and the green channel deviation value of the first pixel is smaller than the expected green channel deviation value corresponding to the first pixel.
The expected value of the green channel deviation corresponding to the first pixel may be in a direct proportion to the distance of the first pixel from the optical center of the basic image. For example, the expected value of the green channel deviation corresponding to the first pixel may be larger when the distance of the first pixel from the optical center of the basic image is larger, and the expected value of the green channel deviation corresponding to the first pixel may be smaller when the distance of the first pixel from the optical center of the basic image is smaller.
Other technical scheme details and technical effects of the embodiment of the invention can refer to the relevant descriptions in other embodiments.
An embodiment of the present invention further provides an image processing method, fig. 9 is a fourth flowchart of the image processing method provided in the embodiment of the present invention, and as shown in fig. 9, the steps of the embodiment of the present invention may include:
step S901, for each pixel point in the image to be processed, determine whether the difference between the Gr and Gb channels is too large.
Wherein, the judgment criterion of whether the Gr and Gb channels are too different is
Figure BDA0001539286940000181
And if the Gr channel difference is larger than the threshold value, judging that the Gr channel difference is too large with the Gb channel difference.
Step S902, if the difference is too large, it is determined that the pixel point in the image to be processed needs to be corrected.
And adding the pixel points needing to be corrected into the pixel point set to be compensated.
In step S903, a solid color chart is photographed.
In the embodiment of the present invention, a pure color map captured by a capturing device of the same or similar type as that used to obtain the image to be processed is similar to the base image described in the previous embodiment, that is, a difference value between a color value of any pixel in the pure color map and an average value of color values of all pixels in the base image is smaller than a preset first threshold. Wherein the average of the color values of all pixels in the pure color map is not equal to the color value of white.
For example, when using shooting device to gather basic image in advance, can predetermine a shooting scene in the laboratory, can set up a flat board in this shooting scene, lay a canvas on this flat board, can draw in advance for the pure color on this canvas to there is not obvious colour difference with the naked eye observation can, then openly shoot this shooting scene by shooting device, through the distance between adjustment shooting device and the canvas for the image of canvas fills up whole shooting equipment's the frame of looking up. The color of the canvas may be any pure color other than white, and may be, for example, red, orange, yellow, green, cyan, blue, purple, maroon, turquoise, tibetan blue, brown, black, etc. In other embodiments of the present invention, when acquiring a pure color chart, color differences at various places on a canvas as a shooting object may also be determined by using a color bar card, and exemplarily, colors at various places in an image may be within one color bar.
It should be noted that, the distribution of the green channel ratios of the pixels in the pure color map is closer to the distribution of the green channel ratios of the pixels in the image to be processed, and the pure color map can be used as a reference image for performing green channel compensation processing on the image to be processed.
Step S904, the pure color map is traversed, and the GIC value of each pixel point is calculated.
Wherein GIC may be according to
Figure BDA0001539286940000191
And (4) calculating.
The farther step S905 is from the optical center, the larger GIC, the compensation is needed.
Where the green channel ratio of each pixel in the image is generally related to the distance of the pixel from the optical center. The optical center may be, for example, the center position of the image, and may be, for example, the geometric center of the image. The farther a pixel in the pure color map is from the optical center, the larger the GIC value is generally, and the same position pixel in the image to be processed needs to be compensated for the green channel. Illustratively, the Gr channel value of a pixel point needing compensation in the image to be processed is modified to be consistent with the Gb channel value. Other technical scheme details and technical effects of the embodiment of the invention can refer to the relevant descriptions in other embodiments.
Fig. 10 is a schematic structural diagram of a terminal provided in an embodiment of the present invention, and as shown in fig. 10, the terminal 1000 at least includes: a processor 1001, a memory 1002, an interface 1003, and a bus 1004, wherein:
the memory 1002 is used for storing an image processing program;
the bus 1004 is used for realizing connection communication between the processor and the memory;
the processor 1001 is configured to execute an image processing program stored in the memory to implement the following steps:
acquiring an image to be processed photographed by a photographing device; acquiring a basic image corresponding to the shooting device; according to the first pixel in the basic image, performing green channel compensation processing on a second pixel in the image to be processed; wherein a distance between the first pixel and the optical center of the base image is equal to a distance between the second pixel and the optical center of the image to be processed.
In the embodiment of the present invention, the position of the first pixel in the base image and the position of the second pixel in the image to be processed may be the same.
In an embodiment of the present invention, the acquiring a base image corresponding to the shooting device may include: and acquiring the basic image, wherein the green channel ratio of a first pixel in the basic image is in a direct proportion relation with the distance of the first pixel from the optical center of the basic image.
In an embodiment of the present invention, the acquiring a base image corresponding to the shooting device may include: acquiring a basic image shot by the shooting device, wherein the difference value between the color value of any pixel in the basic image and the average value of the color values of all pixels in the basic image is smaller than a preset first threshold value; wherein an average of the color values of all pixels in the base image is not equal to the color value of white.
In this embodiment of the present invention, the performing, according to the first pixel in the base image, green channel compensation processing on the second pixel in the image to be processed may include: determining a compensation value of a Gr channel value and/or a compensation value of a Gb channel value of a second pixel in the image to be processed according to the green channel ratio of the first pixel; and the green channel ratio of any pixel is the ratio between the Gr channel value and the Gb channel value of the pixel.
In this embodiment of the present invention, the performing, according to the first pixel in the base image, green channel compensation processing on the second pixel in the image to be processed may include: determining an unbalance deviation compensation coefficient of each second pixel in the image to be processed; determining a second pixel of the image to be processed, wherein the imbalance deviation compensation coefficient of the second pixel is larger than a preset imbalance tolerance threshold value, as a second pixel to be compensated; performing green channel balance compensation processing on the second pixel to be compensated; and calculating the unbalance deviation compensation coefficient of any pixel according to the Gr channel value and the Gb channel value of the pixel.
In other embodiments of the invention, the interface may be used to acquire a complete image or an image to be processed from the camera. The terminal may also include a camera and other shooting devices, and the camera of the terminal may capture images frame by frame, and the captured images may be, for example, the 1 st frame, the 2 nd frame, … …, the (N-1) th frame, the nth frame, and the like.
It should be noted that the description of the terminal embodiment is similar to the description of the method embodiment, and has similar beneficial effects to the method embodiment, and therefore, the description is not repeated. For technical details not disclosed in the terminal embodiments of the present invention, reference is made to the description of the method embodiments of the present invention for understanding.
Fig. 11 is a schematic structural diagram of a terminal according to an embodiment of the present invention, and as shown in fig. 11, the terminal 1100 at least includes: a processor 1101, a memory 1102, an interface 1103, and a bus 1104, wherein: the memory 1102 is used for storing an image processing program; the bus 1104 is used for realizing connection communication between the processor and the memory; the processor 1101 is configured to execute an image processing program stored in the memory to implement the following steps: acquiring an image to be processed; determining whether an imbalance deviation compensation coefficient of a pixel in an image to be processed is larger than a preset imbalance tolerance threshold value; if a pixel with an unbalance deviation compensation coefficient larger than an unbalance tolerance threshold exists in the image to be processed, performing green channel balance compensation processing on the pixel; and calculating the unbalance deviation compensation coefficient of any pixel according to the Gr channel value and the Gb channel value of the pixel. For example, the imbalance offset compensation coefficient GIC of any pixel is based on
Figure BDA0001539286940000211
And (4) calculating. Other technical scheme details and technical effects of the embodiment of the invention can refer to the relevant descriptions in other embodiments.
An embodiment of the present invention provides a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of:
acquiring an image to be processed photographed by a photographing device; acquiring a basic image corresponding to the shooting device; according to the first pixel in the basic image, performing green channel compensation processing on a second pixel in the image to be processed; wherein a distance between the first pixel and the optical center of the base image is equal to a distance between the second pixel and the optical center of the image to be processed.
It should be noted that one or more programs in the embodiments of the present invention may be image processing programs used in image processing in other embodiments.
An embodiment of the present invention provides a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of:
acquiring an image to be processed; determining whether an imbalance deviation compensation coefficient of a pixel in an image to be processed is larger than a preset imbalance tolerance threshold value; if a pixel with an unbalance deviation compensation coefficient larger than an unbalance tolerance threshold exists in the image to be processed, performing green channel balance compensation processing on the pixel; and calculating the unbalance deviation compensation coefficient of any pixel according to the Gr channel value and the Gb channel value of the pixel.
It should be noted that one or more programs in the embodiments of the present invention may be image processing programs used in image processing in other embodiments.
It should be noted that the description of the computer-readable storage medium is similar to the description of the method embodiment, and has similar beneficial effects to the method embodiment, and therefore, the description is not repeated. For technical details not disclosed in the embodiments of the computer-readable storage medium of the present invention, reference is made to the description of the embodiments of the method of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method described in the embodiments of the present invention.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (6)

1. An image processing method, characterized in that the method comprises:
acquiring an image to be processed photographed by a photographing device;
acquiring a basic image corresponding to the shooting device, wherein the basic image is shot by the same or same type of shooting device as the to-be-processed image;
according to the first pixel in the basic image, performing green channel compensation processing on a second pixel in the image to be processed, wherein the green channel compensation processing comprises the following steps: determining a compensation value of a Gr channel and/or a compensation value of a Gb channel value of a second pixel according to the green channel ratio of the first pixel; determining the compensated Gr channel value and the Gb channel value of the second pixel according to the compensation value of the Gr channel value and/or the compensation value of the Gb channel value of the second pixel; the green channel ratio of any pixel is the ratio between the Gr channel value and the Gb channel value of the pixel;
wherein a distance between the first pixel and the optical center of the base image is equal to a distance between the second pixel and the optical center of the image to be processed;
wherein, the acquiring of the basic image corresponding to the shooting device includes:
acquiring a basic image shot by the shooting device, wherein the difference value between the color value of any pixel in the basic image and the average value of the color values of all pixels in the basic image is smaller than a preset first threshold value;
wherein an average of the color values of all pixels in the base image is not equal to the color value of white.
2. A method as claimed in claim 1, characterized in that the position of the first pixel in the base image is the same as the position of the second pixel in the image to be processed.
3. The method of claim 1, wherein performing green channel compensation processing on a second pixel in the image to be processed according to a first pixel in the base image comprises:
determining an unbalance deviation compensation coefficient of each second pixel in the image to be processed;
determining a second pixel of the image to be processed, wherein the imbalance deviation compensation coefficient of the second pixel is larger than a preset imbalance tolerance threshold value, as a second pixel to be compensated;
performing green channel balance compensation processing on the second pixel to be compensated;
and calculating the unbalance deviation compensation coefficient of any pixel according to the Gr channel value and the Gb channel value of the pixel.
4. A method as claimed in claim 3, characterized in that the imbalance deviation compensation coefficient GIC for any pixel is based on
Figure FDA0002931876710000021
And (4) calculating.
5. A terminal, characterized in that the terminal comprises at least: a memory, a communication bus, and a processor, wherein:
the memory is used for storing an image processing program;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is used for executing the image processing program stored in the memory so as to realize the following steps:
acquiring an image to be processed photographed by a photographing device;
acquiring a basic image corresponding to the shooting device, wherein the basic image is shot by the same or same type of shooting device as the to-be-processed image;
according to the first pixel in the basic image, performing green channel compensation processing on a second pixel in the image to be processed; the method comprises the following steps: determining a compensation value of a Gr channel and/or a compensation value of a Gb channel value of a second pixel according to the green channel ratio of the first pixel; determining the compensated Gr channel value and the Gb channel value of the second pixel according to the compensation value of the Gr channel value and/or the compensation value of the Gb channel value of the second pixel; the green channel ratio of any pixel is the ratio between the Gr channel value and the Gb channel value of the pixel;
wherein a distance between the first pixel and the optical center of the base image is equal to a distance between the second pixel and the optical center of the image to be processed;
wherein, the acquiring of the basic image corresponding to the shooting device includes:
acquiring a basic image shot by the shooting device, wherein the difference value between the color value of any pixel in the basic image and the average value of the color values of all pixels in the basic image is smaller than a preset first threshold value;
wherein an average of the color values of all pixels in the base image is not equal to the color value of white.
6. A computer-readable storage medium, characterized in that an image processing program is stored thereon, which when executed by a processor implements the steps of the image processing method according to any one of claims 1 to 4.
CN201810007958.1A 2018-01-04 2018-01-04 Image processing method, terminal and computer readable storage medium Active CN108234970B (en)

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 CN108234970A (en) 2018-06-29
CN108234970B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
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 (9)

* Cited by examiner, † Cited by third party
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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103646387B (en) * 2013-12-16 2017-06-06 威海华菱光电股份有限公司 Image correcting method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
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
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

Also Published As

Publication number Publication date
CN108234970A (en) 2018-06-29

Similar Documents

Publication Publication Date Title
CN107302663B (en) Image brightness adjusting method, terminal and computer readable storage medium
CN107465881B (en) Dual-camera focusing method, mobile terminal and computer readable storage medium
CN107948530B (en) Image processing method, terminal and computer readable storage medium
CN108198146B (en) Noise reduction method, equipment and computer readable storage medium
CN107705247B (en) Image saturation adjusting method, terminal and storage medium
CN107295270B (en) Image brightness value determination method and device, terminal and computer-readable storage medium
CN108198150B (en) Method for eliminating image dead pixel, terminal and storage medium
CN107240072B (en) Screen brightness adjusting method, terminal and computer readable storage medium
CN108184105B (en) Method and device for adjusting brightness and computer readable storage medium
CN110086993B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
CN113179369B (en) Shot picture display method, mobile terminal and storage medium
CN108234893B (en) Brightness adjusting method, brightness adjusting equipment and computer readable storage medium
CN111885307A (en) Depth-of-field shooting method and device and computer readable storage medium
CN107896304B (en) Image shooting method and device and computer readable storage medium
CN108320265B (en) Image processing method, terminal and computer readable storage medium
CN108848321B (en) Exposure optimization method, device and computer-readable storage medium
CN113347372A (en) Shooting light supplement method, mobile terminal and readable storage medium
CN112598758A (en) Image processing method, mobile terminal and computer storage medium
CN108234970B (en) Image processing method, terminal and computer readable storage medium
CN109510941B (en) Shooting processing method and device and computer readable storage medium
CN112203022B (en) Electrochromic control method and device and computer readable storage medium
CN113902918A (en) Game image binarization processing method, equipment and computer readable storage medium
CN109005339B (en) Image acquisition method, terminal and storage medium
CN107784629B (en) Panoramic photo filter processing method and mobile terminal
CN108335271B (en) Image processing method and device and computer readable storage 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