CN111147838B - Image processing method and device and mobile terminal - Google Patents
Image processing method and device and mobile terminal Download PDFInfo
- Publication number
- CN111147838B CN111147838B CN202010005548.0A CN202010005548A CN111147838B CN 111147838 B CN111147838 B CN 111147838B CN 202010005548 A CN202010005548 A CN 202010005548A CN 111147838 B CN111147838 B CN 111147838B
- Authority
- CN
- China
- Prior art keywords
- color temperature
- temperature value
- preset
- pixel ratio
- pixel
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 238000012545 processing Methods 0.000 claims abstract description 31
- 230000006870 function Effects 0.000 claims description 71
- 238000000034 method Methods 0.000 claims description 13
- 238000004364 calculation method Methods 0.000 claims description 12
- 238000012937 correction Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 8
- 230000006854 communication Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000001514 detection method Methods 0.000 description 4
- 239000000463 material Substances 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 238000002834 transmittance Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 235000012308 Tagetes Nutrition 0.000 description 1
- 241000736851 Tagetes Species 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 235000013372 meat Nutrition 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/73—Colour balance circuits, e.g. white balance circuits or colour temperature control
-
- 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/80—Camera processing pipelines; Components thereof
- H04N23/84—Camera processing pipelines; Components thereof for processing colour signals
- H04N23/88—Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
- Color Television Image Signal Generators (AREA)
Abstract
The embodiment of the application discloses an image processing method, an image processing device and a mobile terminal, wherein the image processing method comprises the following steps: acquiring a plurality of pixel units of an image to be processed; obtaining a pixel ratio according to the pixel unit; calculating an average pixel ratio through a plurality of pixel ratios, and acquiring a first color temperature value according to the average pixel ratio; calculating a second color temperature value according to the average pixel ratio, the first color temperature value and a preset function; correcting the image to be processed according to the second color temperature value; the embodiment of the application also discloses an image processing method device and a mobile terminal; the scheme provided by the embodiment of the application aims to find the actual color temperature value through the pixel ratio, the first color temperature value and the preset function, completely restores the original picture original color according to the blue light missing in the actual color temperature value compensation obtained image, and corrects the color distortion of the obtained image color compared with the color distortion of a shooting target scene, so that the satisfaction degree of a user shooting by using the under-screen front-facing camera is improved.
Description
Technical Field
The embodiment of the application relates to the technical field of mobile terminals, in particular to an image processing method and device and a mobile terminal.
Background
In the technical field of mobile terminal display, a full-screen gradually becomes one of the main directions of current development, and in order to realize a real full-screen, mobile terminal manufacturers often set the mobile terminal front camera as an off-screen camera when setting the mobile terminal front camera. However, there are many key problems to be solved by providing an off-screen camera.
In the research and practice process of the prior art, the inventors of the embodiments of the present application found that most screen manufacturers currently focus on developing a front-facing camera under a flexible screen, and all relate to an organic light-Emitting Diode (OLED) screen when using the front-facing camera, most OLED substrate materials adopted in the prior art are materials that can withstand over 300 degrees, and materials that can withstand over 300 degrees are yellow, and the yellow color filters blue light, so that a color cast phenomenon obviously occurs in a captured image, and a color distortion phenomenon occurs in an obtained image color compared with a captured target scene, and an original image color cannot be completely restored, and a satisfaction degree of a user using the front-facing camera is reduced.
Disclosure of Invention
In view of the foregoing disadvantages of the prior art, embodiments of the present application provide an image processing method and apparatus, and a mobile terminal, so as to solve the problems that in the prior art, an image formed by shooting with an off-screen camera is obviously color-shifted, resulting in a color distortion phenomenon of an obtained image color compared with a shooting target scene, an original color of an original picture cannot be completely restored, and a satisfaction degree of a user shooting with a front-facing camera is reduced.
In a first aspect, an embodiment of the present application provides an image processing method, where the method includes:
acquiring a plurality of pixel units of an image to be processed;
obtaining a pixel ratio according to the pixel unit;
calculating an average pixel ratio through a plurality of pixel ratios, and acquiring a first color temperature value according to the average pixel ratio;
calculating a second color temperature value according to the average pixel ratio, the first color temperature value and a preset function;
and correcting the image to be processed according to the second color temperature value.
In some embodiments, calculating a second color temperature value according to the average pixel ratio, the first color temperature value and a preset function comprises:
and calling the preset function corresponding to the preset interval when the first color temperature value is in at least one preset interval to obtain the second color temperature value.
In some embodiments, the preset function includes a preset first function and a preset second function.
In some embodiments, the preset interval includes a preset first interval between 0K and 5000K and a preset second interval greater than 5000K.
In some embodiments, the step of obtaining the second color temperature value by calling the preset function corresponding to the preset interval when the first color temperature value is within at least one preset interval includes:
when the first color temperature is in the preset first interval, calculating by adopting a preset first function to obtain the second color temperature;
and when the first color temperature is in the preset second interval, calculating by adopting a preset second function to obtain the second color temperature.
In some embodiments, the pixel unit includes a first sub-pixel, a second sub-pixel, and a third sub-pixel.
In some embodiments, obtaining a pixel ratio from the pixel cell comprises:
the pixel ratio comprises a first pixel ratio and a second pixel ratio, and the first pixel ratio is obtained by comparing the first sub-pixel with the second sub-pixel; and comparing the third sub-pixel with the second sub-pixel to obtain the second pixel ratio.
In some embodiments, calculating an average pixel ratio value from a plurality of pixel ratio values comprises:
the average pixel ratio comprises a first average pixel ratio and a second average pixel ratio, and an average value of the sum of a plurality of first pixel ratios is obtained to obtain the first average pixel ratio; and obtaining the average value of the sum of the second pixel ratios to obtain the second average pixel ratio.
In a second aspect, an embodiment of the present application further provides an image processing apparatus, including:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a plurality of pixel units of an image to be processed;
the processing module is used for obtaining a pixel ratio according to the pixel unit; the device comprises a plurality of pixel ratios, a first color temperature value and a second color temperature value, wherein the pixel ratios are used for calculating an average pixel ratio and obtaining a first color temperature value according to the average pixel ratio; the second color temperature value is calculated according to the average pixel ratio, the first color temperature value and a preset function;
and the correction module is used for correcting the image to be processed according to the second color temperature value.
In some embodiments, further comprising:
the judging module is used for judging that the first color temperature value is within at least one preset interval;
and the calling module is used for calling the preset function corresponding to the preset interval.
In a third aspect, an embodiment of the present application provides a mobile terminal, which includes the image processing apparatus described in the second aspect, and is capable of performing operations in the image processing method described in the first aspect.
Compared with the prior art, the embodiment of the application provides an image processing method, an image processing device and a mobile terminal, through the scheme provided by the embodiment of the application, the actual color temperature value is found, the original color of the original image is completely restored according to the missing blue light in the image obtained through the compensation of the actual color temperature value, the obtained image color is corrected to have a color distortion phenomenon compared with the shooting target scene, and therefore the satisfaction degree of a user shooting by using the front-facing camera under the screen is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an image processing method provided in an embodiment of the present application;
FIG. 2 is a diagram illustrating a relationship between a pixel ratio and a first color temperature according to an embodiment of the present disclosure;
FIG. 3a is a schematic diagram of a normal condition camera shooting standard light source provided by the embodiment of the present application;
FIG. 3b is a schematic diagram of a standard light source photographed by an off-screen camera according to an embodiment of the present application;
FIG. 4 is a schematic diagram of the transmittance of blue light provided by the embodiment of the present application;
fig. 5 is a block diagram of an image processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Detailed Description
The terms "first," "second," and the like in the description and in the claims of the embodiments of the application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments described herein are capable of operation in other sequences than illustrated or otherwise described herein. The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides an image processing method and device and a mobile terminal. The image processing method can be integrated in a terminal, such as a mobile phone, a tablet computer, a notebook computer or a personal computer. The image processing method will be described in detail below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
Referring to fig. 1, fig. 1 is a schematic flowchart of an image processing method according to an embodiment of the present disclosure.
The embodiment of the application comprises the following steps:
101. acquiring a plurality of pixel units of an image to be processed;
specifically, the embodiment of the present application may specifically receive an image processing request triggered by a user, or receive an image processing request sent by another device, where the image processing request may indicate an image to be processed (i.e., an image to be processed), and indicate a specific processing manner, for example, performing color temperature detection operation on the image to be processed. The image to be processed may be acquired by a local (i.e., the image processing apparatus) camera component, such as an off-screen camera, or may be acquired by receiving an image sent by another device, such as another terminal.
Specifically, in the embodiment of the present application, a plurality of pixel units of an image to be processed may be obtained according to the image to be processed, specifically, pixel statistics may be performed on each color block of the image to be processed, and a pixel unit of each color block is obtained through calculation, where the pixel unit includes a first sub-pixel, a second sub-pixel, and a third sub-pixel, the first sub-pixel may be a RED (RED, R) component, the second sub-pixel may be a GREEN (GREEN, G) component, and the third sub-pixel may be a BLUE (BLUE, B) component.
102. Obtaining a pixel ratio according to the pixel unit;
specifically, in the embodiment of the present application, a pixel ratio is obtained according to a first sub-pixel, a second sub-pixel and a third sub-pixel included in the pixel unit, where the pixel ratio includes a first pixel ratio and a second pixel ratio, the first sub-pixel is compared with the second sub-pixel to obtain the first pixel ratio, and the third sub-pixel is compared with the second sub-pixel to obtain the second pixel ratio; for example, the first sub-pixel may be an R component, the second sub-pixel may be a G component, and the first pixel ratio obtained by comparing the first sub-pixel with the second sub-pixel is R/G; the second sub-pixel may be a G component, the third sub-pixel may be a B component, and the second pixel ratio obtained by comparing the third sub-pixel with the second sub-pixel is B/G.
103. Calculating an average pixel ratio through a plurality of pixel ratios, and acquiring a first color temperature value according to the average pixel ratio;
specifically, in the embodiment of the present application, the pixel ratios of the plurality of pixel units can be obtained through step 102, the plurality of pixel ratios are summed to obtain a total pixel ratio, and an average value of the total pixel ratio is calculated to obtain the average pixel ratio, where the average pixel ratio includes a first average pixel ratio and a second average pixel ratio, an average value of a sum of the plurality of first pixel ratios is obtained to obtain the first average pixel ratio, and an average value of a sum of the plurality of second pixel ratios is obtained to obtain the second average pixel ratio; for example, the first sub-pixel may be an R component, the second sub-pixel may be a G component, the first pixel ratio is obtained by comparing the first sub-pixel with the second sub-pixel, the first pixel ratio is R/G, R/G values of a plurality of pixels are accumulated and summed, and an average pixel ratio of the R/G values is calculated to obtain the first average pixel ratio; the second sub-pixel may be a G component, the third sub-pixel may be a B component, the second pixel ratio is obtained by comparing the third sub-pixel with the second sub-pixel, the second pixel ratio is B/G, the B/G values of the plurality of pixels are accumulated and summed, and the average pixel ratio of the B/G values is calculated to obtain the second average pixel ratio.
Specifically, in the embodiment of the present application, a first color temperature value is obtained according to the average pixel ratio, an average value of a sum of a plurality of first pixel ratios is obtained through calculation, so as to obtain the first average pixel ratio, an average value of a sum of a plurality of second pixel ratios is obtained, so as to obtain the second average pixel ratio, and a corresponding point is found in a graph according to a color temperature curve histogram of fig. 2 by referring to the first average pixel ratio and the second average pixel ratio, so as to obtain the first color temperature value, where the first color temperature value in the embodiment of the present application is a current color temperature value, that is, a color temperature value obtained by a camera shooting an image below a screen.
Optionally, in the embodiment of the present application, an average gray value may be obtained by measuring a gray value of each pixel, and then adding all the gray values to obtain an average gray value, for example: the method comprises the steps of obtaining R/G values and B/G values of a plurality of pixels, accumulating the R/G values and the B/G values respectively, then averaging, calculating actual average gray scale of G, and calibrating by matching the average gray scale with a graph 2.
104. Calculating a second color temperature value according to the average pixel ratio, the first color temperature value and a preset function;
it should be noted that, in the embodiment of the present application, the preset interval includes a preset first interval and a preset second interval, the preset first interval is between 0K and 5000K, and an interval range of the preset first interval is: 0 is not less than 5000K of a preset first interval; the preset second interval is greater than 5000K, and the interval range of the preset first interval is as follows: the preset second interval is more than 5000K.
It should be noted that, in the embodiment of the present application, the preset function includes a preset first function and a preset second function, where the preset first function is K ═ mx + my, and K is the second colorWhen the color temperature value of the first color temperature is within a preset first interval, substituting the obtained first average pixel ratio and the second average pixel ratio into the preset first function, and calculating to obtain the color temperature value of the second color temperature; and when the color temperature value of the first color temperature is within a preset second interval, substituting the obtained first average pixel ratio and the second average pixel ratio into the preset second function, and calculating to obtain the color temperature value of the second color temperature. The scaling value m can be obtained by performing a scaling comparison calculation according to the histograms of the standard light sources shown in fig. 3a and 3b, the histograms of the standard light sources shown in fig. 3a and 3b have 6 points, the 6 points respectively indicate coordinates of 6 standard light sources in the histograms of the standard light sources, and the 6 standard light sources are respectively international standard artificial sunlight 31, a american cool and white store light source 32, a european standard warm and white store light source 33, a american retailer tagete 34, a american kitchen window spotlight 35, and simulated horizontal sunlight 36; the variation ratio value n may be nlog according to a function Y B X is calculated, X is the wavelength, Y is the transmittance, B gives an appropriate value by the curvature of fig. 4, which is generally close but not equal, so the value of n is a modified variation value, which can be obtained by comparison with fig. 4.
Specifically, in this embodiment of the application, when the first color temperature value is detected within at least one preset interval, the preset function corresponding to the preset interval is called, and the second color temperature value is obtained through function calculation, where the preset function includes a preset first function and a preset second function, and when the first color temperature value is within the preset first interval, the second color temperature value is obtained through calculation by using the preset first function, for example, when the color temperature value of the first color temperature value is within the preset first interval, such as: the color temperature value of the first color temperature value is 2000K or 3000K, the obtained first average pixel ratio and the obtained second average pixel ratio are substituted into the preset first function K ═ mx + my, and the color temperature value of the second color temperature value is obtained through calculation; when the first color temperature value is within the preset second interval, calculating to obtain the second color temperature value by using a preset second function, for example, when the color temperature value of the first color temperature is within the preset second interval, such as: and the color temperature value of the first color temperature value is 7000K or 8000K, the obtained first average pixel ratio and the obtained second average pixel ratio are substituted into the preset second function K ═ nx + ny, and the color temperature value of the second color temperature value is obtained through calculation. The second color temperature value is an actual color temperature value, that is, an actual color temperature value of the imaging meat without the display screen covering in the environment.
105. And correcting the image to be processed according to the second color temperature value.
Specifically, in the embodiment of the present application, an average pixel ratio is calculated through a plurality of pixel ratios, a first color temperature value is obtained according to the average pixel ratio, a second color temperature value is obtained through calculation of a preset function, a blue light value missing from the under-screen camera can be calculated according to comparison between the first color temperature value and the second color temperature value and a proportional relation, and blue light compensation is performed on a light sensor that shoots the under-screen camera through the proportional relation, so that blue light filtered by a screen is compensated, the blue light missing from the image to be processed is corrected, and original color of the image to be processed is restored.
To sum up, compared with the prior art, embodiments of the present application provide an image processing method, an image processing apparatus, and a mobile terminal, where a plurality of pixels of an image to be processed are obtained, a pixel ratio and a pixel gray scale value are obtained according to the pixels, a first color temperature value is obtained according to the pixel gray scale value, a second color temperature value is obtained according to the pixel ratio, the first color temperature value, and a preset function, where the first color temperature value is within at least one preset interval, a preset function corresponding to the pixel ratio and the preset interval is called to obtain the second color temperature value, and the image to be processed is corrected according to the second color temperature value; according to the scheme provided by the embodiment of the application, the actual color temperature value is found, the original color of the original picture is completely restored by compensating the missing blue light in the obtained image according to the actual color temperature value, the obtained image color is corrected to have a color distortion phenomenon compared with the shooting target scene, and therefore the satisfaction degree of a user shooting by using the front-facing camera under the screen is improved.
In the above description, an image processing method in the embodiment of the present application is described, and an apparatus for executing the image processing method is described below.
Referring to fig. 5, as a schematic structural diagram of an apparatus 51 for an image processing method shown in fig. 5, the apparatus 51 in the embodiment of the present application can implement steps corresponding to the image processing method executed in the embodiment corresponding to fig. 1. The functions implemented by the apparatus 51 may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, which may be software and/or hardware. The device 51 may include an obtaining module 511, a processing module 512, a determining module 513, a calling module 514, and a modifying module 515.
Specifically, the obtaining module 511 is configured to obtain a plurality of pixel units of the image to be processed; a processing module 512, configured to obtain a pixel ratio according to the pixel unit, calculate an average pixel ratio through a plurality of pixel ratios, obtain a first color temperature value according to the average pixel ratio, and calculate a second color temperature value according to the average pixel ratio, the first color temperature value, and a preset function; the judging module 513 is configured to judge that the first color temperature value is within at least one preset interval; a calling module 514, configured to call the preset function corresponding to the preset interval; a correcting module 515, configured to correct the image to be processed according to the second color temperature value;
the terminal device in the embodiment of the present application is described above from the perspective of the modular functional entity, and the terminal device in the embodiment of the present application is described below from the perspective of hardware processing. An embodiment of the present application further provides a mobile terminal, as shown in fig. 6, which shows a schematic structural diagram of a terminal according to an embodiment of the present application, where the terminal may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like, and specifically:
as shown in fig. 6, the mobile terminal may include Radio Frequency (RF) circuitry 601, memory 602 including one or more computer-readable storage media, input unit 603, display unit 604, sensor 605, audio circuitry 606, Wireless Fidelity (Wi-Fi) module 607, processor 608 including one or more processing cores, and power supply 609. Those skilled in the art will appreciate that the terminal structure shown in fig. 6 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Wherein:
the RF circuit 601 may be used for receiving and transmitting signals during a message transmission or communication process, and in particular, for receiving downlink messages from a base station and then processing the received downlink messages by one or more processors 608; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuit 601 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 601 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
The memory 602 may be used to store software programs and modules, and the processor 608 executes various functional applications and data processing by operating the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage 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 mobile terminal, and the like. Further, the memory 602 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. Accordingly, the memory 602 may also include a memory controller to provide the processor 608 and the input unit 603 access to the memory 602.
The input unit 603 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, input unit 603 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means 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 608, and can receive and execute commands sent by the processor 608. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 603 may include other input devices in addition to a touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 604 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 604 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 608 to determine the type of touch event, and the processor 608 then provides a corresponding visual output on the display panel according to the type of touch event.
The mobile terminal may also include at least one sensor 605, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the 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 gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal, detailed description is omitted here. In the embodiment of the application, after image processing, light compensation is performed through the light sensor in the terminal, the image to be processed is corrected, and the original color of the image to be processed is restored.
Wi-Fi belongs to short-distance wireless transmission technology, and the terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through a Wi-Fi module 607, and provides wireless broadband internet access for the user. Although fig. 6 shows the Wi-Fi module 607, it is understood that it does not belong to the essential constitution of the terminal and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 608 is a control center of the terminal, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 602 and calling data stored in the memory 602, thereby performing overall monitoring of the handset. Optionally, processor 608 may include one or more processing cores; preferably, the processor 608 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 608. In this embodiment, the processor 608 can control the image processing apparatus to perform image processing on an image to be processed.
The mobile terminal also includes a power supply 609 (e.g., a battery) for powering the various components, which may be logically coupled to the processor 608 via a power management system that may be configured to manage charging, discharging, and power consumption. The power supply 609 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the mobile terminal may further include a camera, a bluetooth module, and the like, which will not be described herein. Specifically, in this embodiment, the processor 608 in the terminal loads the executable file corresponding to the process of one or more application programs into the memory 602 according to the following instructions, and the processor 608 runs the application programs stored in the memory 602, thereby implementing various functions.
The image processing method, the image processing device, and the mobile terminal provided in the embodiments of the present application are described in detail above, a specific example is applied in the embodiments of the present application to explain the principle and the implementation of the present application, and the description of the above embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (10)
1. An image processing method, comprising:
acquiring a plurality of pixel units of an image to be processed;
obtaining a pixel ratio according to the pixel unit;
calculating an average pixel ratio through a plurality of pixel ratios, and acquiring a first color temperature value according to the average pixel ratio;
calculating a second color temperature value according to the average pixel ratio, the first color temperature value and a preset function; the preset function is a function corresponding to the size of the first color temperature value; the average pixel ratio comprises a first average pixel ratio and a second average pixel ratio;
the preset functions comprise a preset first function and a preset second function D;
the preset first function is K ═ mx + my, when the first color temperature value is within a preset first interval, the obtained first average pixel ratio and the obtained second average pixel ratio are substituted into the preset first function, and the second color temperature value is obtained through calculation; wherein K is the color temperature value of the second color temperature, and m is a constant proportion value;
the preset second function is K ═ nx + ny, when the first color temperature value is within a preset second interval, the obtained first average pixel ratio and the obtained second average pixel ratio are substituted into the preset second function, and the second color temperature value is obtained through calculation; k is the color temperature value of the second color temperature, and n is the change proportion value;
and correcting the image to be processed according to the second color temperature value.
2. The method of claim 1, wherein calculating a second color temperature value according to the average pixel ratio, the first color temperature value and a preset function comprises:
and calling the preset function corresponding to the preset interval when the first color temperature value is in at least one preset interval to obtain the second color temperature value.
3. The method of claim 1, wherein the predetermined function comprises a predetermined first function and a predetermined second function.
4. The method of claim 1, wherein the predetermined interval comprises a predetermined first interval between 0K and 5000K and a predetermined second interval greater than 5000K.
5. The method of claim 2, wherein the predetermined intervals include a predetermined first interval and a predetermined second interval, the first color temperature value is within at least one predetermined interval, and the calling the predetermined function corresponding to the predetermined interval to obtain the second color temperature value comprises:
when the first color temperature value is in the preset first interval, calculating by adopting a preset first function to obtain a second color temperature value;
and when the first color temperature value is in the preset second interval, calculating by adopting a preset second function to obtain the second color temperature value.
6. The method of claim 1, wherein the pixel unit comprises a first sub-pixel, a second sub-pixel and a third sub-pixel.
7. The method of claim 6, wherein obtaining a pixel ratio value from the pixel unit comprises:
the pixel ratio comprises a first pixel ratio and a second pixel ratio, and the first pixel ratio is obtained by comparing the first sub-pixel with the second sub-pixel; and comparing the third sub-pixel with the second sub-pixel to obtain the second pixel ratio.
8. The method of claim 7, wherein calculating an average pixel ratio from a plurality of pixel ratios comprises:
the average pixel ratio comprises a first average pixel ratio and a second average pixel ratio, and an average value of the sum of a plurality of first pixel ratios is obtained to obtain the first average pixel ratio; and obtaining the average value of the sum of the second pixel ratios to obtain the second average pixel ratio.
9. An image processing apparatus characterized by comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a plurality of pixel units of an image to be processed;
the processing module is used for obtaining a pixel ratio according to the pixel unit; the device comprises a plurality of pixel ratios, a first color temperature value and a second color temperature value, wherein the pixel ratios are used for calculating an average pixel ratio and obtaining a first color temperature value according to the average pixel ratio; the second color temperature value is calculated according to the average pixel ratio, the first color temperature value and a preset function; the preset function is a function corresponding to the size of the first color temperature value; the average pixel ratio comprises a first average pixel ratio and a second average pixel ratio;
the preset functions comprise a preset first function and a preset second function D;
the preset first function is K ═ mx + my, when the first color temperature value is within a preset first interval, the obtained first average pixel ratio and the obtained second average pixel ratio are substituted into the preset first function, and the second color temperature value is obtained through calculation; wherein K is the color temperature value of the second color temperature, and m is a constant proportion value;
the preset second function is K ═ nx + ny, when the first color temperature value is within a preset second interval, the obtained first average pixel ratio and the obtained second average pixel ratio are substituted into the preset second function, and the second color temperature value is obtained through calculation; k is the color temperature value of the second color temperature, and n is the change proportion value;
and the correction module is used for correcting the image to be processed according to the second color temperature value.
10. A mobile terminal characterized by comprising the image processing apparatus of claim 9, and capable of performing the operations in the image processing method of any one of claims 1 to 8.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010005548.0A CN111147838B (en) | 2020-01-03 | 2020-01-03 | Image processing method and device and mobile terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010005548.0A CN111147838B (en) | 2020-01-03 | 2020-01-03 | Image processing method and device and mobile terminal |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111147838A CN111147838A (en) | 2020-05-12 |
| CN111147838B true CN111147838B (en) | 2022-08-09 |
Family
ID=70523453
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010005548.0A Active CN111147838B (en) | 2020-01-03 | 2020-01-03 | Image processing method and device and mobile terminal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111147838B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103546732A (en) * | 2013-10-18 | 2014-01-29 | 广州市浩云安防科技股份有限公司 | Image processing method and system |
| CN104360829A (en) * | 2014-11-07 | 2015-02-18 | 深圳市中兴移动通信有限公司 | Method and device for adjusting color temperature of screen |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7755671B2 (en) * | 2007-04-23 | 2010-07-13 | Hewlett-Packard Development Company, L.P. | Correcting a captured image in digital imaging devices |
-
2020
- 2020-01-03 CN CN202010005548.0A patent/CN111147838B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103546732A (en) * | 2013-10-18 | 2014-01-29 | 广州市浩云安防科技股份有限公司 | Image processing method and system |
| CN104360829A (en) * | 2014-11-07 | 2015-02-18 | 深圳市中兴移动通信有限公司 | Method and device for adjusting color temperature of screen |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111147838A (en) | 2020-05-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110602473B (en) | White balance calibration method and device | |
| US9697622B2 (en) | Interface adjustment method, apparatus, and terminal | |
| CN107038715B (en) | Image processing method and device | |
| CN107966209B (en) | Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus | |
| CN109688322B (en) | Method and device for generating high dynamic range image and mobile terminal | |
| WO2020199878A1 (en) | Display brightness adjusting method and related product | |
| WO2017071219A1 (en) | Method for detecting skin region and device for detecting skin region | |
| CN107067842B (en) | Color value adjusting method, mobile terminal and storage medium | |
| US11915633B2 (en) | Screen color temperature control method, apparatus, storage medium, and mobile terminal | |
| CN107705247B (en) | Image saturation adjusting method, terminal and storage medium | |
| CN108198150B (en) | Method for eliminating image dead pixel, terminal and storage medium | |
| CN114143523B (en) | Brightness adjusting method and device, projection equipment and storage medium | |
| CN108200421B (en) | White balance processing method, terminal and computer readable storage medium | |
| CN112691363A (en) | Cross-terminal switching method and related device for cloud games | |
| CN109729280A (en) | A kind of image processing method and mobile terminal | |
| CN109195191B (en) | Cell reselection control method and terminal | |
| CN107835336B (en) | Dual-camera frame synchronization method and device, user terminal and storage medium | |
| CN113286335A (en) | Frequency point switching method and device, storage medium and access point | |
| CN114442346B (en) | Method and device for calculating ghost of display panel, storage medium and terminal equipment | |
| CN109348212B (en) | Image noise determination method and terminal equipment | |
| CN111629263A (en) | Display picture compensation method and device, electronic equipment and storage medium | |
| US12137381B2 (en) | Random access method and terminal | |
| CN112867171B (en) | WIFI connection method and device, storage medium and mobile terminal | |
| CN109379575B (en) | White balance processing method and mobile terminal | |
| CN111147838B (en) | Image processing method and device and mobile terminal |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |