CN109151329A - Photographic method, device, terminal and computer readable storage medium - Google Patents
Photographic method, device, terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN109151329A CN109151329A CN201811405822.2A CN201811405822A CN109151329A CN 109151329 A CN109151329 A CN 109151329A CN 201811405822 A CN201811405822 A CN 201811405822A CN 109151329 A CN109151329 A CN 109151329A
- Authority
- CN
- China
- Prior art keywords
- pixel
- virtualization
- frame image
- focusing position
- blurred
- 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
Links
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/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
-
- 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
Abstract
The application belongs to field of photographing technology, more particularly to a kind of photographic method, device, terminal and computer readable storage medium, wherein, the described method includes: obtaining the first focusing position and virtualization value for frame image of taking pictures, and obtain the second focusing position for being worth corresponding virtualization frame image with first focusing position and the virtualization;When receiving photographing instruction, frame image of taking pictures corresponding with first focusing position, and acquisition virtualization frame image corresponding with second focusing position are acquired;Frame image is taken pictures and the virtualization frame image synthesizes to described, obtains virtualization image corresponding with the virtualization value;It realizes and frame image of taking pictures is blurred using the virtualization frame image of camera shooting, and the virtualization image does not need not needing the virtualization effect for combining the depth information to realize image using virtualization algorithm more using the depth information of each target object in depth transducer acquisition photographed scene.
Description
Technical field
The application belongs to field of photographing technology more particularly to a kind of photographic method, device, terminal and computer-readable storage
Medium.
Background technique
Image virtualization refers to allows focus in subject element in one image, and the bat of fuzzy not a theme element
Take the photograph means.At present, it usually needs the photo with virtualization effect can be just shot using the slr camera for having large aperture, for
The intelligent terminals such as mobile phone are limited by volume, cost and use environment, and the camera lens of collocation substantially belongs to the type of small aperture,
The photo with virtualization effect can not be shot by camera lens.Thus, virtualization image is being carried out using intelligent terminals such as mobile phones
When shooting, the depth information using each target object in depth transducer acquisition photographed scene is needed, further according to depth information
Realize the virtualization effect of image.
However, resolution ratio of the resolution ratio that can be provided due to depth transducer often than the photo of shooting is low, and depth
When sensor sampling depth information be easy influenced by strong reflection object so that using depth transducer acquisition depth information into
When row image blurs, it is unable to get the virtualization image of better quality.
Summary of the invention
The embodiment of the present application provides a kind of photographic method, device, terminal and computer readable storage medium, can solve nothing
Method obtains the technical issues of virtualization image of better quality.
The embodiment of the present application first aspect provides a kind of photographic method, comprising:
Take pictures the first focusing position and virtualization value of frame image are obtained, and is obtained and first focusing position and described
Virtualization is worth the second focusing position of corresponding virtualization frame image;
When receiving photographing instruction, acquire corresponding with first focusing position frame image of taking pictures, and acquisition and
The corresponding virtualization frame image of second focusing position;
Frame image is taken pictures and the virtualization frame image synthesizes to described, obtains virtualization figure corresponding with the virtualization value
Picture.
The embodiment of the present application second aspect provides a kind of camera arrangement, comprising:
Acquiring unit, for obtaining the first focusing position and virtualization value of frame image of taking pictures, and acquisition and described first
Focusing position and the virtualization are worth the second focusing position of corresponding virtualization frame image;
Acquisition unit, for acquiring frame figure of taking pictures corresponding with first focusing position when receiving photographing instruction
Picture, and acquisition virtualization frame image corresponding with second focusing position;
Unit is blurred, for taking pictures frame image and the virtualization frame image synthesizes to described, is obtained and the virtualization
It is worth corresponding virtualization image.
The embodiment of the present application third aspect provides a kind of terminal, including camera, memory, processor and is stored in
In reservoir and the computer program that can run on a processor, processor realize the step of the above method when executing computer program
Suddenly.
The embodiment of the present application fourth aspect provides a kind of computer readable storage medium, computer-readable recording medium storage
The step of having computer program, the above method is realized when computer program is executed by processor.
In the embodiment of the present application, terminal passes through the first focusing position and virtualization value for obtaining frame image of taking pictures, and obtains
It is worth the second focusing position of corresponding virtualization frame image with first focusing position and the virtualization, and is receiving finger of taking pictures
When enabling, frame image of taking pictures corresponding with first focusing position is acquired, and acquire corresponding with second focusing position
Blur frame image;Then frame image is taken pictures and the virtualization frame image synthesizes to described, obtain corresponding with the virtualization value
Virtualization image;It realizes and frame image of taking pictures is blurred using the virtualization frame image of camera shooting, and the virtualization figure
As not needing not need more to calculate using virtualization using the depth information of each target object in depth transducer acquisition photographed scene
Method combines the virtualization effect of depth information realization image;Meanwhile it will not be by the resolution ratio and strong reflection of depth transducer
The influence of object realizes preferably image virtualization effect.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached
Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore is not construed as pair
The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 is a kind of first implementation flow schematic diagram of photographic method provided by the embodiments of the present application;
Fig. 2 is preview interface schematic diagram provided by the embodiments of the present application of taking pictures;
Fig. 3 is a kind of specific implementation flow schematic diagram of the step 103 of photographic method provided by the embodiments of the present application;
Fig. 4 is a kind of the first specific implementation flow schematic diagram of the step 303 of photographic method provided by the embodiments of the present application;
Fig. 5 is a kind of the second specific implementation flow schematic diagram of the step 303 of photographic method provided by the embodiments of the present application;
Fig. 6 is a kind of the second implementation process schematic diagram of photographic method provided by the embodiments of the present application;
Fig. 7 be the first focusing position, the second focusing position and third focusing position three provided by the embodiments of the present application it
Between positional diagram;
Fig. 8 is a kind of third implementation process schematic diagram of photographic method provided by the embodiments of the present application;
Fig. 9 be the first focusing position, the 4th focusing position and the 5th focusing position three provided by the embodiments of the present application it
Between positional diagram;
Figure 10 is a kind of the 4th implementation process schematic diagram of photographic method provided by the embodiments of the present application;
Figure 11 is the first focusing position provided by the embodiments of the present application, the 4th focusing position, the 5th focusing position, the 6th pair
Positional diagram between burnt position and the 7th focusing position;
Figure 12 is the structural schematic diagram of camera arrangement provided by the embodiments of the present application;
Figure 13 is the structural schematic diagram of terminal provided by the embodiments of the present application.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and
It is not used in restriction the application.Meanwhile in the description of the present application, term " first ", " second " etc. are only used for distinguishing description, without
It can be interpreted as indication or suggestion relative importance.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " instruction is described special
Sign, entirety, step, operation, the presence of element and/or component, but be not precluded one or more of the other feature, entirety, step,
Operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this present specification merely for the sake of description specific embodiment
And be not intended to limit the application.As present specification and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in present specification and the appended claims is
Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
In order to illustrate technical solution described herein, the following is a description of specific embodiments.
When the intelligent terminals such as current mobile phone carry out the shooting of virtualization image, usually to be acquired and be shot by depth transducer
The depth information of each target object in scene carries out the image that shooting obtains using virtualization algorithm further according to the depth information
Virtualization processing obtains virtualization image.
However, resolution ratio of the resolution ratio that can be provided due to depth transducer often than the photo of shooting is low, and depth
When sensor sampling depth information be easy influenced by strong reflection object so that using depth transducer acquisition depth information into
When row image blurs, it is unable to get the virtualization image of better quality.
In the embodiment of the present application, terminal passes through the first focusing position and virtualization value for obtaining frame image of taking pictures, and obtains
It is worth the second focusing position of corresponding virtualization frame image with first focusing position and the virtualization, and is receiving finger of taking pictures
When enabling, frame image of taking pictures corresponding with first focusing position is acquired, and acquire corresponding with second focusing position
Blur frame image;Then frame image is taken pictures and the virtualization frame image synthesizes to described, obtain corresponding with the virtualization value
Virtualization image;It realizes and frame image of taking pictures is blurred using the virtualization frame image of camera shooting, obtain and the void
Change is worth corresponding virtualization image, and the virtualization image does not need to utilize each target pair in depth transducer acquisition photographed scene
The depth information of elephant does not need the virtualization effect for combining the depth information to realize image using virtualization algorithm more;Meanwhile it will not
It is influenced by the resolution ratio and strong reflection object of depth transducer, realizes preferably image virtualization effect.
A kind of implementation process schematic diagram of photographic method provided by the embodiments of the present application as shown in figure 1, this method application
It in terminal, can be executed by the camera arrangement configured in terminal, be applicable to obtain the situation of the virtualization image of better quality,
Including step 101 to step 103.
Wherein, the terminal includes the terminal device that smart phone, tablet computer, learning machine etc. are configured with camera arrangement.
Application of taking pictures can be installed on the terminal device.
In step 101, the first focusing position and virtualization value of frame image of taking pictures are obtained, and is obtained and first focusing
Position and the virtualization are worth the second focusing position of corresponding virtualization frame image.
In the embodiment of the present application, first focusing position is to need to realize the position clearly shot, that is, is finally obtained
It blurs in image, clearly image should be presented in the object of the focusing position, and fuzzy figure should be presented in the object of other positions
Picture.
Obtaining for first focusing position can be selected by the auto-focusing algorithm of camera arrangement, can also be by user
It is selected in preview interface of taking pictures.The virtualization value can be configured according to actual needs by user.For example, can set
It is bigger to be set to virtualization value, virtualization degree is higher.
For example, as shown in Fig. 2, user can click first man face 22 in preview interface 21 of taking pictures, so that first pair
Burnt position is located on the first face 22.
Optionally, the acquisition is worth corresponding second pair for blurring frame image with first focusing position and the virtualization
Burnt position may include: the corresponding relationship searched between the first focusing position, virtualization value and the second focusing position three, obtain
It is worth the second focusing position of corresponding virtualization frame image with first focusing position and the virtualization.
For example, searching corresponding between the first focusing position as shown in Table 1, virtualization value and the second focusing position three
Determining the second focusing position for being worth corresponding virtualization frame image with first focusing position and the virtualization of relation table.It needs
Bright, first focusing position belongs to different positions from second focusing position.Numerical value in table one can be root
The numerical value being calculated according to functional relation, or the numerical value to be obtained according to practical experience.
Table one:
First focusing position | Virtualization value | Second focusing position |
3m | 2 | 5m |
3.5m | 2 | 6m |
In step 102, when receiving photographing instruction, frame image of taking pictures corresponding with first focusing position is acquired,
And acquisition virtualization frame image corresponding with second focusing position.
In the embodiment of the present application, in the acquisition parameters (the first focusing position) for obtaining frame image of taking pictures, and virtualization frame
After the acquisition parameters (the second focusing position) of image, i.e., controllable motor driving camera camera lens be moved to corresponding position into
The acquisition of capable frame image of taking pictures and the acquisition for blurring frame image.Wherein, virtualization frame image is for carrying out to frame image of taking pictures
Image virtualization processing or clearly handled, virtualization frame image obtain corresponding virtualization figure after carrying out virtualization processing to frame image of taking pictures
Picture obtains clear image when virtualization frame image clearly handles frame image of taking pictures.It should be noted that the virtualization frame
Image and the frame image of taking pictures are the image that camera acquires external optical signals generation when getting photographing instruction.
For example, first acquiring frame image of taking pictures by a camera in the way of continuous shooting, then virtualization frame image is acquired,
Obtain frame image and the virtualization frame image of taking pictures.Or multiple cameras are utilized, while collecting the frame image of taking pictures
With virtualization frame image.
It should be noted that when acquiring the frame image of taking pictures in the way of continuous shooting with frame image is blurred, due to depositing
In the time difference, the displacement of the shake or reference object itself that generate when may shoot because of user is hand-held leads to the bat
Inconsistent situation is had according to the content of frame image and virtualization frame image taking, therefore, in the embodiment of the present application, the acquisition
Frame image of taking pictures corresponding with first focusing position, and acquisition virtualization frame image corresponding with second focusing position
It later, may include taking pictures frame image and the virtualization frame image is aligned to described.
For example, virtualization frame image and frame image of taking pictures are converted and are sheared using alignment algorithm, so that virtualization frame figure
Pixel as in is corresponded with the pixel in frame image of taking pictures.Wherein, the alignment algorithm can be general alignment algorithm,
For example, forward direction addition algorithm and inverse combinational algorithm.
In step 103, frame image is taken pictures and the virtualization frame image synthesizes to described, is obtained and the virtualization value pair
The virtualization image answered.
In the embodiment of the present application, since the focusing position of take pictures frame image and virtualization frame image is not identical, frame of taking pictures
Clear area in image and the clear area in virtualization frame image be not identical.That is, have can for the clear area in frame image of taking pictures
The virtualization region in virtualization frame image can be corresponded to, therefore, virtualization frame image is can use and frame image of taking pictures is blurred, obtain
Blur image, that is, take pictures frame image and the virtualization frame image synthesizes to described, obtain void corresponding with the virtualization value
Change image.
Optionally, as shown in figure 3, in some embodiments of the application, the step 103, to the frame figure of taking pictures
Picture and the virtualization frame image are synthesized, and virtualization image corresponding with the virtualization value is obtained, may include: step 301 to
Step 303.
Step 301, it takes pictures described in calculating the edge strength of each pixel in frame image.
The edge strength of each pixel refers to the weighted value of each pixel eight pixels adjacent thereto.Example
Such as, the edge strength of each pixel is obtained by calculating the Sobel Operator (Sobel operator) of each pixel, or passed through
The Laplace operator for calculating each pixel obtains the edge strength of each pixel.
Step 302, the edge strength of pixel in frame image of taking pictures described in holding is greater than or equal to the pixel of first threshold
Point is constant.
Wherein, the first threshold is configured according to the edge strength of the pixel of focusing position in frame image of taking pictures
, the pixel for the edge strength of pixel in frame image of taking pictures to be greater than or equal to first threshold, which is divided into, to be needed to keep
Clearly pixel, that is, the pixel of focusing position in the frame image of taking pictures, and by the edge of pixel in frame image of taking pictures
The pixel that intensity is less than the first threshold divides into the pixel of non-focusing position, that is, carries out the pixel of virtualization processing
Point (pixel to be blurred).
In the embodiment of the present application, since the edge strength of pixel in frame image of taking pictures is greater than or equal to the picture of first threshold
Vegetarian refreshments is to need to keep clearly pixel, accordingly, it is therefore desirable to maintain the edge strength of pixel is greater than in the frame image of taking pictures
It is or constant equal to the pixel of first threshold, that is, virtualization processing not to be carried out to it, then again to pixel in frame image of taking pictures
The pixel that edge strength is less than first threshold carries out virtualization processing.
Step 303, the pixel that the edge strength of pixel in the frame image of taking pictures is less than the first threshold is made
For pixel to be blurred, and virtualization processing is carried out to the pixel to be blurred.
Optionally, as shown in figure 4, described to treat virtualization pixel to carry out virtualization processing may include: step 401 to step
403。
Step 401, the edge strength of each pixel in the virtualization frame image is calculated, and calculates the pixel to be blurred
First difference of point and the edge strength of the pixel of corresponding position in the virtualization frame image.
For example, the edge strength of the pixel A to be blurred in frame image of taking pictures be a, pixel A and virtualization frame image in
Pixel B be corresponding position pixel, and the edge strength of pixel B be b, then the edge strength of pixel A to be blurred with
The first difference for blurring the edge strength of the pixel B of corresponding position in frame image is a-b.
Step 402, if first difference is less than or equal to zero, keep the pixel to be blurred constant.
In the embodiment of the present application, since first difference is less than or equal to zero, indicate to take pictures in frame image wait blur
The virtualization degree of pixel is greater than the virtualization degree of the pixel of corresponding position in virtualization frame image, that is, the pixel may be
The pixel of focusing position in frame image is blurred, therefore, is less than or equal to zero in first difference, needs to keep described to void
It is constant to change pixel.
Step 403, if first difference is greater than zero, the pixel to be blurred is replaced with into the virtualization frame image
The pixel of middle corresponding position obtains virtualization image corresponding with the virtualization value.
In the embodiment of the present application, by the way that when first difference is greater than zero, the pixel to be blurred is replaced with institute
State virtualization frame image in corresponding position pixel, realize using camera shooting virtualization frame image to take pictures frame image into
Row virtualization obtains virtualization image corresponding with the virtualization value, and the virtualization image does not need to acquire using depth transducer
The depth information of each target object in photographed scene does not need more to combine the depth information to realize image using virtualization algorithm
Blur effect;Meanwhile will not be influenced by the resolution ratio and strong reflection object of depth transducer, realize preferably image
Blur effect.
Optionally, in order to enable virtualization image is more smooth naturally, in the embodiment of the present application, as shown in figure 5, described right
It may include: step 501 to step 503 that pixel to be blurred, which carries out virtualization processing,.
Step 501, the edge of the pixel of corresponding position in the pixel to be blurred and the virtualization frame image is calculated
First difference of intensity.
Step 502, if first difference is less than or equal to zero, keep the pixel to be blurred constant.
Wherein, the step 501 is identical or corresponding as the implementation method of the step 401 to step 402 to step 502,
Details are not described herein again.
Step 503, if first difference is greater than zero, corresponding first synthesis ratio of the pixel to be blurred is obtained
Example, synthesizes the pixel to be blurred using the first synthesis ratio, the pixel after being synthesized, and will be described
Pixel after blurring pixel and replacing with the synthesis obtains virtualization image corresponding with the virtualization value;Wherein, described
First synthesis ratio is the pixel value of pixel corresponding with the pixel to be blurred in the virtualization frame image in the conjunction
Shared ratio in the pixel value of pixel after.
In the embodiment of the present application, by the way that it is corresponding to obtain the pixel to be blurred when first difference is greater than zero
First synthesis ratio, and the pixel to be blurred is synthesized using the first synthesis ratio, while will be described to void
Change pixel and replace with the pixel after the synthesis, obtains virtualization image corresponding with the virtualization value;Rather than described
When first difference is greater than zero, the pixel to be blurred directly is replaced with to the pixel of corresponding position in the virtualization frame image
Point, so that pixel after virtualization can be more smooth naturally, will not be too lofty when first difference comparsion is big.
Optionally, if described obtain second difference greater than zero, the pixel corresponding second to be blurred is obtained
Synthesis ratio synthesizes the pixel to be blurred using the second synthesis ratio, the pixel after being synthesized, and
By the pixel after blurring pixel and replacing with the synthesis, obtains virtualization image corresponding with the virtualization value and wait for void
Change the corresponding first synthesis ratio of pixel, comprising: search the between the first difference, virtualization value and the first synthesis ratio three
One corresponding relationship obtains the corresponding first synthesis ratio of the pixel to be blurred.
For example, by searching for first between the first difference as shown in Table 2, virtualization value and the first synthesis ratio three
Mapping table determines the corresponding first synthesis ratio of the pixel to be blurred.It should be noted that the numerical value in table two can
To be the numerical value being calculated according to functional relation, or the numerical value to be obtained according to practical experience.
Table two:
First difference | Virtualization value | First synthesis ratio |
30 | 2 | 50% |
40 | 2 | 40% |
While guaranteeing the precision of synthesis ratio, reach stronger virtualization effect, in the base of the embodiment of Fig. 3 description
On plinth, as shown in fig. 6, also providing a kind of photographic method in the embodiment of the present application, comprising: step 601 to step 606.In order to retouch
That states is succinct, may refer to the description in Fig. 3 embodiment with part identical or corresponding in Fig. 3 embodiment in the present embodiment.
Step 601, take pictures the first focusing position and virtualization value of frame image are obtained, obtain with first focusing position and
The virtualization is worth the second focusing position of corresponding virtualization frame image, and obtains and first focusing position and the virtualization
It is worth the third focusing position of corresponding reference frame image;Wherein, the distance between the third focusing position and camera are greater than
The distance between first focusing position and the camera, also, the third focusing position is small at a distance from camera
In the distance between second focusing position and the camera.
For example, the first focusing position of frame image is position 72 as shown in fig. 7, camera 71 is taken pictures, camera 71 is clapped
The third focusing position for taking the photograph reference frame image is position 73;The distance between the third focusing position 73 and camera 71 L are big
In the distance between first focusing position 72 and the camera 71 G, and, the third focusing position 73 and camera 71
Distance be less than the distance between second focusing position 74 and the camera 71 J.
Step 602, frame image of taking pictures corresponding with first focusing position, acquisition and second focusing position are acquired
Corresponding virtualization frame image, and acquisition reference frame image corresponding with the third focusing position.
Step 603, it takes pictures described in calculating the edge strength of each pixel in frame image;It is taken pictures in frame image described in holding
The pixel that the edge strength of pixel is greater than or equal to first threshold is constant;By the edge of pixel in the frame image of taking pictures
The pixel that intensity is less than the first threshold is used as pixel to be blurred.
In the embodiment of the present application, since the edge strength of pixel in frame image of taking pictures is greater than or equal to the picture of first threshold
Vegetarian refreshments is to need to keep clearly pixel, accordingly, it is therefore desirable to maintain the edge strength of pixel is greater than in the frame image of taking pictures
It is or constant equal to the pixel of first threshold, that is, virtualization processing not to be carried out to it, then again to pixel in frame image of taking pictures
The pixel that edge strength is less than first threshold carries out virtualization processing.
Step 604, the edge of the pixel of corresponding position in the pixel to be blurred and the reference frame image is calculated
Second difference of intensity.
Step 605, if second difference is less than or equal to zero, keep the pixel to be blurred constant.
Step 606, if second difference is greater than zero, corresponding second synthesis ratio of the pixel to be blurred is obtained
Example, synthesizes the pixel to be blurred using the second synthesis ratio, the pixel after being synthesized, and will be described
Pixel after blurring pixel and replacing with the synthesis obtains virtualization image corresponding with the virtualization value;Wherein, described
Second synthesis ratio is the pixel value of pixel corresponding with the pixel to be blurred in the virtualization frame image in the conjunction
Shared ratio in the pixel value of pixel after.
In the embodiment of the present application, due between the focusing position of reference frame image and the focusing position for frame image of taking pictures away from
Therefore the distance between focusing position from the focusing position and frame image of taking pictures for being less than the virtualization frame image is calculated to void
Change the second difference of the edge strength of the pixel of corresponding position in pixel and reference frame image, and according to second difference
The precision of the second obtained synthesis ratio is than directly utilizing pixel to be blurred and blurring the pixel of corresponding position in frame image
The precision for the first synthesis ratio that first difference of the edge strength of point obtains wants high, in addition, due to the focusing for blurring frame image
The distance between position and the focusing position for frame image of taking pictures are greater than pair of the focusing position and frame image of taking pictures of reference frame image
Therefore the distance between burnt position blurs the virtualization degree of frame image for reference frame image, virtualization degree will be more
Height therefore, can by acquiring a reference frame image between virtualization frame image and frame image of taking pictures in the embodiment of the present application
While to realize the precision for guaranteeing synthesis ratio, reach stronger virtualization effect.
It should be noted that the acquisition modes of the second synthesis ratio are referred to the acquisition of the first synthesis ratio
Mode, details are not described herein again.
In order to realize the prospect virtualization and background blurring, the reality that the embodiment of the present application describes Fig. 3 of frame image of taking pictures simultaneously
It applies and further limits, as shown in figure 8, also providing a kind of photographic method in the embodiment of the present application, comprising: step 801 to step
808。
Step 801, take pictures the first focusing position and virtualization value of frame image are obtained, obtain with first focusing position and
The virtualization be worth it is corresponding before virtualization frame image the 4th focusing position, and, obtain and first focusing position and described
Virtualization is worth the 5th focusing position of corresponding rear virtualization frame image, wherein distance of first focusing position apart from camera
Distance greater than the 5th focusing position apart from camera, and distance of first focusing position apart from camera is less than institute
State distance of the 4th focusing position apart from camera.
For example, as shown in figure 9, distance H of first focusing position 72 apart from camera 71 is greater than the 5th focusing
Distance G of the position 75 apart from camera 71, and distance H of first focusing position 72 apart from camera 71 is less than the described 4th
Distance J of the focusing position 74 apart from camera 71.
Step 802, frame image of taking pictures corresponding with first focusing position, acquisition and the 4th focusing position are acquired
Frame image, and acquisition rear virtualization frame image corresponding with the 5th focusing position are blurred before corresponding.
Step 803, it takes pictures described in calculating the edge strength of each pixel in frame image;It is taken pictures in frame image described in holding
The pixel that the edge strength of pixel is greater than or equal to first threshold is constant;By the edge of pixel in the frame image of taking pictures
The pixel that intensity is less than the first threshold is used as pixel to be blurred.
Step 804, the side of the pixel of corresponding position in the pixel to be blurred and the preceding virtualization frame image is calculated
The third difference of edge intensity;And calculate it is described wait blur pixel and it is described after blur the pixel of corresponding position in frame image
4th difference of the edge strength of point.
Step 805, if the third difference and the 4th difference are respectively less than or are equal to zero, the picture to be blurred is kept
Vegetarian refreshments is constant.
Step 806, if the third difference and/or the 4th difference are greater than zero, the third difference and institute
State the size of the 4th difference.
Step 807, the to be blurred pixel corresponding third of the third difference greater than the 4th difference is obtained
Synthesis ratio synthesizes the pixel to be blurred using third synthesis ratio, the pixel after being synthesized, and
By the pixel after blurring pixel and replacing with the synthesis, virtualization image corresponding with the virtualization value is obtained;Its
In, third synthesis ratio be it is described before in virtualization frame image pixel corresponding with the pixel to be blurred pixel value
The shared ratio in the pixel value of the pixel after the synthesis.
Step 808, the pixel to be blurred corresponding that third difference is less than or equal to the 4th difference is obtained
Four synthesis ratios, synthesize the pixel to be blurred using the 4th synthesis ratio, the pixel after being synthesized,
And by the pixel after blurring pixel and replacing with the synthesis, virtualization image corresponding with the virtualization value is obtained;
Wherein, the 4th synthesis ratio be it is described after in virtualization frame image pixel corresponding with the pixel to be blurred pixel
It is worth shared ratio in the pixel value of the pixel after the synthesis.
Due to it is described it is preceding virtualization frame image prospect be it is real, background be it is empty, it is described after virtualization frame image background be
Real prospect be it is empty, it is therefore, big by the way that distance of first focusing position apart from camera is arranged in the embodiment of the present application
In distance of the 5th focusing position apart from camera, and it is less than distance of the 4th focusing position apart from camera, that is,
Virtualization frame image and rear virtualization frame image, can make before the front-end and back-end of the focusing position for frame image of taking pictures acquire respectively
Take pictures frame image and meanwhile carry out prospect virtualization and it is background blurring.
It should be noted that virtualization frame image therein can be one in the embodiment that described Fig. 1 to Fig. 7 is described
Frame image is blurred before a or multiple, blurs frame image after being also possible to one or more, and reference frame image therein can also
Preceding reference frame image is thought or for rear reference frame image, for realizing a scene for carry out prospect virtualization respectively and only being carried on the back
The scene of scape virtualization.
In the embodiment that described Fig. 8 to Fig. 9 is described, likewise, being referred to the implementation that described Fig. 6 to Fig. 7 is described
Mode increases preceding reference frame image and rear reference frame image, specifically, as shown in Figure 10, one is also provided in the embodiment of the present application
Kind photographic method, comprising: step 1001 to step 1006.
Step 1001, the first focusing position and virtualization value of frame image of taking pictures are obtained, is obtained and first focusing position
It is worth the 4th focusing position of corresponding preceding virtualization frame image with the virtualization, obtains and first focusing position and the virtualization
It is worth the 5th focusing position of corresponding rear virtualization frame image, before acquisition is corresponding with first focusing position and virtualization value
6th focusing position of reference frame image, and, obtain rear reference corresponding with first focusing position and virtualization value
7th focusing position of frame image, wherein distance of first focusing position apart from camera is greater than the 5th focusing position
The distance apart from camera is set, and distance of first focusing position apart from camera is less than the 4th focusing position distance
The distance of camera;Distance of 7th focusing position apart from the camera is less than the first focusing position distance camera shooting
The distance of head;Distance of 6th focusing position apart from the camera is greater than first focusing position apart from camera
Distance, also, distance of the 6th focusing position apart from the camera is less than the 4th focusing position apart from camera
Distance.
For example, as shown in figure 11, distance H of first focusing position 72 apart from camera 71 is greater than the 5th focusing position
The 75 distance G apart from camera 71, and distance H of first focusing position 72 apart from camera 71 is less than the 4th focusing
Distance J of the position 74 apart from camera 71, distance K of the 7th focusing position 77 apart from the camera 71 are greater than described the
Distance G of five focusing positions 75 apart from camera 71, distance K of the 7th focusing position 77 apart from the camera 71 are less than
Distance H of first focusing position 72 apart from camera 71;6th focusing position 76 apart from the camera 71 away from
It is greater than the distance H of camera 71 with a distance from first focusing position 72 from L, also, the 6th focusing position 76 is apart from described
The distance L of camera 71 is less than distance J of the 4th focusing position 74 apart from camera 71.
Step 1002, frame image of taking pictures corresponding with first focusing position, acquisition and the 4th focusing position are acquired
Set it is corresponding before blur frame image, acquire it is corresponding with the 5th focusing position after blur frame image, acquisition and the described 6th
The corresponding preceding reference frame image of focusing position, and acquisition rear reference frame image corresponding with the 7th focusing position.
Step 1003, it takes pictures described in calculating the edge strength of each pixel in frame image;It takes pictures described in holding frame image
The pixel that the edge strength of middle pixel is greater than or equal to first threshold is constant;By the side of pixel in the frame image of taking pictures
The pixel that edge intensity is less than the first threshold is used as pixel to be blurred.
Step 1004, the side of the pixel of corresponding position in the pixel to be blurred and the preceding reference frame image is calculated
5th difference of edge intensity;And calculate it is described wait blur pixel and it is described after in reference frame image corresponding position pixel
6th difference of the edge strength of point;
Step 1005, if the 5th difference and the 6th difference are respectively less than or are equal to zero, keep described wait blur
Pixel is constant;
Step 1006, it if the 5th difference and/or the 6th difference are greater than zero, obtains the 5th difference and is greater than
The corresponding pentahapto of the pixel to be blurred of 6th difference is proportional, using the pentahapto it is proportional to it is described to
Virtualization pixel is synthesized, the pixel after being synthesized, and by described after blurring pixel and replacing with the synthesis
Pixel;Wherein, the pentahapto is proportional for pixel corresponding with the pixel to be blurred in virtualization frame image before described
The pixel value of point ratio shared in the pixel value of the pixel after the synthesis;And it obtains the 5th difference and is less than or waits
The corresponding six directions of the pixel to be blurred described in the 6th difference is proportional, proportional to described using the six directions
Pixel to be blurred is synthesized, the pixel after being synthesized, and by described after blurring pixel and replacing with the synthesis
Pixel, obtain virtualization image corresponding with the virtualization value;Wherein, the six directions is proportional for the rear virtualization frame figure
It is shared in the pixel value of the pixel after the synthesis with the pixel value wait blur the corresponding pixel of pixel as in
Ratio.
In the embodiment of the present application, in the embodiment that described Fig. 8 to Fig. 9 is described, increase the preceding reference frame and rear ginseng
According to frame, to realize stronger prospect virtualization effect and stronger background blurring effect.Its realization principle can be with reference to described
The embodiment that Fig. 6 to Fig. 7 is described, details are not described herein again.
It should be noted that in the embodiment of the description, the focusing position of reference frame image and frame image of taking pictures
The distance between focusing position be greater than the focusing position of virtualization frame image and the distance between the focusing position of reference frame image,
The synthesis ratio obtained according to reference frame is enabled to be suitable for virtualization frame image.
For example, the distance between the focusing position of preceding reference frame image and the focusing position for frame image of taking pictures are greater than preceding virtualization
The distance between the focusing position of the focusing position of frame image and preceding reference frame image so that it is described according to preceding reference frame obtain
Pentahapto is proportional the pixel value of pixel corresponding with the pixel to be blurred to exist suitable for preceding virtualization frame image
Shared ratio in the pixel value of pixel after the synthesis, so that the image after virtualization is more smooth natural.
In the embodiment of the description, the virtualization frame image is in addition to that can be used to blur frame image of taking pictures
Except processing, it can also be used to clearly handle frame image of taking pictures.
Optionally, acquisition frame image of taking pictures corresponding with first focusing position, and acquisition and described second
After the corresponding virtualization frame image of focusing position, further includes: frame image is taken pictures and the virtualization frame image synthesizes to described,
Obtain clear image.
Specifically, described take pictures frame image and the virtualization frame image synthesizes to described, obtaining clear image includes:
It takes pictures in frame image described in calculating the pixel of corresponding position in the edge strength of each pixel and the virtualization frame image
7th difference of edge strength;The 7th difference in frame image of taking pictures described in holding is constant more than or equal to zero pixel;By institute
The pixel that the 7th minus pixel of difference in frame image of taking pictures replaces with corresponding position in the virtualization frame image is stated, is obtained
It is worth corresponding virtualization image to the virtualization;It takes pictures frame image clearly value alternatively, obtaining, and the in frame image of taking pictures described in obtaining
The corresponding 7th synthesis ratio of the minus pixel of seven differences, using the 7th synthesis ratio in the frame image of taking pictures
The 7th minus pixel of difference is synthesized, the pixel after being synthesized, and poor by the in the frame image of taking pictures the 7th
It is worth minus pixel and replaces with the pixel after the synthesis, obtains clearly being worth corresponding clear image with described;Wherein,
The 7th synthesis ratio is pixel of the pixel value of corresponding position pixel in the virtualization frame image after the synthesis
Pixel value in shared ratio.
Based on the description, in the embodiment of the present application, by taking pictures frame image and the virtualization frame image carries out to described
Synthesis, the corresponding virtualization image of available and described virtualization value or is clearly worth corresponding clear image, realization mould with described
The effect of quasi- camera iris ring.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence, this
Apply in embodiment, some steps may be performed in other sequences or simultaneously.
Figure 12 shows a kind of structural schematic diagram of camera arrangement 1200 provided by the embodiments of the present application, including acquiring unit
1201, acquisition unit 1202 and virtualization unit 1203.
Acquiring unit 1201, for obtaining the first focusing position and virtualization value of frame image of taking pictures, and obtain with it is described
First focusing position and the virtualization are worth the second focusing position of corresponding virtualization frame image;
Acquisition unit 1202, for acquiring take pictures corresponding with first focusing position when receiving photographing instruction
Frame image, and acquisition virtualization frame image corresponding with second focusing position;
Blur unit 1203, for taking pictures frame image and the virtualization frame image synthesizes to described, obtain with it is described
Virtualization is worth corresponding virtualization image.
It should be noted that for convenience and simplicity of description, the specific work process of the camera arrangement 1200 of the description,
Can be with reference to the corresponding process of method described in described Fig. 1 to Figure 11, details are not described herein.
As shown in figure 13, the application provides a kind of terminal for realizing the photographic method, which can be movement
Terminal, the mobile terminal can be the terminals such as smart phone, tablet computer, PC (PC), learning machine, comprising: processor
131, memory 132, one or more input equipments 133 (one is only shown in Figure 13), one or more output equipments 134
(one is only shown in Figure 13) and camera 135.It processor 131, memory 132, input equipment 133, output equipment 134 and takes the photograph
It is connected by bus 136 as first 135.The camera is used to acquire external optical signals according to the photographing instruction, generates the bat
According to frame image and virtualization frame image.
It should be appreciated that in the embodiment of the present application, alleged processor 131 can be central processing unit (Central
Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit,
ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic
Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at
Reason device is also possible to any conventional processor etc..
Input equipment 133 may include that dummy keyboard, Trackpad, fingerprint adopt sensor (fingerprint for acquiring user believed
The directional information of breath and fingerprint), microphone etc., output equipment 134 may include display, loudspeaker etc..
Memory 132 may include read-only memory and random access memory, and provide instruction sum number to processor 131
According to.Part or all of memory 132 can also include nonvolatile RAM.For example, memory 132 may be used also
With the information of storage device type.
The memory 132 is stored with computer program, and the computer program can be run on the processor 131,
For example, the computer program is the program of photographic method.Described in the processor 131 is realized when executing the computer program
Step in photographic method embodiment, such as step 101 shown in FIG. 1 is to step 103.Alternatively, the processor 131 executes institute
Realize the function of each module/unit in each Installation practice when stating computer program, for example, unit 1001 shown in Figure 10 to
1003 function.
The computer program can be divided into one or more module/units, one or more of modules/mono-
Member is stored in the memory 132, and is executed by the processor 131, to complete the application.One or more of moulds
Block/unit can be the series of computation machine program instruction section that can complete specific function, the instruction segment by describe it is described based on
Implementation procedure of the calculation machine program in the terminal taken pictures.For example, the computer program can be divided into acquisition
Unit, acquisition unit and virtualization unit, each unit concrete function is as follows: acquiring unit, takes pictures the first of frame image for obtaining
Focusing position and virtualization value, and obtain and be worth the second of corresponding virtualization frame image with first focusing position and the virtualization
Focusing position;Acquisition unit, for acquiring frame figure of taking pictures corresponding with first focusing position when receiving photographing instruction
Picture, and acquisition virtualization frame image corresponding with second focusing position;Blur unit, for it is described take pictures frame image and
The virtualization frame image is synthesized, and virtualization image corresponding with the virtualization value is obtained.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with each function
Can unit, module division progress for example, in practical application, can according to need and by the function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing
The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also
To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is described integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list
Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.The system
The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the described embodiment, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
Scope of the present application.
In embodiment provided herein, it should be understood that disclosed device/terminal and method can pass through
Other modes are realized.For example, device/terminal embodiment described above is only schematical, for example, the module or
The division of unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units
Or component can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, institute
Display or the mutual coupling or direct-coupling or communication connection discussed can be through some interfaces, device or unit
INDIRECT COUPLING or communication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.The integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the application realizes the implementation
All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program
Calculation machine program can be stored in a computer readable storage medium, and the computer program is when being executed by processor, it can be achieved that institute
The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation
Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium
It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code
Dish, CD, computer storage, read-only memory (Read-Only Memory, ROM), random access memory (Random
Access Memory, RAM), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the meter
The content that calculation machine readable medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice,
It such as does not include electric carrier signal and telecommunications according to legislation and patent practice, computer-readable medium in certain jurisdictions
Signal.
Embodiment described above is only to illustrate the technical solution of the application, rather than its limitations;Although referring to aforementioned reality
Example is applied the application is described in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution should all
Comprising within the scope of protection of this application.
Claims (14)
1. a kind of photographic method characterized by comprising
The first focusing position and virtualization value of frame image of taking pictures are obtained, and is obtained and first focusing position and the virtualization
It is worth the second focusing position of corresponding virtualization frame image;
When receiving photographing instruction, acquire corresponding with first focusing position frame image of taking pictures, and acquire with it is described
The corresponding virtualization frame image of second focusing position;
Frame image is taken pictures and the virtualization frame image synthesizes to described, obtains virtualization image corresponding with the virtualization value.
2. photographic method as described in claim 1, which is characterized in that the acquisition and first focusing position and the void
Change is worth the second focusing position of corresponding virtualization frame image, comprising:
The corresponding relationship between the first focusing position, virtualization value and the second focusing position three is searched, is obtained and described first pair
Burnt position and the virtualization are worth the second focusing position of corresponding virtualization frame image.
3. photographic method as claimed in claim 1 or 2, which is characterized in that described to take pictures frame image and the virtualization
Frame image is synthesized, and virtualization image corresponding with the virtualization value is obtained, comprising:
It takes pictures described in calculating the edge strength of each pixel in frame image;
The pixel that the edge strength of pixel in frame image of taking pictures described in holding is greater than or equal to first threshold is constant;
The edge strength of pixel in the frame image of taking pictures is less than the pixel of the first threshold as pixel to be blurred
Point, and virtualization processing is carried out to the pixel to be blurred.
4. photographic method as claimed in claim 3, which is characterized in that described to be carried out at virtualization to the pixel to be blurred
Reason, comprising:
Calculate the edge strength of the pixel of corresponding position in the pixel to be blurred and the virtualization frame image first is poor
Value;
If described first is worse than or equal to zero, keeps the pixel to be blurred constant;
If first difference is greater than zero, the pixel to be blurred is replaced with into corresponding position in the virtualization frame image
Pixel obtains virtualization image corresponding with the virtualization value;
Alternatively,
If first difference is greater than zero, the corresponding first synthesis ratio of the pixel to be blurred is obtained, utilizes described the
One synthesis ratio synthesizes the pixel to be blurred, the pixel after being synthesized, and by the pixel to be blurred
Pixel after replacing with the synthesis obtains virtualization image corresponding with the virtualization value;Wherein, the first synthesis ratio
For in the virtualization frame image with the pixel of the pixel value after the synthesis wait blur the corresponding pixel of pixel
Pixel value in shared ratio.
5. photographic method as claimed in claim 4, which is characterized in that pixel corresponding first to be blurred described in the acquisition
Synthesis ratio, comprising:
The first corresponding relationship between the first difference, virtualization value and the first synthesis ratio three is searched, the picture to be blurred is obtained
The corresponding first synthesis ratio of vegetarian refreshments.
6. photographic method as claimed in claim 3, which is characterized in that the acquisition and first focusing position and the void
Change is worth the second focusing position of corresponding virtualization frame image, further includes:
Obtain the third focusing position for being worth corresponding reference frame image with first focusing position and the virtualization;Wherein, institute
The distance between third focusing position and camera are stated greater than the distance between first focusing position and the camera, and
And the third focusing position is less than the distance between second focusing position and the camera at a distance from camera;
Correspondingly, described acquire frame image of taking pictures corresponding with first focusing position, and acquisition and second focusing
The corresponding virtualization frame image in position, further includes:
Acquire reference frame image corresponding with the third focusing position;
It is described that virtualization processing is carried out to the pixel to be blurred, comprising:
Calculate the edge strength of the pixel of corresponding position in the pixel to be blurred and the reference frame image second is poor
Value;
If second difference is less than or equal to zero, keep the pixel to be blurred constant;
If second difference is greater than zero, the corresponding second synthesis ratio of the pixel to be blurred is obtained, utilizes described the
Two synthesis ratios synthesize the pixel to be blurred, the pixel after being synthesized, and by the pixel to be blurred
Pixel after replacing with the synthesis obtains virtualization image corresponding with the virtualization value;Wherein, the second synthesis ratio
For in the virtualization frame image with the pixel of the pixel value after the synthesis wait blur the corresponding pixel of pixel
Pixel value in shared ratio.
7. photographic method as claimed in claim 3, which is characterized in that the acquisition and first focusing position and the void
Change is worth the second focusing position of corresponding virtualization frame image, comprising:
The 4th focusing position for being worth corresponding preceding virtualization frame image with first focusing position and the virtualization is obtained, and,
Obtain the 5th focusing position for being worth corresponding rear virtualization frame image with first focusing position and the virtualization;Wherein, described
Distance of first focusing position apart from camera is greater than distance of the 5th focusing position apart from camera, and described first pair
The distance of burnt positional distance camera is less than distance of the 4th focusing position apart from camera
Correspondingly, described acquire virtualization frame image corresponding with second focusing position, comprising:
Preceding virtualization frame image corresponding with the 4th focusing position is acquired, and is acquired corresponding with the 5th focusing position
Frame image is blurred afterwards;
It is described that virtualization processing is carried out to the pixel to be blurred, comprising:
Calculate the third of the edge strength of the pixel of corresponding position in the pixel to be blurred and the preceding virtualization frame image
Difference;And calculate it is described wait blur pixel and it is described after blur the edge strength of the pixel of corresponding position in frame image
The 4th difference;
If the third difference and the 4th difference are respectively less than or are equal to zero, keep the pixel to be blurred constant;
If the third difference and/or the 4th difference are greater than zero, the third difference and the 4th difference
Size;
Third difference third synthesis ratio corresponding greater than the pixel to be blurred of the 4th difference is obtained, is utilized
The third synthesis ratio synthesizes the pixel to be blurred, the pixel after being synthesized, and by described wait blur
Pixel replaces with the pixel after the synthesis, obtains virtualization image corresponding with the virtualization value;Wherein, the third is closed
It is proportional for before described in virtualization frame image with the pixel value wait blur the corresponding pixel of pixel after the synthesis
Pixel pixel value in shared ratio;
Obtain the corresponding 4th synthesis ratio of the pixel to be blurred that third difference is less than or equal to the 4th difference, benefit
The pixel to be blurred is synthesized with the 4th synthesis ratio, the pixel after being synthesized, and will be described to void
Change pixel and replace with the pixel after the synthesis, obtains virtualization image corresponding with the virtualization value;Wherein, the described 4th
Synthesis ratio be it is described after in virtualization frame image pixel corresponding with the pixel to be blurred pixel value in the synthesis
Shared ratio in the pixel value of pixel afterwards.
8. photographic method as claimed in claim 7, which is characterized in that the acquisition and first focusing position and the virtualization
It is worth the 4th focusing position of corresponding preceding virtualization frame image, and, it obtains and first focusing position and the virtualization value pair
5th focusing position of the rear virtualization frame image answered, further includes:
The 6th focusing position for being worth corresponding preceding reference frame image with first focusing position and the virtualization is obtained, and,
Obtain the 7th focusing position for being worth corresponding rear reference frame image with first focusing position and the virtualization;Wherein, described
Distance of first focusing position apart from camera is greater than distance of the 5th focusing position apart from camera, and described first pair
The distance of burnt positional distance camera is less than distance of the 4th focusing position apart from camera;7th focusing position away from
It is less than distance of first focusing position apart from camera with a distance from the camera;6th focusing position is apart from institute
The distance for stating camera is greater than distance of first focusing position apart from camera, also, the 6th focusing position distance
The distance of the camera is less than distance of the 4th focusing position apart from camera;
Correspondingly, blurring frame image before acquisition is corresponding with the 4th focusing position, and acquisition and the 5th focusing position
Set corresponding rear virtualization frame image, further includes:
Preceding reference frame image corresponding with the 6th focusing position is acquired, and is acquired corresponding with the 7th focusing position
Reference frame image afterwards;
It is described that virtualization processing is carried out to the pixel to be blurred, comprising:
Calculate the 5th of the edge strength of the pixel of corresponding position in the pixel to be blurred and the preceding reference frame image
Difference;And calculate it is described wait blur pixel and it is described after in reference frame image the pixel of corresponding position edge strength
The 6th difference;
If the 5th difference and the 6th difference are respectively less than or are equal to zero, keep the pixel to be blurred constant;
If the 5th difference and/or the 6th difference are greater than zero, the 5th difference and the 6th difference
Size;And it is proportional greater than the corresponding pentahapto of the pixel to be blurred of the 6th difference to obtain the 5th difference,
The pixel to be blurred is synthesized using the pentahapto is proportional, the pixel after being synthesized, and will it is described to
Virtualization pixel replaces with the pixel after the synthesis;Wherein, the pentahapto is proportional in the preceding virtualization frame image
The ratio shared in the pixel value of the pixel after the synthesis with the pixel value wait blur the corresponding pixel of pixel
Example;And
It is proportional less than or equal to the corresponding six directions of the pixel to be blurred of the 6th difference to obtain the 5th difference, benefit
The pixel to be blurred is synthesized with the six directions is proportional, the pixel after being synthesized, and will be described to void
Change pixel and replace with the pixel after the synthesis, obtains virtualization image corresponding with the virtualization value;Wherein, the described 6th
Synthesis ratio be it is described after in virtualization frame image pixel corresponding with the pixel to be blurred pixel value in the synthesis
Shared ratio in the pixel value of pixel afterwards.
9. the photographic method as described in claim any one of 1-2, which is characterized in that the acquisition and first focusing position pair
After the frame image of taking pictures answered, and acquisition virtualization frame image corresponding with second focusing position, comprising:
Frame image is taken pictures and the virtualization frame image is aligned to described.
10. photographic method as described in claim 1, which is characterized in that described to acquire bat corresponding with first focusing position
After frame image, and acquisition virtualization frame image corresponding with second focusing position, further includes:
Frame image is taken pictures and the virtualization frame image synthesizes to described, obtains clear image.
11. photographic method as claimed in claim 10, which is characterized in that described to frame image and the virtualization frame figure of taking pictures
As being synthesized, obtain clearly being worth corresponding clear image with described, comprising:
It takes pictures in frame image described in calculating the pixel of corresponding position in the edge strength of each pixel and the virtualization frame image
7th difference of the edge strength of point;
The 7th difference in frame image of taking pictures described in holding is constant more than or equal to zero pixel;
The 7th minus pixel of difference in the frame image of taking pictures is replaced with into corresponding position in the virtualization frame image
Pixel obtains the corresponding virtualization image of the virtualization value;Alternatively,
Acquisition is taken pictures frame image clearly value, and the 7th minus pixel of difference corresponding the in frame image of taking pictures described in obtaining
Seven synthesis ratios, close the 7th minus pixel of difference in the frame image of taking pictures using the 7th synthesis ratio
At, pixel after being synthesized, and the 7th minus pixel of difference in the frame image of taking pictures is replaced with into the conjunction
Pixel after obtains clearly being worth corresponding clear image with described;Wherein, the 7th synthesis ratio is the virtualization frame
The pixel value of corresponding position pixel ratio shared in the pixel value of the pixel after the synthesis in image.
12. a kind of camera arrangement characterized by comprising
Acquiring unit, for obtaining the first focusing position and virtualization value of frame image of taking pictures, and acquisition and first focusing
Position and the virtualization are worth the second focusing position of corresponding virtualization frame image;
Acquisition unit, for acquiring frame image of taking pictures corresponding with first focusing position when receiving photographing instruction, with
And acquisition virtualization frame image corresponding with second focusing position;
Unit is blurred, for taking pictures frame image and the virtualization frame image synthesizes to described, is obtained and the virtualization value pair
The virtualization image answered.
13. a kind of terminal, including camera, memory, processor and storage are in the memory and can be in the processing
The computer program run on device, which is characterized in that the processor realizes such as claim 1 when executing the computer program
The step of to 11 any one the method.
14. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In realization is such as the step of claim 1 to 11 any one the method when the computer program is executed by processor.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811405822.2A CN109151329A (en) | 2018-11-22 | 2018-11-22 | Photographic method, device, terminal and computer readable storage medium |
PCT/CN2019/110853 WO2020103604A1 (en) | 2018-11-22 | 2019-10-12 | Method and device for photographing, terminal, and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811405822.2A CN109151329A (en) | 2018-11-22 | 2018-11-22 | Photographic method, device, terminal and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109151329A true CN109151329A (en) | 2019-01-04 |
Family
ID=64806189
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811405822.2A Pending CN109151329A (en) | 2018-11-22 | 2018-11-22 | Photographic method, device, terminal and computer readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109151329A (en) |
WO (1) | WO2020103604A1 (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110505406A (en) * | 2019-08-26 | 2019-11-26 | 宇龙计算机通信科技(深圳)有限公司 | Background-blurring method, device, storage medium and terminal |
WO2020103604A1 (en) * | 2018-11-22 | 2020-05-28 | Oppo广东移动通信有限公司 | Method and device for photographing, terminal, and computer-readable storage medium |
CN111212231A (en) * | 2020-01-16 | 2020-05-29 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN111246093A (en) * | 2020-01-16 | 2020-06-05 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN111246092A (en) * | 2020-01-16 | 2020-06-05 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN112351204A (en) * | 2020-10-27 | 2021-02-09 | 歌尔智能科技有限公司 | Photographing method, photographing device, mobile terminal and computer readable storage medium |
CN112954212A (en) * | 2021-02-08 | 2021-06-11 | 维沃移动通信有限公司 | Video generation method, device and equipment |
CN114762313A (en) * | 2020-01-16 | 2022-07-15 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112085686A (en) * | 2020-08-21 | 2020-12-15 | 北京迈格威科技有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100214437A1 (en) * | 2009-02-25 | 2010-08-26 | Samsung Digital Imaging Co., Ltd. | Digital image processing apparatus, method of controlling the apparatus, and recording medium having recorded thereon a program for executing the method |
CN102625038A (en) * | 2012-02-10 | 2012-08-01 | 明基电通有限公司 | Image capturing device and image processing method |
CN105187722A (en) * | 2015-09-15 | 2015-12-23 | 努比亚技术有限公司 | Depth-of-field adjustment method and apparatus, terminal |
CN105227847A (en) * | 2015-10-30 | 2016-01-06 | 上海斐讯数据通信技术有限公司 | A kind of camera photographic method of mobile phone and system |
CN106454118A (en) * | 2016-11-18 | 2017-02-22 | 上海传英信息技术有限公司 | Picture blurring method and mobile terminal |
CN108769545A (en) * | 2018-06-12 | 2018-11-06 | Oppo(重庆)智能科技有限公司 | A kind of image processing method, image processing apparatus and mobile terminal |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9451147B2 (en) * | 2012-06-11 | 2016-09-20 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, image pickup apparatus, method of controlling image pickup apparatus, and non-transitory computer-readable storage medium |
CN104660900B (en) * | 2013-10-30 | 2018-03-02 | 株式会社摩如富 | Image processing apparatus and image processing method |
CN104333700B (en) * | 2014-11-28 | 2017-02-22 | 广东欧珀移动通信有限公司 | Image blurring method and image blurring device |
CN104680478B (en) * | 2015-02-15 | 2018-08-21 | 青岛海信移动通信技术股份有限公司 | A kind of choosing method and device of destination image data |
CN106952222A (en) * | 2017-03-17 | 2017-07-14 | 成都通甲优博科技有限责任公司 | A kind of interactive image weakening method and device |
CN108230234B (en) * | 2017-05-19 | 2019-08-20 | 深圳市商汤科技有限公司 | Image blurs processing method, device, storage medium and electronic equipment |
CN106941590A (en) * | 2017-05-19 | 2017-07-11 | 深圳天珑无线科技有限公司 | A kind of image processing method and device |
CN107592466B (en) * | 2017-10-13 | 2020-04-24 | 维沃移动通信有限公司 | Photographing method and mobile terminal |
CN109151329A (en) * | 2018-11-22 | 2019-01-04 | Oppo广东移动通信有限公司 | Photographic method, device, terminal and computer readable storage medium |
-
2018
- 2018-11-22 CN CN201811405822.2A patent/CN109151329A/en active Pending
-
2019
- 2019-10-12 WO PCT/CN2019/110853 patent/WO2020103604A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100214437A1 (en) * | 2009-02-25 | 2010-08-26 | Samsung Digital Imaging Co., Ltd. | Digital image processing apparatus, method of controlling the apparatus, and recording medium having recorded thereon a program for executing the method |
CN102625038A (en) * | 2012-02-10 | 2012-08-01 | 明基电通有限公司 | Image capturing device and image processing method |
CN105187722A (en) * | 2015-09-15 | 2015-12-23 | 努比亚技术有限公司 | Depth-of-field adjustment method and apparatus, terminal |
CN105227847A (en) * | 2015-10-30 | 2016-01-06 | 上海斐讯数据通信技术有限公司 | A kind of camera photographic method of mobile phone and system |
CN106454118A (en) * | 2016-11-18 | 2017-02-22 | 上海传英信息技术有限公司 | Picture blurring method and mobile terminal |
CN108769545A (en) * | 2018-06-12 | 2018-11-06 | Oppo(重庆)智能科技有限公司 | A kind of image processing method, image processing apparatus and mobile terminal |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020103604A1 (en) * | 2018-11-22 | 2020-05-28 | Oppo广东移动通信有限公司 | Method and device for photographing, terminal, and computer-readable storage medium |
CN110505406A (en) * | 2019-08-26 | 2019-11-26 | 宇龙计算机通信科技(深圳)有限公司 | Background-blurring method, device, storage medium and terminal |
CN111212231A (en) * | 2020-01-16 | 2020-05-29 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN111246093A (en) * | 2020-01-16 | 2020-06-05 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN111246092A (en) * | 2020-01-16 | 2020-06-05 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN111212231B (en) * | 2020-01-16 | 2021-06-15 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN111246093B (en) * | 2020-01-16 | 2021-07-20 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN111246092B (en) * | 2020-01-16 | 2021-07-20 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN114762313A (en) * | 2020-01-16 | 2022-07-15 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN114762313B (en) * | 2020-01-16 | 2024-03-01 | Oppo广东移动通信有限公司 | Image processing method, device, storage medium and electronic equipment |
CN112351204A (en) * | 2020-10-27 | 2021-02-09 | 歌尔智能科技有限公司 | Photographing method, photographing device, mobile terminal and computer readable storage medium |
CN112954212A (en) * | 2021-02-08 | 2021-06-11 | 维沃移动通信有限公司 | Video generation method, device and equipment |
Also Published As
Publication number | Publication date |
---|---|
WO2020103604A1 (en) | 2020-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109151329A (en) | Photographic method, device, terminal and computer readable storage medium | |
US10645368B1 (en) | Method and apparatus for estimating depth of field information | |
KR101602394B1 (en) | Image Blur Based on 3D Depth Information | |
CN107454332B (en) | Image processing method and device and electronic equipment | |
CN105323425B (en) | Scene motion correction in blending image system | |
TWI706379B (en) | Method, apparatus and electronic device for image processing and storage medium thereof | |
CN105339841B (en) | The photographic method and bimirror head apparatus of bimirror head apparatus | |
CN104506762B (en) | Optical field acquisition control method and device, optical field acquisition equipment | |
CN107735713A (en) | Medical image processing unit, medical image processing method and medical viewing system | |
CN109889724B (en) | Image blurring method and device, electronic equipment and readable storage medium | |
CN109906599A (en) | A kind of photographic method and terminal of terminal | |
CN109040603A (en) | High-dynamic-range image acquisition method, device and mobile terminal | |
CN110677621B (en) | Camera calling method and device, storage medium and electronic equipment | |
JP5766077B2 (en) | Image processing apparatus and image processing method for noise reduction | |
TW201501533A (en) | Method for adjusting focus position and electronic apparatus | |
US20140204086A1 (en) | Imaging apparatus capable of generating three-dimensional images, three-dimensional image generating method, and recording medium | |
CN109120862A (en) | High-dynamic-range image acquisition method, device and mobile terminal | |
CN105227847A (en) | A kind of camera photographic method of mobile phone and system | |
CN110084765A (en) | A kind of image processing method, image processing apparatus and terminal device | |
CN114445562A (en) | Three-dimensional reconstruction method and device, electronic device and storage medium | |
US9736366B1 (en) | Tile-based digital image correspondence | |
CN113747067A (en) | Photographing method and device, electronic equipment and storage medium | |
CN113542600A (en) | Image generation method, device, chip, terminal and storage medium | |
CN114723603A (en) | Image processing method, image processing apparatus, and storage medium | |
CN115134532A (en) | Image processing method, image processing device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190104 |
|
RJ01 | Rejection of invention patent application after publication |