CN108769510A - Image processing method, device, computer readable storage medium and electronic equipment - Google Patents
Image processing method, device, computer readable storage medium and electronic equipment Download PDFInfo
- Publication number
- CN108769510A CN108769510A CN201810408621.1A CN201810408621A CN108769510A CN 108769510 A CN108769510 A CN 108769510A CN 201810408621 A CN201810408621 A CN 201810408621A CN 108769510 A CN108769510 A CN 108769510A
- Authority
- CN
- China
- Prior art keywords
- image
- pixel
- colour temperature
- temperature data
- shooting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/10—Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
Abstract
This application involves a kind of image processing method, device, computer readable storage medium and electronic equipments.The method includes:Shooting image is acquired by imaging sensor, include the first pel array and the second pel array in described image sensor, the shooting image includes the first pixel acquired by first pel array and the second pixel acquired by second pel array, first pixel corresponds to a channel, and second pixel corresponds at least two channels;Target colour temperature data are calculated according to the shooting image;The shooting image is handled according to the target colour temperature data.Above-mentioned image processing method, device, computer readable storage medium and electronic equipment can improve the accuracy of image procossing.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of image processing method, device, computer-readable deposit
Storage media and electronic equipment.
Background technology
Camera can be installed on electronic equipment, and light is acquired by the camera of installation, then pass through image sensing
Device converts the optical signal of acquisition to electric signal, so that image can be handled and shown by electronic equipment, for user
It checks.However the scene for shooting photo be often it is extremely complex, the power and colour temperature of light can all influence image it is final at
As effect.For example, when shooting same object, the effect come is shot in the illumination of different colours can be different.Fluorescent lamp
The object taken in room can seem that greening, the object shot under tungsten light indoors will be partially yellow, and in daylight
The object that shaded side takes can be partially blue.
Invention content
A kind of image processing method of the embodiment of the present application offer, device, computer readable storage medium and electronic equipment, can
To improve the accuracy of image procossing.
A kind of image processing method, the method includes:
Shooting image is acquired by imaging sensor, includes the first pel array and the second pixel in described image sensor
Array, the shooting image include the first pixel acquired by first pel array and by second pel array
Second pixel of acquisition, first pixel correspond to a channel, and second pixel corresponds at least two channels;
Target colour temperature data are calculated according to the shooting image;
The shooting image is handled according to the target colour temperature data.
A kind of image processing apparatus, described device include:
Image capture module includes first in described image sensor for acquiring shooting image by imaging sensor
Pel array and the second pel array, the shooting image include the first pixel for acquire by first pel array with
The second pixel acquired by second pel array, first pixel correspond to a channel, second pixel
Corresponding at least two channels;
Data acquisition module, for calculating target colour temperature data according to the shooting image;
Image processing module, for being handled the shooting image according to the target colour temperature data.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
Following steps are realized when row:
Shooting image is acquired by imaging sensor, includes the first pel array and the second pixel in described image sensor
Array, the shooting image include the first pixel acquired by first pel array and by second pel array
Second pixel of acquisition, first pixel correspond to a channel, and second pixel corresponds at least two channels;
Target colour temperature data are calculated according to the shooting image;
The shooting image is handled according to the target colour temperature data.
A kind of electronic equipment, including memory and processor store computer-readable instruction in the memory, described
When instruction is executed by the processor so that the processor executes following steps:
Shooting image is acquired by imaging sensor, includes the first pel array and the second pixel in described image sensor
Array, the shooting image include the first pixel acquired by first pel array and by second pel array
Second pixel of acquisition, first pixel correspond to a channel, and second pixel corresponds at least two channels;
Target colour temperature data are calculated according to the shooting image;
The shooting image is handled according to the target colour temperature data.
Above-mentioned image processing method, device, computer readable storage medium and electronic equipment can wrap in imaging sensor
Containing the first pel array and the second pel array, acquisition shoots the first pixel acquired by the first pel array in image
Including a channel, two channels are included at least by the second pixel that the second pel array acquires.Then according to acquisition
It shoots image and calculates target colour temperature data, and handled according to target colour temperature data by image is shot.It is passed in this way by image
Sensor can acquire the partial pixel point in shooting image simultaneously at least two channels, and the image of acquisition can be more accurately anti-
The true colors for answering environment, the colour temperature data calculated in this way are more accurate, improve the accuracy of image procossing.
Description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is the applied environment figure of image processing method in one embodiment;
Fig. 2 is the flow chart of image processing method in one embodiment;
Fig. 3 is the displaying schematic diagram of imaging sensor in one embodiment;
Fig. 4 is the flow chart of image processing method in another embodiment;
Fig. 5 is the flow chart of image processing method in another embodiment;
Fig. 6 is the distribution map of one embodiment neutral color temperature data;
Fig. 7 is the structural schematic diagram of image processing apparatus in one embodiment;
Fig. 8 is the schematic diagram of image processing circuit in one embodiment.
Specific implementation mode
It is with reference to the accompanying drawings and embodiments, right in order to make the object, technical solution and advantage of the application be more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and
It is not used in restriction the application.
It is appreciated that term " first " used in this application, " second " etc. can be used to describe herein various elements,
But these elements should not be limited by these terms.These terms are only used to distinguish first element and another element.Citing comes
It says, in the case where not departing from scope of the present application, the first client can be known as the second client, and similarly, can incite somebody to action
Second client is known as the first client.First client and the second client both client, but it is not same visitor
Family end.
Fig. 1 is the applied environment figure of image processing method in one embodiment.With reference to as shown in Figure 1, on electronic equipment 102
Camera and imaging sensor are installed, include the first pel array and the second pel array in imaging sensor.Electronic equipment
The light that object 104 can be acquired on 102 by the camera of installation, is then imaged by imaging sensor, to raw
At shooting image.The shooting image of acquisition includes the first pixel acquired by the first pel array and by the second pel array
Second pixel of acquisition, the first pixel correspond to a channel, and the second pixel corresponds at least two channels.Then electronics is set
Standby 102 can calculate target colour temperature data according to shooting image;It is handled according to target colour temperature data by image is shot.The electronics
Equipment 102 can be mobile phone, tablet computer or personal digital assistant or Wearable etc., not limit herein.
Fig. 2 is the flow chart of image processing method in one embodiment.As shown in Fig. 2, the image processing method includes step
Rapid 202 to step 206.Wherein:
Step 202, shooting image is acquired by imaging sensor, includes the first pel array and second in imaging sensor
Pel array, shooting image include the first pixel acquired by the first pel array and acquired by the second pel array the
Two pixels, the first pixel correspond to a channel, and the second pixel corresponds at least two channels.
In one embodiment, camera can be installed, the quantity of the camera of installation is unlimited on electronic equipment.For example, electric
One, two or more cameras can be installed in sub- equipment.When electronic equipment receives the instruction of unlatching camera
When, camera can be called to enter shooting state.Electronic equipment can be provided for triggering the shooting button shot, when detecting
When to the clicking operation of the button, the instruction of camera is opened in triggering.Electronic equipment is also predeterminable for triggering unlatching camera shooting
The shooting voice messaging of the instruction of head.By calling pronunciation receiver, corresponding voice messaging is received, by parsing the voice
Information can trigger the instruction of the unlatching camera when detecting that the voice messaging is matched with the shooting voice messaging.
Into after shooting state, camera meeting timing acquiring shooting picture, and generated a preview image by imaging sensor,
The preview image of generation will not generally be stored, but be shown on the display interface of electronic equipment, be carried out for user
It checks.User can adjust current shooting picture and acquisition parameters according to preview image, to generate last shooting image.Example
Such as, camera in shooting process can be at interval of 0.5 second one frame preview image of acquisition, and the every of generation is shown on display interface
One frame preview image.In previews, the preview image of generation can form a continuous preview image sequence, be looked into for user
It sees.
It distributed several photosensitive elements in imaging sensor, the light of camera acquisition can be converted by photosensitive element
For digital signal, to obtain the pixel value of corresponding pixel in image.Photosensitive element can only generally filter monochromatic light, i.e., one
It is secondary to acquire a kind of light of color.For example, photosensitive element can acquire the light of red, blue, green three kinds of colors, red sense respectively
Optical element can only just acquire feux rouges, and blue sensitive can only just acquire blue light, and green sensitive elements can only just acquire green light.?
The first pel array and the second pel array are contained in the present embodiment, in imaging sensor, include more in the first pel array
A pixel also contains multiple pixels in the second pixel.It can only be same by the pixel being distributed in the first pel array
When acquire a kind of channel value of color, the pixel being distributed in the second pel array can acquire the channel of multiple color simultaneously
Value.For example, the first pel array can only acquire a channel in red bluish-green (Red Green Blue, RGB), the second pixel battle array
Row can acquire red bluish-green three channels simultaneously.
Fig. 3 is the displaying schematic diagram of imaging sensor in one embodiment.As shown in figure 3, including in the imaging sensor
Pel array 30.Include the first pel array 302 and the second pel array 304 in the pel array 30.Wherein, the first pixel battle array
Each pixel only corresponds to a Color Channel in a RGB, each pixel in the second pel array 304 in row 302
Point tri- Color Channels of corresponding RGB.Include only second pel array 304, second pel array in the imaging sensor
304 be the array of 3*3.It is understood that can also include two or more second pixel battle arrays in imaging sensor
Row 304 include the pixel of n*n arrays in each second pel array 304, and n is arbitrary integer, is not limited herein.
Step 204, target colour temperature data are calculated according to shooting image.
It is understood that acquisition shooting figure seem to be made of several pixels, this several pixel according to
For certain aligned transfer at a two-dimensional matrix, each pixel corresponds to one or more channels.Colour temperature data are clapped for indicating
Take the photograph the color component that light in environment is included, shooting image can anyway captured object color change, therefore can lead to
Shooting image is crossed to calculate the colour temperature of shooting environmental.Specifically, electronic equipment is predeterminable the algorithm for obtaining target colour temperature data,
The algorithm can be, but not limited to include gray world algorithm, perfect reflection algorithm etc..
Step 206, it is handled according to target colour temperature data by image is shot.
It is understood that each first pixel only corresponds to a Color Channel in the shooting image formed, it is each
A second pixel can correspond to more than two Color Channels.Shooting image is handled according to target colour temperature data, it can
Directly to handle shooting image, shooting image can also be converted, obtain pending image, and by pending figure
As being handled.The pixel shot in image is handled, each pixel is made to correspond to the channel of identical quantity.Tool
Body, the first pixel only incudes a color in red, green, blue, and the second pixel can incude three kinds of red, green, blue simultaneously
Color, the first pixel and the second pixel are arranged according to certain rule.Every four the first pixels constitute a picture
Plain unit, most common arrangement mode are the arrangement mode of RG/GB, i.e., in each pixel unit by 50% G, 25% R and
25% B is constituted.The shooting image of imaging sensor acquisition can be sent to ISP (Image Signal Processing, figure
As signal processing) processor, ISP processors can handle shooting image, by interpolation processing by each first pixel
All it is indicated by tri- channel values of RGB.Treated, and the first pixel can correspond to tri- channel values of RGB simultaneously, i.e.,
Each pixel in obtained pending image corresponds to tri- channel values of RGB.
After obtaining target colour temperature data, target colour temperature data can reflect the color temperature value in shooting environmental, pass through target
Pending image can be carried out color correction by colour temperature data.For example, can white balance be carried out to image, color renders, special efficacy
Deng processing, the processing of color is carried out with hobby according to the demand of user, obtained image can be more accurate.Then according to target colour temperature
The step of data handle pending image include:Convert the shooting image of acquisition to pending image, this is pending
Each pixel in image corresponds at least two channels;Pending image is handled according to target colour temperature data
The image processing method that above-described embodiment provides can include the first pel array and the second picture in imaging sensor
Pixel array, shooting in image for acquisition include a channel by the first pixel that the first pel array acquires, pass through second
Second pixel of pel array acquisition includes at least two channels.Then target colour temperature number is calculated according to the shooting image of acquisition
According to, and handled according to target colour temperature data by image is shot.It in this way can be in shooting image by imaging sensor
Partial pixel point acquires at least two channel values simultaneously, the image of acquisition can more accurately reaction environment true colors, this
The colour temperature data that sample calculates are more accurate, improve the accuracy of image procossing.
Fig. 4 is the flow chart of image processing method in another embodiment.As shown in figure 4, the image processing method includes
Step 402 is to step 414.Wherein:
Step 402, control camera is rotated, and is acquired and is shot by imaging sensor during camera rotates
Image.
In one embodiment, when acquisition shoots image, camera can also be controlled and rotated, clapped with acquiring
The shooting image of different angle in scene is taken the photograph, can more accurately calculate colour temperature data in this way.Specifically, when unlatching electronic equipment
On camera when, camera can acquire current shooting picture in real time, form preview image.But the visual field of camera is fixed
, or can only change in a certain range.It therefore, can be in order to allow camera that can acquire more comprehensive shooting picture
It allows camera to generate rotation, during camera rotates, obtains preview image.It is understood that camera rotation can
Can also be to drive turning for camera by rotating electronic equipment to be to control camera by electronic equipment to be rotated
It is dynamic, it is not specifically limited in the present embodiment.
Electronic equipment can also show the prompt message of rotation camera on a display screen under screening-mode, with prompt
User rotates camera.Then in the rotation process of camera, preview image is obtained.It is to be appreciated that the prompt
The display mode of information and the data format of prompt message may include a variety of.For example, " asking left-right rotation camera " can be shown
It etc. similar text prompt information, or can show for indicating the labels such as left-right rotation figure or symbol, for example can show table
Show the arrow etc. of left-right rotation.Electronic equipment can be under screening-mode, you can caches the frame image that the real time scan obtains.It is optional
Ground, camera can carry out left and right, upper and lower, front and back etc. and rotate at any angle, during electronic equipment rotates, generate preview
Image, for example left-right rotation can be carried out with some fixed position.Camera slewing area is bigger, then correspondence collected can be clapped
It is more rich to take the photograph picture so that the accuracy higher of follow-up white balance processing.For example, user can before capturing the image, hand
The electronic equipment is held, environmental scanning is carried out to the scene to be shot, for example hand-holdable 360 ° of electronic equipment horizontally rotates a circle,
To obtain the shooting image in entire space.
For camera during rotation, electronic equipment can acquire one or more shooting figure by imaging sensor
Picture.This one or more shooting image can reflect the variation of light in photographed scene from different angles, according to this or
Colour temperature data can be more accurately calculated in multiple shooting images, more accurately to handle image.
Step 404, shooting image is divided at least one reference image block.
Each shooting image can be indicated by a two dimensional image matrix, shoot the width and height of image
It can be indicated by the quantity of pixel, shooting the size of image can be then indicated by width and height.For example,
The size of shooting image can be expressed as 640*320, then it represents that there are 640 pixels in the width direction of the shooting image, it is high
Degree has 320 pixels on direction.Specifically, the two-dimensional matrix pixel of the shooting image can be divided into different areas
Domain contains the partial pixel point in shooting image in each region, and a region is exactly a reference image block.Reference picture
The size of block can be identical, then several identical reference image blocks of size can be divided by shooting image.
Step 406, the reference image vegetarian refreshments for including in each reference image block is obtained, and according to the reference image vegetarian refreshments meter of acquisition
Calculate corresponding color reference value.
In one embodiment, reference image vegetarian refreshments is the pixel for screening target image block.Reference image vegetarian refreshments can be with
It is the first pixel and the second pixel, can also is the second pixel.Specifically, it obtains and is wrapped in each reference image block
The first pixel and the second pixel contained, as with reference to pixel;Or obtain the second pixel for including in reference image block
As with reference to pixel.
Each Color Channel of reference image vegetarian refreshments can be indicated by a numerical value, and the value range of the numerical value is 0
~255.It needs to find point most white in image when obtaining colour temperature data as canonical reference point, then joined according to the standard
The color channel values of examination point calculate colour temperature data.When pixel is white, the RGB channel value of pixel is respectively 255,
255,255.Color reference value is exactly the value for matching white pixel point, calculates the color reference value of each pixel, then
White pixel point can be screened by color reference value.
Step 408, target image block is obtained from reference image block according to color reference value, and according to target image block meter
Calculate target colour temperature data.
The color reference value for calculating each reference image vegetarian refreshments in reference image block, may determine that picture according to color reference value
Whether vegetarian refreshments is white pixel point.It can screen comprising the more reference image block of white pixel point as target image block, so
Target colour temperature data are calculated according to target image block afterwards.Specifically, reference image block is traversed;It calculates each in reference image block
The corresponding color reference value of a reference image vegetarian refreshments, and reference image vegetarian refreshments of the statistical color reference value within the scope of preset reference value
Pixel quantity;Using reference image block of the pixel quantity within the scope of preset quantity as target image block.For example, divide
Include 20*20 pixel in each reference image block, then the reference image block comprising 300 white pixel points can be made
For target image block, target colour temperature data are then calculated according to target image block.
If in camera rotary course, multiple shooting images are collected, then each shooting image can be divided into
At least one reference image block, and target image block is filtered out from obtained all reference image blocks, further according to target image
Target colour temperature data are calculated in block.Camera can collect more colouring informations in rotary course in this way, to
To more accurately target colour temperature data.
Step 410, the second pixel in image will be shot and carries out pixel compensation, be compensated shooting image;Wherein, it mends
It repays each pixel for including in shooting image and corresponds to a channel.
Each first pixel for including in shooting image corresponds to a channel, each second pixel corresponds at least
Two channels.Before carrying out color correction processing to shooting image, need that the corresponding channel of the pixel in image will be shot
Value is modified.It can will shoot the second pixel in image and regard bad point, pixel compensation, pixel are carried out to the second pixel
The second pixel after compensation corresponds to a channel value, thus can be uniformly located in the shooting image after compensation
Reason.Specifically, shooting the first pixel in image is arranged according to certain rule, then the second pixel also must be according to
The queueing discipline of first pixel carries out pixel compensation.For example, if the first pixel be according to RG/GB arrangement mode into
Row acquisition, then the second pixel after pixel compensation must also be arranged according to the arrangement mode of RG/GB, such ability
Ensure to carry out unitized processing to shooting image.
In one embodiment, pixel compensation can be carried out according to the second pixel channel value of itself, it can also root
Come to carry out pixel compensation to the second pixel according to the channel value of the first pixel.Specifically, corresponding at least from the second pixel
A channel is chosen in two channels, as the corresponding channel of the second pixel after pixel compensation;Or according to the first pixel
Corresponding channel determines the corresponding channel of the second pixel after pixel compensation.
Step 412, compensation shooting image is converted to pending image.
Each pixel for including in obtained compensation shooting image corresponds to a channel, can will thus compensate
Shooting image is uniformly processed, to convert obtained pending image.Convert each picture in obtained pending image
Vegetarian refreshments corresponds at least two channels, then can carry out color correction processing to pending image.Specifically, compensation shooting image
In pixel be to be arranged according to the rule of RG/GB, the pixel in compensation shooting image can be traversed, and from adjacent
Pixel in obtain compensation channel value, to obtain pending image.For example, it is assumed that a pixel corresponds to G channel values,
So this single channel pixel can read the adjacent channels R pixel and channel B pixel, and by the adjacent of reading
The channels R pixel and the corresponding channel value of channel B pixel, the R channel values after being compensated as the pixel and channel B value, from
And convert the single channel pixel to triple channel pixel.
If collecting two or more shooting images in camera rotary course, every shooting image can all be turned
Pending image is turned to, color correction is all carried out to each obtained pending image further according to obtained target colour temperature data
Processing.A target can also be chosen from shooting image and shoots image, and converts target shooting image to pending image,
Pending image is handled according to obtained target colour temperature data.For example, the clear of each shooting image can be calculated
The highest shooting image of clarity is shot image by degree.Or each of detection shoots the face for including in image,
Using comprising the most shooting image of face image is shot as target.
Step 414, pending image is handled according to target colour temperature data.
In embodiment provided by the present application, when shooting image, shoot image in object color be easy to by
To the influence of ambient light color.After obtaining target colour temperature data, so that it may with according to obtained target colour temperature data to pending
Image carries out color correction processing.In pending image after color correction processing, what color will be original closer to object
Color, so that the image arrived is more accurate.
In one embodiment, the step of calculating colour temperature data specifically includes:
Step 502, the corresponding colour temperature data of each target image block are calculated, and count the distribution map of colour temperature data.
Target image block is comprising the more image block of white pixel point, namely the relatively image of white area
Block.After filtering out target image block, a corresponding colour temperature data can be calculated to each target image block, further according to color
The distribution of warm data is come the target colour temperature data in obtaining most.It is understood that RGB channel value and colour temperature data have centainly
Correspondence, therefore corresponding colour temperature data can be calculated according to RGB channel value.Specifically, target image block can be calculated
In each channel value mean value, obtain colour temperature data further according to the mean value computation of each channel value.For example, calculating target image block
The mean value in the middle channels R is Rave, and the mean value in the channels G is Gave, and Rave/Gave is calculated.Rave/Gave has with colour temperature data
There is certain correspondence, then can be obtained by the corresponding colour temperature data of target image block according to obtained Rave/Gave.
Step 504, target colour temperature data are determined from colour temperature data according to distribution map.
Each target image block can correspond to a colour temperature data, then can count obtained colour temperature data,
Obtain the distribution map of colour temperature data.The distribution situation that can see colour temperature data in distribution map, according to the distribution feelings of colour temperature data
Condition can determine final target colour temperature data.Fig. 6 is the distribution map of one embodiment neutral color temperature data.As shown in fig. 6, this point
Horizontal axis indicates that colour temperature data, the longitudinal axis indicate the ratio of the channels the R channels mean value Rave and G mean value Gave in Butut.According to target figure
As Rave and Gave that block is calculated, Rave/Gave can be obtained.Target image can be got according to the colour temperature curve
The corresponding colour temperature data of block.Then the distribution map of colour temperature data is counted, it is assumed that a total of 100 target image blocks, wherein having 80
The corresponding colour temperature data of a image block are all in 4500K or so, then can consider target colour temperature data just is 4500K.
The image processing method that above-described embodiment provides can include the first pel array and the second picture in imaging sensor
Pixel array, shooting in image for acquisition include a channel by the first pixel that the first pel array acquires, pass through second
Second pixel of pel array acquisition includes at least two channels.Then target colour temperature number is calculated according to the shooting image of acquisition
According to, and handled according to target colour temperature data by image is shot.It in this way can be in shooting image by imaging sensor
Partial pixel point acquires at least two channels simultaneously, the image of acquisition can more accurately reaction environment true colors, in this way
The colour temperature data calculated are more accurate, improve the accuracy of image procossing.
It should be understood that although each step in the flow chart of Fig. 2,4,5 is shown successively according to the instruction of arrow,
Be these steps it is not that the inevitable sequence indicated according to arrow executes successively.Unless expressly stating otherwise herein, these steps
There is no stringent sequences to limit for rapid execution, these steps can execute in other order.Moreover, in Fig. 2,4,5 extremely
Few a part of step may include that either these sub-steps of multiple stages or stage are not necessarily same to multiple sub-steps
Moment executes completion, but can execute at different times, and the execution sequence in these sub-steps or stage is also not necessarily
It carries out successively, but can either the sub-step of other steps or at least part in stage in turn or are handed over other steps
Alternately execute.
Fig. 7 is the structural schematic diagram of image processing apparatus in one embodiment.As shown in fig. 7, the image processing apparatus 700
Including image capture module 702, data acquisition module 704 and image processing module 706.Wherein:
Image capture module 702, for by imaging sensor acquisition shooting image, including the in described image sensor
One pel array and the second pel array, the shooting image includes the first pixel acquired by first pel array
With the second pixel acquired by second pel array, first pixel corresponds to a channel, second pixel
Corresponding at least two channels of point.
Data acquisition module 704, for calculating target colour temperature data according to the shooting image.
Image processing module 706, for being handled the shooting image according to the target colour temperature data.
The image processing apparatus that above-described embodiment provides can include the first pel array and the second picture in imaging sensor
Pixel array, shooting in image for acquisition include a channel by the first pixel that the first pel array acquires, pass through second
Second pixel of pel array acquisition includes at least two channels.Then target colour temperature number is calculated according to the shooting image of acquisition
According to, and handled according to target colour temperature data by image is shot.It in this way can be in shooting image by imaging sensor
Partial pixel point acquires at least two channels simultaneously, the image of acquisition can more accurately reaction environment true colors, in this way
The colour temperature data calculated are more accurate, improve the accuracy of image procossing.
In one embodiment, image capture module 702 be additionally operable to control camera rotated, camera rotation
Shooting image is acquired by imaging sensor in the process.
In one embodiment, data acquisition module 704 is additionally operable to the shooting image being divided at least one reference
Image block;The reference image vegetarian refreshments for including in each reference image block is obtained, and corresponding according to the calculating of the reference image vegetarian refreshments of acquisition
Color reference value;Target image block is obtained from the reference image block according to the color reference value, and according to the target
Image block calculates target colour temperature data.
In one embodiment, data acquisition module 704 is additionally operable to obtain first included in each reference image block
Pixel and the second pixel, as with reference to pixel;Or obtain the second pixel conduct for including in the reference image block
Reference image vegetarian refreshments.
In one embodiment, data acquisition module 704 is additionally operable to calculate the corresponding colour temperature number of each target image block
According to, and count the distribution map of the colour temperature data;Target colour temperature data are determined from the colour temperature data according to the distribution map.
In one embodiment, image processing module 706 is additionally operable to convert the shooting image of acquisition to pending
Image, each pixel in the pending image correspond at least two channels;It will according to the target colour temperature data
The pending image is handled.
In one embodiment, image processing module 706 is additionally operable to carry out the second pixel in the shooting image
Pixel compensation is compensated shooting image;Wherein, each pixel for including in the compensation shooting image corresponds to one and leads to
Road;Convert compensation shooting image to pending image.
In one embodiment, image processing module 706 is additionally operable to lead to from second pixel corresponding at least two
A channel is chosen in road, as the corresponding channel value of the second pixel after pixel compensation;Or it is corresponded to according to the first pixel
Channel, determine the corresponding channel of the second pixel after pixel compensation.
The division of modules is only used for for example, in other embodiments, can will scheme in above-mentioned image processing apparatus
As processing unit is divided into different modules as required, to complete all or part of function of above-mentioned image processing apparatus.
The embodiment of the present application also provides a kind of computer readable storage mediums.One or more is executable comprising computer
The non-volatile computer readable storage medium storing program for executing of instruction, when the computer executable instructions are executed by one or more processors
When so that the processor executes the image processing method of above-described embodiment offer.
A kind of computer program product including instruction, when run on a computer so that computer executes above-mentioned
The image processing method that embodiment provides.
The embodiment of the present application also provides a kind of electronic equipment.Above-mentioned electronic equipment includes image processing circuit, at image
Managing circuit can utilize hardware and or software component to realize, it may include define ISP (Image Signal Processing, figure
As signal processing) the various processing units of pipeline.Fig. 8 is the schematic diagram of image processing circuit in one embodiment.Such as Fig. 8 institutes
Show, for purposes of illustration only, only showing the various aspects with the relevant image processing techniques of the embodiment of the present application.
As shown in figure 8, image processing circuit includes ISP processors 840 and control logic device 850.Imaging device 810 captures
Image data handled first by ISP processors 840, ISP processors 840 to image data analyzed with capture can be used for really
The image statistics of fixed and/or imaging device 810 one or more control parameters.Imaging device 810 may include thering is one
The camera of a or multiple lens 812 and imaging sensor 814.Imaging sensor 814 may include colour filter array (such as
Bayer filters), imaging sensor 814 can obtain the luminous intensity captured with each imaging pixel of imaging sensor 814 and wavelength
Information, and the one group of raw image data that can be handled by ISP processors 840 is provided.Sensor 820 (such as gyroscope) can be based on passing
The parameter (such as stabilization parameter) of the image procossing of acquisition is supplied to ISP processors 840 by 820 interface type of sensor.Sensor 820
Interface can utilize SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imager framework) interface,
The combination of other serial or parallel camera interfaces or above-mentioned interface.
In addition, raw image data can be also sent to sensor 820 by imaging sensor 814, sensor 820 can be based on passing
820 interface type of sensor is supplied to ISP processors 840 or sensor 820 to deposit raw image data raw image data
It stores up in video memory 830.
ISP processors 840 handle raw image data pixel by pixel in various formats.For example, each image pixel can
Bit depth with 8,10,12 or 14 bits, ISP processors 840 can carry out raw image data at one or more images
Reason operation, statistical information of the collection about image data.Wherein, image processing operations can be by identical or different bit depth precision
It carries out.
ISP processors 840 can also receive image data from video memory 830.For example, 820 interface of sensor will be original
Image data is sent to video memory 830, and the raw image data in video memory 830 is available to ISP processors 840
It is for processing.Video memory 830 can be independent special in a part, storage device or electronic equipment for memory device
With memory, and it may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving from 814 interface of imaging sensor or from 820 interface of sensor or from video memory 830
When raw image data, ISP processors 840 can carry out one or more image processing operations, such as time-domain filtering.Treated schemes
As data can be transmitted to video memory 830, to carry out other processing before shown.ISP processors 840 are from image
Memory 830 receives processing data, and is carried out in original domain and in RGB and YCbCr color spaces to the processing data
Image real time transfer.Treated that image data may be output to display 870 for ISP processors 840, for user's viewing and/or
It is further processed by graphics engine or GPU (Graphics Processing Unit, graphics processor).In addition, ISP processors
840 output also can be transmitted to video memory 830, and display 870 can read image data from video memory 830.?
In one embodiment, video memory 830 can be configured as realizing one or more frame buffers.In addition, ISP processors 840
Output can be transmitted to encoder/decoder 860, so as to encoding/decoding image data.The image data of coding can be saved,
And it is decompressed before being shown in 870 equipment of display.Encoder/decoder 860 can be real by CPU or GPU or coprocessor
It is existing.
The statistical data that ISP processors 840 determine, which can be transmitted, gives control logic device Unit 850.For example, statistical data can wrap
Include the image sensings such as automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 812 shadow correction of lens
814 statistical information of device.Control logic device 850 may include the processor and/or micro-control that execute one or more routines (such as firmware)
Device processed, one or more routines can determine the control parameter and ISP processors of imaging device 810 according to the statistical data of reception
840 control parameter.For example, the control parameter of imaging device 810 may include 820 control parameter of sensor (such as gain, exposure
The time of integration, stabilization parameter of control etc.), camera flash control parameter, 812 control parameter of lens (such as focus or zoom
With focal length) or these parameters combination.ISP control parameters may include for automatic white balance and color adjustment (for example, in RGB
During processing) 812 shadow correction parameter of gain level and color correction matrix and lens.
It is to realize image processing method that above-described embodiment provides with image processing techniques in Fig. 8 below.
Used in this application may include to any reference of memory, storage, database or other media is non-volatile
And/or volatile memory.Suitable nonvolatile memory may include read-only memory (ROM), programming ROM (PROM),
Electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include arbitrary access
Memory (RAM), it is used as external cache.By way of illustration and not limitation, RAM is available in many forms, such as
It is static RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDR SDRAM), enhanced
SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM).
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
Cannot the limitation to the application the scope of the claims therefore be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, under the premise of not departing from the application design, various modifications and improvements can be made, these belong to the guarantor of the application
Protect range.Therefore, the protection domain of the application patent should be determined by the appended claims.
Claims (10)
1. a kind of image processing method, which is characterized in that the method includes:
Shooting image is acquired by imaging sensor, includes the first pel array and the second pixel battle array in described image sensor
Row, the shooting image include the first pixel acquired by first pel array and are adopted by second pel array
Second pixel of collection, first pixel correspond to a channel, and second pixel corresponds at least two channels;
Target colour temperature data are calculated according to the shooting image;
The shooting image is handled according to the target colour temperature data.
2. according to the method described in claim 1, it is characterized in that, it is described by imaging sensor acquire shooting image, including:
Control camera is rotated, and shooting image is acquired by imaging sensor during camera rotates.
3. according to the method described in claim 1, it is characterized in that, described calculate target colour temperature data according to the shooting image
Including:
The shooting image is divided at least one reference image block;
The reference image vegetarian refreshments for including in each reference image block is obtained, and corresponding color is calculated according to the reference image vegetarian refreshments of acquisition
Reference value;
Target image block is obtained from the reference image block according to the color reference value, and according to the target image block meter
Calculate target colour temperature data.
4. according to the method described in claim 3, it is characterized in that, described obtain the reference image for including in each reference image block
Vegetarian refreshments, including:
The first pixel and the second pixel included in each reference image block are obtained, as with reference to pixel;Or
The second pixel for including in the reference image block is obtained to be used as with reference to pixel.
5. according to the method described in claim 3, it is characterized in that, described calculate target colour temperature number according to the target image block
According to, including:
The corresponding colour temperature data of each target image block are calculated, and count the distribution map of the colour temperature data;
Target colour temperature data are determined from the colour temperature data according to the distribution map.
6. the method according to any one of claims 1 to 5, it is characterized in that, described according to the target colour temperature data
The shooting image is handled, including:
Convert the shooting image of acquisition to pending image, each pixel in the pending image is corresponding
At least two channels;
The pending image is handled according to the target colour temperature data.
7. according to the method described in claim 6, it is characterized in that, it is described convert the shooting image of acquisition to it is pending
Image, including:
The second pixel in the shooting image is subjected to pixel compensation, is compensated shooting image;Wherein, the compensation is clapped
It takes the photograph each pixel for including in image and corresponds to a channel;
Convert compensation shooting image to pending image.
8. a kind of image processing apparatus, which is characterized in that described device includes:
Image capture module includes the first pixel in described image sensor for acquiring shooting image by imaging sensor
Array and the second pel array, the shooting image include the first pixel acquired by first pel array and by institute
The second pixel of the second pel array acquisition is stated, first pixel corresponds to a channel, and second pixel corresponds to
At least two channels;
Data acquisition module, for calculating target colour temperature data according to the shooting image;
Image processing module, for being handled the shooting image according to the target colour temperature data.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt
The method as described in any one of 1 to 7 is realized when processor executes.
10. a kind of electronic equipment, including memory and processor, computer-readable instruction is stored in the memory, it is described
When instruction is executed by the processor so that the processor executes the method as described in any one of claim 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810408621.1A CN108769510B (en) | 2018-05-02 | 2018-05-02 | Image processing method, image processing device, computer-readable storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810408621.1A CN108769510B (en) | 2018-05-02 | 2018-05-02 | Image processing method, image processing device, computer-readable storage medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108769510A true CN108769510A (en) | 2018-11-06 |
CN108769510B CN108769510B (en) | 2021-03-23 |
Family
ID=64009122
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810408621.1A Active CN108769510B (en) | 2018-05-02 | 2018-05-02 | Image processing method, image processing device, computer-readable storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108769510B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111125113A (en) * | 2019-12-25 | 2020-05-08 | 中科三清科技有限公司 | Method and device for storing air pollutant data |
CN113691716A (en) * | 2021-08-26 | 2021-11-23 | 维沃移动通信有限公司 | Image sensor, image processing method, image processing apparatus, electronic device, and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101394570A (en) * | 2007-09-21 | 2009-03-25 | 微彩智库有限公司 | Display and method of control |
CN102273208A (en) * | 2009-10-20 | 2011-12-07 | 索尼公司 | Image processing device, image processing method, and program |
CN103327345A (en) * | 2012-03-19 | 2013-09-25 | 华晶科技股份有限公司 | White balance processing method and processing device thereof |
JP2014072658A (en) * | 2012-09-28 | 2014-04-21 | Mega Chips Corp | Pixel interpolating device, imaging apparatus, program and integrated circuit |
CN105721843A (en) * | 2014-12-21 | 2016-06-29 | 瑞沃罗申显示有限责任公司 | Large-Format Display Systems Having Color Pixels and White Pixels |
CN106162135A (en) * | 2016-07-29 | 2016-11-23 | 广东欧珀移动通信有限公司 | White balance adjustment method and device |
-
2018
- 2018-05-02 CN CN201810408621.1A patent/CN108769510B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101394570A (en) * | 2007-09-21 | 2009-03-25 | 微彩智库有限公司 | Display and method of control |
CN102273208A (en) * | 2009-10-20 | 2011-12-07 | 索尼公司 | Image processing device, image processing method, and program |
CN103327345A (en) * | 2012-03-19 | 2013-09-25 | 华晶科技股份有限公司 | White balance processing method and processing device thereof |
JP2014072658A (en) * | 2012-09-28 | 2014-04-21 | Mega Chips Corp | Pixel interpolating device, imaging apparatus, program and integrated circuit |
CN105721843A (en) * | 2014-12-21 | 2016-06-29 | 瑞沃罗申显示有限责任公司 | Large-Format Display Systems Having Color Pixels and White Pixels |
CN106162135A (en) * | 2016-07-29 | 2016-11-23 | 广东欧珀移动通信有限公司 | White balance adjustment method and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111125113A (en) * | 2019-12-25 | 2020-05-08 | 中科三清科技有限公司 | Method and device for storing air pollutant data |
CN113691716A (en) * | 2021-08-26 | 2021-11-23 | 维沃移动通信有限公司 | Image sensor, image processing method, image processing apparatus, electronic device, and storage medium |
CN113691716B (en) * | 2021-08-26 | 2023-07-11 | 维沃移动通信有限公司 | Image sensor, image processing method, image processing device, electronic apparatus, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108769510B (en) | 2021-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110166695B (en) | Camera anti-shake method and device, electronic equipment and computer readable storage medium | |
CN108055452B (en) | Image processing method, device and equipment | |
CN107911682B (en) | Image white balance processing method, device, storage medium and electronic equipment | |
CN108712608B (en) | Terminal equipment shooting method and device | |
CN108012078B (en) | Image brightness processing method and device, storage medium and electronic equipment | |
US20050128509A1 (en) | Image creating method and imaging device | |
CN110290323B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN107911683B (en) | Image white balancing treatment method, device, storage medium and electronic equipment | |
CN112004029B (en) | Exposure processing method, exposure processing device, electronic apparatus, and computer-readable storage medium | |
CN109685853B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN111711755B (en) | Image processing method and device, terminal and computer readable storage medium | |
CN108024054A (en) | Image processing method, device and equipment | |
CN107704798B (en) | Image blurring method and device, computer readable storage medium and computer device | |
CN110035206B (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
CN107959841A (en) | Image processing method, device, storage medium and electronic equipment | |
CN108804658A (en) | Image processing method and device, storage medium, electronic equipment | |
CN109712177A (en) | Image processing method, device, electronic equipment and computer readable storage medium | |
CN112087571A (en) | Image acquisition method and device, electronic equipment and computer readable storage medium | |
CN107948511B (en) | Brightness of image processing method, device, storage medium and brightness of image processing equipment | |
CN107920205B (en) | Image processing method, device, storage medium and electronic equipment | |
CN109559352A (en) | Camera calibration method, device, electronic equipment and computer readable storage medium | |
CN107194901B (en) | Image processing method, image processing device, computer equipment and computer readable storage medium | |
CN108322648A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN109697737B (en) | Camera calibration method, device, electronic equipment and computer-readable storage medium | |
CN108769510A (en) | Image processing method, device, computer readable storage medium and electronic equipment |
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 |