CN107948617A - Image processing method, device, computer-readable recording medium and computer equipment - Google Patents

Image processing method, device, computer-readable recording medium and computer equipment Download PDF

Info

Publication number
CN107948617A
CN107948617A CN201711277419.1A CN201711277419A CN107948617A CN 107948617 A CN107948617 A CN 107948617A CN 201711277419 A CN201711277419 A CN 201711277419A CN 107948617 A CN107948617 A CN 107948617A
Authority
CN
China
Prior art keywords
image
white balance
target
pending
color
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
CN201711277419.1A
Other languages
Chinese (zh)
Other versions
CN107948617B (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 CN201711277419.1A priority Critical patent/CN107948617B/en
Publication of CN107948617A publication Critical patent/CN107948617A/en
Application granted granted Critical
Publication of CN107948617B publication Critical patent/CN107948617B/en
Active 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/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • 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

Abstract

This application involves a kind of image processing method, device, computer-readable recording medium and computer equipment.The above method, including:Multiframe preview image is obtained, the preview image is obtained after computer equipment starts shooting class application program;If receiving shooting instruction, pending image is determined according to the shooting instruction;If there is no refer to color in the pending image, the pending image is matched respectively with the multiframe preview image, the preview image that there is overlapping region with the pending image is obtained, target image is obtained from the preview image with overlapping region with the pending image;White balance processing is carried out to the target image, obtains target white balance gains value;White balance processing is carried out to the pending image according to the target white balance gains value.The above method, improves the accuracy that white balance processing is carried out to pending image so that the color rendition to image is more accurate.

Description

Image processing method, device, computer-readable recording medium and computer equipment
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 computer equipment.
Background technology
With developing rapidly for intelligence computation machine equipment, the technique for taking of intelligent computer is more and more complete.Shooting is obtained The image taken, intelligence computation machine equipment can carry out a variety of image processing operations.For example, the white balance to image is handled, at U.S. face Reason etc..Wherein, the white balance processing to image is color in adjustment image so that image can accurately reflect subject Color situation.
The content of the invention
The embodiment of the present application provides a kind of image processing method, device, computer-readable recording medium and computer equipment, White balance processing can be carried out to image.
A kind of image processing method, including:
Multiframe preview image is obtained, the preview image is obtained after computer equipment starts shooting class application program;
If receiving shooting instruction, pending image is determined according to the shooting instruction;
If there is no color is referred in the pending image, by the pending image and the multiframe preview image point Do not matched, obtain with the pending image have overlapping region the preview image, from it is described with it is described pending Image, which has in the preview image of overlapping region, obtains target image;
White balance processing is carried out to the target image, obtains target white balance gains value;
White balance processing is carried out to the pending image according to the target white balance gains value.
A kind of image processing apparatus, including:
Acquisition module, for obtaining multiframe preview image, the preview image is that computer equipment starts shooting class application Obtained after program;
Taking module, if for receiving shooting instruction, pending image is determined according to the shooting instruction;
Matching module, if in the pending image there is no referring to color, by the pending image with it is described Multiframe preview image is matched respectively, the preview image for having overlapping region with the pending image is obtained, from institute State in the preview image that there is overlapping region with the pending image and obtain target image;
Processing module, for carrying out white balance processing to the target image, obtains target white balance gains value;According to institute State target white balance gains value and white balance processing is carried out to the pending image.
A kind of computer-readable recording medium, is stored thereon with computer program, and the computer program is held by processor Method as described above is realized during row.
A kind of computer equipment, including memory and processor, store computer-readable instruction in the memory, institute Instruction is stated when being performed by the processor so that processor execution method as described above.
In the embodiment of the present application, pending image is directly carried out white balance processing it is inaccurate when, obtain with it is pending Image has the preview image of overlapping region, to carry out pending image further according to the white balance processing parameter to preview image White balance processing, improves the accuracy that white balance processing is carried out to pending image so that the color rendition to image is more smart Really.
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 flow chart of image processing method in one embodiment;
Fig. 2 is the schematic diagram of the preview image with pending image in one embodiment with overlapping region;
Fig. 3 is the schematic diagram that preview image is synthesized to complete image in one embodiment with pending image;
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 structure diagram of image processing apparatus in one embodiment;
Fig. 7 is the structure diagram of image processing apparatus in another embodiment;
Fig. 8 is the structure diagram of image processing apparatus in another embodiment;
Fig. 9 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.
Fig. 1 is the flow chart of image processing method in one embodiment.As shown in Figure 1, a kind of image processing method, bag Include:
Step 102, multiframe preview image is obtained, preview image is obtained after computer equipment starts shooting class application program 's.
Computer equipment can capture current scene by camera and image in calculating after shooting class application program is started Machine equipment display interface, i.e., be illustrated in computer equipment display interface by preview image.Computer equipment can obtain multiframe preview Image.By taking computer equipment is mobile terminal as an example, above-mentioned preview image can be the image that mobile terminal front camera obtains, Or the image that mobile terminal rear camera obtains.
Step 104, if receiving shooting instruction, pending image is determined according to shooting instruction.
Computer equipment is after shooting instruction is received, and computer equipment shows boundary at the time of can receiving shooting instruction The preview image that face is shown is as pending image.Computer equipment can treat place after above-mentioned pending image is got Manage image and carry out image procossing, U.S. face processing is such as carried out to pending image, white balance processing etc. is carried out to pending image.
Step 106, if there is no refer to color in pending image, by pending image and multiframe preview image respectively into Row matching, obtains the preview image for having overlapping region with pending image, has the pre- of overlapping region from pending image Look in image and obtain target image.
Computer equipment can first detect above-mentioned treat when carrying out white balance processing to pending image using white balance algorithm It whether there is in processing image and refer to color.Wherein, it is above-mentioned to refer to the value of chromatism with standard color in preset range with reference to color Interior color, that is, the color for the color that is near the mark.Under normal conditions, above-mentioned standard color can be arranged to white, above-mentioned reference Color is the color close to white.In one embodiment, above-mentioned standard color can be also arranged to other colors, such as skin Color.
Color is referred to if existing in pending image, processing image progress white balance can be treated with reference to color according to above-mentioned Processing.Each pixel is made of multiple Color Channels in pending image, for example, by RGB (three kinds of colors of red, green, blue) Triple channel is formed or is made of HSV (tone, saturation degree and lightness) triple channel or by CMY (blue or green, fuchsin or magenta and three kinds of Huang Color) triple channel composition.The white balance algorithm of image may include:Gray world algorithm, perfect reflection algorithm, white point method etc.. By taking white point method as an example, the white balance processing to pending image in RGB triple channels may include:It is by white of standard color Example, R/G=1.0, B/G=1.0 in the corresponding pixel of white in tri- Color Channels of RGB, then close to the reference color of white Color Range be { 0.8<R/G<1.2,0.8<B/G<1.2 }, if computer equipment detects that pixel is expired in pending image Foot { 0.8<R/G<1.2,0.8<B/G<1.2 }, then using above-mentioned pixel as referring to color point.To pixel color in pending image Color spot is averaged, and can obtain R/G_average, B/G_average, i.e., the average of R/G and the average of B/G in pixel.It will wait to locate The R passages of each pixel multiply R/G_average in reason image, and channel B multiplies B/G_average, you can complete to pending figure The white balance processing of picture.
If there is no color is referred in pending image, white balance processing is directly carried out to pending image can be inaccurate, Then the pending image of acquisition is matched respectively with multiframe preview image, detects whether pending image and preview image have Overlapping region.Computer equipment can extract pending image and characteristic point in preview image respectively, and figure is carried out further according to characteristic point As registration.If pending image with pending image from above-mentioned in preview image with that, there are overlapping region, can have overlay region Target image is obtained in the preview image in domain.
In one embodiment, target image bag is obtained from the preview image with pending image with overlapping region Include:Color is referred to if having with pending image and existing in the preview image of overlapping region, there will be reference color with waiting to locate Managing image has the preview image of overlapping region as target image.
Computer equipment can detect in the above-mentioned preview image with overlapping region with pending image with the presence or absence of reference Color.Wherein, if with pending image have overlapping region preview image in exist refer to color, by it is above-mentioned with it is pending Image has the preview image of overlapping region as target image.
Method in the embodiment of the present application, computer equipment can have in the preview image of overlapping region from pending image Choose with the preview image with reference to color as target image, can determine that white balance is joined with reference to color according in preview image Number, the white balance parameter of acquisition is more accurate, improves white balance treatment effect.
Step 108, white balance processing is carried out to target image, obtains target white balance gains value.
Computer equipment can carry out white balance processing to target image, obtain target white balance gains value.Above-mentioned target is white Balancing gain value is yield value of the computer equipment to each Color Channel in target image.By taking RGB triple channels as an example, work as mark When quasi- color is white, using the white balance algorithm that white point is reference point with being handled in step 106 white balance of pending image Algorithm it is identical, wherein, R/G_average be R passages yield value, B/G_average be channel B yield value.
In one embodiment, when exist in target image refer to color when, then may be referred on the basis of color point to mesh Logo image carries out white balance processing, obtains target white balance gains value.
Step 110, white balance processing is carried out to pending image according to target white balance gains value.
After target white balance gains value is got, pending image can be put down in vain according to target white balance gains value Weighing apparatus processing.Wherein, computer equipment can be according to the white balance gains value pair of each passage in the target white balance gains value of acquisition Pending image carries out white balance processing.
Under normal conditions, when user's active computer equipment (such as mobile terminal) is taken pictures, it is necessary to adjust photo angle, The sequence of operations such as distance and focusing.That is for user before taking pictures, computer equipment can obtain the multiframe preview graph of current scene Picture, and preview image is illustrated in computer equipment display interface.When computer equipment receives shooting instruction, then shoot and work as Preceding scene, obtains pending image.Since computer equipment is starting shooting class application program between receiving shooting instruction, Can continuous continual acquisition image, therefore, the multiframe preview image and pending image that computer equipment obtains are same fields The corresponding image of scape, mostly with overlapping region, and white balance processing parameter also can be identical.
As shown in Fig. 2, pending image 204 has overlapping region with preview image 202 and preview image 206, then calculate Machine equipment can carry out white balance processing respectively to preview image 202 and preview image 206, obtain to the white flat of preview image 202 Weigh yield value and the white balance gains value to preview image 206, from the white balance gains value to preview image 202 and to preview graph A white balance gains value is chosen in the white balance gains value of picture 206 white balance processing is carried out to pending image.Wherein, from right The white balance gains value of preview image 202 and in the white balance gains value of preview image 206 choose a white balance gains value It may include, obtain the value of chromatism with reference to color and standard color in preview image 202 and preview image 206, choose value of chromatism most Preview image 206 where small reference color, carries out pending image according to the white balance gains value of preview image 206 white Balance Treatment.
Method in the embodiment of the present application, when directly carrying out white balance processing inaccuracy to pending image, obtains and treats Handling image has the preview image of overlapping region, comes further according to the white balance processing parameter to preview image to pending image White balance processing is carried out, improves the accuracy that white balance processing is carried out to pending image so that the color rendition to image It is more accurate.
In one embodiment, white balance processing is carried out to target image in step 108, obtains target white balance gains value Including:If there are multiframe target image, the value of chromatism with reference to color and standard color in multiframe target image is obtained respectively;If deposit In the target image of value of chromatism minimum, white balance processing is carried out to the target image of value of chromatism minimum, target white balance is obtained and increases Benefit value.
If computer equipment, which gets multiframe, has the preview image of overlapping region, i.e. multiframe target figure with pending image Picture, can respectively obtain and color is referred in every frame target image, then calculate the value of chromatism with reference to color and standard color.Wherein, color Difference can represent the difference of two kinds of colors, and in Lab color spaces, value of chromatism can be
Computer equipment can obtain the value of chromatism with reference to color and standard color in every frame target image.Using standard color as Exemplified by white, the Color Range close to the reference color of white is { 0.8<R/G<1.2,0.8<B/G<1.2 }, computer equipment can The reference color point for meeting the above-mentioned Color Range with reference to color per pixel in frame target image is obtained, calculates each reference color The color of color spot and the value of chromatism of white, obtain the target image where the reference color point of value of chromatism minimum, that is, choose and most connect Target image where the reference color point of near-white, then the target image where the reference color point of value of chromatism minimum is carried out White balance processing, obtains target white balance gains value.
Under normal conditions, preview image and pending image are that computer equipment is shot under Same Scene, same light source The image of acquisition, it is also to be used to carry out pending image that the white balance gains value that white balance processing obtains is carried out to preview image White balance processing.Method in the embodiment of the present application, chooses the reference color with the value of chromatism minimum of standard color, i.e., closest to mark The reference color of quasi- color so that it is more accurate that the white balance gains value that white balance processing obtains is carried out to target image.
In one embodiment, white balance processing is carried out to target image in step 108, obtains target white balance gains value Including:If there are multiframe target image, white balance processing is carried out respectively to multiframe target image, obtain and corresponded to per frame target image The first white balance gains value;The average of the first white balance gains value is obtained as target white balance gains value.
Computer equipment is got more when getting multiframe and pending image has the preview image of overlapping region During frame target image, white balance processing can be carried out respectively to every frame target image, obtain respectively and every frame target image is carried out in vain The first white balance gains value that Balance Treatment obtains.Computer equipment is getting the first white balance gains of multiframe target image After value, the average of above-mentioned first white balance gains value can be obtained as target white balance gains value.Above-mentioned first white balance gains Value may include the white balance gains value to each Color Channel in target image.
Method in the embodiment of the present application, computer equipment can carry out multiframe target image respectively white balance processing, then root White balance processing is carried out to pending image according to the average that multiframe target image white balance is handled so that computer equipment obtains Target white balance gains value it is more accurate, be conducive to preferably reduce realistic colour in scene.
In one embodiment, in step 106 after the preview image that there is overlapping region with pending image is obtained, Method further includes:
(1) preview image with pending image with overlapping region is obtained complete respectively with pending image mosaic Image.
(2) white balance processing is carried out to complete image, obtains target white balance gains value.
(3) white balance processing is carried out to pending image according to target white balance gains value.
Computer equipment, can be by above-mentioned with waiting to locate after the preview image for having overlapping region with pending image is got Managing image, there is the preview image of overlapping region and pending image to carry out image mosaic.Wherein, the step of image mosaic, is wrapped Include:Determine characteristic point identical in two field pictures, characteristic point identical in two field pictures is carried out overlapping so that in two field pictures Same area is overlapping, obtains complete image.Computer equipment can be carried out at white balance complete image after complete image is obtained Reason, calculates target white balance gains value.Wherein, white balance processing of the computer equipment to complete image may include:Obtain complete Color point is referred in image, even if referring to color point white balance gains value according to above-mentioned, wherein, computer equipment is to complete image White balance Processing Algorithm it is identical with algorithm in step 106, details are not described herein.Computer equipment is being got to complete image After the white balance gains value of white balance processing, pending image can be carried out in vain with the white balance gains value handled complete image Balance Treatment.
As shown in figure 3, pending image 306 and preview image 302, preview image 304, preview image 308, preview image 310 have overlapping region, then computer equipment can be by preview image 302, preview image 304, preview image 308, preview image 310 carry out image mosaic with pending image 306, obtain complete image 312.Computer equipment can carry out complete image 312 White balance processing, obtains white balance gains value, and white balance is carried out to pending image 306 further according to the white balance gains value of acquisition Processing.
Method in the embodiment of the present application, computer equipment can be complete into one with pending image mosaic by multiframe preview image Whole image, then white balance processing is carried out to this complete image, obtain white balance gains value so that computer equipment can be according to right The white balance gains value of complete image carries out white balance processing to pending image, and the white balance gains value of acquisition is to complete graph The white balance processing of picture obtains, and the white balance processing to pending image is more accurate.
In one embodiment, after step 106, further include:
Step 112, if there is no the preview image with pending image with overlapping region, obtained according to color temperature sensor Environment color temperature value.
Step 114, the second white balance gains value is determined according to environment color temperature value.
Step 116, white balance processing is carried out to pending image according to the second white balance gains value.
If computer equipment detects that the preview image for having overlapping region with pending image is not present, computer is set It is standby current environment color temperature value to be obtained according to color temperature sensor.Colour temperature is the measurement unit for representing to include color component in light, In real image scene, there is different colour temperatures without the light source of color.Computer equipment can be obtained by color temperature sensor Current environment color temperature value.The correspondence that can be prestored between colour temperature and white balance gains value in computer equipment, works as getting After preceding environment color temperature value, computer equipment can search corresponding white balance gains value according to current environment color temperature value, further according to looking into The white balance gains value found carries out white balance processing to pending image, i.e. computer equipment can be according to current environment color temperature value Determine the second white balance gains value, white balance processing is being carried out to pending image according to above-mentioned second white balance gains value.
Method in the embodiment of the present application, when there is no with pending image have overlapping region other images when, calculate Machine equipment can carry out white balance processing according to the color temperature value that color temperature sensor is got to pending image, i.e., in pending figure It is not present as in when can not provide white balance gains value to pending image with reference to color and preview image, according to the colour temperature of acquisition White balance processing is carried out to pending image so that white balance processing of the computer equipment to image is more accurate.
In one embodiment, after step 106, further include:
Step 118, if there is no the preview image with pending image with overlapping region, detect whether to exist with waiting to locate The shooting time of reason image is spaced in the storage image in preset duration.
Step 120, if being spaced in the storage image in preset duration in the presence of the shooting time with pending image, according to The 3rd white balance gains value for having stored image carries out white balance processing to pending image.
If it can detect and calculating there is no the preview image with pending image with overlapping region in computer equipment It whether there is the storage image being spaced in the shooting time of pending image in preset duration in machine equipment.During above-mentioned shooting Between be spaced time difference between the shooting time and the shooting time of pending image for having stored image.Above-mentioned preset duration The value that can be set for computer equipment, or the value of user's setting.Such as 5 minutes, 10 minutes., can be false in preset duration Determine environmental information change it is smaller, i.e. the change such as light-source angle, light source color temperature is smaller, then computer equipment can be obtained in shooting time The storage image being spaced in preset duration, puts down pending image according to the white balance gains value for having stored image in vain Weighing apparatus processing, i.e., carry out white balance processing according to the 3rd white balance gains value for having stored image to pending image.Wherein, meter is worked as When shooting time in calculation machine equipment there are multiframe and pending image is spaced in the image of storage in preset duration, computer Equipment can choose shooting time and pending image shooting time it is immediate stored image, according to above-mentioned shooting time with The immediate white balance gains value for having stored image of the shooting time of pending image carries out at white balance pending image Reason.
Method in the embodiment of the present application, the white balance gains value that selection has stored image handle pending image, Can avoid in pending image there is no refer to color point when, pending image is directly carried out white balance handle image effect The problem of poor, improve the effect that white balance processing is carried out to pending image.
Fig. 6 is the structure diagram of image processing apparatus in one embodiment.As shown in fig. 6, a kind of image processing apparatus, bag Include:
Acquisition module 602, for obtaining multiframe preview image, preview image is that computer equipment starts shooting class application journey Obtained after sequence.
Taking module 604, if for receiving shooting instruction, pending image is determined according to shooting instruction.
Matching module 606, if color is referred to for being not present in pending image, by pending image and multiframe preview graph As being matched respectively, the preview image that there is overlapping region with pending image is obtained, it is overlapping from having with pending image Target image is obtained in the preview image in region.
Processing module 608, for carrying out white balance processing to target image, obtains target white balance gains value.According to mesh Mark white balance gains value and white balance processing is carried out to pending image.
In one embodiment, matching module 606 is obtained from the preview image for having overlapping region with pending image Target image includes:Color is referred to if having with pending image and existing in the preview image of overlapping region, there will be reference color Color has the preview image of overlapping region as target image with pending image.
In one embodiment, the color in the value of chromatism and preset range with standard color is referred to reference to color.Processing Module 608 carries out white balance processing to target image, and obtaining target white balance gains value includes:If there are multiframe target image, The value of chromatism with reference to color and standard color in multiframe target image is obtained respectively.If there are the target image of value of chromatism minimum, White balance processing is carried out to the target image of value of chromatism minimum, obtains target white balance gains value.
In one embodiment, processing module 608 carries out white balance processing to target image, obtains target white balance gains Value includes:If there are multiframe target image, white balance processing is carried out respectively to multiframe target image, obtain per frame target image pair The the first white balance gains value answered.The average of the first white balance gains value is obtained as target white balance gains value.
In one embodiment, matching module 606 is additionally operable to obtaining the preview with overlapping region with pending image After image, by the preview image with pending image with overlapping region respectively with pending image mosaic, complete graph is obtained Picture.Processing module 608 is used to carry out white balance processing to complete image, obtains target white balance gains value.Put down in vain according to target The yield value that weighs carries out white balance processing to pending image.
Fig. 7 is the structure diagram of image processing apparatus in another embodiment.As shown in fig. 7, a kind of image processing apparatus, Including:Acquisition module 702, taking module 704, matching module 706, processing module 708, colour temperature acquisition module 710.Wherein, obtain Modulus block 702, taking module 704, matching module 706, processing module 708 are identical with corresponding functions of modules in Fig. 6.
Colour temperature acquisition module 710, if for there is no with pending image have overlapping region preview image, according to color Temperature sensor obtains environment color temperature value.
Processing module 708, for determining the second white balance gains value according to environment color temperature value.According to the second white balance gains Value carries out white balance processing to pending image.
Fig. 8 is the structure diagram of image processing apparatus in another embodiment.As shown in figure 8, a kind of image processing apparatus, Including:Acquisition module 802, taking module 804, matching module 806, processing module 808, detection module 810.Wherein, mould is obtained Block 802, taking module 804, matching module 806, processing module 808 are identical with corresponding functions of modules in Fig. 6.
Detection module 810, if for there is no the preview image with pending image with overlapping region, detecting whether to deposit The storage image being spaced in the shooting time with pending image in preset duration.
Processing module 808, if for the storage being spaced in the presence of the shooting time with pending image in preset duration Image, white balance processing is carried out according to the 3rd white balance gains value for having stored image to 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 computer executable instructions are executed by one or more processors, So that processor performs following steps:
(1) multiframe preview image is obtained, preview image is obtained after computer equipment starts shooting class application program.
(2) if receiving shooting instruction, pending image is determined according to shooting instruction.
(3) if there is no refer to color in pending image, pending image and multiframe preview image are carried out respectively Match somebody with somebody, obtain the preview image that there is overlapping region with pending image, from the preview graph with pending image with overlapping region Target image is obtained as in.
(4) white balance processing is carried out to target image, obtains target white balance gains value.
(5) white balance processing is carried out to pending image according to target white balance gains value.
In one embodiment, target image bag is obtained from the preview image with pending image with overlapping region Include:Color is referred to if having with pending image and existing in the preview image of overlapping region, there will be reference color with waiting to locate Managing image has the preview image of overlapping region as target image.
In one embodiment, the color in the value of chromatism and preset range with standard color is referred to reference to color.To mesh Logo image carries out white balance processing, and obtaining target white balance gains value includes:If there are multiframe target image, multiframe is obtained respectively With reference to color and the value of chromatism of standard color in target image.It is if minimum to value of chromatism there are the target image of value of chromatism minimum Target image carry out white balance processing, obtain target white balance gains value.
In one embodiment, white balance processing is carried out to target image, obtaining target white balance gains value includes:If deposit In multiframe target image, white balance processing is carried out respectively to multiframe target image, it is white to obtain per frame target image corresponding first Balancing gain value.The average of the first white balance gains value is obtained as target white balance gains value.
In one embodiment, after the preview image that there is overlapping region with pending image is obtained, also perform:Will There is the preview image of overlapping region respectively with pending image mosaic with pending image, obtain complete image.To complete graph As carrying out white balance processing, target white balance gains value is obtained.Pending image is carried out according to target white balance gains value white Balance Treatment.
In one embodiment, also perform:If there is no with pending image have overlapping region preview image, according to Color temperature sensor obtains environment color temperature value.Second white balance gains value is determined according to environment color temperature value.Increased according to the second white balance Benefit value carries out white balance processing to pending image.
In one embodiment, also perform:If there is no the preview image with pending image with overlapping region, detection The storage image being spaced in the presence or absence of the shooting time with pending image in preset duration.If in the presence of with pending image Shooting time be spaced in storage image in preset duration, place is treated according to the 3rd white balance gains value for having stored image Manage image and carry out white balance processing.
A kind of computer program product for including instruction, when run on a computer so that computer performs following Step:
(1) multiframe preview image is obtained, preview image is obtained after computer equipment starts shooting class application program.
(2) if receiving shooting instruction, pending image is determined according to shooting instruction.
(3) if there is no refer to color in pending image, pending image and multiframe preview image are carried out respectively Match somebody with somebody, obtain the preview image that there is overlapping region with pending image, from the preview graph with pending image with overlapping region Target image is obtained as in.
(4) white balance processing is carried out to target image, obtains target white balance gains value.
(5) white balance processing is carried out to pending image according to target white balance gains value.
In one embodiment, target image bag is obtained from the preview image with pending image with overlapping region Include:Color is referred to if having with pending image and existing in the preview image of overlapping region, there will be reference color with waiting to locate Managing image has the preview image of overlapping region as target image.
In one embodiment, the color in the value of chromatism and preset range with standard color is referred to reference to color.To mesh Logo image carries out white balance processing, and obtaining target white balance gains value includes:If there are multiframe target image, multiframe is obtained respectively With reference to color and the value of chromatism of standard color in target image.It is if minimum to value of chromatism there are the target image of value of chromatism minimum Target image carry out white balance processing, obtain target white balance gains value.
In one embodiment, white balance processing is carried out to target image, obtaining target white balance gains value includes:If deposit In multiframe target image, white balance processing is carried out respectively to multiframe target image, it is white to obtain per frame target image corresponding first Balancing gain value.The average of the first white balance gains value is obtained as target white balance gains value.
In one embodiment, after the preview image that there is overlapping region with pending image is obtained, also perform:Will There is the preview image of overlapping region respectively with pending image mosaic with pending image, obtain complete image.To complete graph As carrying out white balance processing, target white balance gains value is obtained.Pending image is carried out according to target white balance gains value white Balance Treatment.
In one embodiment, also perform:If there is no with pending image have overlapping region preview image, according to Color temperature sensor obtains environment color temperature value.Second white balance gains value is determined according to environment color temperature value.Increased according to the second white balance Benefit value carries out white balance processing to pending image.
In one embodiment, also perform:If there is no the preview image with pending image with overlapping region, detection The storage image being spaced in the presence or absence of the shooting time with pending image in preset duration.If in the presence of with pending image Shooting time be spaced in storage image in preset duration, place is treated according to the 3rd white balance gains value for having stored image Manage image and carry out white balance processing.
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. 9 is that image processing circuit shows in one embodiment It is intended to.As shown in figure 9, 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 9, image processing circuit includes ISP processors 940 and control logic device 950.Imaging device 910 is caught View data handled first by ISP processors 940, ISP processors 940 view data is analyzed with catch can be used for it is true The image statistics of fixed and/or imaging device 910 one or more control parameters.Imaging device 910 may include there is one The camera of a or multiple lens 912 and imaging sensor 914.Imaging sensor 914 may include colour filter array (such as Bayer filters), imaging sensor 914 can obtain the luminous intensity caught with each imaging pixel of imaging sensor 914 and wavelength Information, and the one group of raw image data that can be handled by ISP processors 940 is provided.Sensor 920 (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 940 by 920 interface type of sensor.Sensor 920 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 920 by imaging sensor 914, sensor 920 can be based on passing 920 interface type of sensor is supplied to ISP processors 940, or sensor 920 to deposit raw image data raw image data Store up in video memory 930.
ISP processors 940 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 940 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 940 can also receive view data from video memory 930.For example, 920 interface of sensor will be original View data is sent to video memory 930, and the raw image data in video memory 930 is available to ISP processors 940 It is for processing.Video memory 930 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 914 interface of imaging sensor or from 920 interface of sensor or from video memory 930 During raw image data, ISP processors 940 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 930, to carry out other processing before shown.ISP processors 940 are from image Memory 930 receives processing data, and processing data are carried out with the image in original domain and in RGB and YCbCr color spaces Data processing.View data after the processing of ISP processors 940 may be output to display 970, so that user watches and/or by scheming Shape engine or GPU (Graphics Processing Unit, graphics processor) are further handled.In addition, ISP processors 940 Output also can be transmitted to video memory 930, and display 970 can read view data from video memory 930.At one In embodiment, video memory 930 can be configured as realizing one or more frame buffers.In addition, ISP processors 940 is defeated Go out can be transmitted to encoder/decoder 960, so as to encoding/decoding image data.The view data of coding can be saved, and Decompressed before being shown in 970 equipment of display.Encoder/decoder 960 can be realized by CPU or GPU or coprocessor.
The definite statistics of ISP processors 940, which can be transmitted, gives control logic device Unit 950.For example, statistics can wrap Include the image sensings such as automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 912 shadow correction of lens 914 statistical information of device.Control logic device 950 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 910 940 control parameter.For example, the control parameter of imaging device 910 may include 920 control parameter of sensor (such as gain, exposure Time of integration of control, stabilization parameter etc.), camera flash control parameter, 912 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 912 shadow correction parameter of lens.
It it is below the step of realizing above-mentioned image processing method with image processing techniques in Fig. 9:
(1) multiframe preview image is obtained, preview image is obtained after computer equipment starts shooting class application program.
(2) if receiving shooting instruction, pending image is determined according to shooting instruction.
(3) if there is no refer to color in pending image, pending image and multiframe preview image are carried out respectively Match somebody with somebody, obtain the preview image that there is overlapping region with pending image, from the preview graph with pending image with overlapping region Target image is obtained as in.
(4) white balance processing is carried out to target image, obtains target white balance gains value.
(5) white balance processing is carried out to pending image according to target white balance gains value.
In one embodiment, target image bag is obtained from the preview image with pending image with overlapping region Include:Color is referred to if having with pending image and existing in the preview image of overlapping region, there will be reference color with waiting to locate Managing image has the preview image of overlapping region as target image.
In one embodiment, the color in the value of chromatism and preset range with standard color is referred to reference to color.To mesh Logo image carries out white balance processing, and obtaining target white balance gains value includes:If there are multiframe target image, multiframe is obtained respectively With reference to color and the value of chromatism of standard color in target image.It is if minimum to value of chromatism there are the target image of value of chromatism minimum Target image carry out white balance processing, obtain target white balance gains value.
In one embodiment, white balance processing is carried out to target image, obtaining target white balance gains value includes:If deposit In multiframe target image, white balance processing is carried out respectively to multiframe target image, it is white to obtain per frame target image corresponding first Balancing gain value.The average of the first white balance gains value is obtained as target white balance gains value.
In one embodiment, after the preview image that there is overlapping region with pending image is obtained, also perform:Will There is the preview image of overlapping region respectively with pending image mosaic with pending image, obtain complete image.To complete graph As carrying out white balance processing, target white balance gains value is obtained.Pending image is carried out according to target white balance gains value white Balance Treatment.
In one embodiment, also perform:If there is no with pending image have overlapping region preview image, according to Color temperature sensor obtains environment color temperature value.Second white balance gains value is determined according to environment color temperature value.Increased according to the second white balance Benefit value carries out white balance processing to pending image.
In one embodiment, also perform:If there is no the preview image with pending image with overlapping region, detection The storage image being spaced in the presence or absence of the shooting time with pending image in preset duration.If in the presence of with pending image Shooting time be spaced in storage image in preset duration, place is treated according to the 3rd white balance gains value for having stored image Manage image and carry out white balance processing.
Any reference to memory, storage, database or other media used in this application may include non-volatile And/or volatile memory.Suitable nonvolatile memory may include read-only storage (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).
Above example only expresses the several embodiments of the application, its description is more specific and detailed, but can not Therefore it is interpreted as the limitation to the application the scope of the claims.It should be pointed out that for those of ordinary skill in the art, On the premise of the application design is not departed from, various modifications and improvements can be made, these belong to the protection model of the application Enclose.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:
    Multiframe preview image is obtained, the preview image is obtained after computer equipment starts shooting class application program;
    If receiving shooting instruction, pending image is determined according to the shooting instruction;
    If there is no refer to color in the pending image, by the pending image and the multiframe preview image respectively into Go and match, obtain the preview image that there is overlapping region with the pending image, from the described and pending image Target image is obtained in the preview image with overlapping region;
    White balance processing is carried out to the target image, obtains target white balance gains value;
    White balance processing is carried out to the pending image according to the target white balance gains value.
  2. 2. according to the method described in claim 1, it is characterized in that, described have overlay region from described with the pending image Target image is obtained in the preview image in domain to be included:
    If referring to color there are described in the preview image with overlapping region with the pending image, there will be It is described that there is the preview image of overlapping region as the target image with the pending image with reference to described in color.
  3. 3. according to the method described in claim 2, it is characterized in that:
    Color in the value of chromatism and preset range referred to reference to color with standard color;
    White balance processing is carried out to the target image, obtaining target white balance gains value includes:
    If there are target image described in multiframe, obtain refer to color and the reference colour described in multiframe described in target image respectively Color value of chromatism;If there are the target image of value of chromatism minimum, to the target image of value of chromatism minimum White balance processing is carried out, obtains the target white balance gains value.
  4. 4. according to the method described in claim 2, it is characterized in that, it is described to the target image carry out white balance processing, obtain Target white balance gains value is taken to include:
    If there are target image described in multiframe, white balance processing is carried out respectively to target image described in multiframe, obtain described in per frame The corresponding first white balance gains value of target image;
    The average of the first white balance gains value is obtained as the target white balance gains value.
  5. 5. according to the method described in claim 1, it is characterized in that, there is overlay region with the pending image in the acquisition After the preview image in domain, the method further includes:
    By the preview image with the pending image with overlapping region respectively with the pending image mosaic, Obtain complete image;
    White balance processing is carried out to the complete image, obtains the target white balance gains value;
    White balance processing is carried out to the pending image according to the target white balance gains value.
  6. 6. method according to any one of claim 1 to 4, it is characterised in that further include:
    If there is no the preview image with the pending image with overlapping region, environment is obtained according to color temperature sensor Color temperature value;
    Second white balance gains value is determined according to the environment color temperature value;
    White balance processing is carried out to the pending image according to the second white balance gains value.
  7. 7. method according to any one of claim 1 to 4, it is characterised in that further include:
    If there is no the preview image with the pending image with overlapping region, detect whether to exist and wait to locate with described The shooting time of reason image is spaced in the storage image in preset duration;
    If being spaced in the storage image in preset duration in the presence of the shooting time with pending image, figure has been stored according to described 3rd white balance gains value of picture carries out white balance processing to the pending image.
  8. A kind of 8. image processing apparatus, it is characterised in that including:
    Acquisition module, for obtaining multiframe preview image, the preview image is that computer equipment starts shooting class application program Obtain afterwards;
    Taking module, if for receiving shooting instruction, pending image is determined according to the shooting instruction;
    Matching module, if color is referred to for being not present in the pending image, by the pending image and the multiframe Preview image is matched respectively, obtain with the pending image have overlapping region the preview image, from it is described with The pending image, which has in the preview image of overlapping region, obtains target image;
    Processing module, for carrying out white balance processing to the target image, obtains target white balance gains value;According to the mesh Mark white balance gains value and white balance processing is carried out to the pending 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 method as any one of claim 1 to 7 is realized when processor performs.
  10. 10. a kind of computer equipment, including memory and processor, computer-readable instruction is stored in the memory, institute Instruction is stated when being performed by the processor so that method of the processor execution as any one of claim 1 to 7.
CN201711277419.1A 2017-12-06 2017-12-06 Image processing method, image processing device, computer-readable storage medium and computer equipment Active CN107948617B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711277419.1A CN107948617B (en) 2017-12-06 2017-12-06 Image processing method, image processing device, computer-readable storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711277419.1A CN107948617B (en) 2017-12-06 2017-12-06 Image processing method, image processing device, computer-readable storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN107948617A true CN107948617A (en) 2018-04-20
CN107948617B CN107948617B (en) 2021-03-02

Family

ID=61945952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711277419.1A Active CN107948617B (en) 2017-12-06 2017-12-06 Image processing method, image processing device, computer-readable storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN107948617B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769521A (en) * 2018-06-05 2018-11-06 Oppo广东移动通信有限公司 A kind of photographic method, mobile terminal and computer readable storage medium
CN108833870A (en) * 2018-09-20 2018-11-16 陕西土豆数据科技有限公司 A kind of white balance algorithm based on oblique photograph camera
CN108965535A (en) * 2018-07-23 2018-12-07 太平洋未来科技(深圳)有限公司 Optimization method, device and the electronic equipment of Lighting information
CN111107270A (en) * 2019-12-31 2020-05-05 维沃移动通信有限公司 Shooting method and electronic equipment
CN111429536A (en) * 2020-03-13 2020-07-17 深圳市雄帝科技股份有限公司 Method, system and storage medium for toning complexion in image
CN113177886A (en) * 2021-04-14 2021-07-27 RealMe重庆移动通信有限公司 Image processing method, image processing device, computer equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100033595A1 (en) * 2008-07-30 2010-02-11 Olympus Corporation White balance adjustment apparatus and white balance coefficient calculation method
US20110050927A1 (en) * 2009-08-31 2011-03-03 Canon Kabushiki Kaisha Information processing apparatus and control method therefor
CN103402102A (en) * 2013-07-17 2013-11-20 广东欧珀移动通信有限公司 Double-camera picture pick-up system and white balance adjustment method and device thereof
CN105227945A (en) * 2015-10-21 2016-01-06 维沃移动通信有限公司 A kind of control method of Automatic white balance and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100033595A1 (en) * 2008-07-30 2010-02-11 Olympus Corporation White balance adjustment apparatus and white balance coefficient calculation method
US20110050927A1 (en) * 2009-08-31 2011-03-03 Canon Kabushiki Kaisha Information processing apparatus and control method therefor
CN103402102A (en) * 2013-07-17 2013-11-20 广东欧珀移动通信有限公司 Double-camera picture pick-up system and white balance adjustment method and device thereof
CN105227945A (en) * 2015-10-21 2016-01-06 维沃移动通信有限公司 A kind of control method of Automatic white balance and mobile terminal

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769521A (en) * 2018-06-05 2018-11-06 Oppo广东移动通信有限公司 A kind of photographic method, mobile terminal and computer readable storage medium
CN108769521B (en) * 2018-06-05 2021-02-02 Oppo广东移动通信有限公司 Photographing method, mobile terminal and computer readable storage medium
CN108965535A (en) * 2018-07-23 2018-12-07 太平洋未来科技(深圳)有限公司 Optimization method, device and the electronic equipment of Lighting information
CN108833870A (en) * 2018-09-20 2018-11-16 陕西土豆数据科技有限公司 A kind of white balance algorithm based on oblique photograph camera
CN111107270A (en) * 2019-12-31 2020-05-05 维沃移动通信有限公司 Shooting method and electronic equipment
CN111107270B (en) * 2019-12-31 2022-01-28 维沃移动通信有限公司 Shooting method and electronic equipment
CN111429536A (en) * 2020-03-13 2020-07-17 深圳市雄帝科技股份有限公司 Method, system and storage medium for toning complexion in image
CN111429536B (en) * 2020-03-13 2023-12-19 深圳市雄帝科技股份有限公司 Method, system and storage medium for toning skin color in image
CN113177886A (en) * 2021-04-14 2021-07-27 RealMe重庆移动通信有限公司 Image processing method, image processing device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN107948617B (en) 2021-03-02

Similar Documents

Publication Publication Date Title
CN107948617A (en) Image processing method, device, computer-readable recording medium and computer equipment
CN111182217B (en) Image white balance processing method and device
CN109767467A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN108805103A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN108322669A (en) The acquisition methods and device of image, imaging device, computer readable storage medium and computer equipment
CN107911682A (en) Image white balancing treatment method, device, storage medium and electronic equipment
CN108734676A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN110022469A (en) Image processing method, device, storage medium and electronic equipment
CN101124611A (en) Automatic white balancing of colour gain values
CN108063891A (en) Image processing method, device, computer readable storage medium and computer equipment
CN107911625A (en) Light measuring method, device, readable storage medium storing program for executing and computer equipment
CN107911683B (en) Image white balancing treatment method, device, storage medium and electronic equipment
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
CN107563976A (en) U.S. face parameter acquiring method, device, readable storage medium storing program for executing and computer equipment
CN107481186A (en) Image processing method, device, computer-readable recording medium and computer equipment
CN109360254A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN107395991A (en) Image combining method, device, computer-readable recording medium and computer equipment
CN107509044A (en) Image combining method, device, computer-readable recording medium and computer equipment
CN108804658A (en) Image processing method and device, storage medium, electronic equipment
CN109327626A (en) Image-pickup method, device, electronic equipment and computer readable storage medium
CN108616700A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN107801011A (en) White balancing treatment method, device and the equipment of pan-shot
CN109963080A (en) Image-pickup method, device, electronic equipment and computer storage medium
CN109410152A (en) Imaging method and device, electronic equipment, computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant