CN108174173A - Image pickup method and device, computer readable storage medium and computer equipment - Google Patents

Image pickup method and device, computer readable storage medium and computer equipment Download PDF

Info

Publication number
CN108174173A
CN108174173A CN201711423781.5A CN201711423781A CN108174173A CN 108174173 A CN108174173 A CN 108174173A CN 201711423781 A CN201711423781 A CN 201711423781A CN 108174173 A CN108174173 A CN 108174173A
Authority
CN
China
Prior art keywords
image
light source
colour temperature
multiple frames
continuous multiple
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
CN201711423781.5A
Other languages
Chinese (zh)
Other versions
CN108174173B (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 CN201711423781.5A priority Critical patent/CN108174173B/en
Publication of CN108174173A publication Critical patent/CN108174173A/en
Application granted granted Critical
Publication of CN108174173B publication Critical patent/CN108174173B/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/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/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Color Television Image Signal Generators (AREA)
  • Studio Devices (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

The application discloses a kind of image pickup method.Image pickup method includes:Continuous multiple frames image is obtained, continuous multiple frames image includes present frame preview image;It handles per frame image to detect the light source of every frame image;The color per the light source of frame image is determined to determine the colour temperature of the light source per frame image;The equivalent colour temperature of present frame preview image is determined according to the colour temperature of the light source of continuous multiple frames image;White balance processing is carried out to present frame preview image with according to equivalent colour temperature.A kind of filming apparatus, computer readable storage medium and computer equipment is also disclosed in the application.Image pickup method and device, the computer readable storage medium and computer equipment of the application embodiment determine the equivalent colour temperature of present frame preview image according to the colour temperature of the light source of continuous multiple frames image, go out so as to carry out white balance to present frame preview image according to equivalent colour temperature, so that the color of white balance treated present frame preview image is more accurate, the color transition of continuous multiple frames image is more smooth.

Description

Image pickup method and device, computer readable storage medium and computer equipment
Technical field
This application involves technical field of imaging, more particularly to a kind of image pickup method, filming apparatus, computer-readable storage medium Matter and computer equipment.
Background technology
The image pickup method of the relevant technologies is by detecting the colour temperature of the light source of the corresponding scene of current frame image and according to light source Colour temperature current frame image is carried out after white balance processing as preview image, in this way, large change, which occurs, in scene leads to field When the colour temperature of the light source of scape varies widely, the tone of preview image can also vary widely, and influence user experience.
Invention content
Embodiments herein provides a kind of image pickup method, filming apparatus, computer readable storage medium and computer Equipment.
The image pickup method of the application embodiment includes the following steps:
Continuous multiple frames image is obtained, the continuous multiple frames image includes present frame preview image;
It handles per frame described image to detect the light source of every frame described image;
The color per the light source of frame described image is determined to determine the colour temperature of the light source per frame described image;
The equivalent colour temperature of present frame preview image is determined according to the colour temperature of the light source of the continuous multiple frames image;With
White balance processing is carried out to the present frame preview image according to the equivalent colour temperature.
The filming apparatus of the application embodiment includes:
Acquisition module, for the acquisition module for obtaining continuous multiple frames image, the continuous multiple frames image includes present frame Preview image;
First processing module, the first processing module are used to handle every frame described image to detect every frame described image Light source;
First determining module, first determining module are every to determine for determining the color per the light source of frame described image The colour temperature of the light source of frame described image;
Second determining module, second determining module are used to be determined according to the colour temperature of the light source of the continuous multiple frames image The equivalent colour temperature of present frame preview image;With
Second processing module, the Second processing module are used for according to the equivalent colour temperature to the present frame preview image Carry out white balance processing.
Non-volatile computer of the one or more of the application embodiment comprising computer executable instructions is readable to be deposited Storage media, when the computer executable instructions are executed by one or more processors so that described in the processor performs Image pickup method.
The computer equipment of the application embodiment includes memory and processor, and computer is stored in the memory Readable instruction, when described instruction is performed by the processor so that the processor performs the image pickup method.
The image pickup method and device of the application embodiment, computer readable storage medium and computer equipment are according to continuous The colour temperature of the light source of multiple image determines the equivalent colour temperature of present frame preview image, so as to according to equivalent colour temperature to present frame Preview image carries out white balance and goes out, so that the color of white balance treated present frame preview image is more accurate, continuously The color transition of multiple image is more smooth.
The additional aspect and advantage of the application will be set forth in part in the description, and will partly become from the following description It obtains significantly or is recognized by the practice of the application.
Description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or it will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow diagram of the image pickup method of the application certain embodiments.
Fig. 2 is the module diagram of the filming apparatus of the application certain embodiments.
Fig. 3 is the floor map of the computer equipment of the application certain embodiments.
Fig. 4 is the flow diagram of the image pickup method of the application certain embodiments.
Fig. 5 is the module diagram of the first processing module of the application certain embodiments.
Fig. 6 is the schematic diagram of the photographed scene of the application certain embodiments.
Fig. 7 is the flow diagram of the image pickup method of the application certain embodiments.
Fig. 8 is the schematic diagram of the photographed scene of the application certain embodiments.
Fig. 9 is the module diagram of the first determining module of the application certain embodiments.
Figure 10 is the colour temperature curve synoptic diagram of the application certain embodiments.
Figure 11 is the flow diagram of the image pickup method of the application certain embodiments.
Figure 12 is the flow diagram of the image pickup method of the application certain embodiments.
Figure 13 is the module diagram of the second determining module of the application certain embodiments.
Figure 14 is the module diagram of the computer equipment of the application certain embodiments.
Figure 15 is the module diagram of the image processing circuit of the application certain embodiments.
Main element symbol description:
Computer equipment 1000, filming apparatus 100, acquisition module 112, first processing module 114, division unit 1142, First judging unit 1144, second judgment unit 1146, concatenation unit 1148, the first determination unit 1149, the first determining module 116th, the second determination unit 1162, first processing units 1164, third determination unit 1166, at the second determining module 118, second Manage unit 1182, third processing unit 1184, computing unit 1186, Second processing module 122, system bus 510, processor 520th, memory 530, built-in storage 540, display screen 550, input unit 560, image processing circuit 800, ISP processors 810, Control logic device 820, camera 830, lens 832, imaging sensor 834, sensor 840, video memory 850, encoder/ Decoder 860, display 870.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the object, technical solution and advantage for making the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
It is appreciated that term " first " used in this application, " second " etc. can be used to describe 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 It says, in the case where not departing from scope of the present application, the first weights can be known as the second weights, and similarly, it can be by second Weights are known as the first weights.First weights and the second weights both weights, but be not same weights.
Referring to Fig. 1, the image pickup method of the application embodiment includes the following steps:
S112:Continuous multiple frames image is obtained, continuous multiple frames image includes present frame preview image;
S114:It handles per frame image to detect the light source of every frame image;
S116:The color per the light source of frame image is determined to determine the colour temperature of the light source per frame image;
S118:The equivalent colour temperature of present frame preview image is determined according to the colour temperature of the light source of continuous multiple frames image;With
S122:White balance processing is carried out to present frame preview image according to equivalent colour temperature.
Referring to Fig. 2, the filming apparatus 100 of the application embodiment include acquisition module 112, first processing module 114, First determining module 116, the second determining module 118 and Second processing module 122.Acquisition module 112 is used to obtain continuous multiple frames Image, continuous multiple frames image include present frame preview image.First processing module 114 is used to handle every frame image to detect every frame The light source of image.First determining module 116 is used to determine the color per the light source of frame image to determine the light source per frame image Colour temperature.Second determining module 118 is used to determine the equivalent of present frame preview image according to the colour temperature of the light source of continuous multiple frames image Colour temperature.Second processing module 122 is used to carry out white balance processing to present frame preview image according to equivalent colour temperature.
The image pickup method of the application embodiment can realize by the filming apparatus 100 of the application embodiment, wherein, step Rapid S112 can be realized that step S114 can be realized by first processing module 114 by acquisition module 112, and step S116 can be by First determining module 116 realizes that step S118 can realize that step S122 can be by second processing by the second determining module 118 Module 122 is realized.
Referring to Fig. 3, the filming apparatus 100 of the application embodiment can be applied to the computer of the application embodiment In equipment 1000, in other words, the computer equipment 1000 of the application embodiment can include the bat of the application embodiment Take the photograph device 100.
Image pickup method, filming apparatus 100 and the computer equipment 1000 of the application embodiment are according to continuous multiple frames image The colour temperature of light source determine the equivalent colour temperature of present frame preview image, so as to according to equivalent colour temperature to present frame preview image White balance is carried out to go out, so that the color of white balance treated present frame preview image is more accurate, continuous multiple frames image Color transition it is more smooth.
In some embodiments, continuous multiple frames image can be image more than two continuous frames and two frames.Continuous multiple frames Image can refer to the multiple image that the camera of computer equipment 1000 acquires in preset time.For example, computer equipment 1000 camera acquired 6 frame images in 0.2 second, then can be using this 6 frame image as continuous multiple frames image.Present frame is pre- Image of looking at can refer to the image in the display screen display of computer equipment 1000.Present frame preview image is continuous multiple frames figure The frame image acquired at the latest as in.
In one embodiment, the camera of computer equipment 1000 is from first acquisition image to sometime acquiring in total 10 frame images, temporally from morning to night number consecutively is 1-10.The frame number of continuous multiple frames image is, for example, 6 frames, in computer During image (i.e. present frame preview image is to number the image for being 7) that the display screen display number of equipment 1000 is 7, then it can incite somebody to action The image that number is 2-7 is regarded as continuous multiple frames image.The image for being 8 is numbered in the display screen display of computer equipment 1000 (i.e. Present frame preview image is the image that number is 8) when, then it can will number the image for being 3-8 and be regarded as continuous multiple frames image.
It in some embodiments, can be by first frame when the camera of computer equipment 1000 acquires image for the first time Preview image is regarded as present frame preview image, and the colour temperature for the light source that first frame preview image is detected is regarded as present frame preview graph The equivalent colour temperature of picture.Before continuous multiple frames image is collected, the image that front is acquired treats as continuous multiple frames image.
In one embodiment, the camera of computer equipment 1000 is from first acquisition image to sometime acquiring in total 10 frame images, temporally from morning to night number consecutively is 1-10.The frame number of continuous multiple frames image is, for example, 6 frames, in computer During image (i.e. present frame preview image is to number the image for being 1) that the display screen display number of equipment 1000 is 1, then it can incite somebody to action The image detection that number is 1 to the colour temperature of light source be regarded as the colour temperature of present frame preview image.In the aobvious of computer equipment 1000 Then can be 1 and 2 by number during image (i.e. present frame preview image is to number the image for being 2) that display screen display number is 2 Image is regarded as continuous multiple frames image.
In some embodiments, it is continuous collecting when the camera of computer equipment 1000 acquires image for the first time Before multiple image, preview image can not be shown.
In one embodiment, the camera of computer equipment 1000 is from first acquisition image to sometime acquiring in total 10 frame images, temporally from morning to night number consecutively is 1-10.The frame number of continuous multiple frames image is, for example, 6 frames, then computer The display screen of equipment 1000 does not show the image that number is 1-5, is just shown when collecting the 6th frame image, in computer During image (i.e. present frame preview image is to number the image for being 6) that the display screen display number of equipment 1000 is 6, then it can incite somebody to action The image that number is 1-6 is regarded as continuous multiple frames image.
In some embodiments, equivalent colour temperature is prestored in computer equipment 1000 and the corresponding of white balance parameter is closed System can search in the correspondence of equivalent colour temperature and white balance parameter according to equivalent colour temperature and obtain corresponding white balance ginseng Number, so as to carry out white balance processing to present frame preview image according to white balance parameter.
Referring to Fig. 4, in some embodiments, step S114 includes the following steps:
S1142:Divide the image into multiple regions;
S1144:Judge whether region is the target area that includes light source according to the histogram in each region;
S1146:Judge whether adjacent multiple target areas;
S1148:There are adjacent multiple target areas are spliced into light source during adjacent multiple target areas;With
S1149:There is no target area is determined as light source during adjacent multiple target areas.
Referring to Fig. 5, in some embodiments, first processing module 114 includes division unit 1142, first and judges list Member 1144, second judgment unit 1146,1148 and first determination unit 1149 of concatenation unit.Division unit 1142 is used for image It is divided into multiple regions.First judging unit 1144 is used to judge whether region is to include light source according to the histogram in each region Target area.Second judgment unit 1146 is used to judge whether adjacent multiple target areas.Concatenation unit 1148 is used for There are adjacent multiple target areas are spliced into light source during adjacent multiple target areas.First determination unit 1149 is used for There is no target area is determined as light source during adjacent multiple target areas.
In other words, step S1142 can be realized by division unit 1142, and step S1144 can be by the first judging unit 1144 realize, step S1146 can be realized that step S1148 can be realized by concatenation unit 1148 by second judgment unit 1146, Step S1149 can be realized by the first determination unit 1149.
So, it may be determined that the light source position in image.
Specifically, multiple regions can be divided the image into, such as divide the image into 64*48 region.According to each region Histogram may determine that whether the accounting of the pixel of pixel value in each region more than presetted pixel value P is more than preset ratio, Presetted pixel value P is, for example, 239, and preset ratio is, for example, 5%, that is, judges pixel of the pixel value more than 239 in each region Accounting whether more than 5%, pixel value more than presetted pixel value P pixel accounting be more than preset ratio corresponding region be to include The target area of light source.Judge that there are during target area, illustrate image correspondence in the picture with the presence or absence of target area in image Scene in there are light sources;When target area being not present in the picture, illustrate light source is not present in the corresponding scene of image.Scheming There are during target area, judging whether adjacent multiple target areas as in, there are during adjacent multiple target areas, Adjacent multiple target areas belong to same light source in the scene, therefore can adjacent multiple target areas be spliced into light Source;There is no during adjacent multiple target areas, target area is regarded as light source.It therefore, can be with by target area Determine the light source position in image.
Referring to Fig. 6, in one example, region A, region B, region C may determine that according to the histogram in each region It is the target area that includes light source with region D, such as from the histogram of region A, it can be determined that going out pixel value in the A of region is more than The accounting of the pixel of presetted pixel value P has been more than preset ratio, since region A, region B, region C and region D are adjacent more A target area, therefore region A, region B, region C and region D can be stitched together, so as to obtain more complete light source.
Fig. 7 and Fig. 8 are please referred to, in some embodiments, step S116 includes the following steps:
S1162:Highlight regions H and middle bright area M are determined according to the Luminance Distribution of the center of light source radially;
S1164:The primary color channels pixel that the primary color channels pixel average of highlight regions H is subtracted to middle bright area M is averaged Value is with the color of determining light source;With
S1166:The colour temperature of light source is determined according to the color of light source.
Please refer to Fig. 8 and Fig. 9, in some embodiments, the first determining module 116 include the second determination unit 1162, First processing units 1164 and third determination unit 1166.Second determination unit 1162 be used for according to the center of light source radially to Outer Luminance Distribution determines highlight regions H and middle bright area M.First processing units 1164 are used to lead to the primary colours of highlight regions H Road pixel average subtracts the primary color channels pixel average of middle bright area M to determine the color of light source.Third determination unit 1166 are used to determine the colour temperature of light source according to the color of light source.
In other words, step S1162 can be realized by the second determination unit 1162, and step S1164 can be by the first processing Unit 1164 realizes that step S1166 can be realized by third determination unit 1166.
In this way, the color and colour temperature of light source can be determined by highlight regions H and middle bright area M.
Referring to Fig. 8, after light source position in the picture determines, it will be understood that the center of the light source in image Domain O is overexposure region, generally Great White Spot, the information of the color not comprising light source.The color of light source can pass through highlight regions H It is determined with the primary color channels pixel average of middle bright area M.Highlight regions H can refer to the center of light source radially bright Angle value is in the region that the pixel of the first brightness range L1 is formed, the first brightness range L1 be, for example, [200,239).Middle clear zone Domain M can refer to that the brightness value of the center of light source radially is in the region that the pixel of the second brightness range L2 is formed, Second brightness range L2 be, for example, [150,200).It should be noted that the tool of the first brightness range L1 and the second brightness range L2 Body value can determine according to the Luminance Distribution of the center O of light source radially, for example, light source brightness decay must than very fast, The first brightness range L1 and the second brightness range L2 can be increased;Such as the brightness decay of light source obtains slow, can reduce One brightness range L1 and the second brightness range L2.
In some embodiments, primary color channels refer to Color Channel, such as (green red) logical including R (red) channel, Gr At least one of road, Gb (turquoise) channel, B (blue) channel, in some embodiments, can pass through the pixel of Gr channels The pixel value of value and Gb channels obtains the pixel value of G (green) channel.Pixel average can refer to the arithmetic of multiple pixel values Average value, multiple pixel values can be the pixels of the pixel value of all pixels of highlight regions or all pixels of middle bright area Value.In one example, each primary color channels pixel average (R of highlight regionsavg, Gavg, Bavg) it is (200,210,220), Each primary color channels pixel average (R of middle bright areaavg, Gavg, Bavg) be (160,180,190), then the color of light source is logical Road (R, G, B) is (200-160,210-180,220-190), i.e., (40,30,30).
In some embodiments, the colour temperature of light source is determined according to the color of light source, is specifically as follows:According to the face of light source The correspondence of the colour temperature of color, the color of light source and light source determines the colour temperature of light source.Wherein, the color of light source and the colour temperature of light source Correspondence can be mapping table and/or colour temperature curve.
Referring to Fig. 10, can be respectively the marks such as 3000K, 4000K, 5000K, 6000K in colour temperature in one embodiment Under quasi- lamp box, obtain image and the color of the corresponding light source under above-mentioned different-colour is obtained by calculation, it is possible thereby to be formed The color of light source and the colour temperature curve of colour temperature, and the colour temperature curve can be stored in computer equipment 1000.Pass through light source Color the colour temperature that can obtain corresponding light source is searched in colour temperature curve.
1 is please referred to Fig.1, in some embodiments, step S118 includes the following steps:
S1181:The average value of the colour temperature of the light source of continuous multiple frames image is calculated as equivalent colour temperature.
Referring to Fig. 2, in some embodiments, the second determining module 118 is used to calculate the light source of continuous multiple frames image Colour temperature average value as equivalent colour temperature.
In other words, step S1181 can be realized by the second determining module 118.
In this way, it can rapidly obtain equivalent colour temperature.
Specifically, after the colour temperature of light source of continuous multiple frames image is obtained, the color of the light source of continuous multiple frames image can be taken The average value of temperature is as equivalent colour temperature.In one embodiment, continuous multiple frames image be continuous three frames image, continuous three frames image The colour temperature of light source that arrives of first frame image detection be 5000K (Kelvin), the second frame image detection to the colour temperature of light source be 6000K, the colour temperature for the light source that present frame preview image detects is 7000K, then equivalent colour temperature is (5000K+6000K+ 7000K)/3=6000K.
2 are please referred to Fig.1, in some embodiments, continuous multiple frames image includes early previous frame preview image, step S118 packets Include following steps:
S1182:The colour temperature of the light source of present frame preview image is handled with the first weights to obtain the first colour temperature;
S1184:The colour temperature of the light source of early previous frame preview image is handled with the second weights to obtain the second colour temperature, the first weights More than the second weights;
S1186:Equivalent colour temperature is calculated according to the first colour temperature and the second colour temperature.
3 are please referred to Fig.1, in some embodiments, continuous multiple frames image includes early previous frame preview image, the second determining mould Block 118 includes second processing unit 1182, third processing unit 1184 and computing unit 1186.Second processing unit 1182 is used for The colour temperature of the light source of present frame preview image is handled with the first weights to obtain the first colour temperature.Third processing unit 1184 be used for For the colour temperature of the light source of the early previous frame preview image of second weights processing to obtain the second colour temperature, the first weights are more than the second weights.Meter Unit 1186 is calculated to be used to calculate equivalent colour temperature according to the first colour temperature and the second colour temperature.
In other words, step S1182 can be realized that step S1184 can be handled by third by second processing unit 1182 Unit 1184 realizes that step S1186 can be realized by computing unit 1186.
In this way, more accurate equivalent colour temperature can be obtained.
Specifically, due to the equivalent colour temperature of present frame preview image be for present frame preview image carry out white balance at Reason, therefore when calculating equivalent colour temperature, in order to improve the accuracy of equivalent colour temperature, it is pre- present frame can be multiplied by using the first weights Look at image light source colour temperature to obtain the first colour temperature, the colour temperature of the light source of early previous frame preview image is multiplied by using the second weights Average value is to obtain the second colour temperature, wherein early previous frame preview image refers in continuous multiple frames image other than present frame preview image Other images, the sum total of the first weights and the second weights is, for example, 1.Equivalent colour temperature can pass through the first colour temperature and the second colour temperature It is added and obtains.
In one embodiment, continuous multiple frames image is continuous three frames image, and the first frame image of continuous three frames image is examined The colour temperature of the light source measured is 5000K, and the colour temperature of light source that the second frame image detection arrives is 6000K, and present frame preview image is examined The colour temperature of the light source measured is 7000K, and the first weights are, for example, 0.8, and the second weights are, for example, 0.2, then the first colour temperature is 0.8* 7000K=5600K, the second colour temperature are 0.2* [(5000K+6000K)/2]=1100K, equivalent colour temperature 5600K+1100K= 6700K。
The division of modules is only used for for example, in other embodiments, can will shoot in above-mentioned filming apparatus 100 Device 100 is divided into different modules as required, to complete all or part of function of above-mentioned filming apparatus 100.
The embodiment of the present application additionally provides a kind of computer readable storage 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:
S112:Continuous multiple frames image is obtained, continuous multiple frames image includes present frame preview image;
S114:It handles per frame image to detect the light source of every frame image;
S116:The color per the light source of frame image is determined to determine the colour temperature of the light source per frame image;
S118:The equivalent colour temperature of present frame preview image is determined according to the colour temperature of the light source of continuous multiple frames image;With
S122:White balance processing is carried out to present frame preview image according to equivalent colour temperature.
Figure 14 is the internal structure schematic diagram of one embodiment Computer equipment.As shown in figure 14, the computer equipment 1000 include the processor 520 connected by system bus 510, memory 530 (being, for example, non-volatile memory medium), memory Reservoir 540, display screen 550 and input unit 560.Wherein, the memory 530 of computer equipment 1000 be stored with operating system and Computer-readable instruction.The computer-readable instruction can be performed by processor 520, to realize the shooting side of the application embodiment Method.The processor 520 supports the operation of entire computer equipment 1000 for providing calculating and control ability.Computer equipment 1000 built-in storage 530 provides environment for the operation of the computer-readable instruction in memory 520.Computer equipment 1000 Display screen 550 can be liquid crystal display or electric ink display screen etc., and input unit 560 can be 550 overlying of display screen The button, trace ball or the Trackpad that are set on the touch layer or 1000 shell of computer equipment of lid or external Keyboard, Trackpad or mouse etc..The computer equipment 1000 can be mobile phone, tablet computer, laptop, individual digital Assistant or Wearable (such as Intelligent bracelet, smartwatch, intelligent helmet, intelligent glasses) etc..Those skilled in the art can The structure shown to understand, in Figure 14 only with the schematic diagram of the relevant part-structure of application scheme, is not formed to this The restriction of computer equipment 1000 that application scheme is applied thereon, specific computer equipment 1000 can include than in figure Shown more or fewer components either combine certain components or are arranged with different components.
5 are please referred to Fig.1, the computer equipment 1000 of the embodiment of the present application includes image processing circuit 800, image procossing Circuit 800 can utilize hardware and or software component to realize, it may include define ISP (Image Signal Processing, figure As signal processing) the various processing units of pipeline.Figure 15 is the schematic diagram of image processing circuit 800 in one embodiment.Such as figure Shown in 15, for purposes of illustration only, only showing the various aspects with the relevant image processing techniques of the embodiment of the present application.
As shown in figure 15, including ISP processors 810, (ISP processors 810 can be processor 520 to image processing circuit 800 Or a part for processor 520) and control logic device 820.The image data that camera 830 captures is first by ISP processors 810 Processing, ISP processors 810 analyze image data can be used for determining that the one or more of camera 830 control to capture The image statistics of parameter.Camera 830 may include one or more lens 832 and imaging sensor 834.Imaging sensor 834 may include colour filter array (such as Bayer filters), and imaging sensor 834 can obtain the light intensity that each imaging pixel captures Degree and wavelength information, and the one group of raw image data that can be handled by ISP processors 810 is provided.Sensor 840 (such as gyroscope) Can the parameter (such as stabilization parameter) of the image procossing of acquisition be supplied to based on 840 interface type of sensor by ISP processors 810. 840 interface of sensor can be SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imager frame Structure) interface, other serial or parallel camera interfaces or above-mentioned interface combination.
In addition, raw image data can be also sent to sensor 840 by imaging sensor 834, sensor 840 can be based on passing 840 interface type of sensor is supplied to ISP processors 810 or sensor 840 to deposit raw image data raw image data It stores up in video memory 850.
ISP processors 810 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 810 can carry out raw image data at one or more images Reason operation, statistical information of the collection about image data.Wherein, image processing operations can be by identical or different bit depth precision It carries out.
ISP processors 810 can also receive image data from video memory 850.For example, 840 interface of sensor will be original Image data is sent to video memory 850, and the raw image data in video memory 850 is available to ISP processors 810 It is for processing.Video memory 850 can be in memory 530, a part for memory 530, storage device or electronic equipment Independent private memory, and may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving from 834 interface of imaging sensor or from 840 interface of sensor or from video memory 850 During raw image data, ISP processors 810 can carry out one or more image processing operations, such as time-domain filtering.Treated schemes As data can be transmitted to video memory 850, to carry out other processing before shown.ISP processors 810 are from image Memory 850 receives processing data, and the processing data are carried out in original domain and in RGB and YCbCr color spaces Image real time transfer.Treated that image data may be output to display 870 that (display 870 may include showing for ISP processors 810 Display screen 550), so that user watches and/or by graphics engine or GPU (Graphics Processing Unit, graphics process Device) it is further processed.In addition, the output of ISP processors 810 also can be transmitted to video memory 850, and display 870 can be from Video memory 850 reads image data.In one embodiment, video memory 850 can be configured as realizing one or more A frame buffer.In addition, the output of ISP processors 810 can be transmitted to encoder/decoder 860, so as to encoding/decoding image Data.The image data of coding can be saved, and be decompressed before being shown in 870 equipment of display.Encoder/decoder 860 can be realized by CPU or GPU or coprocessor.
The determining statistical data of ISP processors 810, which can be transmitted, gives control logic device Unit 820.For example, statistical data can wrap Include the image sensings such as automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 832 shadow correction of lens 834 statistical information of device.Control logic device 820 may include performing the processing element of one or more routines (such as firmware) and/or micro- Controller, one or more routines can determine the control parameter of camera 830 and ISP processors according to the statistical data of reception 810 control parameter.For example, the control parameter of camera 830 may include 840 control parameter of sensor (such as gain, exposure control The time of integration, stabilization parameter of system etc.), camera flash control parameter, 832 control parameter of lens (such as focus on or zoom use Focal length) or these parameters combination.ISP control parameters may include for automatic white balance and color adjustment (for example, at RGB During reason) 832 shadow correction parameter of gain level and color correction matrix and lens.
It is the step of realizing image pickup method with image processing techniques in Figure 15 below:
S112:Continuous multiple frames image is obtained, continuous multiple frames image includes present frame preview image;
S114:It handles per frame image to detect the light source of every frame image;
S116:The color per the light source of frame image is determined to determine the colour temperature of the light source per frame image;
S118:The equivalent colour temperature of present frame preview image is determined according to the colour temperature of the light source of continuous multiple frames image;With
S122:White balance processing is carried out to present frame preview image according to equivalent colour temperature.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in that a non-volatile computer is readable to be deposited In storage media, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium Can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) etc..
Embodiment described above only expresses the several embodiments of the application, and description is more specific and detailed, but simultaneously Cannot the limitation to the application the scope of the claims therefore be interpreted as.It should be pointed out that for those of ordinary skill in the art For, under the premise of the application design is not departed from, various modifications and improvements can be made, these belong to the guarantor of the application Protect range.Therefore, the protection domain of the application patent should be determined by the appended claims.

