CN107959841A - Image processing method, device, storage medium and electronic equipment - Google Patents

Image processing method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN107959841A
CN107959841A CN201711287892.8A CN201711287892A CN107959841A CN 107959841 A CN107959841 A CN 107959841A CN 201711287892 A CN201711287892 A CN 201711287892A CN 107959841 A CN107959841 A CN 107959841A
Authority
CN
China
Prior art keywords
white balance
image
balance parameter
image block
camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711287892.8A
Other languages
Chinese (zh)
Other versions
CN107959841B (en
Inventor
杜成鹏
孙剑波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711287892.8A priority Critical patent/CN107959841B/en
Publication of CN107959841A publication Critical patent/CN107959841A/en
Application granted granted Critical
Publication of CN107959841B publication Critical patent/CN107959841B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

This application involves a kind of image processing method, device, storage medium and electronic equipment, the described method includes:In camera moving process, preview image is obtained;Each Zhang Suoshu preview images are divided into the image block of default quantity, and corresponding white balance parameter is calculated according to the corresponding each described image block of each Zhang Suoshu preview images;Target white balance parameter is obtained according to the white balance parameter;White balance processing is carried out to shooting image according to the target white balance parameter, wherein the shooting image is obtained from the preview image.Above-mentioned image processing method, device, storage medium and electronic equipment, can provide the accuracy of image procossing.

Description

Image processing method, device, storage medium and electronic equipment
Technical field
This application involves technical field of image processing, more particularly to a kind of image processing method, device, storage medium and Electronic equipment.
Background technology
Photographing device is when shooting the object of same color, and under different light environments, shooting shows the face of the object Color is different.White balance is to describe an index of white accuracy after red, green, blue three primary colours mixing generation in display, to clapping The image taken the photograph carries out automatic white balance (Auto White Balance, AWB) processing, can be original by the color rendition of image Color, to solve the problems, such as reference object color distortion in the picture.
The content of the invention
The embodiment of the present application provides a kind of image processing method, device, storage medium and electronic equipment, can improve image The accuracy of processing.
A kind of image processing method, including:
In camera moving process, preview image is obtained;
Each Zhang Suoshu preview images are divided into the image block of default quantity, and according to each Zhang Suoshu preview images pair The each described image block answered calculates corresponding white balance parameter;
Target white balance parameter is obtained according to the white balance parameter;
White balance processing is carried out to shooting image according to the target white balance parameter, wherein the shooting image is from institute State what is obtained in preview image.
A kind of image processing apparatus, including:
Image collection module, in camera moving process, obtaining preview image;
Parameter acquisition module, for each Zhang Suoshu preview images to be divided into the image block of default quantity, and according to every The corresponding each described image block of one preview image calculates corresponding white balance parameter;Obtained according to the white balance parameter Take target white balance parameter;
Image processing module, for carrying out white balance processing to shooting image according to the target white balance parameter, wherein The shooting image is obtained from the preview image.
A kind of computer-readable recording medium, is stored thereon with computer program, and the computer program is held by processor Following steps are realized during row:
In camera moving process, preview image is obtained;
Each Zhang Suoshu preview images are divided into the image block of default quantity, and according to each Zhang Suoshu preview images pair The each described image block answered calculates corresponding white balance parameter;
Target white balance parameter is obtained according to the white balance parameter;
White balance processing is carried out to shooting image according to the target white balance parameter, wherein the shooting image is from institute State what is obtained in preview image.
A kind of electronic equipment, including memory, processor and storage are on a memory and the meter that can run on a processor Calculation machine program, the processor realize following steps when performing the computer program:
In camera moving process, preview image is obtained;
Each Zhang Suoshu preview images are divided into the image block of default quantity, and according to each Zhang Suoshu preview images pair The each described image block answered calculates corresponding white balance parameter;
Target white balance parameter is obtained according to the white balance parameter;
White balance processing is carried out to shooting image according to the target white balance parameter, wherein the shooting image is from institute State what is obtained in preview image.
Above-mentioned image processing method, device, storage medium and electronic equipment, can be obtained during camera moves Take multiple preview images.Then preview image is divided into image block, and corresponding white balance is calculated according to each image block and is joined Number.Target white balance parameter is finally obtained according to white balance parameter, then shooting image is carried out according to target white balance parameter White balance processing.The white balance processing procedure further accounts for camera being moved through not only using current taken image as foundation The preview image shot in journey so that the information gathered when white balance is handled is more comprehensive, and white balance processing also can be more It is accurate to add.
Brief 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, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of application, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained 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 schematic diagram of image block in one embodiment;
Fig. 4 is the flow chart of image processing method in another embodiment;
Fig. 5 is the schematic diagram on first direction and second direction in one embodiment;
Fig. 6 is the schematic diagram on first direction and second direction in another embodiment;
Fig. 7 is the structure diagram of image processing apparatus in one embodiment;
Fig. 8 is the schematic diagram of image processing circuit in one embodiment.
Embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the object, technical solution and advantage of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only 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 various elements herein, But these elements should not be limited by these terms.These terms are only used to distinguish first element and another element.Citing comes Say, 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 clients, 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 110 Camera is installed, electronic equipment 110 can control camera to be rotated, and can also make by the movement of electronic equipment 110 Camera produces movement.In the moving process of camera, camera can be scanned object 120 and generate a preview image, Then each Zhang Suoshu preview images that electronic equipment 110 generates camera are divided into the image block of default quantity, and according to The corresponding each described image block of each Zhang Suoshu preview images calculates corresponding white balance parameter;According to the white balance parameter Obtain target white balance parameter;White balance processing is carried out to shooting image according to the target white balance parameter.
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 208.Wherein:
Step 202, in camera moving process, preview image is obtained.
In one embodiment, camera can be installed, the quantity of the camera of installation is unlimited on electronic equipment.It is 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.Wherein, the instruction for opening camera can be grasped by the related touch-control detected The shooting instruction of the triggerings such as work, the pressing operation of physical button or voice-controlled operations.Touch control operation can be touch clicking operation, Touch long-press operation, touch the operation such as slide, multi-point touch operation.Electronic equipment can provide for what triggering was shot Shooting push button, when detecting the clicking operation to the button, the instruction of camera is opened in triggering.The also predeterminable use of electronic equipment In the shooting voice messaging for the instruction for triggering the unlatching camera.By calling pronunciation receiver, corresponding voice letter is received Breath, by parsing the voice messaging, when detecting that the voice messaging is matched with the shooting voice messaging, can trigger the unlatching and takes the photograph As the instruction of head.
Into after shooting state, camera meeting timing acquiring shooting picture simultaneously generates a preview image, the preview image of generation It will not generally be stored, but be shown on the display interface of electronic equipment, be checked for user.User can root Current shooting picture and acquisition parameters are adjusted according to preview image, to generate last shooting image.For example, camera is being shot During can be at interval of 0.5 second one frame preview image of collection, and show on display interface each frame preview image of generation. In previews, the preview image of generation can form a continuous preview image sequence, be checked for user.
Specifically, when opening the camera on electronic equipment, camera can gather current shooting picture in real time, be formed pre- Look at image.But the visual field of camera is fixed, or can only change in certain scope.Therefore in order to allow camera can To gather more comprehensive shooting picture, camera can be allowed to produce movement, during camera moves, obtain preview graph Picture.It is understood that camera movement can be controlled camera to be rotated by electronic equipment or pass through shifting Dynamic electronic equipment drives the movement of camera, is not specifically limited in the present embodiment.
Electronic equipment can also show the prompt message of dollying head on a display screen under screening-mode, with prompting User moves camera.Then in the moving process of camera, preview image is obtained.It is to be appreciated that the prompting The display mode of information and the data format of prompt message can include a variety of.For example, it can show " camera please be move left and right " Etc. similar text prompt information, or it can show and move left and right the mark such as figure or symbol for expression, for example can show table Show arrow moved left and right etc..Electronic equipment can be under screening-mode, you can caches the two field picture that the real time scan obtains.It is optional Ground, camera can carry out the movement of the optional position such as left and right, upper and lower, front and rear, during electronic equipment moves, generate preview graph Picture, for example left-right rotation can be carried out with some fixed position.Camera moving range is bigger, then the shooting that correspondence can collect Picture is more rich so that the accuracy higher of follow-up white balance processing.For example, user can before capturing the image, can 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 preview image in whole space.
In one embodiment, in the moving process of camera, motion detection elements are may call upon, and detect shooting The translational speed of head;Then preview image is obtained according to translational speed.Motion detection elements are to move shape suitable for detection device The element of state, it may include but it is not limited to the element such as gyroscope or gravity sensing device, acceleration transducer.Electronic equipment can call Built-in motion detection elements, calculate translational speed of the camera in moving process.When the translational speed of camera is less than During threshold speed, the preview image of camera generation is obtained.
Step 204, each preview image is divided into the image block of default quantity, and according to each preview image pair The each image block answered calculates corresponding white balance parameter.
Multiple preview images can be obtained during camera moves, are then divided into each preview image pre- If the image block of quantity.It is understood that the preview image of camera collection is made of several pixels, this is some A pixel can form the two-dimensional matrix of one, and each pixel has corresponding pixel value, then passes through different pixel values Pixel carries out the different preview image of arrangement form according to certain rule.The width and height of preview image can pass through picture The quantity of vegetarian refreshments is indicated, and the size of preview image can be then indicated by width and height.For example, preview image Size can be expressed as 640*320, then it represents that have 640 pixels on the width of the preview image, have in short transverse 320 pixels.
Specifically, the two-dimensional matrix pixel of the preview image can be divided into different regions, each region Zhong Bao The partial pixel point in preview image is contained, a region is exactly an image block.The size of image block can be identical, then preview Image can be divided into several identical image blocks of size.Fig. 3 is the schematic diagram of image block in one embodiment.Such as Fig. 3 Shown, the size of image 30 is 24*16, i.e., 24 pixels are arranged with the width of image 30, are arranged in short transverse There are 16 pixels.Image 30 can be divided equally into 24 image blocks 302,4*4 pixel is contained in each image block Point.
The required parameter used when white balance parameter is for carrying out white balance processing to image, for example can be image face The gain of chrominance channel.Electronic equipment can according to the corresponding pixel value of each image pixel in the block, calculate one it is corresponding White balance parameter.Specifically, electronic equipment is predeterminable white balance algorithm, the white balance algorithm may include gray world algorithm, The one or more therein such as perfect reflection algorithm, global white balance algorithm and local white balance method.Electronic equipment can choose it A kind of middle algorithm, the input using the image block as the white balance algorithm, and the white balance algorithm is run, and obtain corresponding white Balance parameters.
Step 206, target white balance parameter is obtained according to white balance parameter.
Each preview image is divided into multiple images block, it is then corresponding white for each image block acquisition one Balance parameters, target white balance parameter is obtained further according to white balance parameter.For example, the white balance parameter of acquisition can be compared Compared with using minimum white balance parameter as target white balance parameter.Or the standard value of one white balance parameter of setting, then will Closest to the standard value white balance parameter as target white balance parameter.
Step 208, according to target white balance parameter to shooting image carry out white balance processing, wherein the shooting image be from Obtained in preview image.
After obtaining target white balance parameter, white balance processing is carried out to shooting image according to target white balance parameter.Clap Take the photograph image to obtain from preview image, can be any one in preview image.Specifically, each picture of shooting image Vegetarian refreshments can be made of multiple Color Channels, and each Color Channel represents a color component.For example, image can be by RGB (three kinds of colors of red, green, blue) triple channel forms or is formed, may be used also by HSV (tone, saturation degree and lightness) triple channel To be made of CMY (blue or green, fuchsin or magenta and yellow three kinds of colors) triple channel.Lead to for each color on each pixel Road, can be modified according to corresponding target white balance parameter.So as to fulfill to the processing of the white balance of shooting image so that correct Color Channel afterwards can more reflect the realistic colour of corresponding subject.
Above-mentioned image processing method, can obtain multiple preview images during camera moves.Then by preview Image divides image block, and calculates corresponding white balance parameter according to each image block.Finally obtained according to white balance parameter Target white balance parameter, then carries out white balance processing according to target white balance parameter to shooting image.The white balance treats Journey further accounts for the preview image shot into camera moving process not only using current taken image as foundation so that The information gathered when white balance processing is more comprehensive, and white balance processing also can be more accurate.
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 along preset direction, and the preview of camera generation is obtained in rotation process Image.
Electronic equipment can control camera to be rotated along preset direction, and preview graph is obtained in camera rotation process Picture.Specifically, camera can also be controlled to rotate predetermined angle on preset direction.For example, mobile phone can control camera to exist 180 ° are rotated in horizontal direction, or control camera rotates 360 ° etc. in vertical direction.Electronic equipment can include one Or multiple cameras, then the one or more camera can be controlled to be rotated, obtain more photographed scenes.For example, hand Front camera and rear camera can be installed on machine, multiple front cameras or rear camera can also be installed.It is if electric More than two cameras are installed in sub- equipment, then each camera can be controlled to be rotated respectively towards different directions, so The efficiency of collection preview image can be improved, more photographed scenes can also be gathered.
Specifically, the first camera can be controlled to rotate along a first direction, and the first shooting is obtained in rotation process It is first-born into the first preview image;Control second camera is rotated along second direction, and is obtained second in rotation process and taken the photograph As it is first-born into the second preview image.Preview image is obtained according to the first preview image of acquisition and the second preview image, then White balance parameter is obtained according to preview image.The angle of camera rotation can also be pre-set, such as control camera rotates 90 °, or 180 ° etc. of control camera rotation.Then step 402 can specifically include:The first camera is controlled to turn along a first direction Dynamic first angle, and the first preview image that the first camera generates is obtained in rotation process;Control second camera along Second direction rotates second angle, and the second preview image of second camera generation is obtained in rotation process.It is appreciated that , first direction and second direction may be the same or different.First angle and second angle can be identical, can also Difference, does not limit herein.
Fig. 5 and Fig. 6 sets forth the schematic diagram on first direction and second direction in one embodiment.As shown in figure 5, The first camera 502 can be controlled to be rotated towards first direction 506, control second camera 504 is carried out towards second direction 508 Rotate, and preview image is obtained in the rotation process of camera.As shown in fig. 6, the first camera 602 towards first can be controlled Direction 606 is rotated, and control second camera 604 is rotated towards second direction 608, and in the rotation process of camera Obtain preview image.
Step 404, each preview image is divided into the image block of default quantity.
Step 406, the matching value of the corresponding each image block of each preview image is calculated, obtains matching value in matching value Image block in section.
In one embodiment, several pixels are contained in image block, each pixel has corresponding RGB tri- Channel value.Each Color Channel of pixel can be indicated by a numerical value, and the value range of the numerical value is 0~255. Need to find point most white in image during white balance processing as standard reference value, carry out and then carried out according to the standard reference value Color correction.When pixel is white, the RGB channel value of pixel is respectively 255,255,255.Matching value is to be used for The value of image block being screened, when matching value is in matching value section, it is believed that the image block can be used for calculating white balance parameter, Otherwise the image block is abandoned.Therefore the corresponding matching value of image block can lead to according to the RGB of image pixel in the block Road value calculates, and then screens image block according to matching value.
Specifically, average can be calculated according to the RGB channel value of pixel, obtained respectively with traversing graph as pixel in the block To R passages average and channel B average.Then by the ratio of R passages average and channel B average, the corresponding matching of image block is obtained Value.For example, it is assumed that matching value section is 0.8~1.2, R passages average, the channel B average of image block is calculated, is respectively 245th, 251, then the matching value of the obtained image block is just 245/251=0.97.The matching value of the image block is in matching value In section, then the image block can be retained.
Step 408, the acquired corresponding white balance parameter of each image block is calculated, which includes first White balance parameter and the second white balance parameter.
According to each acquired image block, corresponding white balance parameter is calculated.Specifically, it is each acquired in traveling through A image block, obtains each channel value of each pixel in image block;And white balance ginseng is calculated according to the channel value of acquisition Number.Specifically, white balance parameter includes the first white balance parameter and the second white balance parameter.First white balance parameter and second white Balance parameters can be respectively the white balance gains of two different Color Channels, white flat according to the first white balance parameter and second The parameter that weighs can carry out color correction to two Color Channels respectively.
In one embodiment, obtaining the method for white balance parameter can specifically include:Statistical picture block is corresponding each The average value of channel value, the first white balance parameter and the second white balance parameter are obtained according to average value.Specifically, can be with traversing graph As pixel in the block, average is calculated according to the RGB channel value of pixel, R passages average, G passages average and B is respectively obtained and leads to Road average.Then by the ratio of R passages average and G passage averages, as corresponding first white balance parameter of image block;B is led to The ratio of road average and G passage averages, as corresponding second white balance parameter of image block.
Step 410, target image block is obtained from acquisition image block according to the first white balance parameter, by target image block pair The first white balance parameter answered is made as first object white balance parameter, and by corresponding second white balance parameter of target image block For the second target white balance parameter.
In the image block of acquisition, each image block has corresponding first white balance parameter and the second white balance ginseng Number.Target image block is then obtained from obtaining in image block according to the first white balance parameter, target image block is corresponding first white Balance parameters are as first object white balance parameter, and using corresponding second white balance parameter of target image block as the second target White balance parameter.Specifically, can then will using the minimum corresponding image block of the first white balance parameter as target image block Corresponding first white balance parameter of target image block is as first object white balance parameter, and by target image block corresponding second White balance parameter is as the second target white balance parameter, further according to first object white balance parameter and the second target white balance parameter White balance processing is carried out to shooting image.For example, the first white balance parameter is Rave/Gave, the second white balance parameter is Bave/ Gave, wherein Rave, Gave, Bave represent RGB triple channel averages respectively.Then the Rave/Gave of each image block is compared Compared with using the image block of Rave/Gave minimums as target image block, then by target image block corresponding Rave/Gave, Bave/ Gave, respectively as first object white balance parameter, the second target white balance parameter.
Step 412, according to first object white balance parameter, the first passage value of each pixel in shooting image is carried out White balance correction.
Step 414, according to the second target white balance parameter, to the second channel value of each pixel in pending image into Row white balance correction.
It is understood that the target white balance parameter obtained includes first object white balance parameter and the second target is put down in vain Weigh parameter, and then according to first object white balance parameter, the first passage value of each pixel in shooting image is put down in vain Weighing apparatus correction, and according to the second target white balance parameter, white balance is carried out to the second channel value of each pixel in shooting image Correction.For example, obtained first object white balance parameter and the second target white balance parameter are respectively Rave/Gave, Bave/ Gave, then can travel through the pixel in shooting image, and the R channel values of each pixel then are multiplied by Rave/Gave's Inverse, then the channel B value of each pixel is multiplied by the inverse of Bave/Gave, to complete the R Color Channels to the shooting image With the white balance correction of B color channel, the white balance processing to shooting image is realized.
The image processing method that above-described embodiment provides, can obtain multiple preview graphs during camera moves Picture.Then preview image is divided into image block, and corresponding white balance parameter is calculated according to each image block.Last basis is white Balance parameters obtain target white balance parameter, then carry out white balance processing to shooting image according to target white balance parameter.Should White balance processing procedure further accounts for the preview shot into camera moving process not only using current taken image as foundation Image so that the information gathered when white balance is handled is more comprehensive, and white balance processing also can be more accurate.
It should be understood that although each step in the flow chart of Fig. 2 and Fig. 4 is shown successively according to the instruction of arrow, But these steps are not the inevitable order according to arrow instruction to be performed successively.Unless expressly state otherwise herein, these The order that the execution of step is not stringent limits, these steps can perform in other order.Moreover, in Fig. 2 and Fig. 4 At least a portion step can include more sub-steps, and either these sub-steps of multiple stages or stage are not necessarily same One moment performed completion, but can perform different at the time of, and the execution sequence in these sub-steps or stage is also not necessarily To carry out successively, but can with other steps either the sub-step of other steps or at least a portion in stage in turn or Alternately perform.
Fig. 7 is the structure diagram of image processing apparatus in one embodiment.As shown in fig. 7, the image processing apparatus 700 Including image collection module 702, parameter acquisition module 704 and image processing module 706.Wherein:
Image collection module 702, in camera moving process, obtaining preview image.
Parameter acquisition module 704, for each Zhang Suoshu preview images to be divided into the image block of default quantity, and according to The corresponding each described image block of each Zhang Suoshu preview images calculates corresponding white balance parameter;According to the white balance parameter Obtain target white balance parameter.
Image processing module 706, for carrying out white balance processing to shooting image according to the target white balance parameter, its Described in shooting image obtained from the preview image.
The image processing apparatus that above-described embodiment provides, can obtain multiple preview graphs during camera moves Picture.Then preview image is divided into image block, and corresponding white balance parameter is calculated according to each image block.Last basis is white Balance parameters obtain target white balance parameter, then carry out white balance processing to shooting image according to target white balance parameter.Should White balance processing procedure further accounts for the preview shot into camera moving process not only using current taken image as foundation Image so that the information gathered when white balance is handled is more comprehensive, and white balance processing also can be more accurate.
In one embodiment, image collection module 702 is additionally operable to control camera to rotate along preset direction, and is turning The preview image of the camera generation is obtained during dynamic.
In one embodiment, image collection module 702 is additionally operable to control the first camera to rotate along a first direction, and The first preview image of the first camera generation is obtained in rotation process;Second camera is controlled to turn along second direction It is dynamic, and the second preview image that the second camera generates is obtained in rotation process.
In one embodiment, parameter acquisition module 704 is additionally operable to calculate each Zhang Suoshu preview images corresponding each The matching value of described image block, obtains image block of the matching value in matching value section;Calculate each acquired institute State the corresponding white balance parameter of image block.
In one embodiment, parameter acquisition module 704 is additionally operable to travel through each acquired described image block, obtains Each channel value of each pixel in described image block;White balance parameter is calculated according to the channel value of acquisition.
In one embodiment, parameter acquisition module 704 is additionally operable to the corresponding each channel value of statistics described image block Average value, the first white balance parameter and the second white balance parameter are obtained according to the average value.
In one embodiment, parameter acquisition module 704 be additionally operable to according to first white balance parameter from obtain image Target image block is obtained in block, is joined corresponding first white balance parameter of the target image block as first object white balance Number, and using corresponding second white balance parameter of the target image block as the second target white balance parameter.
In one embodiment, image processing module 706 is additionally operable to according to the first object white balance parameter, to described The first passage value of each pixel carries out white balance correction in shooting image;It is right according to the second target white balance parameter The second channel value of each pixel carries out white balance correction in the pending image.
The division of modules is only used for for example, in other embodiments, will can 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 additionally provides a kind of computer-readable recording medium.One or more can perform 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 performs following steps:
In camera moving process, preview image is obtained;
Each Zhang Suoshu preview images are divided into the image block of default quantity, and according to each Zhang Suoshu preview images pair The each described image block answered calculates corresponding white balance parameter;
Target white balance parameter is obtained according to the white balance parameter;
White balance processing is carried out to shooting image according to the target white balance parameter, wherein the shooting image is from institute State what is obtained in preview image.
In one embodiment, what the processor performed is described in camera moving process, obtains preview image bag Include:
Control camera is rotated along preset direction, and the preview graph of the camera generation is obtained in rotation process Picture.
In one embodiment, what the processor performed is described in camera moving process, obtains preview image bag Include:
Control the first camera to rotate along a first direction, and the first camera generation is obtained in rotation process First preview image;
Control second camera is rotated along second direction, and the second camera generation is obtained in rotation process Second preview image.
In one embodiment, what the processor performed is described according to the corresponding each institute of each Zhang Suoshu preview images Stating the corresponding white balance parameter of image block calculating includes:
Calculate the matching value of the corresponding each described image block of each Zhang Suoshu preview images, obtain the matching value With the image block in value section;
Calculate each acquired corresponding white balance parameter of described image block.
In one embodiment, each described image block acquired in the calculating that the processor performs is corresponding White balance parameter includes:
Each acquired described image block of traversal, obtains each passage of each pixel in described image block Value;
White balance parameter is calculated according to the channel value of acquisition.
In one embodiment, what the processor performed is described according to the channel value of acquisition calculating white balance parameter Including:
The average value of the corresponding each channel value of described image block is counted, the first white balance ginseng is obtained according to the average value Number and the second white balance parameter.
In one embodiment, the white balance parameter that the processor performs includes the first white balance parameter and second White balance parameter;
It is described to be included according to white balance parameter acquisition target white balance parameter:
Target image block is obtained from acquisition image block according to first white balance parameter, by the target image block pair The first white balance parameter answered is joined as first object white balance parameter, and by corresponding second white balance of the target image block Number is used as the second target white balance parameter;
It is described that shooting image progress white balance processing is included according to the target white balance parameter:
According to the first object white balance parameter, the first passage value of each pixel in the shooting image is carried out White balance correction;
According to the second target white balance parameter, to the second channel value of each pixel in the pending image into Row white balance correction.
A kind of computer program product for including instruction, when run on a computer so that computer performs above-mentioned The image processing method that embodiment provides.
The embodiment of the present application also provides a kind of computer equipment.Above computer equipment includes image processing circuit, figure As process circuit can utilize hardware and or software component to realize, it may include define ISP (Image Signal Processing, picture signal processing) pipeline various processing units.Fig. 8 is that image processing circuit shows in one embodiment It is intended to.As shown in figure 8, for purposes of illustration only, the various aspects with the relevant image processing techniques of the embodiment of the present application are only shown.
As shown in figure 8, image processing circuit includes ISP processors 840 and control logic device 850.Imaging device 810 is caught View data handled first by ISP processors 840, ISP processors 840 view data is analyzed with catch can be used for it is true The image statistics of fixed and/or imaging device 810 one or more control parameters.Imaging device 810 may include there 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 caught 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 collection 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 Store 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 on view data.Wherein, image processing operations can be by identical or different bit depth precision Carry out.
ISP processors 840 can also receive view data from video memory 830.For example, 820 interface of sensor will be original View 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 the part of storage arrangement, storage device or electronic equipment 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 During raw image data, ISP processors 840 can carry out one or more image processing operations, such as time-domain filtering.Figure after processing 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 the processing data are carried out in original domain and in RGB and YCbCr color spaces Image real time transfer.ISP processors 840 processing after view data may be output to display 870, for user viewing and/or Further handled 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 view 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 view data of coding can be saved, And 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 definite statistics of ISP processors 840, which can be transmitted, gives control logic device Unit 850.For example, statistics 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 for performing one or more routines (such as firmware) Device processed, one or more routines according to the statistics of reception, can determine the control parameter and ISP processors of imaging device 810 840 control parameter.For example, the control parameter of imaging device 810 may include 820 control parameter of sensor (such as gain, exposure Time of integration of control, stabilization parameter etc.), camera flash control parameter, 812 control parameter of lens (such as focus on or zoom With focal length) or these parameters combination.ISP control parameters may include to be used for automatic white balance and color adjustment (for example, in RGB During processing) gain level and color correction matrix, and 812 shadow correction parameter of lens.
It is the step of realizing the image processing method that above-described embodiment provides with image processing techniques in Fig. 8 below.
Any reference to memory, storage, database or other media used in this application may include non-volatile And/or volatile memory.Nonvolatile memory may include that read-only storage (ROM), programming ROM (PROM), electricity can be compiled Journey ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory (RAM), it is used as external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state 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) directly RAM (RDRAM), straight Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM).
Embodiment described above only expresses the several embodiments of the application, its description is more specific and detailed, but simultaneously Therefore the limitation to the application the scope of the claims cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, on the premise of the application design is not departed from, various modifications and improvements can be made, these belong to the guarantor of the application Protect scope.Therefore, the protection domain of the application patent should be determined by the appended claims.

Claims (10)

  1. A kind of 1. image processing method, it is characterised in that including:
    In camera moving process, preview image is obtained;
    Each Zhang Suoshu preview images are divided into the image block of default quantity, and it is corresponding according to each Zhang Suoshu preview images Each described image block calculates corresponding white balance parameter;
    Target white balance parameter is obtained according to the white balance parameter;
    White balance processing is carried out to shooting image according to the target white balance parameter, wherein the shooting image is from described pre- Look in image what is obtained.
  2. 2. according to the method described in claim 1, it is characterized in that, described in camera moving process, acquisition preview image Including:
    Control camera is rotated along preset direction, and the preview image of the camera generation is obtained in rotation process.
  3. 3. according to the method described in claim 1, it is characterized in that, described in camera moving process, acquisition preview image Including:
    Control the first camera to rotate along a first direction, and the first of the first camera generation is obtained in rotation process Preview image;
    Control second camera is rotated along second direction, and the second of the second camera generation is obtained in rotation process Preview image.
  4. It is 4. according to the method described in claim 1, it is characterized in that, described corresponding each according to each Zhang Suoshu preview images Described image block, which calculates corresponding white balance parameter, to be included:
    The matching value of the corresponding each described image block of each Zhang Suoshu preview images is calculated, obtains the matching value in matching value Image block in section;
    Calculate each acquired corresponding white balance parameter of described image block.
  5. 5. according to the method described in claim 4, it is characterized in that, each described image block acquired in the calculating corresponds to White balance parameter include:
    Each acquired described image block of traversal, obtains each channel value of each pixel in described image block;
    White balance parameter is calculated according to the channel value of acquisition.
  6. 6. according to the method described in claim 5, it is characterized in that, described calculate white balance ginseng according to the channel value of acquisition Number includes:
    Count the average value of the corresponding each channel value of described image block, according to the average value obtain the first white balance parameter and Second white balance parameter.
  7. 7. method according to any one of claims 1 to 6, it is characterised in that it is white flat that the white balance parameter includes first The parameter that weighs and the second white balance parameter;
    It is described to be included according to white balance parameter acquisition target white balance parameter:
    Target image block is obtained from acquisition image block according to first white balance parameter, the target image block is corresponding First white balance parameter is made as first object white balance parameter, and by corresponding second white balance parameter of the target image block For the second target white balance parameter;
    It is described that shooting image progress white balance processing is included according to the target white balance parameter:
    According to the first object white balance parameter, the first passage value of each pixel in the shooting image is put down in vain Weighing apparatus correction;
    According to the second target white balance parameter, the second channel value of each pixel in the pending image is carried out in vain Balance correction.
  8. A kind of 8. image processing apparatus, it is characterised in that including:
    Image collection module, in camera moving process, obtaining preview image;
    Parameter acquisition module, for each Zhang Suoshu preview images to be divided into the image block of default quantity, and according to each The corresponding each described image block of the preview image calculates corresponding white balance parameter;Mesh is obtained according to the white balance parameter Mark white balance parameter;
    Image processing module, for carrying out white balance processing to shooting image according to the target white balance parameter, wherein described Shooting image is obtained from the preview image.
  9. 9. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the computer program quilt The step of processor realizes method any one of claim 1 to 7 when performing.
  10. 10. a kind of electronic equipment, including memory, processor and storage are on a memory and the calculating that can run on a processor Machine program, it is characterised in that the processor is realized any one of claim 1 to 7 when performing the computer program The step of method.
CN201711287892.8A 2017-12-07 2017-12-07 Image processing method, image processing apparatus, storage medium, and electronic device Expired - Fee Related CN107959841B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711287892.8A CN107959841B (en) 2017-12-07 2017-12-07 Image processing method, image processing apparatus, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711287892.8A CN107959841B (en) 2017-12-07 2017-12-07 Image processing method, image processing apparatus, storage medium, and electronic device

Publications (2)

Publication Number Publication Date
CN107959841A true CN107959841A (en) 2018-04-24
CN107959841B CN107959841B (en) 2020-03-27

Family

ID=61958244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711287892.8A Expired - Fee Related CN107959841B (en) 2017-12-07 2017-12-07 Image processing method, image processing apparatus, storage medium, and electronic device

Country Status (1)

Country Link
CN (1) CN107959841B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002787A (en) * 2018-07-09 2018-12-14 Oppo广东移动通信有限公司 Image processing method and device, storage medium, electronic equipment
CN112055191A (en) * 2020-08-25 2020-12-08 浙江大华技术股份有限公司 White balance adjustment method, image acquisition device and storage medium
CN112584110A (en) * 2020-12-01 2021-03-30 维沃移动通信有限公司 White balance adjusting method and device, electronic equipment and storage medium
CN114143447A (en) * 2021-11-08 2022-03-04 维沃移动通信有限公司 Image processing method and device and electronic equipment
CN114390266A (en) * 2021-12-28 2022-04-22 杭州涂鸦信息技术有限公司 Image white balance processing method and device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442679A (en) * 2007-11-23 2009-05-27 佛山市顺德区顺达电脑厂有限公司 Automatic white balance control system, white balance module and method thereof
CN102892010A (en) * 2012-10-22 2013-01-23 浙江宇视科技有限公司 White balance processing method and device under multiple light sources
CN105872500A (en) * 2015-12-08 2016-08-17 乐视移动智能信息技术(北京)有限公司 Adjusting method and device for white balance of image
CN106713887A (en) * 2017-01-03 2017-05-24 捷开通讯(深圳)有限公司 Mobile terminal, and white balance adjustment method
CN107277228A (en) * 2017-05-23 2017-10-20 捷开通讯(深圳)有限公司 Storage device, mobile terminal and its image processing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442679A (en) * 2007-11-23 2009-05-27 佛山市顺德区顺达电脑厂有限公司 Automatic white balance control system, white balance module and method thereof
CN102892010A (en) * 2012-10-22 2013-01-23 浙江宇视科技有限公司 White balance processing method and device under multiple light sources
CN105872500A (en) * 2015-12-08 2016-08-17 乐视移动智能信息技术(北京)有限公司 Adjusting method and device for white balance of image
CN106713887A (en) * 2017-01-03 2017-05-24 捷开通讯(深圳)有限公司 Mobile terminal, and white balance adjustment method
CN107277228A (en) * 2017-05-23 2017-10-20 捷开通讯(深圳)有限公司 Storage device, mobile terminal and its image processing method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002787A (en) * 2018-07-09 2018-12-14 Oppo广东移动通信有限公司 Image processing method and device, storage medium, electronic equipment
CN112055191A (en) * 2020-08-25 2020-12-08 浙江大华技术股份有限公司 White balance adjustment method, image acquisition device and storage medium
CN112055191B (en) * 2020-08-25 2022-08-09 浙江大华技术股份有限公司 White balance adjustment method, image acquisition device and storage medium
CN112584110A (en) * 2020-12-01 2021-03-30 维沃移动通信有限公司 White balance adjusting method and device, electronic equipment and storage medium
CN114143447A (en) * 2021-11-08 2022-03-04 维沃移动通信有限公司 Image processing method and device and electronic equipment
CN114143447B (en) * 2021-11-08 2024-03-05 维沃移动通信有限公司 Image processing method and device and electronic equipment
CN114390266A (en) * 2021-12-28 2022-04-22 杭州涂鸦信息技术有限公司 Image white balance processing method and device and computer readable storage medium
CN114390266B (en) * 2021-12-28 2024-05-21 杭州涂鸦信息技术有限公司 Image white balance processing method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN107959841B (en) 2020-03-27

