CN107454328B - Image processing method, device, computer readable storage medium and computer equipment - Google Patents
Image processing method, device, computer readable storage medium and computer equipment Download PDFInfo
- Publication number
- CN107454328B CN107454328B CN201710737527.6A CN201710737527A CN107454328B CN 107454328 B CN107454328 B CN 107454328B CN 201710737527 A CN201710737527 A CN 201710737527A CN 107454328 B CN107454328 B CN 107454328B
- Authority
- CN
- China
- Prior art keywords
- image
- depth
- view information
- preview image
- region
- 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.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 24
- 238000012545 processing Methods 0.000 claims abstract description 130
- 238000000034 method Methods 0.000 claims abstract description 36
- 230000008859 change Effects 0.000 claims description 3
- 238000003384 imaging method Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 12
- 230000003287 optical effect Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 238000012937 correction Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 230000000873 masking effect Effects 0.000 description 2
- 230000006641 stabilisation Effects 0.000 description 2
- 238000011105 stabilization Methods 0.000 description 2
- 239000000872 buffer Substances 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 239000011800 void material Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The present invention relates to a kind of image processing method, device, computer readable storage medium and computer equipments.The above method includes: to obtain the first depth of view information in preview image after the first scanning obtains focus region, carry out virtualization processing to the preview image according to first depth of view information;In the second scanning acquisition focus region after focus point, the second depth of view information in the preview image is obtained, virtualization processing is carried out to the preview image according to second depth of view information.The above method blurs image according to substantially depth of view information when focusing is not completed.So that computer equipment can carry out virtualization processing to image according to substantially depth of view information in the time for waiting focusing to complete, the speed of image virtualization processing is improved.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of image processing method, device, computer-readable deposit
Storage media and computer equipment.
Background technique
With the development of intelligent mobile terminal, user is taken pictures also more and more using intelligent mobile terminal.User exists
After being taken pictures using intelligent mobile terminal, the portrait that mobile terminal can obtain shooting is blurred.By way of virtualization,
It may make that the depth of field shoals in image, protrude image subject.There are many modes for virtualization, comprising: increases focal length, increases subject and back
The distance of scape increases aperture, reduces camera lens at a distance from subject etc..
Summary of the invention
The embodiment of the present invention provides a kind of image processing method, device, computer readable storage medium and computer equipment,
Image virtualization can quickly be carried out to preview image.
A kind of image processing method, comprising:
After the first scanning obtains focus region, the first depth of view information in preview image is obtained, according to first depth of field
Information carries out virtualization processing to the preview image;
In the second scanning acquisition focus region after focus point, the second depth of view information in the preview image is obtained,
Virtualization processing is carried out to the preview image according to second depth of view information.
A kind of image processing apparatus, comprising:
First blurring module, for obtaining the first depth of view information in preview image after the first scanning obtains focus region,
Virtualization processing is carried out to the preview image according to first depth of view information;
Second blurring module obtains the preview graph after the focus point in the second scanning acquisition focus region
The second depth of view information as in, carries out virtualization processing to the preview image according to second depth of view information.
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 executes image processing method as described above
Method.
A kind of computer equipment, including memory and processor store computer-readable instruction in the memory, institute
When stating instruction by processor execution, so that the processor executes image processing method as described above.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is the schematic diagram of internal structure of mobile terminal 10 in one embodiment;
Fig. 2 is the flow chart of image processing method in one embodiment;
Fig. 3 is the line chart of lens location and fv value relationship in one embodiment;
Fig. 4 is the schematic diagram that depth of field value is sought in one embodiment;
Fig. 5 is the structural block diagram of image processing apparatus in one embodiment;
Fig. 6 is the structural block diagram of image processing apparatus in another embodiment;
Fig. 7 is the structural block diagram of image processing apparatus in one embodiment;
Fig. 8 is the structural block diagram of image processing apparatus in one embodiment;
Fig. 9 is the schematic diagram of image processing circuit in one embodiment.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
It is appreciated that term " first " used in the present invention, " 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 the first element from the other element.Citing comes
It says, without departing from the scope of the invention, the first blurring module can be known as the second blurring module, and similarly,
Second blurring module can be known as the first blurring module.First blurring module and the second blurring module both blurring module,
But it is not same blurring module.
By taking computer equipment is mobile terminal as an example.Fig. 1 is the internal structure signal of mobile terminal 10 in one embodiment
Figure.As shown in Figure 1, the mobile terminal 10 includes processor, the non-volatile memory medium, interior storage connected by system bus
Device, network interface, display screen and input unit.Wherein, the non-volatile memory medium of mobile terminal 10 is stored with operating system
And computer-readable instruction.To realize a kind of image processing method when the computer-readable instruction is executed by processor.The processing
Device supports the operation of entire mobile terminal 10 for providing calculating and control ability.Built-in storage in mobile terminal 10 is non-
The operation of computer-readable instruction in volatile storage medium provides environment.Network interface is used to carry out network with server logical
Letter.The display screen of mobile terminal 10 can be liquid crystal display or electric ink display screen etc., and input unit can be display
The touch layer covered on screen is also possible to key, trace ball or the Trackpad being arranged on 10 shell of mobile terminal, is also possible to outer
Keyboard, Trackpad or mouse for connecing etc..The mobile terminal 10 can be mobile phone, tablet computer or personal digital assistant or wearing
Formula equipment etc..It will be understood by those skilled in the art that structure shown in Fig. 1, only part relevant to application scheme
The block diagram of structure does not constitute the restriction for the mobile terminal 10 being applied thereon to application scheme, specific mobile terminal
10 may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
Fig. 2 is the flow chart of image processing method in one embodiment.As shown in Fig. 2, a kind of image processing method, including
Step 202 and step 204.
202, after the first scanning obtains focus region, the first depth of view information in preview image is obtained, according to first depth of field
Information carries out virtualization processing to preview image.
First scanning is phase focusing scanning, and phase focusing refers to reserves masking picture in computer equipment on photosensitive element
Element carries out phase-detection by above-mentioned masking pixel, obtains corresponding camera lens forward according to the phase difference that phase-detection obtains
The distance of propulsion completes focusing so that track in reaches focal position.As shown in figure 3, abscissa is in Fig. 3 line chart
Lens location, ordinate are the corresponding fv of lens location (Focus Value, focus value) value.Fv value be with image definition just
Relevant value, image is more clear, the corresponding fv value of image is bigger.ROI (Region is obtained in computer equipment operation photographing program
Of Interest, area-of-interest) behind region, can be determined by the fv value of above-mentioned ROI region preview screen whether focus.
When fv value reaches vertex, then ROI region is clearest in preview image, picture focusing.In actual use, due to hardware
The presence of precision equal error, there are errors for the focal position that phase focusing promotes camera to reach, i.e., are focused and scanned by phase,
The section where cam lens focus point position, i.e. focus region can be obtained.It is scanned as shown in figure 3, being focused by phase, it can
It obtains focus region [F, G].
After the first scanning obtains focus region, computer equipment can obtain depth of view information in preview image, i.e. the first scape
Deeply convince breath.When computer equipment be it is double take the photograph mobile terminal when, two respective sensors of camera point in mobile terminal can be passed through
Not Huo Qu two camera distance objectives distance.As shown in figure 4, the primary optical axis of two cameras is parallel in mobile terminal, L point
For the optical center for doing left camera, R point is the optical center of right camera.Line segment where PL point and PR point is respectively left and right camera
Image planes, the shortest distance of optical center to image planes are focal length f.If P is target point, P point is PL and PR in the imaging point of left and right image planes.
The distance of the left edge of PL point and PR point away from respective image planes is XL and XR, then parallax d=XR-XL or d=XL-XR.Wherein Z is mesh
The punctuate P point depth of field, T are the distance between left and right camera optical center.It can then be obtained according to Similar Principle of Triangle:
Then
I.e.
Or
By the above method, the depth of view information of each pixel in preview image, i.e. the first depth of view information can be successively obtained.
When computer equipment is singly to take the photograph mobile terminal, target can be obtained by structure light measurement at a distance from camera,
That is the first depth of view information, above structure light can be infrared light.
After getting the first depth of view information, virtualization processing (such as Gauss can be carried out to preview image to the first depth of view information
Fuzzy Processing).Virtualization processing to preview image can include: main body in preview image is obtained according to ROI region, it is raw by region
Regular way obtains the region where main body, to other regions carry out virtualization processing in addition to the region where main body in pre-set image.
204, it is obtained in focus region after focus point in the second scanning, obtains the second depth of view information in preview image, according to
Second depth of view information carries out virtualization processing to preview image.
Second scanning is contrast focusing scanning.It, can be by anti-after phasescan obtains the focus region where focus point
Difference focusing obtains the position of focus point in focus region.As shown in figure 3, passing through after phase focuses and obtains focus region [F, G]
Contrast focusing gradually pushes camera lens backward by G point, and camera lens of every promotion obtains the corresponding fv value of current lens position,
If computer equipment detects in the three fv values continuously acquired, the fv value that centre obtains is larger, and remaining two fv values are smaller, then
Stop contrast focusing.As shown in figure 3, when computer equipment pushes camera lens by G point → H point → I point → J point → K point, by G point
During J point, the corresponding fv value of lens location is gradually increased, and by J point to K point, the corresponding fv value of lens location reduces, i.e.,
The corresponding fv value of J point is greater than the corresponding fv value of I point, and the corresponding fv value of J point is greater than the corresponding fv value of K point, stops contrast focusing.
To three I point, J point and K point parabolas of fit, above-mentioned parabolical vertex is the fv value maximum point of ROI region, and camera lens is pushed away
Focus point can be obtained after moving the lens location of above-mentioned parabolical vertex correspondence, computer equipment focusing is completed.
After the completion of focusing, depth of view information in preview image, i.e. the second depth of view information can be obtained again.According to above-mentioned second
Depth of view information carries out virtualization processing to preview image.Wherein, the step of obtaining the second depth of view information and the first depth of view information of acquisition
The step of it is identical;According to the second depth of view information to preview image carry out virtualization processing the step of with according to the first depth of view information to pre-
It is identical that image of looking at carries out the step of virtualization processing;Part in step 202 specifically is referred to, details are not described herein.
In traditional technology, when carrying out virtualization processing to image, is first focused by computer equipment and complete to obtain focus point, then obtained
Depth of view information in image is taken, virtualization processing is carried out to image according to depth of view information.And during the focusing process, due to AE (Auto
Exposure, automatic exposure), that the factors such as user's hand shaking will lead to focusing time is longer;After the completion of focusing, scape in image is obtained
Deeply convince that breath is also required to the long period, slower so as to cause the virtualization processing to image, period of reservation of number is longer.
Image processing method in the embodiment of the present invention obtains present frame picture pair after phase focuses and obtains focus region
The first depth of view information answered, at this time picture focusing are not yet completed, and the first depth of view information of acquisition is substantially depth of view information, according to big
Depth of view information is caused to carry out virtualization processing to image.After contrast focuses and obtains focus point, present frame picture corresponding second is obtained
Depth of view information, i.e., accurate depth of view information carry out virtualization processing to image further according to accurate depth of view information.When focusing does not complete,
Image is blurred according to substantially depth of view information.So that computer equipment can be according to substantially scape in the time for waiting focusing to complete
Deeply convince that breath carries out virtualization processing to image, improves the speed of image virtualization processing.
In one embodiment, after carrying out virtualization processing to preview image according to the first depth of view information in step 202, side
Method further include: image output display after being handled according to the first depth of view information virtualization.
Image processing method in the embodiment of the present invention will after according to substantially depth of view information carries out virtualization processing to image
Image exports displaying on a computing device after virtualization processing.Compared to obtaining depth of view information after the completion of focusing in traditional technology
The mode of virtualization processing is carried out to image, the above method substantially blurs image, will substantially blur when focusing does not complete
The image of processing, which exports, to be shown, the substantially virtualization effect of image can be presented to user, reduce the waiting time of user
In one embodiment, after carrying out virtualization processing to preview image according to the second depth of view information in step 204, side
Method further include: image output is shown after being handled according to the second depth of view information virtualization.
In one embodiment, in step 202 first scanning obtain focus region after, method further include: identification
Image feature information in preview image obtains pre-set image corresponding with image feature information and exports display.
Image feature information refers to the information that can be identified for that target subject in image, can be color, shape, the texture of image
Deng.By image feature information, target subject in image may recognize that.For example, when in image there are when face, according to face wheel
Wide, face complexion can recognize face;When there are when flower, can recognize flower according to flower shape, flower color in image.Knowing
Pre-set image corresponding with above-mentioned target subject further Chu not can be searched in database, that is, searched in image after target subject
Pre-set image corresponding with image feature information.Above-mentioned lookup pre-set image corresponding with image feature information includes: that identification is pre-
Look at characteristic information in image, search be more than with features described above information matches degree designated value pre-set image;Or identification preview image
Middle characteristic information searches pre-set image associated with features described above information.For example, there are face A in pre-set image, obtaining
In pre-set image after the characteristic information of face A, can search with the characteristic information matching degree of face A is more than specified picture, that is, is looked into
The pre-set image comprising face A is looked for, then is shown being exported comprising the pre-set image of face A.The face A in obtaining pre-set image
After characteristic information, the default figure comprising face B associated with the characteristic information of face A may further look for according to preset corresponding table
It as (such as face B is the household of face A), then will include that the pre-set image of face B exports displaying.
Image processing method in the embodiment of the present invention, after the first scanning obtains focus region, computer equipment is selected
ROI region or user's selection ROI region it has been determined that being searched further according to image feature information in preview image corresponding default
Image, and pre-set image is exported and is shown.Pre-set image is shown during the focusing process, does not influence the selected focusing ROI region of user,
Reduce the time that user waits focusing.
In one embodiment, the above method further include: preview image is divided by foreground zone according to the first depth of view information
Domain and background region;Gaussian Blur processing is carried out to foreground area and/or background region.
It, can be to above-mentioned first depth of view information foregrounding region with after after getting the first depth of view information of preview image
Scene area.Wherein, foregrounding region and the step of background region can include: by the depth of field in the first depth of view information of preview image
Value is less than the conduct foreground area in first threshold region, and depth of field value in the first depth of view information of preview image is greater than second threshold
Region as background region, above-mentioned first threshold and second threshold can be preset value, can also be to be obtained according to the first depth of view information
Take value (for example, the maximal field depth value is a in the first depth of view information, minimum depth of field value is b, will (a+b)/3 as first threshold,
It regard 2 (a+b)/3 as second threshold).Or the first depth of view information of preview image descending (or having small to big) is divided into
The corresponding region division of the depth of field value of predetermined level is foreground area or background region by the grade of preset quantity;For example, by
One depth of view information is descending to be divided into 1 to 7 grade, using the corresponding region of 1 grade to 3 grades depth of field value as background region, extremely by 5 grades
The corresponding region of 7 grades of depth of field value is as foreground area.It, can be to preceding in getting preview image after foreground area and rear neck region
Scene area carries out Gaussian Blur processing, or carries out Gaussian Blur processing to background region, or to foreground area and background region into
The processing of row Gaussian Blur.
Image is divided foreground area and background region according to depth of view information by image processing method in the embodiment of the present invention,
Gaussian Blur processing is carried out to image, image subject can be preferably protruded, so that image subject is more clear.
In one embodiment, the above method further include: preview image is divided by foreground zone according to the second depth of view information
Domain and background region;Gaussian Blur processing is carried out to foreground area and/or background region.
The step of dividing display foreground region and background region according to the second depth of view information is drawn with according to the first depth of view information
The step of partial image foreground area and background region, is identical, and details are not described herein.Before dividing image according to the second depth of view information
After scene area and background region, Gauss can be carried out to display foreground region, background region or display foreground region and background region
Fuzzy Processing.
In one embodiment, step 202 is before carrying out virtualization processing to preview image according to the first depth of view information, side
Method further include: recognition of face is carried out to preview image, obtains the depth of field value of human face region;It is determined according to the depth of field value of human face region
Blur the threshold value of processing.
Recognition of face can be carried out to preview image, when detecting in above-mentioned preview image there are when human face region, can be obtained
The depth of field value of human face region.Obtain the method for the depth of field value of human face region and the method phase that the first depth of field value is obtained in step 202
Together, details are not described herein.After getting the depth of field value of human face region, it can determine that virtualization is handled according to the depth of field value of human face region
Threshold value, virtualization processing is carried out to preview image.Wherein, determine that the threshold value of virtualization processing can wrap according to the depth of field value of human face region
It includes: if the maximal field depth value and minimum depth of field value in the depth of field value in individual human face region are obtained, with most there are individual human face in image
Big depth of field value is threshold value, and the region for being greater than human face region the maximal field depth value to depth of field value in preview image carries out virtualization processing;With
Minimum depth of field value is threshold value, and the region for being less than face minimum depth of field value to depth of field value in preview image carries out virtualization processing;With most
Big depth of field value and minimum depth of field value are threshold value, are greater than the region of human face region the maximal field depth value and pre- to depth of field value in preview image
Looking at the region that depth of field value is less than human face region minimum depth of field value in image carries out virtualization processing.If there are multiple faces in image,
The depth of field value of multiple human face regions is obtained, the maximal field depth value and minimum depth of field value in above-mentioned multiple human face regions are obtained, according to more
The maximal field depth value is that threshold value carries out virtualization processing to image or according to depth of field value minimum in multiple human face regions in a human face region
Virtualization processing is carried out to image for threshold value or it is threshold value to figure according to the maximal field depth value in multiple human face regions and minimum depth of field value
As carrying out virtualization processing.
Image processing method in the embodiment of the present invention when detecting face in preview image, obtains the depth of field value of face,
Virtualization processing is carried out to image according to the depth of field value of face.When recognizing face in the picture, using face as target subject,
Foreground area or background region to target subject carry out virtualization processing, or to the foreground area of target subject and background region into
Row virtualization processing, can make target subject more prominent, image hierarchy becomes apparent from.
In one embodiment, step 204 is before carrying out virtualization processing to preview image according to the second depth of view information, side
Method further include: recognition of face is carried out to preview image, obtains the depth of field value of human face region;It is determined according to the depth of field value of human face region
Blur the threshold value of processing.
The step of carrying out recognition of face to preview image, obtain the depth of field value of human face region is corresponding with upper one embodiment
Method and step is identical.After getting the depth of field value of human face region, the threshold of virtualization processing is determined according to the depth of field value of human face region
The method of value is identical as corresponding method step in upper one embodiment, and details are not described herein.
Fig. 5 is the structural block diagram of image processing apparatus in one embodiment, as shown in figure 5, a kind of image processing apparatus, packet
Include the first blurring module 502 and the second blurring module 504.Wherein:
First blurring module 502, for obtaining first depth of field letter in preview image after the first scanning obtains focus region
Breath, carries out virtualization processing to preview image according to the first depth of view information;
Second blurring module 504 obtains in preview image for obtaining in focus region after focus point in the second scanning
Two depth of view information carry out virtualization processing to preview image according to the second depth of view information.
In one embodiment, the first blurring module 502 is also used to be divided into preview image according to the first depth of view information
Foreground area and background region;Gaussian Blur processing is carried out to foreground area and/or background region.
Fig. 6 is the structural block diagram of image processing apparatus in another embodiment, as shown in fig. 6, a kind of image processing apparatus,
Including the first blurring module 602, the second blurring module 604 and display module 606.Wherein, the first blurring module 602, second is empty
It is identical as functions of modules corresponding in Fig. 5 to change module 604.
Display module 606 will be according to for after carrying out virtualization processing to preview image according to the first depth of view information
Image output display after one depth of view information virtualization processing.
Fig. 7 is the structural block diagram of image processing apparatus in one embodiment, as shown in fig. 7, a kind of image processing apparatus, packet
Include the first blurring module 702, the second blurring module 704 and identification module 706.Wherein, the first blurring module 702, second blurs
Module 704 is identical as functions of modules corresponding in Fig. 5.
Identification module 706, for identifying characteristics of image letter in preview image after the first scanning obtains focus region
Breath obtains pre-set image corresponding with image feature information and exports display.
Fig. 8 is the structural block diagram of image processing apparatus in one embodiment, as shown in figure 8, a kind of image processing apparatus, packet
Include the first blurring module 802, the second blurring module 804 and threshold module 806.Wherein, the first blurring module 802, second blurs
Module 804 is identical as functions of modules corresponding in Fig. 5.
Threshold module 806, for before carrying out virtualization processing to preview image according to the first depth of view information, to preview graph
As carrying out recognition of face, the depth of field value of human face region is obtained;The threshold value of virtualization processing is determined according to the depth of field value of human face region.
The division of modules is only used for for example, in other embodiments, can will scheme in above-mentioned image processing apparatus
As processing unit is divided into different modules as required, to complete all or part of function of above-mentioned image processing apparatus.
The embodiment of the invention also provides a kind of computer readable storage mediums.One or more is executable comprising computer
The non-volatile computer readable storage medium storing program for executing of instruction, when computer executable instructions are executed by one or more processors,
So that processor executes following steps:
(1) after the first scanning obtains focus region, the first depth of view information in preview image is obtained, is believed according to first depth of field
Breath carries out virtualization processing to preview image;
(2) it is obtained in focus region after focus point in the second scanning, obtains the second depth of view information in preview image, according to the
Two depth of view information carry out virtualization processing to preview image.
In one embodiment, after carrying out virtualization processing to preview image according to the first depth of view information, method further include:
Image output display after being handled according to the first depth of view information virtualization.
In one embodiment, first scanning obtain focus region after, method further include: identification preview image in
Image feature information obtains pre-set image corresponding with image feature information and exports display.
In one embodiment, carrying out virtualization processing to preview image according to the first depth of view information includes: according to the first scape
Deeply convince that preview image is divided into foreground area and background region by breath;Gaussian Blur is carried out to foreground area and/or background region
Processing.
In one embodiment, before carrying out virtualization processing to preview image according to the first depth of view information, method is also wrapped
It includes: recognition of face being carried out to preview image, obtains the depth of field value of human face region;It is determined at virtualization according to the depth of field value of human face region
The threshold value of reason.
The embodiment of the present invention also provides a kind of computer equipment.It include image processing circuit, figure in above-mentioned computer equipment
It is realized as processing circuit can use hardware and or software component, it may include define ISP (Image Signal
Processing, image signal process) pipeline various processing units.Fig. 9 is that image processing circuit shows in one embodiment
It is intended to.As shown in figure 9, for purposes of illustration only, only showing the various aspects of image processing techniques relevant to the embodiment of the present invention.
As shown in figure 9, image processing circuit includes ISP processor 940 and control logic device 950.Imaging device 910 captures
Image data handled first by ISP processor 940, ISP processor 940 to image data analyzed with capture can be used for really
The image statistics of fixed and/or imaging device 910 one or more control parameters.Imaging device 910 may include having one
The camera of a or multiple lens 912 and imaging sensor 914.Imaging sensor 914 may include colour filter array (such as
Bayer filter), imaging sensor 914 can obtain the luminous intensity captured with each imaging pixel of imaging sensor 914 and wavelength
Information, and the one group of raw image data that can be handled by ISP processor 940 is provided.Sensor 920 (such as gyroscope) can be based on biography
The parameter (such as stabilization parameter) of the image procossing of acquisition is supplied to ISP processor 940 by 920 interface type of sensor.Sensor 920
Interface can use SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imager framework) interface,
The combination of other serial or parallel camera interfaces or above-mentioned interface.
In addition, raw image data can also be sent to sensor 920 by imaging sensor 914, sensor 920 can be based on biography
920 interface type of sensor is supplied to raw image data that ISP processor 940 is handled or sensor 920 is by original graph
As data storage is into video memory 930.
ISP processor 940 handles 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 processor 940 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 processor 940 can also receive pixel data from video memory 930.For example, 920 interface of sensor will be original
Image data is sent to video memory 930, and the raw image data in video memory 930 is available to ISP processor 940
It is for processing.Video memory 930 can be independent special in a part, storage equipment or electronic equipment of memory device
It with memory, and may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving from 914 interface of imaging sensor or from 920 interface of sensor or from video memory 930
When raw image data, ISP processor 940 can carry out one or more image processing operations, such as time-domain filtering.ISP processor
940 treated that image data can be transmitted to video memory 930, to carry out other processing before shown.At ISP
Manage device 940 from video memory 930 receive processing data, and to the processing data progress original domain in and RGB and YCbCr
Image real time transfer in color space.Image data that treated may be output to display 980, for user viewing and/or
It is further processed by graphics engine or GPU (Graphics Processing Unit, graphics processor).In addition, ISP processor
940 output also can be transmitted to video memory 930, and display 980 can read image data from video memory 930.?
In one embodiment, video memory 930 can be configured to realize one or more frame buffers.In addition, ISP processor 940
Output can be transmitted to encoder/decoder 970, so as to encoding/decoding image data.The image data of coding can be saved,
And it is decompressed before being shown in 980 equipment of display.
Treated that image data can be transmitted to blurring module 960 for ISP processor 940, so as to before shown to figure
As carrying out virtualization processing.Blurring module 960 may include obtaining the depth of view information of image to image data virtualization processing, according to image
Depth of view information obtain corresponding virtualization parameter virtualization processing etc. carried out to image again.Blurring module 960 carries out image data
After virtualization processing, can will virtualization treated that image data is sent to encoder/decoder 970, so as to encoding/decoding image number
According to.The image data of coding can be saved, and show in 980 equipment of display before decompress.It is understood that empty
Changing module 960, treated that image data can directly issue display 980 and be shown without encoder/decoder 970
Show.Treated image data can also the first pass through processing of encoder/decoder 970 of ISP processor 940, then using void
Change module 960 to be handled.Wherein, blurring module 960 or encoder/decoder 970 can be CPU (Central in mobile terminal
Processing Unit, central processing unit) or GPU etc..
The statistical data that ISP processor 940 determines, which can be transmitted, gives control logic device Unit 950.For example, statistical data can wrap
Include the image sensings such as automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 912 shadow correction of lens
914 statistical information of device.Control logic device 950 may include the processor and/or micro-control for executing one or more routines (such as firmware)
Device processed, one or more routines can statistical data based on the received, determine the control parameter and ISP processing of imaging device 910
The control parameter of device 940.For example, the control parameter of imaging device 910 may include 920 control parameter of sensor (such as gain, expose
The time of integration, stabilization parameter of photocontrol etc.), camera flash control parameter, 912 control parameter of lens (such as focus or become
Focal length) or these parameters combination.ISP control parameter may include for automatic white balance and color adjustment (for example,
RGB processing during) 912 shadow correction parameter of gain level and color correction matrix and lens.
The following are realize image processing method with image processing techniques in Fig. 9:
(1) after the first scanning obtains focus region, the first depth of view information in preview image is obtained, is believed according to first depth of field
Breath carries out virtualization processing to preview image;
(2) it is obtained in focus region after focus point in the second scanning, obtains the second depth of view information in preview image, according to the
Two depth of view information carry out virtualization processing to preview image.
In one embodiment, after carrying out virtualization processing to preview image according to the first depth of view information, method further include:
Image output display after being handled according to the first depth of view information virtualization.
In one embodiment, first scanning obtain focus region after, method further include: identification preview image in
Image feature information obtains pre-set image corresponding with image feature information and exports display.
In one embodiment, carrying out virtualization processing to preview image according to the first depth of view information includes: according to the first scape
Deeply convince that preview image is divided into foreground area and background region by breath;Gaussian Blur is carried out to foreground area and/or background region
Processing.
In one embodiment, before carrying out virtualization processing to preview image according to the first depth of view information, method is also wrapped
It includes: recognition of face being carried out to preview image, obtains the depth of field value of human face region;It is determined at virtualization according to the depth of field value of human face region
The threshold value of reason.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read
In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage is situated between
Matter can be magnetic disk, CD, read-only memory (Read-Only Memory, ROM) etc..
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously
Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention
Protect range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.
Claims (12)
1. a kind of image processing method characterized by comprising
After phase focuses scanning acquisition focus region, the first depth of view information in preview image is obtained, according to first depth of field
Information carries out virtualization processing to the preview image;
Image output display after being handled according to the first depth of view information virtualization;
In the contrast focusing scanning acquisition focus region after focus point, the second depth of view information in the preview image is obtained,
Virtualization processing is carried out to the preview image according to second depth of view information.
2. image processing method according to claim 1, which is characterized in that obtain focus in described scan in opposite focusing
After region, the method also includes:
It identifies image feature information in the preview image, obtain pre-set image corresponding with described image characteristic information and exports
Display.
3. image processing method according to claim 2, which is characterized in that the acquisition and described image characteristic information pair
The pre-set image answered simultaneously exports display, comprising:
It identifies the characteristic information in the preview image, searches the default figure with the characteristic information matching degree more than designated value
Picture, and the pre-set image is exported and is shown;Or
It identifies characteristic information in the preview image, searches pre-set image associated with the characteristic information, and will be described pre-
If image output display.
4. image processing method according to claim 1, which is characterized in that it is described according to first depth of view information to institute
State preview image carry out virtualization processing include:
The preview image is divided into foreground area and background region according to first depth of view information;
Gaussian Blur processing is carried out to the foreground area and/or background region.
5. image processing method according to claim 1, which is characterized in that described according to first depth of view information pair
Before the preview image carries out virtualization processing, the method also includes:
Recognition of face is carried out to the preview image, obtains the depth of field value of human face region;
The threshold value of virtualization processing is determined according to the depth of field value of the human face region.
6. a kind of image processing apparatus characterized by comprising
First blurring module, for obtaining the first depth of view information in preview image after opposite focusing scans and obtains focus region,
Virtualization processing is carried out to the preview image according to first depth of view information;
Second blurring module obtains the preview graph after the focus point in the contrast focusing scanning acquisition focus region
The second depth of view information as in, carries out virtualization processing to the preview image according to second depth of view information.
7. image processing apparatus according to claim 6, which is characterized in that described device further include:
Identification module, for after opposite focusing scans and obtains focus region, identifying image in the preview image described
Characteristic information obtains pre-set image corresponding with described image characteristic information and exports display.
8. image processing apparatus according to claim 7, which is characterized in that
The identification module is also used to identify the characteristic information in the preview image, searches super with the characteristic information matching degree
The pre-set image of designated value is crossed, and the pre-set image is exported and is shown;Or
It identifies characteristic information in the preview image, searches pre-set image associated with the characteristic information, and will be described pre-
If image output display.
9. image processing apparatus according to claim 6, it is characterised in that:
First blurring module be also used to according to first depth of view information by the preview image be divided into foreground area and
Background region;Gaussian Blur processing is carried out to the foreground area and/or background region.
10. image processing apparatus according to claim 6, which is characterized in that described device further include:
Threshold module, for it is described virtualization processing is carried out to the preview image according to first depth of view information before, it is right
The preview image carries out recognition of face, obtains the depth of field value of human face region;It is determined according to the depth of field value of the human face region empty
Change the threshold value of processing.
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 executes such as any one of claims 1 to 5
The image processing method.
12. a kind of computer equipment, including memory and processor, computer-readable instruction is stored in the memory, institute
When stating instruction by processor execution, so that the processor executes at the image as described in any one of claims 1 to 5
Reason method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710737527.6A CN107454328B (en) | 2017-08-24 | 2017-08-24 | Image processing method, device, computer readable storage medium and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710737527.6A CN107454328B (en) | 2017-08-24 | 2017-08-24 | Image processing method, device, computer readable storage medium and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107454328A CN107454328A (en) | 2017-12-08 |
CN107454328B true CN107454328B (en) | 2019-08-23 |
Family
ID=60493076
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710737527.6A Active CN107454328B (en) | 2017-08-24 | 2017-08-24 | Image processing method, device, computer readable storage medium and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107454328B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107920209A (en) * | 2017-12-27 | 2018-04-17 | 国网通用航空有限公司 | A kind of high speed camera autofocus system, method and processor, computer equipment |
EP3873083A4 (en) * | 2018-11-02 | 2021-12-01 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Depth image processing method, depth image processing apparatus and electronic apparatus |
CN110677621B (en) * | 2019-09-03 | 2021-04-13 | RealMe重庆移动通信有限公司 | Camera calling method and device, storage medium and electronic equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101587586A (en) * | 2008-05-20 | 2009-11-25 | 株式会社理光 | Device and method for processing images |
JP2013027023A (en) * | 2011-07-26 | 2013-02-04 | Canon Inc | Image processing device and image processing method, and program |
CN104333700A (en) * | 2014-11-28 | 2015-02-04 | 广东欧珀移动通信有限公司 | Image blurring method and image blurring device |
CN105120154A (en) * | 2015-08-20 | 2015-12-02 | 深圳市金立通信设备有限公司 | Image processing method and terminal |
CN106060423A (en) * | 2016-06-02 | 2016-10-26 | 广东欧珀移动通信有限公司 | Bokeh photograph generation method and device, and mobile terminal |
CN106357980A (en) * | 2016-10-19 | 2017-01-25 | 广东欧珀移动通信有限公司 | Image virtualization processing method and device as well as mobile terminal |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006140594A (en) * | 2004-11-10 | 2006-06-01 | Pentax Corp | Digital camera |
-
2017
- 2017-08-24 CN CN201710737527.6A patent/CN107454328B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101587586A (en) * | 2008-05-20 | 2009-11-25 | 株式会社理光 | Device and method for processing images |
JP2013027023A (en) * | 2011-07-26 | 2013-02-04 | Canon Inc | Image processing device and image processing method, and program |
CN104333700A (en) * | 2014-11-28 | 2015-02-04 | 广东欧珀移动通信有限公司 | Image blurring method and image blurring device |
CN105120154A (en) * | 2015-08-20 | 2015-12-02 | 深圳市金立通信设备有限公司 | Image processing method and terminal |
CN106060423A (en) * | 2016-06-02 | 2016-10-26 | 广东欧珀移动通信有限公司 | Bokeh photograph generation method and device, and mobile terminal |
CN106357980A (en) * | 2016-10-19 | 2017-01-25 | 广东欧珀移动通信有限公司 | Image virtualization processing method and device as well as mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN107454328A (en) | 2017-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102278776B1 (en) | Image processing method, apparatus, and apparatus | |
JP7015374B2 (en) | Methods for image processing using dual cameras and mobile terminals | |
KR102279436B1 (en) | Image processing methods, devices and devices | |
CN107977940B (en) | Background blurring processing method, device and equipment | |
KR102306304B1 (en) | Dual camera-based imaging method and device and storage medium | |
KR102306283B1 (en) | Image processing method and device | |
CN111353948B (en) | Image noise reduction method, device and equipment | |
CN107835372A (en) | Imaging method, device, mobile terminal and storage medium based on dual camera | |
CN107481186B (en) | Image processing method, image processing device, computer-readable storage medium and computer equipment | |
CN108259770B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN107704798B (en) | Image blurring method and device, computer readable storage medium and computer device | |
CN107493432A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN107563979A (en) | Image processing method, device, computer-readable recording medium and computer equipment | |
CN107454328B (en) | Image processing method, device, computer readable storage medium and computer equipment | |
CN108024057A (en) | Background blurring processing method, device and equipment | |
CN107395991A (en) | Image combining method, device, computer-readable recording medium and computer equipment | |
CN107454317B (en) | Image processing method, image processing device, computer-readable storage medium and computer equipment | |
CN113259594A (en) | Image processing method and device, computer readable storage medium and terminal | |
CN107563329A (en) | Image processing method, device, computer-readable recording medium and mobile terminal | |
CN108401109B (en) | Image acquisition method and device, storage medium and electronic equipment | |
CN110930440B (en) | Image alignment method, device, storage medium and electronic equipment | |
CN110276730B (en) | Image processing method and device and electronic equipment | |
CN107295261A (en) | Image defogging processing method, device, storage medium and mobile terminal | |
CN107317970B (en) | Image processing method, device, computer readable storage medium and computer equipment | |
CN107481198A (en) | Image processing method, device, computer-readable recording 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 OPPO Mobile Communications Co., Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |