CN114363522A - Photographing method and related device - Google Patents

Photographing method and related device Download PDF

Info

Publication number
CN114363522A
CN114363522A CN202210051913.0A CN202210051913A CN114363522A CN 114363522 A CN114363522 A CN 114363522A CN 202210051913 A CN202210051913 A CN 202210051913A CN 114363522 A CN114363522 A CN 114363522A
Authority
CN
China
Prior art keywords
angle
determining
light field
plane
field camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210051913.0A
Other languages
Chinese (zh)
Inventor
权威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210051913.0A priority Critical patent/CN114363522A/en
Publication of CN114363522A publication Critical patent/CN114363522A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The embodiment of the application provides a photographing method and a related device, which are applied to electronic equipment, wherein the method comprises the following steps: acquiring a preview image by a light field camera module of the electronic device; determining a focus position of the light field camera module from the preview image; determining a first angle of a first imaging surface of the light field camera module relative to a lens plane according to the preview image, wherein the first imaging surface is a refocus plane corresponding to the light field camera module; generating the first imaging surface according to the first angle and the focusing position; and acquiring a target image according to the first imaging surface. Therefore, the photo with the axis shifting effect can be obtained on the basis that the hardware cost is not additionally increased, and compared with the effect of simulating the axis shifting lens by a software algorithm, the photo with the axis shifting effect is realized according to the characteristics of the light field camera, the actual imaging principle of the axis shifting lens is closer, and the shot photo is higher in precision.

Description

Photographing method and related device
Technical Field
The application belongs to the field of data processing, and particularly relates to a photographing method and a related device.
Background
The main characteristic of the shift photographic lens is that the main optical axis of the whole photographic lens can be translated, tilted or rotated under the premise that the positions of the camera body and the film plane are not changed, so as to achieve the purpose of adjusting the perspective relation or the whole-area focusing of the shot image. However, the tilt-shift lens has the characteristics of large volume, high price and the like, and needs to be matched with a single-lens reflex camera or other cameras with interchangeable lenses for use, so that the cost for taking the tilt-shift effect picture is high.
Disclosure of Invention
The embodiment of the application provides a photographing method and a related device, so that a light field camera is used for acquiring a picture with a shift effect, and the photographing cost of the shift picture is reduced.
In a first aspect, an embodiment of the present application provides a photographing method applied to an electronic device, where the method includes:
acquiring a preview image by a light field camera module of the electronic device;
determining a focus position of the light field camera module from the preview image;
determining a first angle of a first imaging surface of the light field camera module relative to a lens plane according to the preview image, wherein the first imaging surface is a refocus plane corresponding to the light field camera module;
generating the first imaging surface according to the first angle and the focusing position;
and acquiring a target image according to the first imaging surface.
In a second aspect, an embodiment of the present application provides a photographing apparatus, which is applied to an electronic device, and the apparatus includes:
a first acquisition unit for acquiring a preview image by a light field camera module of the electronic device;
a first determining unit for determining a focus position of the light field camera module from the preview image;
a second determining unit, configured to determine, according to the preview image, a first angle of a first imaging plane of the light field camera module relative to a lens plane, where the first imaging plane is a refocus plane corresponding to the light field camera module;
a generating unit configured to generate the first imaging plane according to the first angle and the focusing position;
and the second acquisition unit is used for acquiring a target image according to the first imaging surface.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps in the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer storage medium, which is characterized by storing a computer program for electronic data exchange, wherein the computer program enables a computer to perform some or all of the steps described in the first aspect of the present embodiment.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, in the embodiment of the present application, an electronic device first acquires a preview image through a light field camera module of the electronic device, then determines a focusing position of the light field camera module according to the preview image, then determines a first angle of a first imaging plane of the light field camera module relative to a lens plane according to the preview image, then generates the first imaging plane according to the first angle and the focusing position, and finally acquires a target image according to the first imaging plane. Like this, can obtain the photo that has the shift effect on the basis that does not need additionally to increase the hardware cost, can reduce the cost of shooing the picture that has the shift effect, and compare with the software algorithm simulation shift lens effect, this scheme realizes the photo that has the shift effect according to the characteristic of light field camera, more approaches the actual imaging principle of shift lens for the photo precision of shooing is higher, and the effect is better.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1a is a schematic diagram of a photographing principle provided in an embodiment of the present application;
FIG. 1b is a schematic diagram illustrating a principle of tilt-shift photograph taking provided by an embodiment of the present application;
fig. 2a is a schematic structural diagram of a light field camera module provided in an embodiment of the present application;
fig. 2b is a schematic diagram illustrating a photographing principle of a light field camera module according to an embodiment of the present application;
fig. 3a is a schematic diagram of an electronic device according to an embodiment of the present application;
fig. 3b is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 4a is a schematic flowchart of a photographing method according to an embodiment of the present application;
FIG. 4b is a schematic diagram of a photographing interface provided in the embodiment of the present application;
FIG. 4c is a schematic view of another photographing interface provided in the embodiments of the present application;
FIG. 4d is a schematic view of a ray angle provided by an embodiment of the present application;
fig. 4e is a schematic diagram illustrating a pixel value calculation of a photographing method according to an embodiment of the present application;
fig. 5 is a block diagram illustrating functional units of a photographing apparatus according to an embodiment of the present disclosure;
fig. 6 is a block diagram illustrating functional units of another photographing apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The definitions or explanations of the concepts and terms referred to in this application are as follows.
According to Scheimpflug law, when a lens plane, an object plane and an image plane are intersected with a straight line, a picture of a shot object (the plane in which the shot object is located) which is all clear can be shot. I.e. as shown in fig. 1a and 1 b: the object plane, the image plane (rear group part) and the lens plane (front group part) converge on a virtual point under the camera, the smaller the adjustment amount before swinging is, the larger the swinging amplitude of the rear group is, the smaller the swinging amplitude of the rear group is, and the larger the swinging amplitude of the front group is. Thus, the three planes intersect at a single point, and the maximum clear range can be obtained for the inclined object.
The light field camera, the light field camera has a main lens (main lens), a sensor (sensor), and the micro lens (micro lens) array between main lens and sensor, as shown in fig. 2a, the micro lens is made up of many minor lenses with parallel optical axes and small diameter, after each minor lens receives the light from the main lens, before transmitting to the sensor, the focusing light is separated out and the light data is converted, and the data is recorded in digital mode. As shown in fig. 2b, compared to the common camera in which the distance from the sensor to the main lens plane is constant and a new imaging plane cannot be calculated, the light field camera can calculate a refocusing focal plane and perform imaging by integral calculation, and the refocusing focal plane can be changed.
When the object to be photographed is not parallel to the camera plane and the lens plane, it is often difficult to obtain a clear picture of the object to be photographed. Or when shooting scenes such as high buildings, the elevation angle of the camera is raised to shoot, so that the building is deformed. However, the conventional lens with the shift effect can solve the above problems, but the conventional lens is required to be matched with a camera with an interchangeable lens to realize the picture with the shift effect, and the shift lens has the characteristics of large volume, high price and the like, and is required to be matched with a camera with a single lens or other interchangeable lenses to be used, and the hardware limitation is prevented, so that the conventional lens is difficult to generate the ideal shift effect with high precision.
In view of the foregoing problems, embodiments of the present application provide a photographing method and a related apparatus, and the following describes embodiments of the present application in detail with reference to the accompanying drawings.
Referring to fig. 3a, fig. 3a is a schematic view of an electronic device according to an embodiment of the present disclosure. As shown in the figure, the electronic device 10 includes a photographing device 101 and a light field camera module 102, where the light field camera module is configured to obtain a preview picture, and the photographing device 101 is configured to calculate a refocusing focal plane of the light field camera module according to the preview picture and the configuration of the light field camera module 102, and calculate an image with a shift effect according to the refocusing focal plane.
The structure of the electronic device 10 is shown in fig. 3b, where the electronic device 10 includes a processor 120, a memory 130, a communication interface 140, and one or more programs 131, where the one or more programs 131 are stored in the memory 130 and configured to be executed by the processor 120, and the one or more programs 131 include instructions for performing any of the following method embodiments. In a specific implementation, the processor 120 is configured to perform any one of the steps performed by the electronic device in the method embodiments described below, and when performing data transmission such as sending, optionally invokes the communication interface 140 to complete the corresponding operation.
Referring to fig. 4a, fig. 4a is a schematic flowchart of a photographing method according to an embodiment of the present disclosure. As shown in the figure, the photographing method is applied to an electronic device, and the method comprises the following steps:
s401, a preview image is acquired through a light field camera module of the electronic device.
The preview image is image content that changes in real time according to changes in the lens of the electronic device or changes in the focal length of the light field camera, etc. When a user shoots, pictures shot by the main lens of the light field camera are all displayed in a picture display area of the electronic equipment in real time, at the moment, the displayed preview images are obtained by calculation according to a default first imaging plane of the light field camera, and the first imaging plane is a refocusing focal plane of the light field camera. The angle of the default first imaging plane with respect to the lens plane may be a default angle set by a factory or a user, for example, the first imaging plane is parallel to the lens plane. The angle may also be the angle determined by the light field camera at the last shot.
S402, determining the focusing position of the light field camera module according to the preview image.
Wherein the in-focus position may be used to indicate an image distance of the light field camera module. The user may specify the focusing position of the preview image on the electronic device by clicking, selecting, or the like, or the electronic device may perform auto-focusing based on the preview image.
And S403, determining a first angle of a first imaging plane of the light field camera module relative to a lens plane according to the preview image, wherein the first imaging plane is a refocusing focal plane corresponding to the light field camera module.
When a certain angle is formed between the first imaging surface and the lens plane, the effect similar to that brought by the shift lens imaging can be generated. Therefore, the angle of the first imaging plane, which needs to rotate at the current angle, can be determined according to the content of the current preview image, and the first angle of the first imaging plane relative to the lens plane can be obtained when the image with the shift effect, which is required by the user, is obtained. The first imaging plane may also be referred to as a refocusing plane or a virtual imaging plane.
S404, generating the first imaging plane according to the first angle and the focusing position;
s405, acquiring a target image according to the first imaging plane.
The first angle and the focusing position corresponding to the first imaging plane can be changed according to user operation or automatic adjustment of the electronic equipment, when the first imaging plane is changed, the target image generated according to the preview image can be correspondingly changed, and after the target image is obtained, the target image can be displayed in a display area of the electronic equipment in real time, so that a real-time axis shifting effect can be previewed to an equipment end, and the subsequent readjustment of a user is facilitated.
In this example, the electronic device first obtains a preview image through a light field camera module of the electronic device, then determines a focusing position of the light field camera module according to the preview image, then determines a first angle of a first imaging plane of the light field camera module relative to a lens plane according to the preview image, then generates the first imaging plane according to the first angle and the focusing position, and finally obtains a target image according to the first imaging plane. Like this, can obtain the photo that has the shift effect on the basis that does not need additionally to increase the hardware cost, reduce the cost of obtaining the picture that has the shift effect, and compare with the software algorithm simulation shift lens effect, this scheme realizes the photo that has the shift effect according to the characteristic of light field camera, more approaches the actual imaging principle of shift lens for the photo precision of shooing is higher, and the effect is better.
In one possible example, the determining a first angle of a first imaging plane of the light field camera module relative to a lens plane from the preview image comprises: receiving a first operation aiming at an angle adjusting control; adjusting an angle parameter corresponding to the angle adjustment control according to the first operation, wherein the angle parameter is used for indicating an angle of the first imaging plane relative to the lens plane; determining a first angle of a first imaging plane of the light field camera module relative to a lens plane according to the angle parameter.
The angle adjusting control may include a first angle adjusting control for rotating the first imaging plane in the vertical direction, and may further include a second angle adjusting control for rotating the first imaging plane in the horizontal direction. As shown in fig. 4b, fig. 4b is a schematic diagram of a photographing interface provided in the embodiment of the present application, a user can change an angle of a first imaging plane relative to a lens plane by sliding an angle adjustment control in x and y directions, where the angle adjustment control in the x direction is a second angle adjustment control, and the angle adjustment control in the y direction is a first angle adjustment control. As can be seen from the figure, a focus adjustment control for adjusting the focus may also be included on the electronic device. In specific implementation, the angle adjustment control may also be a gesture recognition control, so as to change the first angle according to a gesture of the user. The angle adjustment control can also be an induction control, namely a first angle is determined according to the operation of a user on the angle adjustment control, the angle adjustment control comprises a step that the user presses and moves or rotates the angle control for a long time, and the first imaging surface changes the angle according to the movement track of the angle control.
Therefore, in the embodiment, the user can operate the angle adjustment control of the electronic equipment according to the requirement and the content of the current preview picture so as to determine the user-defined first angle, so that the requirement of the user can be better met, and the use interest and the photographing experience of the user are improved.
In one possible example, the determining a first angle of a first imaging plane of the light field camera module relative to a lens plane from the preview image comprises: determining a target object according to the preview image; determining the deformation degree of the target object in the preview image; and determining a first angle of a first imaging surface of the light field camera module relative to a lens plane according to the deformation degree.
Wherein determining a target object from the preview image may include: and acquiring the clicking operation of the user, and determining the image corresponding to the clicking operation as a target object. If the user clicks a certain position in the preview image, the whole image corresponding to the position can be determined as the target object. For example, if the user clicks one of the blades of the windmill in the preview image shown in fig. 4b, the entire windmill becomes the target object. The determining a target object from the preview image may further include: and determining the content corresponding to the image with the largest image occupation ratio in the preview image as a target object, wherein the image occupation ratio is the ratio of the image range to the range of the whole preview image. In particular, when the preview image includes a preset type of image, it may be directly determined that the content corresponding to the preset type of image is the target object, and the preset type may include that the image content is a building, a vehicle, or the like.
In a specific implementation, the determining the deformation degree of the target object in the preview image may include: determining the type of the target object; determining a photographing angle corresponding to a target object; determining a template image according to the type of the target object and the photographing angle; and comparing the image content corresponding to the target object with the template image to determine the deformation degree of the target object. For example, the type of the target object is a tall building, and at this time, it can be determined by the photographing angle that an image of the tall building which is not deformed at the photographing angle is a template image. When the deformation degree is compared, the contour lines corresponding to the target object and the contour lines of the object in the template image can be extracted for comparison, the line contact ratio is determined according to the line trend, and the deformation degree is determined according to the contact ratio.
In this example, since the image with the shift effect can reduce the deformation degree of objects such as buildings when being photographed, the electronic device can automatically adjust the angle of the first imaging plane relative to the lens plane according to the deformation degree of the target object in the preview image to determine the first angle. Therefore, the target image with the axis shifting effect can be generated quickly and efficiently, the operation steps of a user can be reduced, and the use experience of the user is improved.
In one possible example, the determining a first angle of the first imaging plane of the light field camera module relative to a lens plane according to the degree of deformation includes: determining the angle adjustment range of the first imaging surface according to the deformation degree; determining the proportion of a focus area of the preview image in the preview image; determining the position of an unfocused area in the preview image under the condition that the ratio is smaller than a preset value; and determining a first angle of a first imaging plane of the light field camera module relative to a lens plane according to the position of the unfocused region and the angle adjusting range.
When the angle of the refocus plane corresponding to the preview image is adjusted to the first angle at which the deformation degree of the target object is smaller than the preset deformation degree by the first imaging plane, the angle between the current angle and the first angle is included in the angle adjustment range. In determining the focus area, it may include: dividing the preview image into a plurality of sub-areas, determining the definition of each sub-area, and determining the sub-area with the definition meeting a preset value as a focusing area. Or may further include: preprocessing the preview image; determining a region of interest in a preview image; and detecting and scoring the region of interest, and determining the region of interest with the score higher than a preset score as a focusing region. If the ratio is smaller than the preset value, it means that most of the image content in the preview image is unfocused and does not conform to the characteristics of a picture with a shift effect, so that the first angle of the first imaging plane can be specifically adjusted according to the angle of the current first imaging plane and the position of an unfocused area, so as to determine that the deformation degree of the target image acquired on the first imaging plane corresponding to the first angle is small, and most of the images are clear.
Therefore, in the embodiment, the angle of the first imaging surface relative to the lens plane is automatically adjusted according to the deformation degree and the focusing area, so that the precision of the shot picture with the shift effect can be improved, and the user experience is improved.
In one possible example, the determining a first angle of the first imaging plane of the light field camera module relative to a lens plane according to the degree of deformation includes: determining the angle adjustment range of the first imaging surface according to the deformation degree; receiving a second operation for the preview image; determining the position of a target focusing area according to the second operation; and determining a first angle of the first imaging surface of the light field camera module relative to a lens plane according to the position of the target focusing area and the angle adjusting range.
The second operation includes a click operation and/or an expansion operation, that is, a user may determine a focus point on the preview image through the click operation, and then perform an expansion operation on an image area included in the focus point with the focus point as a center to determine a target focus area.
Therefore, in the embodiment, the angle of the first imaging surface relative to the lens plane is automatically adjusted according to the deformation degree and the focusing area, so that the precision of the shot picture with the shift effect can be improved, and the user experience is improved.
In one possible example, after the target image is acquired according to the first imaging plane, the method further includes: determining a plurality of second angles according to the first angle; generating a plurality of second imaging surfaces according to the plurality of second angles and the focusing positions respectively; generating a plurality of reference images according to the plurality of second imaging surfaces; receiving a third operation for the plurality of reference images, the third operation for determining a target reference image, the target reference image being a reference image of the plurality of reference images; and determining the target reference image as the target image.
The angle values of the plurality of second angles may be all angle values within a preset angle range, and the preset angle range may be determined according to the first angle, that is, differences between all angle values included within the preset angle range and the angle values of the first angle are smaller than the preset angle value. For example, the first angle is 30 °, the plurality of second angles may be 30.5 °, 29.5 °, etc. At this time, the target image may be displayed in a main display area of the electronic device, and the generated multiple reference images may be displayed at preset area positions, for example, as shown in fig. 4c, three pictures displayed in a lower preset area of the main display area are the reference images determined according to the second imaging plane. The method and the device have the advantages that the user can visually see the image slightly adjusted to the current first angle on the display area, the user can conveniently and directly select one image from the reference images below as the target object, the adjustment times of the user to the first angle are reduced, and the photographing efficiency of the user is improved. And the situation that the first angle cannot be quickly adjusted to a proper position due to difficulty in fine operation when a user manually adjusts the angle can be avoided, and the user experience is improved.
Therefore, in this example, the plurality of reference images determined according to the second imaging plane are simultaneously displayed in the display area, so that the photographing efficiency can be improved, and the use experience of the user can be improved.
In one possible example, the acquiring the target image according to the first imaging plane includes: acquiring direction information and position information corresponding to each pixel point on the first imaging plane, wherein the direction information is associated with a third imaging plane, the position information is associated with the first imaging plane, and the third imaging plane is an original imaging plane corresponding to the light field camera module; determining a pixel value corresponding to each pixel point according to the direction information and the position information; and acquiring the target image according to the pixel value corresponding to each pixel point.
As shown in fig. 4d, the image of the point a' on the first imaging plane can be obtained by integrating all the light rays passing through the point. For example, the light rays a ', BA' and C in fig. 4d intersect at the point B and the point C on the original image plane, that is, the light intensities of the light rays a ', BA' and C can be obtained from the light intensities (i.e., the pixel values of the pixel points) at the point B and the point C. The light intensity at point a ', i.e. the image of that point, can be obtained by integrating (i.e. summing) the light at all points a'. By the above method, an image formed by any virtual plane can be obtained. As shown in fig. 4e, a three-dimensional rectangular coordinate system is established with the center point of the image plane, and for a point (s ', t', α × l) in a refocus plane, the resulting image can be calculated by the following formula:
Figure BDA0003474299650000071
wherein, α × l is a distance from the first imaging plane to the lens plane, l is a distance from the lens plane to the original imaging plane, and α is a refocus parameter. Since the position of the pixel under the microlens array relative to the center of the microlens, that is, the position on the third imaging plane, that is, the original imaging plane, is the direction information, (u ', v') is the position coordinate of the pixel point on the third imaging plane, (u ', v') is the position information, the actual position on the first imaging plane is the position information, and (s ', t') is the position of the pixel point on the first imaging plane. Given an input light field image, refocusing parameter α, using the coordinates of the center of each microlens, then accumulating the interpolation result for a first imaging plane, which may also be referred to as a certain point a (s ', t', α × l) on the refocusing plane, according to the above formula and the light intensity corresponding to the point a on the first imaging plane, to obtain the image pixel value of the point, and repeating the above calculation steps until a complete image is pieced together.
Therefore, in the example, the photographing effect of the shift lens can be realized by the light field camera through an algorithm under the condition of not increasing additional equipment and space volume.
Referring to fig. 5, fig. 5 is a block diagram illustrating functional units of a photographing apparatus according to an embodiment of the present disclosure. The photographing apparatus 50 is applied to an electronic device, and the apparatus includes: a first obtaining unit 501, configured to obtain a preview image through a light field camera module of the electronic device; a first determining unit 502 for determining a focus position of the light field camera module from the preview image; a second determining unit 503, configured to determine, according to the preview image, a first angle of a first imaging plane of the light field camera module relative to a lens plane, where the first imaging plane is a refocus plane corresponding to the light field camera module; a generating unit 504, configured to generate the first imaging plane according to the first angle and the in-focus position; a second obtaining unit 505, configured to obtain a target image according to the first imaging plane.
In one possible example, in terms of the determining the first angle of the first imaging plane of the light field camera module with respect to the lens plane from the preview image, the second determining unit 503 is specifically configured to: receiving a first operation aiming at an angle adjusting control; adjusting an angle parameter corresponding to the angle adjustment control according to the first operation, wherein the angle parameter is used for indicating an angle of the first imaging plane relative to the lens plane; determining a first angle of a first imaging plane of the light field camera module relative to a lens plane according to the angle parameter.
In one possible example, in terms of the determining the first angle of the first imaging plane of the light field camera module with respect to the lens plane from the preview image, the second determining unit 503 is specifically configured to: determining a target object according to the preview image; determining the deformation degree of the target object in the preview image; and determining a first angle of a first imaging surface of the light field camera module relative to a lens plane according to the deformation degree.
In one possible example, in terms of the determining the first angle of the first imaging plane of the light field camera module relative to the lens plane according to the deformation degree, the second determining unit 503 is specifically configured to: determining the angle adjustment range of the first imaging surface according to the deformation degree; determining the proportion of a focus area of the preview image in the preview image; determining the position of an unfocused area in the preview image under the condition that the ratio is smaller than a preset value; and determining a first angle of a first imaging plane of the light field camera module relative to a lens plane according to the position of the unfocused region and the angle adjusting range.
In one possible example, in terms of the determining the first angle of the first imaging plane of the light field camera module relative to the lens plane according to the deformation degree, the second determining unit 503 is specifically configured to: determining the angle adjustment range of the first imaging surface according to the deformation degree; receiving a second operation for the preview image; determining the position of a target focusing area according to the second operation; and determining a first angle of the first imaging surface of the light field camera module relative to a lens plane according to the position of the target focusing area and the angle adjusting range.
In one possible example, after the acquiring the target image according to the first imaging plane, the apparatus 50 is further configured to: determining a plurality of second angles according to the first angle; generating a plurality of second imaging surfaces according to the plurality of second angles and the focusing positions respectively; generating a plurality of reference images according to the plurality of second imaging surfaces; receiving a third operation for the plurality of reference images, the third operation for determining a target reference image, the target reference image being a reference image of the plurality of reference images; and determining the target reference image as the target image.
In a possible example, in the aspect of acquiring the target image according to the first imaging plane, the second acquiring unit 505 is specifically configured to: acquiring direction information and position information corresponding to each pixel point on the first imaging plane, wherein the direction information is associated with a third imaging plane, the position information is associated with the first imaging plane, and the third imaging plane is an original imaging plane corresponding to the light field camera module; determining a pixel value corresponding to each pixel point according to the direction information and the position information; and acquiring the target image according to the pixel value corresponding to each pixel point.
It can be understood that, since the method embodiment and the apparatus embodiment are different presentation forms of the same technical concept, the content of the method embodiment portion in the present application should be synchronously adapted to the apparatus embodiment portion, and is not described herein again.
In the case of using an integrated unit, as shown in fig. 6, fig. 6 is a block diagram of a functional unit of another photographing apparatus provided in the embodiment of the present application. In fig. 6, the photographing apparatus 600 includes: a processing module 612 and a communication module 611. The processing module 612 is used to control and manage the actions of the photographing apparatus, for example, to perform the steps of the first acquiring unit 501, the first determining unit 502, the second determining unit 503, the generating unit 504, and the second acquiring unit 505, and/or to perform other processes of the techniques described herein. The communication module 611 is used for interaction between the photographing apparatus and other devices. As shown in fig. 6, the photographing apparatus may further include a storage module 613, and the storage module 613 is used to store program codes and data of the photographing apparatus.
The Processing module 612 may be a Processor or a controller, and may be, for example, a Central Processing Unit (CPU), a general-purpose Processor, a Digital Signal Processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others. The communication module 611 may be a transceiver, an RF circuit or a communication interface, etc. The storage module 613 may be a memory.
All relevant contents of each scene related to the method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again. The photographing apparatus 600 can perform the photographing method shown in fig. 4 a.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device includes hardware structures and software modules for performing the respective functions in order to realize the functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Embodiments of the present application further provide a chip, where the chip includes a processor, configured to call and run a computer program from a memory, so that a device in which the chip is installed performs some or all of the steps described in the electronic device in the above method embodiments.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications can be easily made by those skilled in the art without departing from the spirit and scope of the present invention, and it is within the scope of the present invention to include different functions, combination of implementation steps, software and hardware implementations.

Claims (10)

1. A photographing method is applied to an electronic device, and the method comprises the following steps:
acquiring a preview image by a light field camera module of the electronic device;
determining a focus position of the light field camera module from the preview image;
determining a first angle of a first imaging surface of the light field camera module relative to a lens plane according to the preview image, wherein the first imaging surface is a refocus plane corresponding to the light field camera module;
generating the first imaging surface according to the first angle and the focusing position;
and acquiring a target image according to the first imaging surface.
2. The method of claim 1, wherein said determining a first angle of a first imaging plane of the light field camera module relative to a lens plane from the preview image comprises:
receiving a first operation aiming at an angle adjusting control;
adjusting an angle parameter corresponding to the angle adjustment control according to the first operation, wherein the angle parameter is used for indicating an angle of the first imaging plane relative to the lens plane;
determining a first angle of a first imaging plane of the light field camera module relative to a lens plane according to the angle parameter.
3. The method of claim 1, wherein said determining a first angle of a first imaging plane of the light field camera module relative to a lens plane from the preview image comprises:
determining a target object according to the preview image;
determining the deformation degree of the target object in the preview image;
and determining a first angle of a first imaging surface of the light field camera module relative to a lens plane according to the deformation degree.
4. The method of claim 3, wherein said determining a first angle of a first imaging plane of the light field camera module relative to a lens plane based on the degree of deformation comprises:
determining the angle adjustment range of the first imaging surface according to the deformation degree;
determining the proportion of a focus area of the preview image in the preview image;
determining the position of an unfocused area in the preview image under the condition that the ratio is smaller than a preset value;
and determining a first angle of a first imaging plane of the light field camera module relative to a lens plane according to the position of the unfocused region and the angle adjusting range.
5. The method of claim 3, wherein said determining a first angle of a first imaging plane of the light field camera module relative to a lens plane based on the degree of deformation comprises:
determining the angle adjustment range of the first imaging surface according to the deformation degree;
receiving a second operation for the preview image;
determining the position of a target focusing area according to the second operation;
and determining a first angle of the first imaging surface of the light field camera module relative to a lens plane according to the position of the target focusing area and the angle adjusting range.
6. The method according to any one of claims 1-5, wherein after acquiring the target image according to the first imaging plane, the method further comprises:
determining a plurality of second angles according to the first angle;
generating a plurality of second imaging surfaces according to the plurality of second angles and the focusing positions respectively;
generating a plurality of reference images according to the plurality of second imaging surfaces;
receiving a third operation for the plurality of reference images, the third operation for determining a target reference image, the target reference image being a reference image of the plurality of reference images;
and determining the target reference image as the target image.
7. The method of claim 1, wherein said acquiring a target image from said first imaging plane comprises:
acquiring direction information and position information corresponding to each pixel point on the first imaging plane, wherein the direction information is associated with a third imaging plane, the position information is associated with the first imaging plane, and the third imaging plane is an original imaging plane corresponding to the light field camera module;
determining a pixel value corresponding to each pixel point according to the direction information and the position information;
and acquiring the target image according to the pixel value corresponding to each pixel point.
8. A photographing apparatus applied to an electronic device, the apparatus comprising:
a first acquisition unit for acquiring a preview image by a light field camera module of the electronic device;
a first determining unit for determining a focus position of the light field camera module from the preview image;
a second determining unit, configured to determine, according to the preview image, a first angle of a first imaging plane of the light field camera module relative to a lens plane, where the first imaging plane is a refocus plane corresponding to the light field camera module;
a generating unit configured to generate the first imaging plane according to the first angle and the focusing position;
and the second acquisition unit is used for acquiring a target image according to the first imaging surface.
9. An electronic device comprising a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-7.
CN202210051913.0A 2022-01-17 2022-01-17 Photographing method and related device Pending CN114363522A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210051913.0A CN114363522A (en) 2022-01-17 2022-01-17 Photographing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210051913.0A CN114363522A (en) 2022-01-17 2022-01-17 Photographing method and related device

Publications (1)

Publication Number Publication Date
CN114363522A true CN114363522A (en) 2022-04-15

Family

ID=81091420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210051913.0A Pending CN114363522A (en) 2022-01-17 2022-01-17 Photographing method and related device

Country Status (1)

Country Link
CN (1) CN114363522A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115096194A (en) * 2022-07-27 2022-09-23 深圳市深视智能科技有限公司 Displacement measuring probe, measuring device and displacement measuring method
CN117412174A (en) * 2023-12-15 2024-01-16 荣耀终端有限公司 Shooting method and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103813104A (en) * 2014-03-12 2014-05-21 爱佩仪光电技术(深圳)有限公司 Method for realizing shift photography and three-dimensional multi-region automatic focusing through touch screen operation
CN111246106A (en) * 2020-01-22 2020-06-05 维沃移动通信有限公司 Image processing method, electronic device, and computer-readable storage medium
CN112101361A (en) * 2020-11-20 2020-12-18 深圳佑驾创新科技有限公司 Target detection method, device and equipment for fisheye image and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103813104A (en) * 2014-03-12 2014-05-21 爱佩仪光电技术(深圳)有限公司 Method for realizing shift photography and three-dimensional multi-region automatic focusing through touch screen operation
CN111246106A (en) * 2020-01-22 2020-06-05 维沃移动通信有限公司 Image processing method, electronic device, and computer-readable storage medium
CN112101361A (en) * 2020-11-20 2020-12-18 深圳佑驾创新科技有限公司 Target detection method, device and equipment for fisheye image and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115096194A (en) * 2022-07-27 2022-09-23 深圳市深视智能科技有限公司 Displacement measuring probe, measuring device and displacement measuring method
CN117412174A (en) * 2023-12-15 2024-01-16 荣耀终端有限公司 Shooting method and related equipment
CN117412174B (en) * 2023-12-15 2024-05-17 荣耀终端有限公司 Shooting method and related equipment

Similar Documents

Publication Publication Date Title
US10425638B2 (en) Equipment and method for promptly performing calibration and verification of intrinsic and extrinsic parameters of a plurality of image capturing elements installed on electronic device
WO2018201809A1 (en) Double cameras-based image processing device and method
WO2019105214A1 (en) Image blurring method and apparatus, mobile terminal and storage medium
CN108076278B (en) Automatic focusing method and device and electronic equipment
CN108432230B (en) Imaging device and method for displaying an image of a scene
CN111479065B (en) Camera field angle synchronization method and device and image shooting method and device
US9300858B2 (en) Control device and storage medium for controlling capture of images
WO2021136078A1 (en) Image processing method, image processing system, computer readable medium, and electronic apparatus
CN110677621B (en) Camera calling method and device, storage medium and electronic equipment
CN110213491B (en) Focusing method, device and storage medium
CN110602400B (en) Video shooting method and device and computer readable storage medium
CN114363522A (en) Photographing method and related device
CN110493525A (en) Zoom image determines method and device, storage medium, terminal
CN110177210B (en) Photographing method and related device
CN109409147A (en) A kind of bar code recognition and device
CN110213492B (en) Device imaging method and device, storage medium and electronic device
WO2011014421A2 (en) Methods, systems, and computer-readable storage media for generating stereoscopic content via depth map creation
CN110166680B (en) Device imaging method and device, storage medium and electronic device
WO2021134179A1 (en) Focusing method and apparatus, photographing device, movable platform and storage medium
WO2014008320A1 (en) Systems and methods for capture and display of flex-focus panoramas
CN110740246A (en) image correction method, mobile device and terminal device
JP6283329B2 (en) Augmented Reality Object Recognition Device
CN110312075B (en) Device imaging method and device, storage medium and electronic device
WO2023221969A1 (en) Method for capturing 3d picture, and 3d photographic system
CN103426143B (en) Image editing method and relevant fuzzy parameter method for building up

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