Similar Documents

Publication Publication Date Title
CN108012078B (en) Image brightness processing method and device, storage medium and electronic equipment
CN107911682B (en) Image white balance processing method, device, storage medium and electronic equipment
CN107959841A (en) Image processing method, device, storage medium and electronic equipment
CN107911683B (en) Image white balancing treatment method, device, storage medium and electronic equipment
CN108419028B (en) Image processing method, image processing device, computer-readable storage medium and electronic equipment
TWI537875B (en) Image fusion method and image processing apparatus
KR101155406B1 (en) Image processing apparatus, image processing method and computer readable-medium
DE102019106252A1 (en) Method and system for light source estimation for image processing
CN110290323B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN107704798B (en) Image blurring method and device, computer readable storage medium and computer device
CN108055452A (en) Image processing method, device and equipment
US8310553B2 (en) Image capturing device, image capturing method, and storage medium having stored therein image capturing program
CN106664351A (en) Method and system of lens shading color correction using block matching
CN107395991B (en) Image synthesis method, image synthesis device, computer-readable storage medium and computer equipment
CN107948511A (en) Brightness of image processing method, device, storage medium and electronic equipment
CN112004029B (en) Exposure processing method, exposure processing device, electronic apparatus, and computer-readable storage medium
CN109685853A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN109712177A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN110191287A (en) Focusing method and device, electronic equipment, computer readable storage medium
KR101178777B1 (en) Image processing apparatus, image processing method and computer readable-medium
CN107920205B (en) Image processing method, device, storage medium and electronic equipment
CN109559352B (en) Camera calibration method, device, electronic equipment and computer-readable storage medium
JP2015144475A (en) Imaging apparatus, control method of the same, program and storage medium
CN114979500A (en) Image processing method, image processing apparatus, electronic device, and readable storage medium
CN108769510B (en) Image processing method, image processing 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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200327