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

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

Info

Publication number
CN110392214A
CN110392214A CN201910718150.9A CN201910718150A CN110392214A CN 110392214 A CN110392214 A CN 110392214A CN 201910718150 A CN201910718150 A CN 201910718150A CN 110392214 A CN110392214 A CN 110392214A
Authority
CN
China
Prior art keywords
scene
images
area
preview screen
image
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.)
Pending
Application number
CN201910718150.9A
Other languages
Chinese (zh)
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 CN201910718150.9A priority Critical patent/CN110392214A/en
Publication of CN110392214A publication Critical patent/CN110392214A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
    • 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

Abstract

The embodiment of the present application discloses a kind of image processing method, device, storage medium and electronic equipment, the method includes obtaining preview screen and the determining target area in preview screen, according to the area of target area and the areal calculation dynamic fractional of preview screen, if dynamic fractional is greater than preset value, multiple first scene images of photographed scene are then obtained according to different exposure parameters, it synthesizes multiple first scene images and obtains the first high dynamic range images of photographed scene, if dynamic fractional is not more than preset value, multiple second scene images of photographed scene are then obtained according to same exposure parameter, it synthesizes multiple second scene images and obtains the second high dynamic range images of photographed scene.It synthesizes to obtain the high dynamic range images of photographed scene by this corresponding high dynamic range images synthesis mode used according to the virtual condition of preview screen, can flexibly realize the high dynamic range effect of image taking.

Description

