CN116939351A - Shooting method, shooting device, electronic equipment and readable storage medium - Google Patents

Shooting method, shooting device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN116939351A
CN116939351A CN202210345766.8A CN202210345766A CN116939351A CN 116939351 A CN116939351 A CN 116939351A CN 202210345766 A CN202210345766 A CN 202210345766A CN 116939351 A CN116939351 A CN 116939351A
Authority
CN
China
Prior art keywords
camera
determining
expected
angle
shooting
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
CN202210345766.8A
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202210345766.8A priority Critical patent/CN116939351A/en
Publication of CN116939351A publication Critical patent/CN116939351A/en
Pending legal-status Critical Current

Links

Landscapes

  • Studio Devices (AREA)

Abstract

The disclosure provides a shooting method, a shooting device, an electronic device and a readable storage medium, which are applied to a terminal device with a camera, wherein the shooting method comprises the following steps: determining an expected shooting position of the camera according to a shooting algorithm and the preview image, wherein the image acquired by the camera accords with a set standard under the condition that the camera moves to the expected shooting position; and determining and displaying first guide information according to the current shooting position of the camera and the expected shooting position. According to the method and the device, the expected shooting position of the camera is determined through the preview image, and the current shooting position of the camera is combined, the first guiding information is determined and displayed to prompt the photographer to move the camera until the image collected by the camera meets the set standard, auxiliary prompt is provided for the photographer, the photographer is helped to find the optimal shooting angle and the shooting position to obtain the high-quality image, the influence of subjective aesthetic feeling of the photographer on the image quality is avoided, and the user experience is improved.

Description

Shooting method, shooting device, electronic equipment and readable storage medium
Technical Field
The disclosure relates to the field of photography technology, and in particular, to a photographing method, a photographing device, an electronic device and a readable storage medium.
Background
Currently, with the continuous development of photography, the quality requirements of users on images are also continuously improved. Although some shooting methods are currently capable of beautifying a finished image shot by a user to improve image quality. However, in the shooting process, the user can still only rely on subjective judgment to perform framing operations such as composition, bright and dark design and the like, the shooting process is easily affected by subjective aesthetic feeling of the user, and the quality level of the finished image is difficult to guarantee.
Disclosure of Invention
In view of the above, the present disclosure provides a photographing method, apparatus, electronic device and readable storage medium, which at least solve the problem that the related art cannot assist the photographer in optimizing the image quality.
According to a first aspect of an embodiment of the present disclosure, there is provided a photographing method applied to a terminal device having a camera, the method including:
acquiring a preview image acquired by the camera;
determining an expected shooting position of the camera according to a shooting algorithm and the preview image, wherein the image acquired by the camera accords with a set standard under the condition that the camera moves to the expected shooting position;
and determining and displaying first guide information according to the current shooting position and the expected shooting position of the camera, wherein the first guide information is used for prompting a photographer to move the camera to the expected shooting position.
In combination with any one of the embodiments of the present disclosure, the determining the desired shooting position of the camera includes:
acquiring a desired image according to the preview image, wherein the determined parameters of the desired image conforming to the setting standard comprise the proportion, angle, illumination and picture layout of target information in the image;
and determining the expected shooting position of the camera according to the relative offset of the expected image and the preview image.
In combination with any one of the embodiments of the present disclosure, the shooting algorithm is integrated in a preview queue of a hardware abstraction layer of the terminal device, and after obtaining a preview image collected by the camera, the method further includes:
and sending the preview image to a shooting algorithm node in a preview queue of a hardware abstraction layer of the terminal equipment.
In combination with any one of the embodiments of the present disclosure, before acquiring the preview image acquired by the camera, the method further includes:
and displaying second guide information, wherein the second guide information is used for prompting a photographer to move the position and the angle of the camera so as to acquire multi-frame preview images of the current shooting environment.
In combination with any one of the embodiments of the present disclosure, after acquiring the preview image acquired by the camera, the method further includes:
Acquiring target information of the preview image;
and determining the shooting algorithm according to the target information, wherein the shooting algorithm is used for determining whether the preview image accords with a setting standard corresponding to the target information.
In combination with any of the embodiments of the present disclosure, the determining and displaying the first guiding information includes:
acquiring a current shooting position of the camera, wherein the current shooting position comprises a current coordinate and a current angle of the camera;
determining expected coordinates and an expected angle of the camera according to the expected shooting position of the camera, wherein under the condition that the camera moves to the expected coordinates and rotates to the expected angle, an image acquired by the camera accords with a set standard;
determining a path to be moved of the camera according to the deviation states of the expected coordinate and the current coordinate, and determining a angle to be rotated of the camera according to the deviation states of the expected angle and the current angle;
and determining and displaying first guiding information according to the path to be moved and the angle to be rotated.
In combination with any of the embodiments of the present disclosure, the method further comprises:
determining a motion model of the camera according to the current coordinate and the current moving state of the camera, and the current angle and the current rotating state of the camera through a Kalman filtering algorithm;
Determining a predicted moving path of the camera and a predicted rotating angle of the camera according to the kinematic model of the camera;
determining a corrected moving path of the camera according to the predicted moving path and the path to be moved, and determining a corrected rotating angle of the camera according to the predicted rotating angle and the angle to be rotated;
and determining and displaying third guide information according to the corrected moving path and the corrected rotating angle, wherein the third guide information is used for prompting a photographer to move the camera to the expected shooting position.
According to a second aspect of embodiments of the present disclosure, there is provided a photographing apparatus applied to a terminal device having a camera, the apparatus including:
an image acquisition module: acquiring a preview image acquired by the camera;
a desired shooting position generation module: determining an expected shooting position of the camera according to a shooting algorithm and the preview image, wherein the image acquired by the camera accords with a set standard under the condition that the camera moves to the expected shooting position;
the first information prompt module: the camera shooting device is used for determining and displaying first guide information according to the current shooting position and the expected shooting position of the camera, and the first guide information is used for prompting a photographer to move the camera to the expected shooting position.
In combination with any one of the embodiments of the present disclosure, the expected photographing position generating module determines an expected photographing position of the camera, and is specifically configured to:
acquiring a desired image according to the preview image, wherein the determined parameters of the desired image conforming to the setting standard comprise the proportion, angle, illumination and picture layout of target information in the image;
and determining the expected shooting position of the camera according to the relative offset of the expected image and the preview image.
In combination with any one of the embodiments of the present disclosure, the shooting algorithm is integrated in a preview queue of a hardware abstraction layer of the terminal device, and after obtaining a preview image collected by the camera, the apparatus further includes an image sending module, configured to:
and sending the preview image to a shooting algorithm node in a preview queue of a hardware abstraction layer of the terminal equipment.
In combination with any one of the embodiments of the present disclosure, before acquiring the preview image acquired by the camera, the apparatus further includes a second information prompting module configured to:
and displaying second guide information, wherein the second guide information is used for prompting a photographer to move the position and the angle of the camera so as to acquire multi-frame preview images of the current shooting environment.
In combination with any one of the embodiments of the present disclosure, after acquiring the preview image acquired by the camera, the apparatus further includes a preview image expansion module configured to:
acquiring target information of the preview image;
and determining the shooting algorithm according to the target information, wherein the shooting algorithm is used for determining whether the preview image accords with a setting standard corresponding to the target information.
In combination with any embodiment of the disclosure, the first information prompting module determines and displays first guiding information, which is specifically used for:
acquiring a current shooting position of the camera, wherein the current shooting position comprises a current coordinate and a current angle of the camera;
determining expected coordinates and an expected angle of the camera according to the expected shooting position of the camera, wherein under the condition that the camera moves to the expected coordinates and rotates to the expected angle, an image acquired by the camera accords with a set standard;
determining a path to be moved of the camera according to the deviation states of the expected coordinate and the current coordinate, and determining a angle to be rotated of the camera according to the deviation states of the expected angle and the current angle;
And determining and displaying first guiding information according to the path to be moved and the angle to be rotated.
In combination with any one of the embodiments of the present disclosure, the apparatus further includes a correction information prompting module configured to:
determining a motion model of the camera according to the current coordinate and the current moving state of the camera, and the current angle and the current rotating state of the camera through a Kalman filtering algorithm;
determining a predicted moving path of the camera and a predicted rotating angle of the camera according to the kinematic model of the camera;
determining a corrected moving path of the camera according to the predicted moving path and the path to be moved, and determining a corrected rotating angle of the camera according to the predicted rotating angle and the angle to be rotated;
and determining and displaying third guide information according to the corrected moving path and the corrected rotating angle, wherein the third guide information is used for prompting a photographer to move the camera to the expected shooting position.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
a memory for storing the processor-executable instructions;
A processor configured to execute executable instructions in the memory to implement the steps of the method of any of the embodiments of the first aspect described above.
According to a fourth aspect of the disclosed embodiments, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method according to any of the embodiments of the first aspect described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
the expected shooting position of the camera is determined through the preview image, and the current shooting position of the camera is combined, and the first guiding information is determined and displayed to prompt the photographer to move the camera until the image collected by the camera meets the set standard, so that auxiliary prompt is provided for the photographer, the photographer is helped to find the optimal shooting angle and the shooting position to obtain a high-quality image, the influence of subjective aesthetic feeling of the photographer on the image quality is avoided, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flowchart of a photographing method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flowchart of a desired capture position determination method according to an exemplary embodiment of the present disclosure;
FIG. 3 is a schematic illustration of an indication interface according to an exemplary embodiment of the present disclosure;
fig. 4 is a schematic diagram of a photographing method apparatus according to an exemplary embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
Fig. 1 illustrates a flowchart of a photographing method according to an exemplary embodiment of the present disclosure.
In step S101, a preview image acquired by the camera is acquired.
After the terminal device turns on the camera, the camera may collect preview images in real time, and in one example, each frame of preview image of the preview images may be obtained in real time through a Kernel (Kernel) of the terminal device.
In step S102, a desired shooting position of the camera is determined according to a shooting algorithm and a preview image, wherein the image acquired by the camera meets a set standard when the camera moves to the desired shooting position.
And the shooting algorithm is used for generating an expected shooting position of the camera based on the preview image so as to ensure that the image acquired by the camera accords with a set standard under the condition that the number of cameras are moved to the expected shooting position. Wherein the set criteria may include any image quality criteria such as illumination criteria in an image frame, layout criteria, proportion criteria of target information in an image, etc., or aesthetic quality criteria combining at least two criteria.
In an optional embodiment, the shooting algorithm is integrated in a preview queue of a hardware abstraction layer of the terminal device, and after acquiring the preview image acquired by the camera, the method further includes:
and sending the preview image to a shooting algorithm node in a preview queue of a hardware abstraction layer of the terminal equipment so as to determine the expected shooting position of the camera through a shooting algorithm.
After each frame of preview image of the preview image is obtained in real time through a kernel of the terminal equipment, the preview image is sent to a Hardware Abstraction Layer (HAL) of the terminal equipment, each frame of preview image is sequenced according to shooting time, the preview queue is obtained, the preview queue is sent to the shooting algorithm node according to a set time interval, and the expected shooting position of the camera is determined.
Fig. 2 illustrates a flowchart of a desired photographing position determining method according to an exemplary embodiment of the present disclosure.
In step S1021, a desired image is obtained according to the preview image, where the desired image meets a set standard, and the determined parameters of the set standard include a proportion, an angle, illumination, and a screen layout of target information in the image.
The target information may be determined by a shooting environment of a preview image, in which case the target information of the preview image may be a human face or a human body, and in which case the target information of the preview image may be a scenic subject, such as a building, a mountain, a flower cluster, etc., which generally has a high degree of significance, may be detected by a method of combining significant region detection with target information region division. It will be appreciated that the target information may include one of the figures or landscapes, or may include a plurality of different kinds of photographic subjects at the same time.
The ratio may include at least one of an aspect ratio of the target information itself in the preview image and a ratio of the target information to the overall image, and in one example, the ratio criterion meets the set criterion in a case where the aspect ratio of the target information itself meets the golden section rule and/or where the area ratio of two areas dividing the preview image by a horizontal line meets the golden ratio based on the visual balance rule.
The angle may include at least one of an angle between the target information and a center point of the image, and a relative angle between the plurality of target information, for example, the angle may include an angle between the person and other scenic subjects in the shooting environment, such as trees, in the case where the camera shoots the person. In one example, the angle standard meets the setting standard in a case where the angle of the target information with the center point of the preview image is within a preset angle threshold interval.
The illumination may be determined according to at least one of contrast, color distribution, number of hues, sharpness of the preview image. Compared with the condition that the shooting environment where the camera is located has good illumination conditions and the condition that the illumination conditions are not good, the preview image has the advantages of high contrast, uniform color distribution, multiple color tones and high definition. In one example, the illumination criterion meets the set criterion in case the contrast of the preview image is within a preset contrast threshold interval.
The frame layout may be determined by a composition rule of the preview frame, and in one example, the frame may be divided into three equal parts in a horizontal direction and a vertical direction by a three-part composition method to form a # -shaped grid having 4 intersection points, and since the attention of a person to an image usually looks at four intersection points instead of the center of the image, it may be determined that the frame layout standard meets the set standard in a case that the target image is located at least one intersection point of the four intersection points.
It can be understood that the above threshold and threshold interval can be adjusted by empirically summarizing manual setting, or the related parameter information about the setting standard in the preview image can be extracted through a multi-channel convolution network, and whether the aesthetic quality of the preview image meets the setting standard is determined through the full connection layer of the network.
In one example, whether at least one frame of preview image collected by the camera accords with a set standard may be determined in advance, and if the preview image accords with the set standard, the current frame structure of the photographer is indicated to accord with a set aesthetic standard, and the photographer may be prompted to take the photograph at the current photographing position without performing subsequent algorithm processing, so as to reduce the operation pressure of the terminal device.
In another example, to save power consumption and operation pressure of the terminal device, a mode switch may be set for the photographer to actively select whether or not it is necessary to enter the photographing method of the present disclosure to obtain the instruction information.
And carrying out beautification treatment on the preview image according to the shooting algorithm to obtain a desired image meeting a set standard, wherein the beautification flow at least comprises:
target information size optimization: after the target information is detected, the size of the target information is placed in a ratio meeting the set standard, for example, the ratio of the size of the target information area to the size of the whole image is adjusted to be 0.82, and/or the aspect ratio of the target image is adjusted to be the golden ratio.
Background area repair: after the size of the target information is optimized, a vacant area possibly appears between the environmental background information except the target information and the target information in the image, and after the area to be repaired and the boundary thereof are determined, the vacant area in the background area can be repaired by a pixel filling method.
Layout structure optimization: such images with obvious vertical or horizontal layout can be optimized by visual area balance rules for images without obvious target information: after detecting the area dividing line, the method of stretching the area on either side of the dividing line is adopted to realize that the area size ratio on both sides of the dividing line meets the golden section ratio. For the image with obvious target information, the target information of the image can be adjusted to four focus positions of the well lattice according to the three-division communication graph method.
The method for performing angle optimization and illumination condition optimization on the preview image is not limited herein.
In step S1022, a desired photographing position of the camera is determined according to the relative offset of the desired image and the preview image.
And carrying out feature detection and matching on the pixel feature points in the expected image and the preview image, and acquiring the relative movement state of each pixel feature point in the expected image relative to the pixel feature point in the preview image. And the shooting algorithm determines the moving distance and the moving direction required by the movement of the pixel characteristic points in the preview image to the corresponding pixel characteristic points in the expected image according to the relative moving state. The expected shooting position is a position state of the camera in a world coordinate system when the camera moves to enable the pixel characteristic points in the preview image to move to the corresponding pixel characteristic points in the expected image, and the position state comprises a camera rotation matrix and a moving distance.
In step S103, according to the current shooting position of the camera and the desired shooting position, first guiding information is determined and displayed, where the first guiding information is used to prompt a photographer to move the camera to the desired shooting position.
And the current shooting position can be used for acquiring a rotation matrix of the camera by using the current coordinate of the camera as a coordinate origin through a gyroscope. And determining the relative angle and the relative distance required to be offset by the rotation matrix of the camera in a world coordinate system when the current rotation matrix of the camera and the pixel characteristic points in the preview image are moved to the corresponding pixel characteristic points in the expected image by the movement of the camera. The relative distance comprises translation distance of the camera along x, y and z three axes, and the relative angle comprises relative angle (head angle, pitch angle and roll angle) of the camera rotating around the x, y and z three axes. And generating the first guiding information based on the relative angle and the relative distance of the camera to be offset.
Fig. 3 illustrates a schematic diagram of an indication interface according to an exemplary embodiment of the present disclosure.
As shown in fig. 3, the 6-degree-of-freedom information to be moved of the camera is indicated by an arrow, a photographer can move the camera in a straight line by a straight line arrow in a photographing interface, and the camera can be rotated along a coordinate axis by a rotation arrow.
According to the method, the expected shooting position of the camera is determined through the preview image, and the current shooting position of the camera is combined, so that the first guiding information is determined and displayed to prompt the photographer to move the camera until the image collected by the camera meets the set standard, an auxiliary prompt is provided for the photographer, the photographer is helped to find the optimal shooting angle and the shooting position to obtain a high-quality image, the influence of subjective aesthetic feeling of the photographer on the image quality is avoided, and the user experience is improved.
In an alternative embodiment, after acquiring the preview image acquired by the camera, the method further includes:
acquiring target information of the preview image;
and determining the shooting algorithm according to the target information, wherein the shooting algorithm is used for determining whether the preview image accords with a setting standard corresponding to the target information.
The target information can be determined by the shooting environment of the preview image, and different shooting algorithms can be obtained according to different types of target information. Each photographing algorithm is used for processing one specific type of target information, in other words, a photographing algorithm corresponding to the specific type of target information may be used for performing targeted detection and judgment on the specific type of target information (such as a photographing object), that is, generating a desired image on the specific type of target information. In one example, after determining that the target information of the preview image is portrait information, the terminal device invokes a shooting algorithm library capable of generating the desired image for a portrait; after determining that the target information of the preview image is a landscape (e.g., a rosette), the terminal device invokes a library of shooting algorithms that are capable of generating the desired image for the rosette. The calling process can acquire the shooting algorithm from the storage area of the terminal equipment, and can prompt a photographer to download the shooting algorithm through a network by prompting information so as to reduce the occupation of the shooting algorithm on the memory space of the terminal equipment.
According to the method disclosed by the disclosure, different shooting algorithms are determined according to the target information, so that the terminal equipment can generate a more targeted expected image, the aesthetic quality of the image obtained by the camera is ensured under the condition that the camera moves to the expected shooting position, and the occupation of the shooting algorithm to the memory space of the terminal equipment is reduced.
In an alternative embodiment, the determining and displaying the first guiding information includes:
firstly, a current shooting position of the camera is obtained, wherein the current shooting position comprises a current coordinate and a current angle of the camera.
The current shooting position can be obtained by using a gyroscope and a current coordinate of a camera as a coordinate origin, searching an optimal transformation matrix through a neural network, mapping the coordinate origin and the rotation matrix determined by the camera by using a pixel coordinate system to a world coordinate system, and obtaining a shooting origin by using the camera as the coordinate system and an offset angle relative to the current coordinate axis.
And then, determining the expected coordinates and the expected angle of the camera according to the expected shooting position of the camera, wherein the image acquired by the camera accords with a set standard under the condition that the camera moves to the expected coordinates and rotates to the expected angle.
The expected shooting position is a position state of the camera in a world coordinate system when the camera moves to enable the pixel characteristic points in the preview image to move to the corresponding pixel characteristic points in the expected image, and the position state comprises a camera rotation matrix and a moving distance. The desired coordinates of the image capture map in the world coordinate system, and the offset angle with respect to the current coordinate axis may be acquired based on the desired capture position.
And finally, determining a path to be moved of the camera according to the offset states of the expected coordinate and the current coordinate, determining a angle to be rotated of the camera according to the offset states of the expected angle and the current angle, and determining and displaying first guide information according to the path to be moved and the angle to be rotated.
According to the coordinate position of the camera at the current shooting position and the coordinate position of the camera at the expected shooting position, the offset state of the expected coordinate and the current coordinate can be determined, and the path to be moved of the camera is generated according to the offset state. In one example, the expected coordinate of the camera is located at 30cm along the positive direction of the x-axis, and the path to be moved is to move the camera by 30cm along the positive direction of the x-axis. According to the offset angle of the camera relative to the coordinate axis at the current shooting position and the offset angle of the camera probe relative to the coordinate axis at the expected shooting position, the offset states of the expected angle and the current angle can be determined, and the angle to be rotated of the camera is generated according to the offset states. In one example, the desired angle of the camera is 30 ° rotated clockwise along the x-axis, the current angle of the camera is parallel to the x-axis, and the angle to be rotated is 30 ° rotated clockwise along the x-axis.
According to the method, the path to be moved of the camera is determined according to the expected coordinate and the offset state of the current coordinate, the angle to be rotated of the camera is determined according to the expected angle and the offset state of the current angle, and the first guiding information is determined and displayed to prompt a photographer to move the camera until the image collected by the camera meets the set standard, so that auxiliary prompt is provided for the photographer, the photographer is helped to find the optimal shooting angle and the shooting position to obtain a high-quality image, the influence of subjective aesthetic feeling of the photographer on the image quality is avoided, and the user experience is improved.
In an alternative embodiment, the method further comprises:
firstly, determining a motion model of the camera according to the current coordinate and the current moving state of the camera, and the current angle and the current rotating state of the camera through a Kalman filtering algorithm;
next, a predicted movement path of the camera and a predicted rotation angle of the camera are determined according to a kinematic model of the camera.
In one example, a current movement state of the camera may be acquired by an accelerometer of a terminal device, the current movement state including a movement direction, a movement speed, and a movement acceleration of the camera. The rotation state of the camera can be obtained through a gyroscope of the terminal equipment, and the current rotation state comprises the rotation direction and the rotation angular velocity of the camera. Based on Kalman filtering and an extended Kalman filtering algorithm, the motion state of the camera can be estimated by constructing a kinematic model of the camera in real time. In one example, after the current movement state and the current rotation state of the camera are acquired, the predicted movement position of the camera at any time in the future, that is, the predicted movement path and the predicted rotation angle of the camera, may be acquired. The method for performing state estimation by using kalman filtering is not described in detail herein.
And then, determining a corrected moving path of the camera according to the predicted moving path and the path to be moved, and determining a corrected rotating angle of the camera according to the predicted rotating angle and the angle to be rotated.
The path to be moved is a preset moving path determined according to the current coordinates and the expected coordinates of the camera. Likewise, the angle to be rotated is a preset rotation angle determined according to the current angle and the desired angle of the camera. After the camera moves along the path to be moved and rotates along the angle to be rotated, the image acquired by the camera accords with the set standard. However, during the process that the photographer holds the terminal device to move, the real moving state of the camera may deviate from the preset moving state. The correction movement path of the camera may be determined according to the predicted movement path and the to-be-moved path, for example, the to-be-moved path is moved by 30cm along the positive x-axis direction, the predicted movement path shows that the current device is moving along the negative x-axis direction, and the correction movement path is that the current movement path is corrected to move along the positive x-axis direction. Likewise, the corrected rotation angle of the camera may be determined according to the predicted rotation angle and the to-be-rotated angle, for example, the to-be-rotated angle is 30 ° clockwise along the x-axis, the predicted rotation angle indicates that the current device is rotating counterclockwise along the x-axis, and the corrected rotation angle is that the current rotation angle is corrected to rotate clockwise along the x-axis.
And finally, determining and displaying third guide information according to the corrected moving path and the corrected rotating angle, wherein the third guide information is used for prompting a photographer to move the camera to the expected shooting position.
In one example, the camera may be made aware of the need to correct the current camera's movement path and rotation angle by emphasizing the hint arrow in the camera interface. In another example, the action of the photographer may be adjusted by a text prompt message to make the photographer correct the current moving path and the rotation angle of the camera, for example, "please slightly move up the terminal device and rotate to the left".
According to the method, a motion model of the camera is determined through a Kalman filtering algorithm, correction information of the camera is determined and displayed based on the predicted moving state and the state to be moved, so that a photographer is prompted to correct the moving path and the rotating angle of the current camera, and the camera is enabled to successfully move to the expected shooting position.
In an alternative embodiment, before acquiring the preview image acquired by the camera, the method further includes:
And displaying second guide information, wherein the second guide information is used for prompting a photographer to move the position and the angle of the camera so as to acquire multi-frame preview images of the current shooting environment.
After the terminal device starts the camera, the camera starts to acquire the preview image in real time, in order to facilitate the terminal device to determine the target information in the preview image so as to improve the reliability of the generated expected image, second instruction information may be displayed, which is used to prompt the photographer to perform small-range mobile view finding on the whole shooting environment that the photographer wants to shoot, in one example, for the terminal device with the wide-angle lens, the wide-angle mode may be automatically started so as to acquire the multi-frame preview image of the current shooting environment. In one example, the second instruction information may be a text prompt, such as "please hold device is moving slowly, the system is performing a view analysis on the current environment.
According to the method, the photographer is prompted to move the position and the angle of the camera to acquire the multi-frame preview image of the current shooting environment, the reliability of the generated expected image is improved, and the aesthetic quality of the image acquired by the camera under the condition that the camera moves to the expected shooting position is guaranteed.
For the foregoing method embodiments, for simplicity of explanation, the methodologies are shown as a series of acts, but one of ordinary skill in the art will appreciate that the present disclosure is not limited by the order of acts described, as some steps may occur in other orders or concurrently in accordance with the disclosure.
Further, those skilled in the art will also appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts and modules referred to are not necessarily required by the present disclosure.
Corresponding to the embodiment of the application function implementation method, the disclosure also provides an embodiment of the application function implementation device and a corresponding terminal.
A block diagram of an apparatus for window adjustment according to an exemplary embodiment of the present disclosure is shown in fig. 4, where the apparatus includes:
image acquisition module 401: acquiring a preview image acquired by the camera;
desired shooting position generation module 402: determining an expected shooting position of the camera according to a shooting algorithm and the preview image, wherein the image acquired by the camera accords with a set standard under the condition that the camera moves to the expected shooting position;
first information prompt module 403: the camera shooting device is used for determining and displaying first guide information according to the current shooting position and the expected shooting position of the camera, and the first guide information is used for prompting a photographer to move the camera to the expected shooting position.
In combination with any one of the embodiments of the present disclosure, the expected photographing position generating module determines an expected photographing position of the camera, and is specifically configured to:
acquiring a desired image according to the preview image, wherein the determined parameters of the desired image conforming to the setting standard comprise the proportion, angle, illumination and picture layout of target information in the image;
and determining the expected shooting position of the camera according to the relative offset of the expected image and the preview image.
In combination with any one of the embodiments of the present disclosure, the shooting algorithm is integrated in a preview queue of a hardware abstraction layer of the terminal device, and after obtaining a preview image collected by the camera, the apparatus further includes an image sending module, configured to:
and sending the preview image to a shooting algorithm node in a preview queue of a hardware abstraction layer of the terminal equipment.
In combination with any one of the embodiments of the present disclosure, before acquiring the preview image acquired by the camera, the apparatus further includes a second information prompting module configured to:
and displaying second guide information, wherein the second guide information is used for prompting a photographer to move the position and the angle of the camera so as to acquire multi-frame preview images of the current shooting environment.
In combination with any one of the embodiments of the present disclosure, after acquiring the preview image acquired by the camera, the apparatus further includes a preview image expansion module configured to:
acquiring target information of the preview image;
and determining the shooting algorithm according to the target information, wherein the shooting algorithm is used for determining whether the preview image accords with a setting standard corresponding to the target information.
In combination with any embodiment of the disclosure, the first information prompting module determines and displays first guiding information, which is specifically used for:
acquiring a current shooting position of the camera, wherein the current shooting position comprises a current coordinate and a current angle of the camera;
determining expected coordinates and an expected angle of the camera according to the expected shooting position of the camera, wherein under the condition that the camera moves to the expected coordinates and rotates to the expected angle, an image acquired by the camera accords with a set standard;
determining a path to be moved of the camera according to the deviation states of the expected coordinate and the current coordinate, and determining a angle to be rotated of the camera according to the deviation states of the expected angle and the current angle;
And determining and displaying first guiding information according to the path to be moved and the angle to be rotated.
In combination with any one of the embodiments of the present disclosure, the apparatus further includes a correction information prompting module configured to:
determining a motion model of the camera according to the current coordinate and the current moving state of the camera, and the current angle and the current rotating state of the camera through a Kalman filtering algorithm;
determining a predicted moving path of the camera and a predicted rotating angle of the camera according to the kinematic model of the camera;
determining a corrected moving path of the camera according to the predicted moving path and the path to be moved, and determining a corrected rotating angle of the camera according to the predicted rotating angle and the angle to be rotated;
and determining and displaying third guide information according to the corrected moving path and the corrected rotating angle, wherein the third guide information is used for prompting a photographer to move the camera to the expected shooting position.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements described above as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the objectives of the disclosed solution. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Fig. 5 illustrates a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Referring to fig. 5, a block diagram of an electronic device is shown. For example, the apparatus 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, or the like.
Referring to fig. 5, an apparatus 500 may include one or more of the following components: a processing component 502, a memory 504, a power supply component 506, a multimedia component 508, an audio component 510, an input/output (I/O) interface 512, a sensor component 514, and a communication component 516.
The processing component 502 generally controls overall operation of the apparatus 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interactions between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
Memory 504 is configured to store various types of data to support operations at device 500. Examples of such data include instructions for any application or method operating on the apparatus 500, contact data, phonebook data, messages, pictures, videos, and the like. The memory 504 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 506 provides power to the various components of the device 500. The power components 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 500.
The multimedia component 508 includes a screen between the device 500 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front-facing camera and/or a rear-facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the apparatus 500 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 510 is configured to output and/or input audio signals. For example, the audio component 510 includes a Microphone (MIC) configured to receive external audio signals when the device 500 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in memory 504 or transmitted via communication component 516. In some embodiments, the audio component 510 includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 514 includes one or more sensors for providing status assessment of various aspects of the apparatus 500. For example, the sensor assembly 514 may detect the on/off state of the device 500, the relative positioning of the components, such as the display and keypad of the device 500, the sensor assembly 514 may detect a change in position of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration/deceleration of the device 500, and a change in temperature of the device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communication between the apparatus 500 and other devices in a wired or wireless manner. The apparatus 500 may access a wireless network based on a communication standard, such as WiFi,2G or 3G,4G or 5G, or a combination thereof. In one exemplary embodiment, the communication part 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 516 includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for performing the power supply methods of electronic devices described above.
In an exemplary embodiment, the present disclosure provides a non-transitory computer-readable storage medium, such as memory 504, comprising instructions executable by processor 520 of apparatus 500 to perform the method of powering an electronic device described above. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. A photographing method, which is applied to a terminal device having a camera, the method comprising:
acquiring a preview image acquired by the camera;
determining an expected shooting position of the camera according to a shooting algorithm and the preview image, wherein the image acquired by the camera accords with a set standard under the condition that the camera moves to the expected shooting position;
And determining and displaying first guide information according to the current shooting position and the expected shooting position of the camera, wherein the first guide information is used for prompting a photographer to move the camera to the expected shooting position.
2. The method of claim 1, wherein the determining the desired photographing position of the camera comprises:
acquiring a desired image according to the preview image, wherein the desired image accords with a setting standard, and the determining parameters of the setting standard comprise the proportion, angle, illumination and picture layout of target information in the image;
and determining the expected shooting position of the camera according to the relative offset of the expected image and the preview image.
3. The method of claim 1, wherein the shooting algorithm is integrated in a preview queue of a hardware abstraction layer of the terminal device, and after acquiring the preview image acquired by the camera, the method further comprises:
and sending the preview image to a shooting algorithm node in a preview queue of a hardware abstraction layer of the terminal equipment.
4. A method according to any one of claims 1 to 3, wherein after acquiring the preview image acquired by the camera, the method further comprises:
Acquiring target information of the preview image;
and determining the shooting algorithm according to the target information, wherein the shooting algorithm is used for determining whether the preview image accords with a setting standard corresponding to the target information.
5. The method of claim 1, wherein the determining and displaying the first instructional message comprises:
acquiring a current shooting position of the camera, wherein the current shooting position comprises a current coordinate and a current angle of the camera;
determining expected coordinates and an expected angle of the camera according to the expected shooting position of the camera, wherein under the condition that the camera moves to the expected coordinates and rotates to the expected angle, an image acquired by the camera accords with a set standard;
determining a path to be moved of the camera according to the deviation states of the expected coordinate and the current coordinate, and determining a angle to be rotated of the camera according to the deviation states of the expected angle and the current angle;
and determining and displaying first guiding information according to the path to be moved and the angle to be rotated.
6. The method of claim 5, wherein the method further comprises:
Determining a motion model of the camera according to the current coordinate and the current moving state of the camera, and the current angle and the current rotating state of the camera through a Kalman filtering algorithm;
determining a predicted moving path of the camera and a predicted rotating angle of the camera according to the kinematic model of the camera;
determining a corrected moving path of the camera according to the predicted moving path and the path to be moved, and determining a corrected rotating angle of the camera according to the predicted rotating angle and the angle to be rotated;
and determining and displaying third guide information according to the corrected moving path and the corrected rotating angle, wherein the third guide information is used for prompting a photographer to move the camera to the expected shooting position.
7. The method of claim 1, wherein prior to acquiring the preview image captured by the camera, the method further comprises:
and displaying second guide information, wherein the second guide information is used for prompting a photographer to move the position and the angle of the camera so as to acquire multi-frame preview images of the current shooting environment.
8. A photographing apparatus, which is applied to a terminal device having a camera, the apparatus comprising:
An image acquisition module: acquiring a preview image acquired by the camera;
a desired shooting position generation module: determining an expected shooting position of the camera according to a shooting algorithm and the preview image, wherein the image acquired by the camera accords with a set standard under the condition that the camera moves to the expected shooting position;
the first information prompt module: the camera shooting device is used for determining and displaying first guide information according to the current shooting position and the expected shooting position of the camera, and the first guide information is used for prompting a photographer to move the camera to the expected shooting position.
9. The apparatus of claim 8, wherein the desired capture location generation module determines a desired capture location of the camera, in particular for:
acquiring a desired image according to the preview image, wherein the desired image accords with a setting standard, and the determining parameters of the setting standard comprise the proportion, angle, illumination and picture layout of target information in the image;
and determining the expected shooting position of the camera according to the relative offset of the expected image and the preview image.
10. The apparatus of claim 8, wherein the shooting algorithm is integrated in a preview queue of a hardware abstraction layer of the terminal device, and after acquiring a preview image acquired by the camera, the apparatus further comprises an image sending module configured to:
And sending the preview image to a shooting algorithm node in a preview queue of a hardware abstraction layer of the terminal equipment.
11. The apparatus according to any one of claims 8 to 10, wherein after acquiring the preview image acquired by the camera, the apparatus further comprises a preview image expansion module for:
acquiring target information of the preview image;
and determining the shooting algorithm according to the target information, wherein the shooting algorithm is used for determining whether the preview image accords with a setting standard corresponding to the target information.
12. The apparatus of claim 8, wherein the first information prompting module determines and displays first guidance information, specifically for:
acquiring a current shooting position of the camera, wherein the current shooting position comprises a current coordinate and a current angle of the camera;
determining expected coordinates and an expected angle of the camera according to the expected shooting position of the camera, wherein under the condition that the camera moves to the expected coordinates and rotates to the expected angle, an image acquired by the camera accords with a set standard;
determining a path to be moved of the camera according to the deviation states of the expected coordinate and the current coordinate, and determining a angle to be rotated of the camera according to the deviation states of the expected angle and the current angle;
And determining and displaying first guiding information according to the path to be moved and the angle to be rotated.
13. The apparatus of claim 12, further comprising a correction information prompting module configured to:
determining a motion model of the camera according to the current coordinate and the current moving state of the camera, and the current angle and the current rotating state of the camera through a Kalman filtering algorithm;
determining a predicted moving path of the camera and a predicted rotating angle of the camera according to the kinematic model of the camera;
determining a corrected moving path of the camera according to the predicted moving path and the path to be moved, and determining a corrected rotating angle of the camera according to the predicted rotating angle and the angle to be rotated;
and determining and displaying third guide information according to the corrected moving path and the corrected rotating angle, wherein the third guide information is used for prompting a photographer to move the camera to the expected shooting position.
14. The apparatus of claim 8, wherein prior to acquiring the preview image captured by the camera, the apparatus further comprises a second information prompting module configured to:
And displaying second guide information, wherein the second guide information is used for prompting a photographer to move the position and the angle of the camera so as to acquire multi-frame preview images of the current shooting environment.
15. An electronic device, the electronic device comprising:
a memory for storing processor-executable instructions;
a processor configured to execute executable instructions in the memory to implement the steps of the method of any one of claims 1 to 7.
16. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202210345766.8A 2022-03-31 2022-03-31 Shooting method, shooting device, electronic equipment and readable storage medium Pending CN116939351A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210345766.8A CN116939351A (en) 2022-03-31 2022-03-31 Shooting method, shooting device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210345766.8A CN116939351A (en) 2022-03-31 2022-03-31 Shooting method, shooting device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116939351A true CN116939351A (en) 2023-10-24

Family

ID=88379363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210345766.8A Pending CN116939351A (en) 2022-03-31 2022-03-31 Shooting method, shooting device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116939351A (en)

Similar Documents

Publication Publication Date Title
EP3010226B1 (en) Method and apparatus for obtaining photograph
CN106572299B (en) Camera opening method and device
EP3032821B1 (en) Method and device for shooting a picture
CN111586282B (en) Shooting method, shooting device, terminal and readable storage medium
CN107426502B (en) Shooting method and device, electronic equipment and storage medium
CN105282441B (en) Photographing method and device
CN108462833B (en) Photographing method, photographing device and computer-readable storage medium
CN106503682B (en) Method and device for positioning key points in video data
EP3352453B1 (en) Photographing method for intelligent flight device and intelligent flight device
US11310443B2 (en) Video processing method, apparatus and storage medium
CN108154466B (en) Image processing method and device
CN112738420B (en) Special effect implementation method, device, electronic equipment and storage medium
CN105678296B (en) Method and device for determining character inclination angle
EP3211879A1 (en) Method and device for automatically capturing photograph, electronic device
US11252341B2 (en) Method and device for shooting image, and storage medium
CN113315903B (en) Image acquisition method and device, electronic equipment and storage medium
CN114666490B (en) Focusing method, focusing device, electronic equipment and storage medium
CN114339022B (en) Camera shooting parameter determining method and neural network model training method
CN116939351A (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN108769513B (en) Camera photographing method and device
CN111835977B (en) Image sensor, image generation method and device, electronic device, and storage medium
CN115423692A (en) Image processing method, image processing device, electronic equipment and storage medium
CN114697517A (en) Video processing method and device, terminal equipment and storage medium
US20150279001A1 (en) Method and device for displaying image
CN114390189A (en) Image processing method, device, storage medium and mobile terminal

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