Claims (12)

1. a kind of image pickup method, which is characterized in that include the following steps:
Continuous multiple frames image is obtained, the continuous multiple frames image includes present frame preview image;
It handles per frame described image to detect the light source of every frame described image;
The color per the light source of frame described image is determined to determine the colour temperature of the light source per frame described image;
The equivalent colour temperature of present frame preview image is determined according to the colour temperature of the light source of the continuous multiple frames image;With
White balance processing is carried out to the present frame preview image according to the equivalent colour temperature.
2. image pickup method according to claim 1, which is characterized in that described to handle per frame described image to detect every frame institute The step of light source for stating image, includes the following steps:
Described image is divided into multiple regions;
Judge whether the region is the target area that includes the light source according to the histogram in each region;
Judge whether adjacent multiple target areas;
There are adjacent multiple target areas are spliced into the light source during adjacent multiple target areas;With
There is no the target area is determined as the light source during adjacent multiple target areas.
3. image pickup method according to claim 1, which is characterized in that the color for determining the light source per frame described image To include the following steps the step of determining the colour temperature per the light source of frame described image:
Highlight regions and middle bright area are determined according to the Luminance Distribution of the center of the light source radially;
By the primary color channels pixel average of the highlight regions subtract the primary color channels pixel average of the middle bright area with Determine the color of the light source;With
The colour temperature of the light source is determined according to the color of the light source.
4. image pickup method according to claim 1, which is characterized in that the light source according to the continuous multiple frames image Colour temperature determines that the step of equivalent colour temperature of present frame preview image includes the following steps:
The average value of the colour temperature of the light source of the continuous multiple frames image is calculated as the equivalent colour temperature.
5. image pickup method according to claim 1, which is characterized in that the continuous multiple frames image includes early previous frame preview graph The step of picture, the colour temperature of the light source according to the continuous multiple frames image determines the equivalent colour temperature of present frame preview image, includes Following steps:
The colour temperature of the light source of the present frame preview image is handled with the first weights to obtain the first colour temperature;
The colour temperature of the light source of the early previous frame preview image is handled with the second weights to obtain the second colour temperature, first weights are big In second weights;
The equivalent colour temperature is calculated according to first colour temperature and second colour temperature.
6. a kind of filming apparatus, which is characterized in that including:
Acquisition module, for the acquisition module for obtaining continuous multiple frames image, the continuous multiple frames image includes present frame preview Image;
First processing module, the first processing module are used to handle every frame described image to detect the light of every frame described image Source;
First determining module, first determining module are used to determine the color per the light source of frame described image to determine per frame institute State the colour temperature of the light source of image;
Second determining module, second determining module are used to be determined currently according to the colour temperature of the light source of the continuous multiple frames image The equivalent colour temperature of frame preview image;With
Second processing module, the Second processing module are used to carry out the present frame preview image according to the equivalent colour temperature White balance processing.
7. filming apparatus according to claim 6, which is characterized in that the first processing module includes:
Division unit, the division unit are used to described image being divided into multiple regions;
First judging unit, first judging unit are used to whether judge the region according to the histogram in each region It is the target area for including the light source;
Second judgment unit, the second judgment unit are used to judge whether adjacent multiple target areas;
Concatenation unit, the concatenation unit be used for there are during adjacent multiple target areas by adjacent multiple mesh Mark region is spliced into the light source;With
First determination unit, first determination unit be used for there is no during adjacent multiple target areas by the mesh Mark region is determined as the light source.
8. filming apparatus according to claim 6, which is characterized in that first determining module includes:
Second determination unit, second determination unit is for true according to the Luminance Distribution of the center of the light source radially Determine highlight regions and middle bright area;
First processing units, the first processing units are used to the primary color channels pixel average of the highlight regions subtracting institute The primary color channels pixel average of middle bright area is stated to determine the color of the light source;With
Third determination unit, the third determination unit are used to determine the colour temperature of the light source according to the color of the light source.
9. filming apparatus according to claim 6, which is characterized in that second determining module is used for:
The average value of the colour temperature of the light source of the continuous multiple frames image is calculated as the equivalent colour temperature.
10. filming apparatus according to claim 6, which is characterized in that the continuous multiple frames image includes early previous frame preview Image, second determining module include:
Second processing unit, the second processing unit are used for the light source of the first weights processing present frame preview image Colour temperature is to obtain the first colour temperature;
Third processing unit, the third processing unit are used for the light source of the second weights processing early previous frame preview image For colour temperature to obtain the second colour temperature, first weights are more than second weights;
Computing unit, the computing unit are used to calculate the equivalent colour temperature according to first colour temperature and second colour temperature.
11. one or more includes the non-volatile computer readable storage medium storing program for executing of computer executable instructions, when the calculating When machine executable instruction is executed by one or more processors so that the processor perform claim requires any one of 1 to 5 institute The image pickup method stated.
12. a kind of computer equipment including memory and processor, stores computer-readable instruction, institute in the memory Instruction is stated when being performed by the processor so that the shooting side described in the processor perform claim requirement any one of 1 to 5 Method.
CN201711423781.5A 2017-12-25 2017-12-25 Photographing method and apparatus, computer-readable storage medium, and computer device Active CN108174173B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711423781.5A CN108174173B (en) 2017-12-25 2017-12-25 Photographing method and apparatus, computer-readable storage medium, and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711423781.5A CN108174173B (en) 2017-12-25 2017-12-25 Photographing method and apparatus, computer-readable storage medium, and computer device