Image processing method, device, storage medium and electronic equipment
Technical field
This application involves field of computer technology, and in particular to a kind of image processing method, device, storage medium and electronics Equipment.
Background technique
Due to the hardware limitation of electronic equipment itself, current electronic equipment can only shoot the smaller field of brightness range Scape shoots the details that the image come is easily lost daylight and/or dark place if being shot when scene light and shade difference is too big.
The prior art can be shot by HDR (High-Dynamic Range, high dynamic range images) technology, The HDR algorithm of current project, daytime surround the HDR scheme of exposure using 3 frames, are easy to close when image content has motive objects Ghost is moved out;And 5 frame LLHDR schemes of the side only 1 frame spacer used at night, composition algorithm are relatively conservative, are easy to cause Dynamic is insufficient.
Summary of the invention
The embodiment of the present application provides a kind of image processing method, device, storage medium and electronic equipment, can be flexible Realize the high dynamic range effect of image taking.
In a first aspect, the embodiment of the present application provides a kind of image processing method, it is applied to electronic equipment, at described image Reason method includes:
It obtains preview screen and determines target area in the preview screen;
According to the area of the target area and the areal calculation dynamic fractional of the preview screen;
If the dynamic fractional is greater than preset value, multiple first scenes of photographed scene are obtained according to different exposure parameters Image synthesizes multiple first scene images and obtains the first high dynamic range images of the photographed scene;
If the dynamic fractional is not more than preset value, multiple second of photographed scene are obtained according to same exposure parameter Scape image synthesizes multiple second scene images and obtains the second high dynamic range images of the photographed scene.
Second aspect, the embodiment of the present application provide a kind of image processing apparatus, are applied to electronic equipment, at described image Managing device includes:
Module is obtained, for obtaining preview screen and the determining target area in the preview screen;
Computing module, for according to the area of the target area and the areal calculation dynamic point of the preview screen Number;
First synthesis module, for obtaining and shooting according to different exposure parameters when the dynamic fractional is greater than preset value Multiple first scene images of scene synthesize multiple first scene images and obtain the first high dynamic range of the photographed scene Enclose image;
Second synthesis module when being not more than preset value for the dynamic fractional, is then obtained according to same exposure parameter and is clapped Multiple second scene images of scene are taken the photograph, multiple second scene images is synthesized and obtains the second high dynamic of the photographed scene Range image.
The third aspect, the embodiment of the present application provide a kind of storage medium, are stored thereon with computer program, when the meter When calculation machine program is run on computers, so that the computer is executed as in image processing method provided by the embodiments of the present application The step of.
Fourth aspect, the embodiment of the present application provide a kind of electronic equipment, including processor and memory, the memory It is stored with computer program, the processor is provided by calling the computer program for executing the embodiment of the present application such as Image processing method in step.
In the embodiment of the present application, the available preview screen of electronic equipment simultaneously determines target area in preview screen, According to the area of target area and the areal calculation dynamic fractional of preview screen, if dynamic fractional is greater than preset value, according to Different exposure parameters obtain multiple first scene images of photographed scene, synthesize multiple first scene images and obtain photographed scene First high dynamic range images obtain the more of photographed scene according to same exposure parameter if dynamic fractional is not more than preset value A second scene image synthesizes multiple second scene images and obtains the second high dynamic range images of photographed scene.By this It synthesizes to obtain photographed scene according to the corresponding high dynamic range images synthesis mode that the virtual condition of preview screen uses High dynamic range images can flexibly realize the high dynamic range effect of image taking.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is a flow diagram of image processing method provided by the embodiments of the present application.
Fig. 2 is that synthesis obtains a schematic diagram of the first high dynamic range images in the embodiment of the present application.
Fig. 3 is the first camera of electronic equipment in the embodiment of the present application and the setting position view of second camera.
Fig. 4 is another flow diagram of image processing method provided by the embodiments of the present application.
Fig. 5 is a structural schematic diagram of image processing apparatus provided by the embodiments of the present application.
Fig. 6 is another structural schematic diagram of image processing apparatus provided by the embodiments of the present application.
Fig. 7 is a structural schematic diagram of electronic equipment provided by the embodiments of the present application.
Fig. 8 is another structural schematic diagram of electronic equipment provided by the embodiments of the present application.
Specific embodiment
Schema is please referred to, wherein identical component symbol represents identical component, the principle of the application is to implement one It is illustrated in computing environment appropriate.The following description be based on illustrated by the application specific embodiment, should not be by It is considered as limitation the application other specific embodiments not detailed herein.
The embodiment of the present application provides a kind of image processing method first, which is applied to electronic equipment.Its In, the executing subject of the image processing method can be image processing apparatus provided by the embodiments of the present application, or be integrated with this The electronic equipment of image processing apparatus, the image processing apparatus can realize by the way of hardware or software, electronic equipment Can be smart phone, tablet computer, palm PC, laptop or desktop computer etc. has configured with processor The equipment of processing capacity.
Fig. 1 is please referred to, Fig. 1 is the flow diagram of image processing method provided by the embodiments of the present application.The image procossing Method is applied to electronic equipment provided by the embodiments of the present application, as shown in Figure 1, image processing method provided by the embodiments of the present application Process can be such that
Step 101, it obtains preview screen and determines target area in preview screen.
In one embodiment, above-mentioned image processing method can be realizes under the scene taken pictures on an electronic device 's.The imaging device for just starting electronic equipment when user wants to take pictures, the just imaging of starting device when user wants to take pictures Device, the imaging device can be front camera, rear camera, dual camera etc..Start the imaging device of electronic equipment, It makes it into preview mode of taking pictures, and the object being taken is shown into the display window in electronic equipment, and will display window at this time Picture shown by mouthful is defined as preview screen.
Wherein, five parts are generally comprised on imaging device hardware: shell (motor), camera lens, infrared fileter, image pass Sensor (such as CCD or COMS) and flexible print wiring board (FPCB) etc..Under preview mode of taking pictures, the mistake of preview screen is shown Cheng Zhong, camera lens move driven by a moto, and the object being taken is imaged on the image sensor by camera lens.Imaging sensor Electric signal, which is converted optical signals to, by optical-electronic conversion is defeated by image processing circuit progress subsequent processing.Wherein, image procossing electricity Road can use hardware and or software component realization, it may include define ISP (Image Signal Processing, image letter Number processing) pipeline various processing units.
In one embodiment, target area can also be determined in further preview screen after obtaining preview screen.Its In, target area can be obtained according to the image parameter in preview screen, for example image parameter is obtained in preview screen Meet the image-region of preset condition, and is determined as target area.It is above-mentioned true in preview screen in other embodiments The mode in region of setting the goal can also be to be determined by way of image recognition or being artificially arranged.
Step 102, according to the area of target area and the areal calculation dynamic fractional of preview screen.
In one embodiment, above-mentioned dynamic fractional is used to reflect the area of target area in the gross area of preview screen Specific gravity, therefore the ratio of the area of the preview screen shared by the area of the target area can be first calculated, it then will be above-mentioned Ratio is converted into the score between a 0-1, is as dynamic fractional.That is, described according to the target area The step of area and the areal calculation dynamic fractional of the preview screen, comprising:
Calculate the ratio of the area of the preview screen shared by the area of the target area;
The dynamic fractional is calculated according to the ratio.
In one embodiment, the ratio of the area of preview screen shared by the area of above-mentioned calculating target area can pass through picture Plain number is calculated.For example, in the electronic equipment that screen resolution is a × b, above-mentioned preview screen is first obtained Included number of pixels c, it should be noted that if preview screen is paved with the screen of electronic equipment, above-mentioned preview screen institute Including number of pixels c be a × b, if not being paved with number of pixels c included by above-mentioned preview screen be less than be a × b, so Number of pixels d included by the target area in preview screen is further obtained afterwards, according to above-mentioned number of pixels c and d The ratio for calculating the area of preview screen shared by the area of target area, to calculate dynamic fractional.If than target area The ratio of the area of preview screen shared by area is 30%, calculates and knows that dynamic fractional is 0.3.
In addition, it should also be noted that providing two kinds of high dynamic range synthesis modes, electronics in the embodiment of the present application Equipment is selected after going out dynamic fractional according to the areal calculation of the area of target area and preview screen according to the dynamic fractional A kind of high dynamic range synthesis mode is selected to synthesize to obtain the high dynamic range images of photographed scene.Wherein, if dynamic fractional is big In preset value, then 103 are transferred to, select a kind of high dynamic range synthesis mode to synthesize to obtain the high dynamic range figure of photographed scene Picture;If dynamic fractional is not more than preset value, 104 are transferred to, another high dynamic range synthesis mode is selected to be clapped to synthesize Take the photograph the high dynamic range images of scene.
Step 103, if dynamic fractional is greater than preset value, multiple the first of photographed scene are obtained according to different exposure parameters Scene image synthesizes multiple first scene images and obtains the first high dynamic range images of photographed scene.
Wherein, exposure parameter includes exposure value (the EV value being commonly called as) or exposure time.As a kind of optional embodiment party Formula, when obtaining multiple first scene images of photographed scene according to different exposure parameters, electronic equipment can be short according to presetting The mode that exposure time and long exposure time overlap obtains multiple first scene images of photographed scene.In other words, two phases In first scene image of neighbour's exposure, first scene image is short exposed images, another first scene image is long exposes Light image.It can synthesize to obtain the first high dynamic range images of photographed scene in such a way that long and short exposure synthesizes in this way.
For example, electronic equipment get a short exposure duration the first scene image and a long exposure time One scene image since the first scene image of short exposure duration remains the feature of brighter areas in photographed scene, and grows exposure The feature that first scene image of light time length remains darker area in photographed scene can use long exposure then in synthesis The feature of darker area and the first scene image of short exposure duration in the photographed scene that first scene image of duration retains The feature of brighter areas is synthesized to obtain the first high dynamic range images of photographed scene in the photographed scene of reservation.
As another optional embodiment, multiple first of photographed scene are being obtained according to different exposure parameters When scape image, electronic equipment can obtain multiple first scene images of photographed scene according to different exposure values, wherein electricity Sub- equipment according to default overexposure light value and can preset under-exposure value and be exposed respectively to photographed scene, obtain photographed scene Two the first scene images, can also be according to default overexposure light value, default normal exposure value and to preset under-exposure value right respectively Photographed scene is exposed, and obtains three first scene images of photographed scene etc..
For example, electronic equipment can control camera respectively according to default normal exposure value EV0, preset under-exposure value EV-2 And default overexposure light value EV2 is exposed photographed scene, thus obtains three the first scene images of photographed scene, respectively It for normal exposure image, overexposure image and owes to expose image, to be shot by surrounding the photosynthetic mode of exposure to synthesize First high dynamic range images of scene.
Step 104, if dynamic fractional is not more than preset value, multiple the of photographed scene are obtained according to same exposure parameter Two scene images synthesize multiple second scene images and obtain the second high dynamic range images of photographed scene.
In one embodiment, electronic equipment is in multiple second scene images for obtaining photographed scene according to same exposure parameter When, multiple second scene images of photographed scene can be obtained according to default short exposure duration.For example, electronic equipment control camera shooting Head carries out multiple exposure to photographed scene according to 1 millisecond of default short exposure duration, thus obtains multiple second of photographed scene Scape image, in other words, this multiple second scene image got, as multiple short exposed images of photographed scene.
In the embodiment of the present application, electronic equipment further leads to after getting multiple second scene images of photographed scene The mode for crossing the short exposure of multiframe synthesizes multiple second scene images and obtains the second high dynamic range images of photographed scene.
Wherein, electronic equipment obtains the second high dynamic range images of photographed scene in multiple second scene images of synthesis When, the synthesis of multiframe noise reduction is carried out to multiple second scene images first, obtains a noise reduction composograph.It is understood that Since the second scene image is short exposed images, by more features for retaining brighter areas in photographed scene.Likewise, to more What the noise reduction composograph that a second scene image progress multiframe noise reduction is synthesized into equally more retained is in photographed scene The feature of brighter areas.At this point, electronic equipment further promotes the brightness of noise reduction composograph, so that compared with clear zone in photographed scene The feature in domain and the feature of darker area are presented simultaneously, are obtained the high dynamic range images of photographed scene, are denoted as second High dynamic range images.
Such as, it is assumed that electronic equipment gets 4 the second scene images of photographed scene, respectively the second scene image altogether A, the second scene image B, the second scene image C and the second scene image D.
Referring to figure 2., electronic equipment first from the second scene image A, the second scene image B, the second scene image C and One is selected in second scene image D and is used as benchmark image, it is assumed that selects the second scene image A for benchmark image, then electronics is set It is standby to be aligned the second scene image B, the second scene image C and the second scene image D with the second scene image A, then be based on pair Each image after neat, be calculated each pixel average pixel value (such as, it is assumed that the pixel of certain position is at four second Pixel value in scape image be respectively as follows: " 0.8,0.9,1.1,1.2 ", then the mean pixel of the pixel of the position can be calculated Value is " 1 ").Later, noise reduction composograph is obtained according to the average pixel value of each position.Wherein it is possible to by benchmark image (i.e. Two scene image A) the pixel value of each pixel be accordingly adjusted to each average pixel value being calculated, to obtain noise reduction conjunction At image, the new image of a width can also be generated, is closed the image of generation as noise reduction according to each average pixel value is calculated At image.For noise reduction composograph, electronic equipment further promotes its brightness, obtains the second high dynamic range of photographed scene Image.
From the foregoing, it will be observed that the available preview screen of image processing method provided by the embodiments of the present application and working as in preview screen Middle determining target area, according to the area of target area and the areal calculation dynamic fractional of preview screen, if dynamic fractional is big In preset value, then multiple first scene images of photographed scene are obtained according to different exposure parameters, synthesize multiple first scene figures As obtaining the first high dynamic range images of photographed scene, if dynamic fractional is not more than preset value, according to same exposure parameter Multiple second scene images of photographed scene are obtained, multiple second scene images is synthesized and obtains the second high dynamic range of photographed scene Enclose image.It is synthesized by this corresponding high dynamic range images synthesis mode used according to the virtual condition of preview screen The high dynamic range images of photographed scene are obtained, can flexibly realize the high dynamic range effect of image taking.
In one embodiment, multiple first scene images that the photographed scene is obtained according to different exposure parameters, Include:
The shooting field is obtained according to different exposure parameters by first camera and the second camera respectively Multiple first scene images of scape;
Multiple second scene images that the photographed scene is obtained according to same exposure parameter, comprising:
The multiple of the photographed scene are obtained according to same exposure parameter by the first camera and second camera respectively Second scene image.
Referring to figure 3., in the embodiment of the present application, the same side of electronic equipment is provided with the first camera and the second camera shooting Head.
On the one hand, electronic equipment is when obtaining multiple first scene images of photographed scene according to different exposure parameters, i.e., Multiple first scene figures that first camera and second camera obtain photographed scene according to different exposure parameters can be provided respectively Picture.To improve the acquisition efficiency of the first scene image, so that the combined coefficient of the first high dynamic range images is improved.Than Such as, electronic equipment passes through the first camera respectively and is exposed according to short exposure duration to photographed scene, passes through second camera Photographed scene is exposed according to long exposure time, two first of photographed scene can be got using single exposure operation Scene image, respectively short exposed images and long exposure image.
On the other hand, electronic equipment according to same exposure parameter obtain photographed scene multiple second scene images when, Multiple second scenes of photographed scene can be obtained according to same exposure parameter by the first camera and second camera respectively Image.To improve the acquisition efficiency of the second scene image, so that the combined coefficient of the second high dynamic range images is improved. For example, electronic equipment synchronization is exposed photographed scene according to short exposure duration by the first camera and second camera, Two the second scene images of photographed scene can be got using single exposure operation.
In one embodiment, image processing method provided by the present application further include:
It is carried out using the first high dynamic range images or the second high dynamic range images as the preview image of photographed scene It shows.
In the embodiment of the present application, electronic equipment obtains synthesis after synthesis obtains the first high dynamic range images First high dynamic range images are shown as the preview image of photographed scene, alternatively, obtaining the second high dynamic range in synthesis After enclosing image, the second high dynamic range images that synthesis obtains are shown as the preview image of photographed scene.
Above by using the first high dynamic range images or the second high dynamic range images as the preview of photographed scene Image is shown, and user can be made to view in advance and take pictures the high dynamic range effect of resulting image to photographed scene Fruit helps user preferably to take pictures.
In one embodiment, image processing method provided by the present application can also include:
Video coding is carried out according to the first high dynamic range images or the second high dynamic range images, obtains photographed scene Video.
Wherein, electronic equipment can also be regarded according to the first high dynamic range images or the second high dynamic range images Frequency encodes, and obtains the video of photographed scene, i.e., when recording a video to photographed scene, so that video recording obtains video and also has high dynamic range Enclose effect.
It should be noted that not done in the embodiment of the present application for which kind of video code model to carry out Video coding using Concrete restriction can be chosen according to actual needs suitable video code model by those of ordinary skill in the art, including but unlimited In H.264, H.265, MPEG-4 etc..
In one embodiment, image processing method provided by the present application further include:
Before synthesis obtains the first high dynamic range images, according to the current resolution ratio of screen to multiple first scene figures As carrying out down-sampled processing;
Alternatively, before synthesis obtains the second high dynamic range images, according to the current resolution ratio of screen to multiple second Scene image carries out down-sampled processing.
Those of ordinary skill in the art are it should be understood that the true resolution of preview image is greater than the resolution that screen is shown Rate situation can't obtain better display equal to the case where screen display resolution compared to the true resolution of preview image Effect.
Therefore, electronic equipment gets current point of screen before synthesis obtains the first high dynamic range images first Resolution carries out down-sampled processing to multiple first scene images further according to the current resolution ratio of screen, so that multiple first scenes The resolution ratio of image is consistent with the current resolution ratio of screen, so that the resolution for the first high dynamic range images that synthesis obtains Rate is consistent with the current resolution ratio of screen.In such manner, it is possible to improve the combined coefficient of the first high dynamic range images, and by When one high dynamic range images are shown as preview image, its display effect will not be reduced.
On the other hand, it is current to get screen before synthesis obtains the second high dynamic range images first for electronic equipment Resolution ratio, down-sampled processing is carried out to multiple second scene images further according to the current resolution ratio of screen, so that multiple second The resolution ratio of scene image is consistent with the current resolution ratio of screen, so that the second high dynamic range images that synthesis obtains Resolution ratio is consistent with the current resolution ratio of screen.In such manner, it is possible to the combined coefficient of the second high dynamic range images is improved, and When second high dynamic range images are shown as preview image, its display effect will not be reduced.
Referring to figure 4., Fig. 4 is another flow diagram of image processing method provided by the embodiments of the present application, the figure As the process of processing method may include:
Step 201, preview screen is obtained.
In one embodiment, above-mentioned image processing method can be realizes under the scene taken pictures on an electronic device 's.The imaging device for just starting electronic equipment when user wants to take pictures, the just imaging of starting device when user wants to take pictures Device, the imaging device can be front camera, rear camera, dual camera etc..Start the imaging device of electronic equipment, It makes it into preview mode of taking pictures, and the object being taken is shown into the display window in electronic equipment, and will display window at this time Picture shown by mouthful is defined as preview screen.
Step 202, determine that brightness is small greater than the first area of the first predetermined luminance value and brightness in preview screen In the second area of the second predetermined luminance value.
In an application embodiment, above-mentioned first predetermined luminance value is greater than the second brightness predetermined luminance value.Wherein, above-mentioned electricity Sub- equipment determine first area and second area mode can there are many, such as: obtain the preview of photographed scene in electronic equipment After image, the brightness of each region in the available preview image of electronic equipment, and will be in preview image in each region The region that brightness is greater than the first predetermined luminance value is determined as above-mentioned first area, and by brightness in each region in preview image Region less than the second predetermined luminance value determines that the region is above-mentioned second area.
Optionally, in the embodiment of the present invention, in the above method, if the brightness of the multiple regions in preview image is all larger than First predetermined luminance value, then above-mentioned multiple regions can be determined as above-mentioned first area by electronic equipment.Correspondingly, if preview The brightness of multiple regions in image is respectively less than the second predetermined luminance value, then electronic equipment can determine above-mentioned multiple regions For above-mentioned second area.
It should be noted that above-mentioned first predetermined luminance value and second predetermined luminance value can be preset in electronic equipment Numerical value, first predetermined luminance value and second predetermined luminance value can be preset in the electronic device for the manufacturer of electronic equipment 's.It can specifically be determined according to actual use demand, the embodiment of the present invention is not construed as limiting.
In other embodiments, it can also be observed after the preview image that electronic equipment obtains photographed scene by user The preview image, and by the first input to the biggish region of brightness in the preview image, triggering terminal equipment is by the preview Region corresponding with first input is determined as above-mentioned first area in image, and by smaller to brightness in the preview image Region the second input, region corresponding with second input in the preview image is determined as above-mentioned the by triggering terminal equipment Two regions.
Optionally, in the embodiment of the present invention, in aforesaid way, above-mentioned first input and the second input can be user Clicking input, double-clicking input or the inputs such as long-pressing is inputted in the interface that electronic equipment screen shows above-mentioned preview image Mode.It can specifically be determined according to actual use demand, the embodiment of the present invention is not further qualified this.
Step 203, target area is determined according to first area and second area.
It for example, can be by the excessively sudden and violent region (for example brightness is greater than 220) in preview screen really in the embodiment of the present application It is set to first area, and dark areas (for example brightness is less than 30) is determined as second area, above-mentioned first area and Two regions constitute target area.
Step 204, the ratio for calculating the area of preview screen shared by the area of target area calculates dynamic point according to ratio Number.
In one embodiment, the ratio of the area of preview screen shared by the area of above-mentioned calculating target area can pass through picture Plain number is calculated.For example, in the electronic equipment that screen resolution is a × b, above-mentioned preview screen is first obtained Included number of pixels c, it should be noted that if preview screen is paved with the screen of electronic equipment, above-mentioned preview screen institute Including number of pixels c be a × b, if not being paved with number of pixels c included by above-mentioned preview screen be less than be a × b, so Number of pixels d included by the target area in preview screen is further obtained afterwards, according to above-mentioned number of pixels c and d The ratio for calculating the area of preview screen shared by the area of target area, to calculate dynamic fractional.If than target area The ratio of the area of preview screen shared by area is 30%, calculates and knows that dynamic fractional is 0.3.
Step 205, if dynamic fractional is greater than preset value, multiple the first of photographed scene are obtained according to different exposure parameters Scene image synthesizes multiple first scene images and obtains the first high dynamic range images of photographed scene.
In one embodiment, when obtaining multiple first scene images of photographed scene according to different exposure parameters, electronics Equipment can obtain multiple first scene figures of photographed scene in such a way that default short exposure duration and long exposure time are overlapping Picture.In other words, in the first scene image of two adjacent exposures, first scene image is short exposed images, another First scene image is long exposure image.It can synthesize to obtain the first of photographed scene in such a way that long and short exposure synthesizes in this way High dynamic range images.
In other embodiments, when obtaining multiple first scene images of photographed scene according to different exposure parameters, Electronic equipment can obtain multiple first scene images of photographed scene according to different exposure values, wherein electronic equipment can According to default overexposure light value and to preset under-exposure value and be exposed respectively to photographed scene, two first of photographed scene are obtained Scene image according to default overexposure light value, default normal exposure value and can also preset under-exposure value respectively to photographed scene It is exposed, obtains three first scene images of photographed scene etc..
Step 206, if dynamic fractional is not more than preset value, multiple the of photographed scene are obtained according to same exposure parameter Two scene images synthesize multiple second scene images and obtain the second high dynamic range images of photographed scene.
In one embodiment, electronic equipment is in multiple second scene images for obtaining photographed scene according to same exposure parameter When, multiple second scene images of photographed scene can be obtained according to default short exposure duration.For example, electronic equipment control camera shooting Head carries out multiple exposure to photographed scene according to 1 millisecond of default short exposure duration, thus obtains multiple second of photographed scene Scape image, in other words, this multiple second scene image got, as multiple short exposed images of photographed scene.
In this embodiment, electronic equipment further passes through after getting multiple second scene images of photographed scene The mode of the short exposure of multiframe synthesizes multiple second scene images and obtains the second high dynamic range images of photographed scene.
Step 207, using the first high dynamic range images or the second high dynamic range images as the preview of photographed scene Image is shown.
In the embodiment of the present application, electronic equipment obtains synthesis after synthesis obtains the first high dynamic range images First high dynamic range images are shown as the preview image of photographed scene, alternatively, obtaining the second high dynamic range in synthesis After enclosing image, the second high dynamic range images that synthesis obtains are shown as the preview image of photographed scene.
Above by using the first high dynamic range images or the second high dynamic range images as the preview of photographed scene Image is shown, and user can be made to view in advance and take pictures the high dynamic range effect of resulting image to photographed scene Fruit helps user preferably to take pictures.
From the foregoing, it will be observed that the available preview screen of image processing method provided by the embodiments of the present application, works as in preview screen Middle determining brightness be greater than the first predetermined luminance value first area and brightness less than the second predetermined luminance value second area, Target area is determined according to first area and second area, calculates the ratio of the area of preview screen shared by the area of target area Example calculates dynamic fractional according to ratio, if dynamic fractional is greater than preset value, obtains photographed scene according to different exposure parameters Multiple first scene images synthesize multiple first scene images and obtain the first high dynamic range images of photographed scene, if dynamic Score is not more than preset value, then multiple second scene images of photographed scene are obtained according to same exposure parameter, synthesizes multiple the Two scene images obtain the second high dynamic range images of photographed scene, by the first high dynamic range images or the second high dynamic Range image is shown as the preview image of photographed scene.Pass through this pair used according to the virtual condition of preview screen The high dynamic range images synthesis mode answered synthesizes to obtain the high dynamic range images of photographed scene, can flexibly realize figure As the high dynamic range effect of shooting.
The embodiment of the present application also provides a kind of image processing apparatus.Referring to figure 5., Fig. 5 is provided by the embodiments of the present application The structural schematic diagram of image processing apparatus.Wherein the image processing apparatus 30 is applied to electronic equipment, the image processing apparatus 30 Include:
Module 301 is obtained, for obtaining preview screen and the determining target area in the preview screen;
Computing module 302, for according to the area of the target area and the areal calculation dynamic of the preview screen Score;
First synthesis module 303, for obtaining and clapping according to different exposure parameters when the dynamic fractional is greater than preset value Multiple first scene images of scene are taken the photograph, multiple first scene images is synthesized and obtains the first high dynamic of the photographed scene Range image;
Second synthesis module 304 when being not more than preset value for the dynamic fractional, is then obtained according to same exposure parameter Multiple second scene images of photographed scene, the second height that multiple second scene images of synthesis obtain the photographed scene are dynamic State range image.
In one embodiment, as shown in fig. 6, the acquisition module 301 may include:
Acquisition submodule 3011, for obtaining preview screen;
First determines submodule 3012, for determining that brightness is greater than the first predetermined luminance value in the preview screen The second area of first area and brightness less than the second predetermined luminance value;
Second determines submodule 3013, for determining the target area according to the first area and second area.
In one embodiment, the computing module 302 may include:
First computational submodule 3021, for calculating the area of the preview screen shared by the area of the target area Ratio;
Second computational submodule 3022, for calculating the dynamic fractional according to the ratio.
From the foregoing, it will be observed that image processing apparatus provided by the embodiments of the present application can obtain preview screen by acquisition module 301 And target area is determined in preview screen, computing module 302 is according to the area of target area and the area of preview screen Dynamic fractional is calculated, if dynamic fractional is greater than preset value, the first synthesis module 303 obtains shooting field according to different exposure parameters Multiple first scene images of scape synthesize multiple first scene images and obtain the first high dynamic range images of photographed scene, if Dynamic fractional is not more than preset value, then the second synthesis module 304 obtains multiple the second of photographed scene according to same exposure parameter Scene image synthesizes multiple second scene images and obtains the second high dynamic range images of photographed scene.It is pre- by this basis The corresponding high dynamic range images synthesis mode that uses of virtual condition of picture look at synthesizes to obtain the high dynamic of photographed scene Range image can flexibly realize the high dynamic range effect of image taking.
It should be noted that the image processing method in image processing apparatus provided by the embodiments of the present application and foregoing embodiments It is owned by France in same design, on image processing apparatus can in operation image processing method embodiment provide either method, Specific implementation process is detailed in image processing method embodiment, and details are not described herein again.
The embodiment of the present application provides a kind of computer-readable storage medium, is stored thereon with computer program, when it is deposited When the computer program of storage executes on computers, so that computer executes such as image processing method provided by the embodiments of the present application In step.Wherein, storage medium can be magnetic disk, CD, read-only memory (Read Only Memory, ROM) or with Machine memory access (Random Access Memory, RAM) etc..
The embodiment of the present application also provides a kind of electronic equipment, please refers to Fig. 7, and electronic equipment includes processor 701 and storage Device 702.Wherein, processor 701 and memory 702 are electrically connected.
Processor 701 is the control centre of electronic equipment, utilizes each of various interfaces and the entire electronic equipment of connection A part by the computer program of operation or load store in memory 702, and is called and is stored in memory 702 Data, execute the various functions of electronic equipment and handle data.
Memory 702 can be used for storing software program and module, and processor 701 is stored in memory 702 by operation Computer program and module, thereby executing various function application and data processing.Memory 702 can mainly include storage Program area and storage data area, wherein storing program area can computer program needed for storage program area, at least one function (such as sound-playing function, image player function etc.) etc.;Storage data area can be stored to be created according to using for electronic equipment Data etc..In addition, memory 702 may include high-speed random access memory, it can also include nonvolatile memory, example Such as at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, memory 702 may be used also To include Memory Controller, to provide access of the processor 701 to memory 702.
In the embodiment of the present application, processor 701 in electronic equipment can according to following step, by one or one with On computer program process it is corresponding instruction be loaded into memory 702, and by processor 701 operation be stored in memory Computer program in 702, thus realize various functions, it is as follows:
It obtains preview screen and determines target area in the preview screen;
According to the area of the target area and the areal calculation dynamic fractional of the preview screen;
If the dynamic fractional is greater than preset value, multiple first scenes of photographed scene are obtained according to different exposure parameters Image synthesizes multiple first scene images and obtains the first high dynamic range images of the photographed scene;
If the dynamic fractional is not more than preset value, multiple second of photographed scene are obtained according to same exposure parameter Scape image synthesizes multiple second scene images and obtains the second high dynamic range images of the photographed scene.
Fig. 8 is please referred to, Fig. 8 is another structural schematic diagram of electronic equipment provided by the embodiments of the present application, with electricity shown in Fig. 7 The difference of sub- equipment is that electronic equipment further includes the components such as input unit 703 and output unit 704.
Wherein, input unit 703 can be used for receiving the number of input, character information or user's characteristic information (for example refer to Line), and to generate related with user setting and function control keyboard, mouse, operating stick, optics or trackball signal defeated Enter.
Output unit 704 can be used for showing information input by user or the information for being supplied to user, such as screen.
In the embodiment of the present application, processor 701 in electronic equipment can according to following step, by one or one with On computer program process it is corresponding instruction be loaded into memory 702, and by processor 701 operation be stored in memory Computer program in 702, thus realize various functions, it is as follows:
It obtains preview screen and determines target area in the preview screen;
According to the area of the target area and the areal calculation dynamic fractional of the preview screen;
If the dynamic fractional is greater than preset value, multiple first scenes of photographed scene are obtained according to different exposure parameters Image synthesizes multiple first scene images and obtains the first high dynamic range images of the photographed scene;
If the dynamic fractional is not more than preset value, multiple second of photographed scene are obtained according to same exposure parameter Scape image synthesizes multiple second scene images and obtains the second high dynamic range images of the photographed scene.
It should be noted that electronic equipment provided by the embodiments of the present application and the image processing method in foregoing embodiments are owned by France It, on an electronic device can be with either offer method in operation image processing method embodiment, specific implementation in same design Process is detailed in feature extracting method embodiment, and details are not described herein again.
It should be noted that for the image processing method of the embodiment of the present application, this field common test personnel can be with Understand all or part of the process for realizing the image processing method of the embodiment of the present application, is that can be controlled by computer program Relevant hardware is completed, and the computer program can be stored in a computer-readable storage medium, be such as stored in electronics It in the memory of equipment, and is executed by least one processor in the electronic equipment, in the process of implementation may include such as image The process of the embodiment of processing method.Wherein, the storage medium can be magnetic disk, CD, read-only memory, arbitrary access note Recall body etc..
For the image processing apparatus of the embodiment of the present application, each functional module be can integrate in a processing chip In, it is also possible to modules and physically exists alone, can also be integrated in two or more modules in a module.It is above-mentioned Integrated module both can take the form of hardware realization, can also be realized in the form of software function module.It is described integrated If module realized in the form of software function module and when sold or used as an independent product, also can store one In a computer-readable storage medium, the storage medium is for example read-only memory, disk or CD etc..
Above to a kind of image processing method, device, storage medium and electronic equipment provided by the embodiment of the present application into It has gone and has been discussed in detail, specific examples are used herein to illustrate the principle and implementation manner of the present application, the above implementation The explanation of example is merely used to help understand the present processes and its core concept;Meanwhile for those skilled in the art, according to According to the thought of the application, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification It should not be construed as the limitation to the application.

Claims (11)

1. a kind of image processing method, which is characterized in that described image processing method includes:
It obtains preview screen and determines target area in the preview screen;
According to the area of the target area and the areal calculation dynamic fractional of the preview screen;
If the dynamic fractional is greater than preset value, multiple first scene figures of photographed scene are obtained according to different exposure parameters Picture synthesizes multiple first scene images and obtains the first high dynamic range images of the photographed scene;
If the dynamic fractional is not more than preset value, multiple second scene figures of photographed scene are obtained according to same exposure parameter Picture synthesizes multiple second scene images and obtains the second high dynamic range images of the photographed scene.
2. image processing method according to claim 1, which is characterized in that the acquisition preview screen and in the preview The step of target area is determined in picture, comprising:
Obtain preview screen;
Determine that brightness is pre- less than second greater than the first area of the first predetermined luminance value and brightness in the preview screen If the second area of brightness value;
The target area is determined according to the first area and second area.
3. image processing method according to claim 1, which is characterized in that the area according to the target area with And the preview screen areal calculation dynamic fractional the step of, comprising:
Calculate the ratio of the area of the preview screen shared by the area of the target area;
The dynamic fractional is calculated according to the ratio.
4. image processing method according to claim 1-3, which is characterized in that described according to different exposure parameters Obtain multiple first scene images of the photographed scene, comprising:
The photographed scene is obtained according to different exposure parameters by first camera and the second camera respectively Multiple first scene images;
Multiple second scene images that the photographed scene is obtained according to same exposure parameter, comprising:
The multiple described of the photographed scene is obtained according to same exposure parameter by the first camera and second camera respectively Second scene image.
5. image processing method according to claim 1-3, which is characterized in that described image processing method is also wrapped It includes:
Using first high dynamic range images or second high dynamic range images as the preview of the photographed scene Image is shown.
6. image processing method according to claim 5, which is characterized in that described image processing method further include:
Before synthesis obtains first high dynamic range images, according to the current resolution ratio of screen to multiple described first Scape image carries out down-sampled processing;
Alternatively, before synthesis obtains second high dynamic range images, according to the current resolution ratio of screen to multiple described Second scene image carries out down-sampled processing.
7. a kind of image processing apparatus, which is characterized in that described image processing unit includes:
Module is obtained, for obtaining preview screen and the determining target area in the preview screen;
Computing module, for according to the area of the target area and the areal calculation dynamic fractional of the preview screen;
First synthesis module, for obtaining photographed scene according to different exposure parameters when the dynamic fractional is greater than preset value Multiple first scene images, synthesize multiple first scene images and obtain the first high dynamic range figure of the photographed scene Picture;
Second synthesis module when being not more than preset value for the dynamic fractional, then obtains shooting field according to same exposure parameter Multiple second scene images of scape synthesize multiple second scene images and obtain the second high dynamic range of the photographed scene Image.
8. image processing apparatus according to claim 7, which is characterized in that the acquisition module, comprising:
Acquisition submodule, for obtaining preview screen;
First determines submodule, for determining that brightness is greater than the firstth area of the first predetermined luminance value in the preview screen The second area of domain and brightness less than the second predetermined luminance value;
Second determines submodule, for determining the target area according to the first area and second area.
9. image processing apparatus according to claim 7, which is characterized in that the computing module, comprising:
First computational submodule, for calculating the ratio of the area of the preview screen shared by the area of the target area;
Second computational submodule, for calculating the dynamic fractional according to the ratio.
10. a kind of storage medium, is stored thereon with computer program, which is characterized in that when the computer program is in computer When upper operation, so that the computer is executed such as the step in image processing method as claimed in any one of claims 1 to 6.
11. a kind of electronic equipment, including processor and memory, the memory storage have computer program, which is characterized in that The processor is by calling the computer program, for executing such as image processing method as claimed in any one of claims 1 to 6 Step in method.
CN201910718150.9A 2019-08-05 2019-08-05 Image processing method, device, storage medium and electronic equipment Pending CN110392214A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910718150.9A CN110392214A (en) 2019-08-05 2019-08-05 Image processing method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910718150.9A CN110392214A (en) 2019-08-05 2019-08-05 Image processing method, device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN110392214A true CN110392214A (en) 2019-10-29

Family

ID=68288423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910718150.9A Pending CN110392214A (en) 2019-08-05 2019-08-05 Image processing method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110392214A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112415002A (en) * 2020-11-10 2021-02-26 之江实验室 Multimode sensing device based on image sensor
CN112672060A (en) * 2020-12-29 2021-04-16 维沃移动通信有限公司 Shooting method and device and electronic equipment
CN113099123A (en) * 2021-04-07 2021-07-09 中煤科工集团重庆研究院有限公司 High dynamic range video image acquisition method
CN114390212A (en) * 2020-10-22 2022-04-22 华为技术有限公司 Photographing preview method, electronic device and storage medium
WO2022262259A1 (en) * 2021-06-15 2022-12-22 展讯通信(上海)有限公司 Image processing method and apparatus, and device, medium and chip

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104052933A (en) * 2013-03-15 2014-09-17 聚晶半导体股份有限公司 Method for determining dynamic range mode, and image obtaining apparatus
CN105100637A (en) * 2015-08-31 2015-11-25 联想(北京)有限公司 Image processing method and electronic equipment
CN106067177A (en) * 2016-06-15 2016-11-02 深圳市万普拉斯科技有限公司 HDR scene method for detecting and device
US20170163902A1 (en) * 2015-12-08 2017-06-08 Le Holdings (Beijing) Co., Ltd. Method and electronic device for generating high dynamic range image
CN108391059A (en) * 2018-03-23 2018-08-10 华为技术有限公司 A kind of method and apparatus of image procossing
CN109996009A (en) * 2019-04-09 2019-07-09 Oppo广东移动通信有限公司 Image processing method, device, storage medium and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104052933A (en) * 2013-03-15 2014-09-17 聚晶半导体股份有限公司 Method for determining dynamic range mode, and image obtaining apparatus
CN105100637A (en) * 2015-08-31 2015-11-25 联想(北京)有限公司 Image processing method and electronic equipment
US20170163902A1 (en) * 2015-12-08 2017-06-08 Le Holdings (Beijing) Co., Ltd. Method and electronic device for generating high dynamic range image
CN106067177A (en) * 2016-06-15 2016-11-02 深圳市万普拉斯科技有限公司 HDR scene method for detecting and device
CN108391059A (en) * 2018-03-23 2018-08-10 华为技术有限公司 A kind of method and apparatus of image procossing
CN109996009A (en) * 2019-04-09 2019-07-09 Oppo广东移动通信有限公司 Image processing method, device, storage medium and electronic equipment

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114390212A (en) * 2020-10-22 2022-04-22 华为技术有限公司 Photographing preview method, electronic device and storage medium
CN114390212B (en) * 2020-10-22 2023-03-24 华为技术有限公司 Photographing preview method, electronic device and storage medium
CN112415002A (en) * 2020-11-10 2021-02-26 之江实验室 Multimode sensing device based on image sensor
CN112415002B (en) * 2020-11-10 2023-03-14 之江实验室 Multimode sensing device based on image sensor
CN112672060A (en) * 2020-12-29 2021-04-16 维沃移动通信有限公司 Shooting method and device and electronic equipment
CN112672060B (en) * 2020-12-29 2022-09-02 维沃移动通信有限公司 Shooting method and device and electronic equipment
CN113099123A (en) * 2021-04-07 2021-07-09 中煤科工集团重庆研究院有限公司 High dynamic range video image acquisition method
WO2022262259A1 (en) * 2021-06-15 2022-12-22 展讯通信(上海)有限公司 Image processing method and apparatus, and device, medium and chip

Similar Documents

Publication Publication Date Title
CN110392214A (en) Image processing method, device, storage medium and electronic equipment
CN102811313B (en) Camera head and image capture method
JP6388673B2 (en) Mobile terminal and imaging method thereof
US8687126B2 (en) Digital image signal processing method, medium for recording the method, and digital image signal processing apparatus
WO2016023406A1 (en) Shooting method for motion trace of object, mobile terminal and computer storage medium
CN110381263B (en) Image processing method, image processing device, storage medium and electronic equipment
RU2511499C2 (en) Imaging device and method of its control
JP2017509259A (en) Imaging method for portable terminal and portable terminal
CN106454149B (en) Image capturing method, device and terminal device
CN102957864A (en) Imaging device and control method thereof
CN109996009A (en) Image processing method, device, storage medium and electronic equipment
CN109993722A (en) Image processing method, device, storage medium and electronic equipment
CN104796600B (en) Image synthesizer and image combining method
WO2016008359A1 (en) Object movement track image synthesizing method, device and computer storage medium
CN104754212A (en) Electronic Apparatus And Method Of Capturing Moving Subject By Using The Same
CN110198418A (en) Image processing method, device, storage medium and electronic equipment
CN110430370A (en) Image processing method, device, storage medium and electronic equipment
CN110445986A (en) Image processing method, device, storage medium and electronic equipment
CN110198419A (en) Image processing method, device, storage medium and electronic equipment
CN103916606A (en) Digital photographing apparatus, and method of controlling the same
CN110581957B (en) Image processing method, image processing device, storage medium and electronic equipment
US20100033614A1 (en) Method of controlling digital image processing apparatus, medium for recording the method, and digital image processing apparatus operating according to the method
CN110012227B (en) Image processing method, image processing device, storage medium and electronic equipment
CN110278375A (en) Image processing method, device, storage medium and electronic equipment
CN115706850A (en) Method, apparatus, storage medium, and program product for image capturing

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191029

RJ01 Rejection of invention patent application after publication