CN112788239A - Shooting method and device and electronic equipment - Google Patents

Shooting method and device and electronic equipment Download PDF

Info

Publication number
CN112788239A
CN112788239A CN202110111395.2A CN202110111395A CN112788239A CN 112788239 A CN112788239 A CN 112788239A CN 202110111395 A CN202110111395 A CN 202110111395A CN 112788239 A CN112788239 A CN 112788239A
Authority
CN
China
Prior art keywords
image
target
layout
camera
determining
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
CN202110111395.2A
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.)
Vivo Mobile Communication Hangzhou Co Ltd
Original Assignee
Vivo Mobile Communication Hangzhou 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 Vivo Mobile Communication Hangzhou Co Ltd filed Critical Vivo Mobile Communication Hangzhou Co Ltd
Priority to CN202110111395.2A priority Critical patent/CN112788239A/en
Publication of CN112788239A publication Critical patent/CN112788239A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/695Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects

Abstract

The application discloses a shooting method, a shooting device and electronic equipment, belongs to the technical field of communication, and aims to solve the problems of complex operation and low efficiency of the electronic equipment in the shooting process. The method comprises the following steps: determining a target layout strategy according to target attribute information of a first image, wherein the first image is a preview image acquired by a camera at a first position; updating the camera from the first position to the second position according to the target layout strategy; and shooting a second image by adopting the camera at the second position. The method and the device are applied to automatic composition scenes by utilizing the electronic equipment.

Description

Shooting method and device and electronic equipment
Technical Field
The application belongs to the technical field of communication, and particularly relates to a shooting method, a shooting device and electronic equipment.
Background
With the development of electronic devices, users have higher requirements on images shot by the electronic devices, for example, the users want to highlight subjects besides the images to be shot clearly.
Currently, in order to capture an image that can show a subject, different composition methods (e.g., a three-division method or a nine-grid layout, etc.) are generally required. During the process that the user shoots the image through the electronic equipment, the electronic equipment can display the grid lines in the shooting interface to assist the user in composition. Then, the user can manually adjust the shooting picture to compose according to the square lines, so that an image capable of showing the theme is shot.
However, when a user takes a large number of images, each image requires the user to manually adjust the shooting picture for composition, so that the shooting process is complicated and inefficient.
Disclosure of Invention
The embodiment of the application aims to provide a shooting method, a shooting device and electronic equipment, and can solve the problems of complex operation and low efficiency of the electronic equipment in the shooting process.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a shooting method, where the method includes: determining a target layout strategy according to target attribute information of a first image, wherein the first image is a preview image acquired by a camera at a first position; updating the camera from the first position to the second position according to the target layout strategy; and shooting a second image by adopting the camera at the second position.
In a second aspect, an embodiment of the present application provides a shooting device, including: the device comprises a determining module, an updating module and a shooting module; the determining module is used for determining a target layout strategy according to target attribute information of a first image, wherein the first image is a preview image acquired by a camera at a first position; the updating module is used for updating the camera from the first position to a second position according to the target layout strategy determined by the determining module; and the shooting module is used for shooting a second image by adopting the camera at the second position updated by the updating module.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In this embodiment of the present application, first, a shooting device may determine a target layout policy according to target attribute information of a first image, where the first image is a preview image that the shooting device may capture with a camera in a first position. The camera may then update the camera from the first position to the second position according to the target layout strategy described above. Finally, the camera at the second position can be used to capture a second image. Through the scheme, compared with the scheme that a user needs to manually adjust the shooting picture to compose the picture in the related art, the shooting device in the application does not need the user to manually adjust the shooting picture, determines the target layout strategy according to the target attribute information of the first image, updates the camera from the first position to the second position according to the target layout strategy, and then shoots the second image by adopting the camera at the second position. Therefore, images with professional composition can be shot easily, and the shooting process is simple and convenient to operate and high in efficiency.
Drawings
Fig. 1 is a schematic flowchart of a shooting method according to an embodiment of the present disclosure;
fig. 2 is a schematic interface diagram of an application of a shooting method according to an embodiment of the present disclosure;
fig. 3 is a second schematic interface diagram applied to a shooting method according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a shooting device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a second schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
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 some, but not all, embodiments of the present application. 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 in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. The objects distinguished by "first", "second", and the like are usually a class, and the number of the objects is not limited, and for example, the first object may be one or a plurality of objects. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The cloud platform camera in this application embodiment contains cloud platform and camera, and this cloud platform is the shooting auxiliary assembly who is used for installing and bear the camera that sets up on electronic equipment, and its structure is complicated and accurate, mainly comprises stop gear, two ball suspension, camera lens, voice coil motor, magnetomotive frame and visor. Because the cloud platform is set up inside electronic equipment under normal conditions for bear and install the camera, consequently, the cloud platform among the electronic equipment also can be called little cloud platform, and little cloud platform can be used for the anti-shake, and the supplementary user stably shoots, improves the shooting quality of image.
The shooting method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Fig. 1 is a schematic flow chart of a shooting method provided in an embodiment of the present application, including steps 201 to 203:
step 201: the shooting device determines a target layout strategy according to the target attribute information of the first image.
The first image is a preview image acquired by a camera at a first position.
In this embodiment of the present application, the target attribute information may include one attribute information or may include a plurality of attribute information, which is not limited in this embodiment of the present application. Illustratively, the target attribute information may include at least one of: weather, background, people, animals, plants, time.
It is understood that the above-mentioned target attribute information may include, but is not limited to, the above-mentioned six kinds of information.
For example, the weather attribute may be rainy days, snowy or sunny and high-lighted days, etc.; the background attribute may represent the environment where the image is located, for example, the background attribute may be a street view, a mountain water, a sky, a sea, a desert, a mall, or the like; the character attribute may represent the age, sex, relationship, etc. of the character, for example, the character attribute may be an adult, child, man, woman, or old person, etc.; the animal attribute can represent the body size, the number and the like of the animal; the plant attribute may represent the shape, color, etc. of the plant; the time attribute may indicate a photographing time of the image.
Illustratively, the camera may define a property matrix of the image, for example, the property matrix of the image may be in the form of [ property1, property2, property3, property4, property5, property6], or may be [ property1, property2, property3, property4, property5, property6 ]. Wherein, property1 (or property1) is used to represent the weather property, property2 (or property2) is used to represent the background property, property3 (or property3) is used to represent the character property, property4 (or property4) is used to represent the animal property, property5 (or property5) is used to represent the vegetation property, and property6 (or property6) is used to represent the time property.
Example 1, a user captures a photo 1 through a mobile phone, where the content of the photo 1 is: at 7 a day in the morning of rainy days, office workers are in a scene of arranging in line and orderly getting close to subway stations for taking a bus. The mobile phone can identify the weather attribute, the background attribute, the character attribute, the animal attribute, the plant attribute and the time attribute (namely the target attribute information) of the photo 1 to obtain an attribute matrix of the photo 1 [ rainy day, subway station, young people queue up, no, morning seven points ].
In the embodiment of the present application, the photographing device may recognize the above-mentioned target attribute information based on a machine vision image algorithm. For example, the camera may first identify people and objects in the first image based on a machine vision image algorithm and mark the location; after the person and object are marked, the camera may identify and mark the background in the first image, and so on, identifying and marking the object attribute information of the first image.
In the embodiment of the present application, the target layout strategy is used to assist the automatic composition of the photographing device.
In the embodiment of the present application, the target layout strategy described above may be determined by a composition method (such as a trisection method, a golden section method, or a squared figure layout), or may be determined by a target layout image described below, which is not limited in the embodiment of the present application. Wherein the target layout image may be an image stored in a predetermined database.
In the embodiment of the present application, the camera in the embodiment of the present application may be movable. In one example, the camera may be a pan-tilt camera.
Step 202: and the shooting device updates the camera from the first position to the second position according to the target layout strategy.
In this embodiment, the camera may translate or rotate the camera, and update the camera from the first position to the second position.
For example, the camera may update the camera from the first position to the second position by adjusting a rotation parameter of the camera. Wherein the rotation parameter may comprise at least one of: rotation angle, rotation direction, rotation speed.
Exemplarily, under the condition that the camera is the pan-tilt camera, the rotation parameter of the shooting device for adjusting the pan-tilt camera can be specifically: and adjusting the rotation angle of the camera of the holder in each axial direction. Illustratively, the pan-tilt camera may be a 3-axis pan-tilt camera or a 5-axis pan-tilt camera, which is not limited in this embodiment of the present application.
Optionally, in the case that the first image includes the target object at the first display position, the step 202 may specifically include the following steps 202a to 202 c:
step 202 a: and the shooting device determines a second display position corresponding to the target object according to the target layout strategy.
The target object may be a human being, an animal, a plant, or the like, for example, and this is not limited in the embodiments of the present application.
For example, the first display position may include at least one first coordinate point. The second display position may include at least one second coordinate point.
For example, the second display position refers to a corresponding display position when the target object is in the target layout policy. For example, the second display position may be displayed at any position on the screen of the camera. For example, as shown in fig. 2 (a), an actual display position a of the person 1 in the photo (i.e., the first display position described above) is displayed in the mobile phone screen 31, and the actual display position a includes discrete 5 first coordinate points selected from the person 1, and the 5 first coordinate points are coordinate point 1 to coordinate point 5, respectively. As shown in fig. 2 (B), a display position B (i.e., the second display position) of the person 1 in the optimal layout is displayed in the mobile phone screen 31, where the display position B includes 5 second coordinate points selected from the person 1, the 5 second coordinate points being the same as the 5 first coordinate points, and the 5 second coordinate points are coordinate points 1 'to 5', respectively.
Step 202 b: and the shooting device determines the rotation angle of the camera according to the first display position and the second display position.
For example, the camera may perform a conversion operation according to the first display position and the second display position to obtain a transfer matrix, and then the camera may convert the transfer matrix into a rotation angle of the camera.
For example, in the case of a pan-tilt camera, the coordinate points of the target object in the target layout strategy may constitute the matrix a, assuming that the coordinate points of the target object in the first image may constitute the matrix aThe matrix B may be constituted, i.e. the first display position may be represented as matrix a and the second display position may be represented as matrix B. First, the camera may be expressed by the formula C ═ B × a-1And determining the variation relation between the matrix A and the matrix B, namely an offset distance matrix C of the matrix A. Then, the photographing apparatus may determine that the coordinate points in the matrix a may be represented as a matrix X in the 5-axis direction coordinate system of the pan/tilt head. Then, after determining the matrix C and the matrix X, the photographing apparatus may calculate a distance matrix Z of the pan head in 5 axis directions according to the formula X × Z ═ C. Finally, each of the 5 axes of the pan/tilt camera rotates by 1 degree, and the moving distance on the image can be represented as dz, and the photographing apparatus can calculate the rotation angle of the pan/tilt camera by the formula β i ═ Z/dz.
For example, taking a camera as a pan-tilt camera as an example, in conjunction with fig. 2, coordinate point 1 and coordinate point 5 may form a matrix a, and the coordinates of each coordinate point may be represented as (xi, yi). Coordinate points 1 'to 5' may constitute a matrix B, and the coordinates of each point may be represented as (xi ', yi'). Suppose that according to the formula C, B × A-1The calculated matrix C can be expressed as:
Figure BDA0002919148940000061
as can be seen from the matrix C, the offset distances C1 to C5 representing 5 coordinate points in the matrix a as reference points are [16, 15, 23, 6, 25], respectively.
It is assumed that 5 coordinate points in the matrix a can be represented as a matrix X in the 5-axis coordinate system of the pan/tilt head, that is:
Figure BDA0002919148940000071
after determining the matrix C and the matrix X, the distance matrix Z of the pan-tilt in 5 axis directions can be calculated according to the following formula X × Z ═ C, that is:
Figure BDA0002919148940000072
thus, the distances Z1 to Z5 of the pan/tilt head in the 5-axis direction can be calculated as [1, 4, 3, 1, 5 ].
Assuming that each of the 5 axes of the pan/tilt head camera is rotated by 1 degree and the moving distance dz on the image is 0.5, the rotation angle β i in each axis direction of the pan/tilt head camera can be calculated by substituting the formula β i into Z/dz [2, 8, 6, 2, 10 ].
Step 202 c: and the shooting device updates the camera from the first position to the second position according to the rotation angle.
For example, the camera may rotate the camera by a determined rotation angle to update the camera from the first position to the second position.
In one example, in the case that the camera is a pan-tilt camera, the photographing device may rotate in each axial direction of the pan-tilt camera according to the determined rotation angle to adjust the position of the pan-tilt camera.
Step 203: the shooting device shoots a second image by adopting the camera at the upper second position.
In the embodiment of the present application, the second image is an image captured by using the target layout strategy.
The second image is different from the first image.
It is understood that when the target object in the first image completely coincides with the target object in the second image, it indicates that the camera has updated the camera from the first position to the second position. For example, taking a camera as a pan-tilt camera as an example, as shown in fig. 2 and in fig. 3, when a and B in the mobile phone screen 31 are completely overlapped, it indicates that the pan-tilt camera is adjusted to an optimal shooting angle, and the composition effect of the shot image at the shooting angle is optimal.
Alternatively, in this embodiment of the application, the second image may be a panoramic image.
For example, taking the camera as the pan/tilt/zoom camera as an example, when the user wants to shoot a panoramic image, the user may click the panoramic mode, and at this time, the user may hold the mobile phone by hand, and the pan/tilt/zoom camera rotates to the maximum angle (i.e., the first position) in 5 axial directions, thereby ensuring that the pan/tilt/zoom camera can capture more pictures. Then, the mobile phone can acquire the photo 2, and determine the target layout strategy according to the attribute information of the photo 2. Then, the mobile phone can update the pan-tilt camera, which rotates to the maximum angle in the 5 axis directions, to the second position according to the target layout strategy, and acquire the rotation angle and the rotation speed of the pan-tilt camera in each axis direction, and finally, the mobile phone can adopt the pan-tilt camera in the second position, rotate the pan-tilt camera according to the determined rotation angle and rotation speed, and simultaneously, the mobile phone can acquire the panoramic image (i.e., the second image) in the rotation process.
Optionally, in this embodiment of the present application, before the step 201, the method further includes the following steps: the camera receives a second input from the user. Based on this, the step 201 may specifically include the following steps: in response to the second input, the camera determines a target layout strategy, i.e., enables an automatic composition function, according to the target attribute information of the first image.
For example, the second input may be: the click input of the user to the screen, or the voice instruction input by the user, or the specific gesture input by the user may be specifically determined according to the actual use requirement, which is not limited in the embodiment of the present application.
The specific gesture in the embodiment of the application can be any one of a single-click gesture, a sliding gesture, a dragging gesture, a pressure identification gesture, a long-press gesture, an area change gesture, a double-press gesture and a double-click gesture; the click input in the embodiment of the application can be click input, double-click input, click input of any number of times and the like, and can also be long-time press input or short-time press input.
According to the shooting method provided by the embodiment of the application, firstly, a shooting device can determine a target layout strategy according to target attribute information of a first image, wherein the first image is a preview image which can be acquired by the shooting device through a camera at a first position. The camera may then update the camera from the first position to the second position according to the target layout strategy described above. Finally, the camera at the second position can be used to capture a second image. Through the scheme, compared with the scheme that a user needs to manually adjust the shooting picture to compose the picture in the related art, the shooting device in the application does not need the user to manually adjust the shooting picture, determines the target layout strategy according to the target attribute information of the first image, updates the camera from the first position to the second position according to the target layout strategy, and then shoots the second image by adopting the camera at the second position. Therefore, images with professional composition can be shot easily, and the shooting process is simple and convenient to operate and high in efficiency.
Alternatively, in this embodiment of the application, the target layout strategy described above may be determined by laying out images.
For example, the step 201 may specifically include the following steps 201a to 201 c:
step 201 a: the shooting device determines M layout images according to the object attribute information of the first image.
Wherein, one layout image corresponds to one layout strategy, and M is a positive integer.
Step 201 b: the photographing device determines a target layout image based on the M layout images.
Step 201 c: and the shooting device determines a target layout strategy according to the target layout image.
Illustratively, each of the M layout images includes the object attribute information.
For example, the M layout images may be images in a preset gallery.
For example, after acquiring the target attribute information of the first image, the shooting device may search in a preset database according to the attribute information of the first image as a keyword.
For example, the mobile phone identifies the weather attribute, the background attribute, the character attribute, the animal attribute, the plant attribute, and the time attribute (i.e., the above-mentioned target attribute information) of the photo 1 to obtain an attribute matrix of the photo 1 [ rainy day, subway station, young people queuing, no, seven morning points ]. Then, the mobile phone can search in the database by taking the morning and the subway station as key words, and determine 5 frames of layout images comprising the morning and the subway station, thereby ensuring that the basic scene is consistent with the time point. Next, the mobile phone may perform the next filtering, using the rainy day and the youth queue as keywords, to search in the layout images including the morning and the subway station, and determine the 2-frame layout image including the youth queue and the rainy day. That is, the handset can finally determine the 2-frame layout image including morning, subway station, youth queuing, and rainy day.
For example, the target layout policy may be a layout policy of the target layout image. For example, if the target layout image includes a person displayed in the middle of the screen, the target layout strategy may be to display the person in the middle of the screen; or the target layout image includes a person displayed below the screen, the target layout strategy may be to display the person below the screen, etc.
If M is 1, the image capturing apparatus may determine the 1 layout image as the target layout image; if M is greater than 1, the photographing apparatus may determine a target layout image from the M layout images.
Alternatively, in this embodiment of the application, the photographing apparatus may determine the target layout image based on the M layout images in at least two possible implementation manners.
In a first possible implementation (active determination):
for example, the step 201b may specifically include the following step a 1:
step A1: the shooting device determines a target layout image according to the first attribute weight value and the second attribute weight value corresponding to each layout image in the M layout images.
The first attribute weight value is a weight value corresponding to the target attribute information of the first image, and each second attribute weight value is a weight value corresponding to the target attribute information of the corresponding layout image.
For example, the photographing device may determine the target layout image according to a difference between the first attribute weight value and the second attribute weight value, may also determine the target layout image according to a variance between the first attribute weight value and the second attribute weight value, and may also determine the target layout image according to any possible calculated value of the first attribute weight value and the second attribute weight value, which is not limited in this embodiment of the application.
For example, if the variance between the first attribute weight value and the second attribute weight value is minimum, the layout image corresponding to the second attribute weight value is the target layout image.
For example, the camera may define an attribute matrix of the image, and assign a corresponding weight to each attribute information, resulting in a weight matrix. For example, the weight matrix may be represented as [ property1_ w, property2_ w, property3_ w, property4_ w, property5_ w, property6_ w ].
Illustratively, the attribute weight value is determined comprehensively according to the target attribute information.
For example, in combination with the above example 1, after the mobile phone obtains the attribute matrix of the photo 1 [ rainy day, subway station, young person queuing, no, seven morning ], the mobile phone may determine the key of the photo 1. According to the fact that the current time is 7 am, the relationship between the characters is that the young people queue up, the background is a subway station, the weather is rainy day, and the number of people appearing in the picture is the largest, the fact that the mood of the photo 1 needs to reflect that office workers are in hurry and tense can be determined. After the key is determined, the mobile phone may assign a relatively smaller weight to the weather attribute, the time attribute is more important than the weather attribute, and a weight that is greater than the weight of the weather attribute may be assigned, while the background attribute and the person attribute are main components in the picture attribute, and therefore a greater weight needs to be assigned, and the other attribute items are not involved in the picture 1, so the corresponding weight may be configured as 0. Finally, a weight matrix [0.1, 0.3, 0.4, 0, 0, 0.2] (i.e., the above-mentioned first weight attribute value) is obtained.
After the cell phone obtains the weight matrix [0.1, 0.3, 0.4, 0, 0, 0.2], the cell phone can search the layout image in the database according to the attribute matrix and the weight matrix of the photo 1. Since the mobile phone determines that the picture 1 shows a scene in which a young person in the subway station queues up to get on duty, the mobile phone can search in the database by taking morning and the subway station as keywords and determine 5 frames of layout images comprising the morning and the subway station, so that the basic scene can be ensured to be consistent with the time point. Then, the mobile phone can perform the next screening by using the attribute information with the weight not being 0, and search in the layout image including the morning and the subway station by using the rainy day and the queue of the young people as keywords. Specifically, the mobile phone can search from big to small according to the weight, firstly, the young people queue as a keyword, and search in the layout images including the morning and the subway station to determine the 4-frame layout image including the young people queue; then, the mobile phone can search layout images including morning, subway station and young person queue with rainy day as a key word, and determine 2 frame layout images including rainy day. That is, the handset can finally determine the 2-frame layout image including morning, subway station, youth queuing, and rainy day.
After the mobile phone determines the 2 frames of layout images, the mobile phone may respectively calculate the weight matrix of the attribute information of the 2 frames of layout images, then respectively calculate the variance with the weight matrix [0.1, 0.3, 0.4, 0, 0, 0.2], and determine the layout image with the minimum variance as the optimal layout image (i.e., the target layout image) searched for this time.
In a second possible implementation (passive determination):
for example, the step 201B may specifically include the following steps B1 to B3:
step B1: the photographing device displays M marks corresponding to the M layout images.
Wherein one mark corresponds to one layout image.
Illustratively, the above-mentioned identification may comprise at least one of: characters and pictures. For example, the identification may be a thumbnail of the layout image.
For example, the marks in the embodiments of the present application are used to indicate words, symbols, images, and the like of information, and a control or other container may be used as a carrier for displaying information, including but not limited to a word mark, a symbol mark, and an image mark.
Step B2: the shooting device receives first input of a user to a target mark in the M marks.
For example, the first input may be: the target identifier may be input by a user through clicking, or a voice instruction input by the user, or a specific gesture input by the user, which may be specifically determined according to actual use requirements, and this is not limited in this embodiment of the application.
Step B3: in response to the first input, the photographing apparatus determines a layout image corresponding to the target mark as a target layout image.
The shooting method provided by the embodiment of the application can be applied to a scene of determining the target layout strategy, and the shooting device can actively determine the target layout image corresponding to the target layout strategy based on the determined M layout images, or a user can select the target layout image corresponding to the target layout strategy from the M layout images according to requirements, so that the target layout image can be rapidly determined, and the determination process of the target layout strategy is more flexible.
In the shooting method provided by the embodiment of the present application, the execution subject may be a shooting device, or a control module in the shooting device for executing the shooting method. The embodiment of the present application takes an example in which a shooting device executes a shooting method, and the shooting device provided in the embodiment of the present application is described.
Fig. 4 is a schematic diagram of a possible structure of a camera according to an embodiment of the present disclosure, and as shown in fig. 4, the camera 400 includes: a determination module 401, an update module 402, and a shooting module 403, wherein: a determining module 401, configured to determine a target layout policy according to target attribute information of a first image, where the first image is a preview image acquired by using a camera at a first position; an updating module 402, configured to update the camera from the first location to a second location according to the target layout policy determined by the determining module 401; and a shooting module 403, configured to shoot a second image with the camera at the second position updated by the updating module 402.
Optionally, the determining module 401 is specifically configured to determine M layout images according to the target attribute information of the first image, where one layout image corresponds to one layout policy, and M is a positive integer; determining a target layout image based on the M layout images; and determining a target layout strategy according to the target layout image.
Optionally, the determining module 401 is specifically configured to determine the target layout image according to the first attribute weight value and the second attribute weight value corresponding to each layout image in the M layout images; the first attribute weight value is a weight value corresponding to the target attribute information of the first image, and each second attribute weight value is a weight value corresponding to the target attribute information of the corresponding layout image.
Optionally, as shown in fig. 4, the photographing apparatus 400 further includes: a display module 404 and a receiving module 405; a display module 404, configured to display M identifiers corresponding to the M layout images, where one identifier corresponds to one layout image; a receiving module 405, configured to receive a first input of a target identifier in the M identifiers displayed by the display module 404 from a user; the determining module 401 is specifically configured to determine, in response to the first input received by the receiving module 405, that the layout image corresponding to the target identifier is the target layout image.
Optionally, the first image includes a target object at a first display position; the determining module 401 is further configured to determine, according to the target layout policy, a second display position corresponding to the target object; determining the rotation angle of the camera according to the first display position and the second display position; the updating module 402 is specifically configured to update the camera from the first position to the second position according to the rotation angle determined by the determining module 401.
It should be noted that, as shown in fig. 4, modules that are necessarily included in the photographing apparatus 400 are indicated by solid line boxes, such as the determination module 401; modules that may or may not be included in the camera 400 are illustrated with dashed boxes, such as a display module 404.
According to the shooting device provided by the embodiment of the application, firstly, the shooting device can determine a target layout strategy according to the target attribute information of a first image, and the first image is a preview image which can be acquired by a camera at a first position. The camera may then update the camera from the first position to the second position according to the target layout strategy described above. Finally, the camera at the second position can be used to capture a second image. Through the scheme, compared with the scheme that a user needs to manually adjust the shooting picture to compose the picture in the related art, the shooting device in the application does not need the user to manually adjust the shooting picture, determines the target layout strategy according to the target attribute information of the first image, updates the camera from the first position to the second position according to the target layout strategy, and then shoots the second image by adopting the camera at the second position. Therefore, images with professional composition can be shot easily, and the shooting process is simple and convenient to operate and high in efficiency.
The shooting device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The photographing apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The shooting device provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to 3, and is not described here again to avoid repetition.
Optionally, as shown in fig. 5, an electronic device 500 is further provided in this embodiment of the present application, and includes a processor 501, a memory 502, and a program or an instruction stored in the memory 502 and executable on the processor 501, where the program or the instruction is executed by the processor 501 to implement each process of the foregoing shooting method embodiment, and can achieve the same technical effect, and no further description is provided here to avoid repetition.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 100 includes, but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.
Those skilled in the art will appreciate that the electronic device 100 may further comprise a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 110 is configured to determine a target layout strategy according to target attribute information of a first image, where the first image is a preview image acquired by using a camera at a first position; updating the camera from the first position to a second position according to the target layout strategy; an input unit 104 for taking a second image with the camera in the second position updated by the processor 110.
Optionally, the processor 110 is specifically configured to determine M layout images according to the target attribute information of the first image, where one layout image corresponds to one layout policy, and M is a positive integer; determining a target layout image based on the M layout images; and determining a target layout strategy according to the target layout image.
Optionally, the processor 110 is specifically configured to determine a target layout image according to the first attribute weight value and the second attribute weight value corresponding to each layout image in the M layout images; the first attribute weight value is a weight value corresponding to the target attribute information of the first image, and each second attribute weight value is a weight value corresponding to the target attribute information of the corresponding layout image.
Optionally, the display unit 106 is configured to display M identifiers corresponding to the M layout images, where one identifier corresponds to one layout image; a user input unit 107, configured to receive a first input of a target identifier from the M identifiers displayed by the display unit 106 from a user; the processor 110 is specifically configured to determine, in response to the first input received by the user input unit 107, that the layout image corresponding to the target identifier is a target layout image.
Optionally, the first image includes a target object at a first display position; the processor 110 is further configured to determine a second display position corresponding to the target object according to the target layout policy; determining the rotation angle of the camera according to the first display position and the second display position; and updating the camera from the first position to the second position according to the rotation angle.
According to the electronic device provided by the embodiment of the application, firstly, the electronic device can determine a target layout strategy according to target attribute information of a first image, and the first image is a preview image which can be acquired by a camera at a first position of a shooting device. Then, the electronic device may update the camera from the first location to the second location according to the target layout strategy. Finally, the electronic device may capture a second image using the camera at the second position. Through the scheme, compared with the scheme that a user needs to manually adjust the shooting picture for composition in the related art, the electronic device in the application does not need to manually adjust the shooting picture, determines the target layout strategy according to the target attribute information of the first image, updates the camera from the first position to the second position according to the target layout strategy, and then shoots the second image by adopting the camera at the second position. Therefore, images with professional composition can be shot easily, and the shooting process is simple and convenient to operate and high in efficiency.
It should be understood that, in the embodiment of the present application, the input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the Graphics Processing Unit 1041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 107 includes a touch panel 1071 and other input devices 1072. The touch panel 1071 is also referred to as a touch screen. The touch panel 1071 may include two parts of a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 109 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 110 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above shooting method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above shooting method embodiment, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (12)

1. A photographing method, characterized in that the method comprises:
determining a target layout strategy according to target attribute information of a first image, wherein the first image is a preview image acquired by a camera at a first position;
updating the camera from the first position to a second position according to the target layout strategy;
and shooting a second image by adopting the camera at the second position.
2. The method of claim 1, wherein determining a target layout strategy based on target attribute information for the first image comprises:
determining M layout images according to the target attribute information of the first image, wherein one layout image corresponds to one layout strategy, and M is a positive integer;
determining a target layout image based on the M layout images;
and determining a target layout strategy according to the target layout image.
3. The method of claim 2, wherein determining a target layout image based on the M layout images comprises:
determining a target layout image according to the first attribute weight value and a second attribute weight value corresponding to each layout image in the M layout images;
the first attribute weight value is a weight value corresponding to the target attribute information of the first image, and each second attribute weight value is a weight value corresponding to the target attribute information of the corresponding layout image.
4. The method of claim 2, wherein determining a target layout image based on the M layout images comprises:
displaying M identifiers corresponding to the M layout images, wherein one identifier corresponds to one layout image;
receiving a first input of a user to a target identifier in the M identifiers;
in response to the first input, determining that the layout image corresponding to the target identification is a target layout image.
5. The method of any of claims 1 to 4, wherein the first image comprises a target object at a first display position;
the updating the camera from the first location to a second location according to the target layout strategy includes:
determining a second display position corresponding to the target object according to the target layout strategy;
determining the rotation angle of the camera according to the first display position and the second display position;
and updating the camera from the first position to a second position according to the rotation angle.
6. A photographing apparatus, characterized by comprising: the device comprises a determining module, an updating module and a shooting module;
the determining module is used for determining a target layout strategy according to target attribute information of a first image, wherein the first image is a preview image acquired by a camera at a first position;
the updating module is used for updating the camera from the first position to a second position according to the target layout strategy determined by the determining module;
and the shooting module is used for shooting a second image by adopting the camera at the second position updated by the updating module.
7. The camera according to claim 6, wherein the determining module is specifically configured to determine M layout images according to the target attribute information of the first image, where one layout image corresponds to one layout strategy, and M is a positive integer; determining a target layout image based on the M layout images; and determining a target layout strategy according to the target layout image.
8. The camera according to claim 7, wherein the determining module is specifically configured to determine the target layout image according to a first attribute weight value and a second attribute weight value corresponding to each of the M layout images;
the first attribute weight value is a weight value corresponding to the target attribute information of the first image, and each second attribute weight value is a weight value corresponding to the target attribute information of the corresponding layout image.
9. The camera of claim 7, further comprising: a display module and a receiving module;
the display module is used for displaying M identifiers corresponding to the M layout images, and one identifier corresponds to one layout image;
the receiving module is used for receiving a first input of a target identifier in the M identifiers displayed by the display module by a user;
the determining module is specifically configured to determine, in response to the first input received by the receiving module, that the layout image corresponding to the target identifier is a target layout image.
10. The camera of any one of claims 6 to 9, wherein the first image comprises a target object at a first display position;
the determining module is further configured to determine a second display position corresponding to the target object according to the target layout strategy; determining the rotation angle of the camera according to the first display position and the second display position;
the updating module is specifically configured to update the camera from the first position to a second position according to the rotation angle determined by the determining module.
11. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the photographing method according to any one of claims 1 to 5.
12. A readable storage medium, characterized in that the readable storage medium stores thereon a program or instructions which, when executed by a processor, implement the steps of the photographing method according to any one of claims 1 to 5.
CN202110111395.2A 2021-01-27 2021-01-27 Shooting method and device and electronic equipment Pending CN112788239A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110111395.2A CN112788239A (en) 2021-01-27 2021-01-27 Shooting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110111395.2A CN112788239A (en) 2021-01-27 2021-01-27 Shooting method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112788239A true CN112788239A (en) 2021-05-11

Family

ID=75758322

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110111395.2A Pending CN112788239A (en) 2021-01-27 2021-01-27 Shooting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112788239A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113473004A (en) * 2021-06-16 2021-10-01 维沃移动通信(杭州)有限公司 Shooting method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601889A (en) * 2015-01-20 2015-05-06 广东欧珀移动通信有限公司 Photographing method and device of mobile terminal
CN107835364A (en) * 2017-10-30 2018-03-23 维沃移动通信有限公司 One kind is taken pictures householder method and mobile terminal
CN111814658A (en) * 2020-07-07 2020-10-23 西安电子科技大学 Scene semantic structure chart retrieval method based on semantics

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601889A (en) * 2015-01-20 2015-05-06 广东欧珀移动通信有限公司 Photographing method and device of mobile terminal
CN107835364A (en) * 2017-10-30 2018-03-23 维沃移动通信有限公司 One kind is taken pictures householder method and mobile terminal
CN111814658A (en) * 2020-07-07 2020-10-23 西安电子科技大学 Scene semantic structure chart retrieval method based on semantics

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113473004A (en) * 2021-06-16 2021-10-01 维沃移动通信(杭州)有限公司 Shooting method and device

Similar Documents

Publication Publication Date Title
CN111612873B (en) GIF picture generation method and device and electronic equipment
CN113093968B (en) Shooting interface display method and device, electronic equipment and medium
CN111866392B (en) Shooting prompting method and device, storage medium and electronic equipment
CN112714253B (en) Video recording method and device, electronic equipment and readable storage medium
CN112995500A (en) Shooting method, shooting device, electronic equipment and medium
CN113794829B (en) Shooting method and device and electronic equipment
CN112954210A (en) Photographing method and device, electronic equipment and medium
WO2022161260A1 (en) Focusing method and apparatus, electronic device, and medium
CN112532881B (en) Image processing method and device and electronic equipment
CN112738402A (en) Shooting method, shooting device, electronic equipment and medium
CN112486390A (en) Display control method and device and electronic equipment
CN112492215A (en) Shooting control method and device and electronic equipment
CN112333386A (en) Shooting method and device and electronic equipment
CN113905175A (en) Video generation method and device, electronic equipment and readable storage medium
CN113194256B (en) Shooting method, shooting device, electronic equipment and storage medium
CN112449110B (en) Image processing method and device and electronic equipment
CN112685119A (en) Display control method and device and electronic equipment
CN112788239A (en) Shooting method and device and electronic equipment
CN112330728A (en) Image processing method, image processing device, electronic equipment and readable storage medium
CN112511743A (en) Video shooting method and device
CN111770268A (en) Photographing method and device and electronic equipment
CN114466140B (en) Image shooting method and device
CN113286085B (en) Display control method and device and electronic equipment
CN113794831B (en) Video shooting method, device, electronic equipment and medium
CN114125226A (en) Image shooting method and device, electronic equipment and readable storage medium

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