Publications (2)

Publication Number Publication Date
CN108174173A true CN108174173A (en) 2018-06-15
CN108174173B CN108174173B (en) 2020-01-10

Family

ID=62520666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711423781.5A Active CN108174173B (en) 2017-12-25 2017-12-25 Photographing method and apparatus, computer-readable storage medium, and computer device

Country Status (1)

Country Link
CN (1) CN108174173B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109788268A (en) * 2018-12-25 2019-05-21 努比亚技术有限公司 Terminal and its white balance correction control method and computer readable storage medium
CN110267044A (en) * 2019-07-16 2019-09-20 吉林工程技术师范学院 A kind of chroma coder method and system of film scene
CN111107270A (en) * 2019-12-31 2020-05-05 维沃移动通信有限公司 Shooting method and electronic equipment
CN111163350A (en) * 2019-12-06 2020-05-15 Oppo广东移动通信有限公司 Image processing method, terminal and computer storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104709A (en) * 2009-12-21 2011-06-22 展讯通信(上海)有限公司 Method for processing image shot by camera and camera
CN105611264A (en) * 2015-12-30 2016-05-25 努比亚技术有限公司 Automatic white balance method and device
CN105959661A (en) * 2016-05-06 2016-09-21 联想(北京)有限公司 Color temperature estimation method and electronic equipment
CN106028015A (en) * 2015-03-24 2016-10-12 富士施乐株式会社 Color processing device and method, and color processing system
CN106534835A (en) * 2016-11-30 2017-03-22 珠海市魅族科技有限公司 Image processing method and device
CN106851121A (en) * 2017-01-05 2017-06-13 广东欧珀移动通信有限公司 Control method and control device
CN107277480A (en) * 2017-07-10 2017-10-20 广东欧珀移动通信有限公司 White balance synchronous method, device and terminal device
CN107360410A (en) * 2017-07-10 2017-11-17 广东欧珀移动通信有限公司 Method for controlling white balance, device and terminal device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104709A (en) * 2009-12-21 2011-06-22 展讯通信(上海)有限公司 Method for processing image shot by camera and camera
CN106028015A (en) * 2015-03-24 2016-10-12 富士施乐株式会社 Color processing device and method, and color processing system
CN105611264A (en) * 2015-12-30 2016-05-25 努比亚技术有限公司 Automatic white balance method and device
CN105959661A (en) * 2016-05-06 2016-09-21 联想(北京)有限公司 Color temperature estimation method and electronic equipment
CN106534835A (en) * 2016-11-30 2017-03-22 珠海市魅族科技有限公司 Image processing method and device
CN106851121A (en) * 2017-01-05 2017-06-13 广东欧珀移动通信有限公司 Control method and control device
CN107277480A (en) * 2017-07-10 2017-10-20 广东欧珀移动通信有限公司 White balance synchronous method, device and terminal device
CN107360410A (en) * 2017-07-10 2017-11-17 广东欧珀移动通信有限公司 Method for controlling white balance, device and terminal device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109788268A (en) * 2018-12-25 2019-05-21 努比亚技术有限公司 Terminal and its white balance correction control method and computer readable storage medium
CN110267044A (en) * 2019-07-16 2019-09-20 吉林工程技术师范学院 A kind of chroma coder method and system of film scene
CN111163350A (en) * 2019-12-06 2020-05-15 Oppo广东移动通信有限公司 Image processing method, terminal and computer storage medium
CN111163350B (en) * 2019-12-06 2022-03-01 Oppo广东移动通信有限公司 Image processing method, terminal and computer storage medium
CN111107270A (en) * 2019-12-31 2020-05-05 维沃移动通信有限公司 Shooting method and electronic equipment

Also Published As

Publication number Publication date
CN108174173B (en) 2020-01-10

Similar Documents

Publication Publication Date Title
CN108174172B (en) Image pickup method and device, computer readable storage medium and computer equipment
CN108012134B (en) Image pickup method and device, computer readable storage medium and computer equipment
CN107959851B (en) Colour temperature detection method and device, computer readable storage medium and computer equipment
CN107872663B (en) Image processing method and device, computer readable storage medium and computer equipment
CN108174173A (en) Image pickup method and device, computer readable storage medium and computer equipment
US20070047803A1 (en) Image processing device with automatic white balance
CN104363434B (en) Image processing apparatus
CN110022469A (en) Image processing method, device, storage medium and electronic equipment
CN107481186A (en) Image processing method, device, computer-readable recording medium and computer equipment
CN110213502A (en) Image processing method, device, storage medium and electronic equipment
CN108063926B (en) Image processing method and device, computer readable storage medium and computer device
CN107911682A (en) Image white balancing treatment method, device, storage medium and electronic equipment
CN107395991A (en) Image combining method, device, computer-readable recording medium and computer equipment
CN107948617A (en) Image processing method, device, computer-readable recording medium and computer equipment
CN108063934B (en) Image processing method and device, computer readable storage medium and computer device
CN109685853A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN107911683A (en) Image white balancing treatment method, device, storage medium and electronic equipment
CN108012135B (en) Image processing method and device, computer readable storage medium and computer equipment
CN107959841A (en) Image processing method, device, storage medium and electronic equipment
CN107959843B (en) Image processing method and device, computer readable storage medium and computer equipment
CN108156434B (en) Image processing method and device, computer readable storage medium and computer equipment
CN108259754A (en) Image processing method and device, computer readable storage medium and computer equipment
CN108063933A (en) Image processing method and device, computer readable storage medium and computer equipment
CN107341782A (en) Image processing method, device, computer equipment and computer-readable recording medium
CN107959842B (en) Image processing method and device, computer readable storage medium and computer 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
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: OPPO Guangdong Mobile Communications Co., Ltd.

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

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant