WO2024002022A1 - Photographing composition method and apparatus, and computer device and storage medium - Google Patents

Photographing composition method and apparatus, and computer device and storage medium Download PDF

Info

Publication number
WO2024002022A1
WO2024002022A1 PCT/CN2023/102488 CN2023102488W WO2024002022A1 WO 2024002022 A1 WO2024002022 A1 WO 2024002022A1 CN 2023102488 W CN2023102488 W CN 2023102488W WO 2024002022 A1 WO2024002022 A1 WO 2024002022A1
Authority
WO
WIPO (PCT)
Prior art keywords
gesture
state
target
current
subject
Prior art date
Application number
PCT/CN2023/102488
Other languages
French (fr)
Chinese (zh)
Inventor
蔡智
马龙祥
张伟俊
吴烁楠
蒋宪宏
Original Assignee
影石创新科技股份有限公司
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 影石创新科技股份有限公司 filed Critical 影石创新科技股份有限公司
Publication of WO2024002022A1 publication Critical patent/WO2024002022A1/en

Links

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

Definitions

  • the present application relates to the field of image processing technology, and in particular to a photographing and composition method, device, computer equipment, storage medium and computer program product.
  • Automatic composition technology can be divided into two categories according to the implementation stage of the composition operation: one-time composition, that is, before the shooting action, the image content of the preview screen is analyzed to obtain the deviation information between the current composition and the target composition, and then the corresponding composition prompts are output.
  • Secondary composition means that after the shooting is completed, the software automatically analyzes the content of the shot, confirms the composition method and performs corresponding cropping, zooming and other operations, and finally outputs the image/video after the second composition.
  • the user mainly manually adjusts the position and angle of the shooting device to achieve one-time composition, which is inefficient and manual adjustment is not accurate enough.
  • this application provides a photographing composition method.
  • the methods include:
  • Obtain the current frame image captured by the shooting device obtain the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
  • the target subject determine the current gesture trajectory triggered by the subject in the current gesture trajectory set, and determine the target gesture state triggered by the subject in the current gesture trajectory;
  • the target working parameter of at least one device in the shooting composition system is obtained, and the corresponding device in the shooting composition system is adjusted according to the target working parameter.
  • the current frame image belongs to the image frame group, the images in the image frame group are sorted according to the shooting sequence of the shooting device, and the current frame image is the last frame image; the image of the main object in the current frame image is obtained.
  • Target subject status including:
  • the historical subject state and the predicted subject state are integrated to obtain the target subject state of the subject in the current frame image.
  • updating the historical gesture trajectory set based on the current gesture state of at least one gesture to obtain the current gesture trajectory set includes:
  • the method further includes:
  • a new gesture trajectory is created based on the current gesture state that does not match each historical gesture trajectory and is added to the current gesture trajectory collection.
  • the current gesture trajectory set also includes historical gesture trajectories in which the current gesture state is not added to the historical gesture trajectory set; according to the state of the target subject, the current gesture triggered by the subject is determined in the current gesture trajectory set Before the trajectory, also included:
  • the target subject state includes the position of the subject; according to the target subject state, the current gesture trajectory triggered by the subject is determined in the current gesture trajectory set, and in the current gesture trajectory, the current gesture trajectory triggered by the subject is determined.
  • Target gesture states triggered by objects including:
  • For each gesture trajectory in the current gesture trajectory set determine the last gesture state added in each gesture trajectory, where the gesture state includes the gesture position;
  • the last gesture state added in the current gesture trajectory is used as the target gesture state.
  • the preset detection condition includes at least one of the following two conditions.
  • the following two conditions are that the number of gesture states in the current gesture trajectory is not less than the preset number, and that the last addition in the current gesture trajectory is When adding k gesture states corresponding to The moment sequence matches the shooting moment sequence corresponding to the last k frames of images captured by the shooting device; where k is a positive integer.
  • the target gesture state includes the target gesture type; before obtaining the target working parameter of at least one device in the shooting composition system according to the target gesture state, the method further includes:
  • the step of obtaining the target working parameter of at least one device in the shooting composition system is performed according to the target gesture state.
  • the target subject state includes the position of the subject, and the target gesture state includes the target gesture position; according to the target gesture state, the target working parameter of at least one device in the shooting composition system is obtained, including:
  • the target working parameters of at least one piece of equipment in the shooting composition system are determined.
  • the shooting composition system also includes a control device, which is used to control the movement of the shooting device; the target working parameters include the zoom parameter of the shooting device or the optical axis orientation of the shooting device or the location of the shooting device at least one of them.
  • the target subject state includes the position of the subject, and the target gesture state includes the target gesture position; according to the target gesture state, the target working parameter of at least one device in the shooting composition system is obtained, including:
  • a target working parameter of at least one piece of equipment in the shooting composition system is determined.
  • the shooting composition system also includes a control device, which is used to control the movement of the shooting device; the target working parameters include the zoom parameter of the shooting device or the optical axis orientation of the shooting device or the location of the shooting device at least one of them.
  • the target gesture state includes the target gesture type; according to the target gesture state, the target working parameters of at least one device in the shooting composition system are obtained, including:
  • the preset working parameters corresponding to the preset gesture type are obtained and used as the target working parameters.
  • the preset working parameters include the preset zoom coefficient of the shooting device.
  • the shooting composition system also includes a control device, and the control device is used to control the movement of the shooting device; accordingly,
  • the preset working parameters also include at least one of the preset optical axis orientation of the shooting device or the preset position of the shooting device.
  • this application also provides a shooting composition device.
  • Devices include:
  • a data acquisition module used to acquire the current frame image captured by the shooting device, acquire the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
  • the gesture update module is used to obtain the historical gesture trajectory collection, update the historical gesture trajectory collection based on the current gesture state of at least one gesture, and obtain the current gesture trajectory collection;
  • the gesture determination module is used to determine the current gesture trajectory triggered by the subject object in the current gesture trajectory set according to the state of the target subject object, and determine the target gesture state triggered by the subject object in the current gesture trajectory;
  • the equipment adjustment module is used to obtain the target working parameters of at least one device in the shooting composition system according to the target gesture state, and adjust the corresponding equipment in the shooting composition system according to the target working parameters.
  • this application also provides a computer device.
  • the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
  • Obtain the current frame image captured by the shooting device obtain the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
  • the target subject determine the current gesture trajectory triggered by the subject in the current gesture trajectory set, and determine the target gesture state triggered by the subject in the current gesture trajectory;
  • the target working parameter of at least one device in the shooting composition system is obtained, and the corresponding device in the shooting composition system is adjusted according to the target working parameter.
  • this application also provides a computer-readable storage medium.
  • the computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by the processor, the following steps are implemented:
  • Obtain the current frame image captured by the shooting device obtain the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
  • the target subject determine the current gesture trajectory triggered by the subject in the current gesture trajectory set, and determine the target gesture state triggered by the subject in the current gesture trajectory;
  • the target working parameter of at least one device in the shooting composition system is obtained, and the corresponding device in the shooting composition system is adjusted according to the target working parameter.
  • this application also provides a computer program product.
  • the computer program product includes a computer program that implements the following steps when executed by a processor:
  • Obtain the current frame image captured by the shooting device obtain the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
  • the target subject determine the current gesture trajectory triggered by the subject in the current gesture trajectory set, and determine the target gesture state triggered by the subject in the current gesture trajectory;
  • the target working parameter of at least one device in the shooting composition system is obtained, and the corresponding device in the shooting composition system is adjusted according to the target working parameter.
  • the above-mentioned shooting and composition methods, devices, computer equipment, storage media and computer program products acquire the current frame image captured by the shooting device, acquire the target subject state of the subject in the current frame image and the current gesture state of at least one gesture; obtain The historical gesture trajectory collection updates the historical gesture trajectory collection based on the current gesture state of at least one gesture to obtain the current gesture trajectory collection; determines the current gesture trajectory triggered by the subject object in the current gesture trajectory collection according to the target subject state, And in the current gesture trajectory, the target gesture state triggered by the subject object is determined; according to the target gesture state, the target working parameters of at least one device in the shooting composition system are obtained, and the corresponding equipment in the shooting composition system is processed according to the target working parameters. adjust.
  • the interactive composition function based on gesture control is realized. This enables non-contact, flexibly set composition adjustment.
  • Figure 1 is an application environment diagram of the shooting composition method in one embodiment
  • Figure 2 is a schematic flowchart of a shooting composition method in one embodiment
  • Figure 3 is a schematic flowchart of obtaining the target subject status of the subject in one embodiment
  • Figure 4 is a schematic flowchart of determining the target gesture state in one embodiment
  • Figure 5 is a schematic flowchart of a shooting composition method in another embodiment
  • Figure 6 is a schematic flowchart of a shooting composition method in yet another embodiment
  • Figure 7 is a structural block diagram of a shooting and composition device in one embodiment
  • Figure 8 is an internal structure diagram of a computer device in one embodiment.
  • one-time composition refers to analyzing the image content of the rain screen before the shooting action, obtaining the deviation information between the current composition and the target composition, and then outputting According to the corresponding composition prompt, some users manually adjust the position and angle of the shooting equipment, and trigger the corresponding shooting operation after reaching the specified position. Or the shooting equipment can control the corresponding actuator to reach the specified composition state by itself based on the composition deviation information to realize the shooting operation.
  • Secondary composition means that after the shooting is completed, the software automatically analyzes the content of the shot, confirms the composition method and implements corresponding cropping, zooming and other operations, and finally outputs the image/video after the second composition.
  • the efficiency is low and the manual adjustment is not accurate enough.
  • the shooting composition method provided by the embodiment of the present application is applied to real-time video shooting scenarios, and can be specifically applied to the application environment as shown in Figure 1.
  • the terminal 102 communicates with the server 104 through the network.
  • the video stream captured in real time or the still image obtained can be transmitted to the server 104, and the server analyzes the main object in the video stream or still image, and then analyzes the shooting device. Make adjustments.
  • the data storage system may store data that server 104 needs to process.
  • the data storage system can be integrated on the server 104, or placed on the cloud or other network servers.
  • the terminal 102 is a device capable of acquiring video streams or images, and may include but is not limited to various personal computers with cameras, laptops, smart phones, tablets, logistics network equipment, etc.
  • Server 104 The server may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
  • embodiments of the present application provide a shooting composition method. It can be understood that, for the current frame image in the video stream, multiple subject objects may actually be detected in the current frame image.
  • the main idea of the embodiment of the present application is to use gestures triggered by the target subject to automatically adjust the shooting composition. It is understandable that among these subjects, only the gesture state triggered by the target subject is meaningful for automatically adjusting the shooting composition. In this way, the gesture status corresponding to the subject can be analyzed, and then the shooting device can be adjusted without contact. Taking this method applied to a computer device (the computer device may be a terminal or a server in Figure 1) as an example, the description includes the following steps:
  • Step 202 Obtain the current frame image captured by the shooting device, obtain the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
  • the photographing device may be a camera or a mobile terminal with a photographing function, which is not specifically limited in the embodiments of the present application.
  • the current frame image may be an image captured by the shooting device at the current moment, or may be an image frame at the current moment in the video stream captured by the shooting device. This is not specifically limited in the embodiment of the present application. It should be noted that, regardless of whether the shooting device captures a video stream or an image frame, in the embodiment of the present application, it is mainly to obtain a target gesture state that is triggered by the subject object and is meaningful for the shooting composition. It is understandable that the target gesture state that is meaningful for the shooting composition may not necessarily be recognized and obtained through only one frame of image. Therefore, only in the application embodiment, multiple frames of images are captured, and at the current moment when the "current frame image" is captured, the target gesture state triggered by the subject object is obtained by combining the previously captured images.
  • the previous frame image of the current frame image is also processed using the method provided by the embodiment of the present application.
  • the relationship between the current frame image and the previous frame image when the shooting device captures the image frame, in the actual implementation process, the current frame image and the previous frame image can be two frames of images continuously acquired by the shooting device.
  • a preset frame image may also be spaced between a frame image and the previous frame image, which is not specifically limited in the embodiments of the present application.
  • the current frame image can be intercepted from the real-time video stream at the current moment, and the previous frame image and the current frame image can be continuous or separated by multiple Image frames are not specifically limited in the embodiments of this application.
  • the embodiment of the present application takes the current frame image intercepted from the real-time video stream as an example to describe the subsequent process.
  • the subject object refers to an object that can trigger the gesture.
  • the object may refer to a person. It is understandable that there may be more than one subject captured in the current frame image, such as more than one person. These subjects may all trigger gestures, but usually only one subject can trigger a gesture state related to the shooting composition, and this subject can be the target subject.
  • the "target subject state” mentioned in this step It mainly refers to the state of the target subject.
  • the gesture state triggered by the target subject is the target gesture state.
  • the image content presented by the subject in the current frame image may be the person's head, the person's upper body, or the person's whole body captured by the shooting device.
  • the embodiments of the present application are No specific limitation is made.
  • the target subject state is mainly used to represent the state of the image content presented by the subject in the current frame image, which may include at least one of the range or position occupied by the subject in the current frame image.
  • the target subject state may include the position and size of the subject's bounding box in the current frame image, and may be obtained by detecting the current frame image using a person detection algorithm, which is not specifically limited in the embodiments of this application.
  • the position of the external frame may be the coordinates of the upper left corner of the external frame or the coordinates of the center point of the external frame, which is not specifically limited in the embodiment of the present application.
  • the current gesture state is mainly used to refer to the state of the image content presented by the subject's hand in the current frame image, which may also include at least one of the range or position occupied in the current frame image.
  • the current gesture status may include the position, size, and gesture category of the gesture, and may be obtained by detecting the current frame image through a gesture detection algorithm.
  • the position and size of the gesture are large Small can also be represented by an external frame.
  • the position of the bounding box can also be the coordinates of the upper left corner of the bounding box or the coordinates of the center point of the bounding box.
  • the "current” in “current gesture state” mainly emphasizes the gesture state obtained in the current frame image, while the “at least one” in “at least one gesture” is mainly because the subject may There will be more than one, and the resulting current gesture state may also be more than one.
  • the shooting composition method provided by the embodiment of the present application needs to use both the subject object and the gesture state. Therefore, if the gesture state is not detected in the current frame image, the method provided by the embodiment of the present application will continue to be used to process the next frame image of the current frame image.
  • Step 204 Obtain a historical gesture trajectory set, update the historical gesture trajectory set based on the current gesture state of at least one gesture, and obtain the current gesture trajectory set;
  • the gesture trajectory refers to a collection of a series of gesture states recorded in the order of acquisition within a period of time.
  • the gesture trajectory collection is a collection of multiple gesture trajectories. Multiple gesture trajectories are generated because more than one gesture state may be detected in an image frame.
  • the historical gesture trajectory set refers to the gesture trajectory set determined based on the image before the current frame image, and the current gesture trajectory set is obtained by updating the historical gesture trajectory set based on the current frame image.
  • i represents the i-th gesture
  • n represents the total number of gestures.
  • m represents the number of gesture trajectories in the historical gesture trajectory collection
  • j represents the jth historical gesture trajectory in the historical gesture trajectory collection.
  • "updating the historical gesture trajectory set based on the current gesture state of the at least one gesture” mainly means adding the current gesture state to the historical gesture trajectory or forming a new gesture trajectory.
  • the current gesture state can be matched with each gesture track in the historical track set. If the match is successful, the current gesture state is added to the successfully matched gesture track. If the match fails, a new gesture track can be created based on the current gesture state. gesture trajectories.
  • the gesture position in the gesture state can be used for matching, such as calculating the gesture position in the current gesture state and the gesture state at the last recorded moment of each gesture track in the historical gesture track set. The distance between the gesture positions.
  • the gesture trajectory corresponding to the minimum distance will be regarded as the gesture trajectory that successfully matches the current gesture state.
  • matching may be performed based on the gesture category in the current gesture state, which is not specifically limited in the embodiments of the present application.
  • Step 206 Determine the current gesture trajectory triggered by the subject object in the current gesture trajectory set according to the state of the target subject object, and determine the target gesture state triggered by the subject object in the current gesture trajectory;
  • the current gesture trajectory set obtained will include multiple gestures. gesture trajectory. It can be seen from the above process that the process of determining the target subject state of the subject based on the current frame image and the process of determining the current gesture state of the gesture based on the current frame image are independent of each other. Before adjusting the shooting device according to the subject's gesture, It is necessary to establish a connection between the subject and the gesture, so that after updating the historical gesture trajectory set to obtain the current gesture trajectory set, the current gesture trajectory corresponding to the subject can be determined in the current gesture trajectory set according to the target subject state of the subject. Then determine the target gesture state triggered by the subject object.
  • Step 208 Obtain the target working parameters of at least one device in the shooting composition system according to the target gesture state, and adjust the corresponding equipment in the shooting composition system according to the target working parameters.
  • the target gesture state refers to a gesture state that can be used to adjust the working parameters of the shooting composition system.
  • the gesture category of the target gesture state triggered by the subject is an automatic composition gesture
  • the orientation of the camera can be adjusted according to the position of the bounding box in the target state and the position of the preset bounding frame, so that in the next frame of the image
  • the position of the external frame of the main object should fit as closely as possible to the position of the preset external frame.
  • the working parameters that need to be adjusted may be different according to different composition requirements. Therefore, more than one parameter may need to be adjusted according to the target gesture state.
  • the composition requirements are determined through the gesture category corresponding to the gesture triggered by the subject object, so as to adjust the working parameters. Understandably, one gesture category usually corresponds to one compositional need.
  • the target working parameters corresponding to this gesture category can be directly determined, or the adjustment method of the working parameters can also be determined, and the target working parameters can be obtained by adjusting the working parameters.
  • the gesture category in the target gesture state indicates adjusting the focal length of the shooting device
  • the zoom factor and focal length change determine the current zoom factor.
  • the focal length change amount is positive or negative. A positive number indicates that the focal length becomes larger, and a negative number indicates that the focal length becomes smaller.
  • the specific adjustment method can be determined based on the gesture category in the target gesture state.
  • the shooting device is usually adjusted continuously through corresponding gestures showing the same composition requirement in several consecutive frames, so that the shooting device can meet the composition requirement.
  • the focal length may need to be adjusted to a value of 4, but the focal length change determined based on each frame of image is 0.5, that is, only 0.5 can be adjusted at a time, so 8 consecutive frames of images are required.
  • the zoom gesture appears, which means you need to make 8 consecutive adjustments to meet the composition requirements.
  • the zoom coefficient mentioned above is actually the target working parameter of the shooting equipment in the shooting composition system.
  • the automatic shooting composition can be completed through gestures, so the composition efficiency is higher and the composition result is more accurate.
  • the state of the target subject is also referenced, which can avoid misjudgment of the target gesture state caused by gesture states generated by irrelevant subjects, and in turn can make the shooting composition results more accurate.
  • the current frame image belongs to the image frame group, the images in the image frame group are sorted according to the shooting timing of the shooting device, and the current frame image is the last frame image; see Figure 3 to obtain the current frame image.
  • the target subject state of the subject including:
  • Step 302 Obtain the historical subject status of the subject in the first frame of the image frame group.
  • the historical subject state refers to the state of the subject in the image frame before the current frame image, which may include position or size, etc. This embodiment of the present application does not specifically limit this.
  • the image frame group is mainly used for target tracking processing. It should be noted that the "first frame image” mentioned here mainly emphasizes the first frame image used for target tracking, rather than the first frame image captured by the shooting device or the first frame in other senses. image.
  • Step 304 Based on the image frame group, perform target tracking on the subject object, and obtain the predicted subject state of the subject object in the current frame image.
  • the historical subject state of the target subject in the previous frame image can be directly used for prediction, or the historical subject state of the target subject in a series of images before the current frame image can be used for prediction.
  • This application The examples do not specifically limit this.
  • the target tracking algorithm can be used to obtain the predicted subject state of the subject in the current frame image.
  • Step 306 Integrate the historical subject state and the predicted subject state to obtain the target subject state of the subject in the current frame image.
  • the integration process may be to directly use the predicted subject state, that is, directly use the predicted subject state as the target subject state.
  • the integration process can also be other methods such as averaging.
  • the subject state may include the position and size of the subject's bounding box, and the position of the bounding box in the predicted subject state will be the same as the position of the bounding box in the historical subject state. Taking the average value, the position of the bounding box in the target subject state can be obtained. In the same way, by averaging, the size of the bounding box in the target object state can also be calculated.
  • historical subject state used for integration here can only include the historical subject state of the subject in the first frame image, and can also include the historical subject state of the subject in other images before the current frame image. , the embodiments of this application do not specifically limit this.
  • the target subject state of the subject in the current frame image when obtaining the target subject state of the subject in the current frame image, it is based on the integration of the historical subject state of the subject in the image before the current frame image and the predicted subject state obtained through target tracking. obtained, and the historical subject material state
  • the state is the clear state of the subject in the image before the current frame image, so that the target subject state obtained based on the historical subject state can be as accurate as possible.
  • the status of the target subject can be obtained more accurately even if the subject is prevented from being temporarily blocked.
  • updating the set of historical gesture trajectories based on the current gesture state of at least one gesture to obtain the current set of gesture trajectories includes: comparing the current gesture state of each gesture with each historical gesture trajectory in the set of historical gesture trajectories. Matching determines the current gesture state and historical gesture trajectories that match each other; adds the current gesture state of each matching historical gesture trajectory to the matching historical gesture trajectories to obtain the current gesture trajectory set.
  • the process of matching the current gesture state with the historical gesture trajectory may adopt the Hungarian algorithm.
  • Take the current gesture state of a total of n gestures detected in the current frame image as ⁇ R ti ⁇ , i 1,...,n as an example.
  • i represents the i-th gesture
  • t represents the current frame image as the t-th frame image.
  • the set of historical gesture trajectories is recorded as ⁇ T j ⁇
  • ⁇ T j ⁇ includes m historical gesture trajectories
  • j represents the jth historical gesture trajectory in the set of historical gesture trajectories.
  • a value of 1 indicates a match
  • a value of -1 indicates a mismatch.
  • R ti can be added to the matching historical gesture trajectory, that is, added to the jth historical gesture trajectory.
  • the current gesture state in the current frame image is added to the matching historical gesture trajectories to form a current gesture trajectory set.
  • the target working parameters for adjusting the shooting composition system can be obtained based on the current gesture trajectories. Since multiple image frames can be used for continuous tracking, compared to determining target working parameters based on one image frame, the shooting composition results can be more accurate.
  • the method further includes:
  • a new gesture trajectory is created based on the current gesture state that does not match each historical gesture trajectory and is added to the current gesture trajectory collection.
  • the reason why the embodiment of the present application creates a new gesture trajectory for the current gesture state that does not match is mainly because the subject may not have made a gesture towards the shooting device before, or has not made any gesture related to the shooting composition.
  • the associated gestures are started at the corresponding moment of the current frame image and are presented in the current frame image. Therefore, there will be a current gesture that does not match each historical gesture trajectory. Gesture status.
  • the current gesture state which does not match every historical gesture trajectory, should not be ignored because it may be related to the composition of the shot. Therefore, in the embodiment of the present application, a new gesture trajectory can be created to record the current gesture state and serve as a new gesture trajectory in the current gesture trajectory set.
  • the current gesture trajectory set also includes historical gesture trajectories in which the current gesture state is not added to the historical gesture trajectory set; the current gesture trajectory triggered by the subject object is determined in the current gesture trajectory set according to the state of the target subject. Previously, this also included:
  • For each gesture trajectory in the current gesture trajectory set obtain the adding moment corresponding to the last gesture state added in each gesture trajectory; calculate the time interval between each adding moment and the acquisition moment of the current frame image, which will be greater than the preset
  • the gesture trajectory corresponding to the time interval is deleted from the current gesture trajectory collection.
  • the last gesture track in the gesture track will be Since the added gesture state is the current gesture state obtained in the current frame image, the time interval between the addition time corresponding to the last gesture state added in the gesture trajectory and the acquisition time of the current frame image will not exceed big. Only historical gesture trajectories that have not been updated based on the current frame image, or even historical gesture trajectories that have not been updated based on multiple frames of images before the current frame image, are left to the current gesture trajectory collection as the current gesture trajectory collection. A certain gesture trajectory in the gesture trajectory; the time interval between the addition time corresponding to the last gesture state added in the gesture trajectory and the acquisition time of the current frame image will be too large.
  • gesture trajectories with larger time intervals are filtered out through a preset duration. It is also understandable that the reason why we choose to delete gesture trajectories corresponding to time intervals greater than the preset duration from the current gesture trajectory collection is mainly because such gesture trajectories usually cannot be updated for too long, and the main object cannot be updated. It is very possible to use such a gesture trajectory as a basis and continue to make gestures on this basis to control the composition of the shot. Therefore, in order to ensure the accuracy of the subsequent determination of the current gesture trajectory triggered by the subject, you may choose to delete the gesture trajectory corresponding to a time interval greater than the preset time from the current gesture trajectory set.
  • gesture trajectories that have not been updated for too long can be deleted from the current gesture trajectory set, the accuracy of subsequent determination results when determining the current gesture trajectory triggered by the subject object can be ensured.
  • gesture trajectories that have not been updated for too long are deleted from the current gesture trajectories, the amount of data in the current gesture trajectory collection can also be reduced to save resources.
  • the target subject state includes the position of the subject; see Figure 4, according to the target subject state, the current gesture trajectory triggered by the subject is determined in the current gesture trajectory set, and in the current gesture trajectory, Determine the target gesture state triggered by the subject object status, including:
  • Step 402 For each gesture trajectory in the current gesture trajectory set, determine the gesture state last added in each gesture trajectory, where the gesture state includes the gesture position.
  • the gesture states in each gesture trajectory are usually arranged in the order of adding time, and the gesture state added last is the gesture state arranged last.
  • the gesture position can be represented by the coordinates of the center point of the external frame, or can be represented by other methods, which are not specifically limited in the embodiments of the present application.
  • Step 404 Filter the current gesture trajectory set according to the distance between the position of the subject and the gesture position in each last added gesture state to obtain the current gesture trajectory.
  • the current gesture trajectory collection can be filtered according to the distance between the two. Specifically, if the distance between the gesture position in the last gesture state added in a certain gesture trajectory and the position of the subject is greater than a preset threshold or is not within a certain range, the gesture can be filtered out from the current gesture trajectory collection. Gesture trajectories. Since the gesture trajectories in the current gesture trajectory collection are screened based on distance, this process can also be understood as selecting the current gesture trajectory that matches the subject object from the current gesture trajectory collection.
  • Step 406 When the current gesture trajectory meets the preset detection conditions, the last gesture state added in the current gesture trajectory is used as the target gesture state.
  • the preset detection conditions are based on the current gesture trajectory as the basis for determining the target gesture state, and what rational conditions need to be met are set. For example, since the target gesture state needs to be determined from the current gesture trajectory, the current gesture trajectory should be stable. This "stability" can be reflected in the fact that the time intervals between the adding moments of different gesture states in the current gesture trajectory are uniform.
  • the reason why the above content can reflect "stability" is mainly because if the subject needs to control the shooting composition, it is usually The same gesture will be performed over a period of time to produce stable recognition results, thus producing a series of gesture states with even time intervals between adding moments.
  • the preset detection conditions may also have other setting bases, which are not specifically limited in the embodiments of this application.
  • the reason why the last added gesture state in the current gesture trajectory is selected as the target gesture state is mainly because the last added gesture state is the latest gesture state in the current gesture trajectory, which can reflect the latest shooting of the subject. Composition intention, so as to achieve precise shooting composition control.
  • the current gesture track set matching the main object is filtered out. Pre-gesture trajectories. Since the calculation process is relatively simple, the processing efficiency can be improved. In addition, after the current gesture trajectory is initially screened based on distance, the current gesture trajectory needs to be further detected based on preset detection conditions, so that a more accurate target gesture state can be obtained.
  • the preset detection conditions include at least one of the following two conditions.
  • the following two conditions are that the number of gesture states in the current gesture trajectory is not less than the preset number, and that the number of gesture states last added in the current gesture trajectory is not less than the preset number.
  • the added time sequence corresponding to the k gesture states matches the shooting time sequence corresponding to the k frames of images last captured by the shooting device; where k is a positive integer.
  • the reason why the number of gesture states in the gesture trajectory is used as the basis for setting the preset detection conditions is mainly because only when the number of gesture states in the gesture trajectory reaches a certain number, can the gesture trajectory be "stable", and “Stable" gesture trajectories are more conducive to accurately determining the target gesture state.
  • the addition time sequence corresponding to the last k gesture states added to the current gesture trajectory matches the shooting time sequence corresponding to the last k frames of images captured by the shooting device, which can explain this problem for the last k gesture states added.
  • the update progress of the current gesture track is basically synchronized with the shooting progress of the image taken by the shooting device. That is, basically every time the shooting device takes a frame of image, the current gesture track will add the gesture state inside itself based on the captured image. . It can also be seen from here that the current gesture trajectory that meets this condition should gradually form gesture instructions for controlling the shooting composition, that is, the current gesture trajectory that meets this condition should be "valid".
  • the so-called “matching” can mean that the adding time sequence and the shooting time sequence are completely consistent with the adding time and shooting time in the same sequence, or it can be that the error is within an acceptable range, which is not the case in the embodiment of the present application. Specific limitations.
  • the current gesture trajectory after the current gesture trajectory is initially screened based on distance, the current gesture trajectory needs to be further detected based on preset detection conditions, so that a more accurate target gesture state can be obtained.
  • the target gesture state includes the target gesture type; before obtaining the target working parameter of at least one device in the shooting composition system according to the target gesture state, the method further includes:
  • the embodiment of the present application mainly focuses on the process of starting the automatic shooting composition mode based on a specified gesture.
  • the specified gesture can be used as a trigger condition for entering the automatic shooting composition mode controlled by gestures, that is, only when the specified gesture is recognized, "according to the target gesture state, obtain at least one of the shooting composition modes in the shooting composition system" "Target working parameters of an equipment” step, and then control the shooting composition according to the target working parameters.
  • the shooting composition system can issue a reminder through an external indicator light to inform the user whether the shooting composition system is currently in the automatic shooting composition mode.
  • you can use the indicator light Color distinguishes automatic shooting composition modes from non-automatic shooting composition modes.
  • the preset designated gestures for entering and exiting the automatic shooting composition mode may be the same or different, and this is not specifically limited in the embodiments of the present application.
  • the automatic shooting composition mode can be entered first through the specified gesture, and then the shooting composition can be controlled.
  • the target subject state includes the position of the subject, and the target gesture state includes the target gesture position; according to the target gesture state, the target working parameter of at least one device in the shooting composition system is obtained, including:
  • Step 502 Based on the position of the main object and the position of the target gesture, determine the relative positional relationship between the main object and the gesture corresponding to the target gesture state in the current frame image.
  • the relative positional relationship between the subject and the gesture refers to the relative positional relationship presented in the two-dimensional image.
  • the relative position relationship can be specifically determined based on the relationship between the center coordinates of the subject's bounding box (x head , y head ) and the center coordinates of the gesture's bounding box (x hand , y hand ). Since it is a coordinate value, the relative position relationship can include multiple types. Taking the subject object as the user's head as an example, the relative position relationship may include the hand above the head, the hand below the head, or the hand above the left side of the head, etc.
  • Step 504 Determine the target working parameter of at least one piece of equipment in the shooting composition system based on the relative position relationship.
  • this step is mainly a process of parsing the meaning of the gesture.
  • the analysis process includes two aspects that are advanced in sequence.
  • the first aspect is the process of "what to adjust” for the shooting composition
  • the second aspect is the process of "how to adjust” the shooting composition.
  • Optional adjustment objects may be the zoom coefficient or the optical axis orientation of the shooting device, etc. This is not specifically limited in the embodiments of the present application.
  • the specific adjustment object to be selected can be the default, or indicated by the target gesture type in the target gesture state, such as a zoom control gesture or an optical axis direction control gesture.
  • the adjustment object can be the zoom coefficient, and the adjustment method is to increase the zoom coefficient.
  • the adjustment process of the zoom coefficient may be to fix the proportion of the main object but enlarge or reduce the size of the main object.
  • the automatic shooting composition can be completed according to the relative positional relationship between the subject and the gesture corresponding to the target gesture state, the composition efficiency is higher and the composition result is more accurate, and due to the adjustment object and the composition of the shooting
  • the adjustment method can be personalized based on gestures, making the operation more flexible and convenient.
  • the shooting composition system further includes a control device, which is used to control the movement of the shooting device; the target working parameters include at least one of the zoom parameters of the shooting device or the orientation of the optical axis of the shooting device or the position of the shooting device.
  • a control device which is used to control the movement of the shooting device; the target working parameters include at least one of the zoom parameters of the shooting device or the orientation of the optical axis of the shooting device or the position of the shooting device.
  • the control device refers to a mechanical device that can change the shooting range or shooting angle of the shooting device by adjusting its own position or shape.
  • the control device may be a pan/tilt, and the pan/tilt may include a robotic arm, and a shooting device may be placed on the carrying portion of the robotic arm.
  • the bearing part can expand and contract and translate along with the expansion and contraction of the mechanical arm, and the bearing part can also rotate, so that the shooting equipment placed on the bearing part of the robotic arm can expand, contract, translate or rotate along with the bearing part.
  • the robotic arm expands and contracts, it will change the viewing range of the shooting equipment. If the robotic arm translates, the viewing area of the shooting device will change.
  • the robotic arm flips, it will change the viewing angle of the shooting equipment.
  • the position of the shooting device can be changed by telescopic and panning. By rotating, the orientation of the optical axis of the shooting device can be changed. Through the focusing function of the gimbal, you can change the zoom parameters of the shooting device.
  • At least the zoom parameter or the direction or position of the optical axis of the shooting device can be determined based on the relative positional relationship between the subject and the gesture corresponding to the target gesture state, so that the composition efficiency is higher and the composition result is more accurate. It is more accurate, and because the adjustment objects and methods of shooting composition can be customized based on gestures, the operation is more flexible and convenient.
  • the target subject state includes the position of the subject, and the target gesture state includes the target gesture position; according to the target gesture state, the target working parameter of at least one device in the shooting composition system is obtained, including:
  • Step 602 Obtain the historical subject state of the subject in the historical image captured by the shooting device and the historical gesture state triggered by the subject.
  • the target gesture state is determined in the current gesture trajectory, and the gesture states in the current gesture trajectory are sequentially sorted based on the adding time, and the historical gesture states triggered by the subject object can refer to The gesture state preceding the target gesture state in the current gesture trajectory.
  • the historical gesture state is obtained from the historical image, so the historical subject state of the subject can also be obtained in the historical image.
  • R 5 is the target gesture state determined in the current frame image
  • R 1 , R 2 , R 3 and R 4 are the historical gesture states in the 4 consecutive frames of historical images obtained before the current frame image.
  • the historical subject states in the four consecutive frames of historical images can be W 1 , W 2 , W 3 and W 4 respectively, and the target subject state in the current frame image can be W 5 .
  • Step 604 Based on the position of the main object and the position of the target gesture, calculate the first distance between the main object in the current frame image and the gesture corresponding to the target gesture state.
  • (x hand5 , y hand5 ) represents the target gesture position
  • (x head5 , y head5 ) represents the position of the subject object.
  • Step 606 Calculate the second distance between the subject in the historical image and the gesture corresponding to the historical gesture state based on the historical position of the subject in the historical subject state and the historical gesture position in the historical gesture state.
  • a second distance may be calculated based only on a certain historical gesture position.
  • R 1 , R 2 , R 3 and R 4 are respectively the historical gesture states in the 4 consecutive frames of images acquired before the current frame image.
  • the second distance bias 4 (x hand4 ,yh and4 )- ( x head4 , y head4 ).
  • (x hand4 , y hand4 ) represents the historical gesture position in the 4th frame image
  • (x head4 , y head4 ) represents the historical position of the subject in the 4th frame image.
  • the second distance may not necessarily be calculated based on the 4th frame image, but may also be calculated based on other frame historical images, such as the 1st frame image as the initial frame.
  • the embodiment of the present application is This is not specifically limited.
  • Step 608 Determine the target working parameter of at least one device in the shooting composition system based on the difference between the first distance and the second distance.
  • the difference represents how much the distance between the hand and the head has changed at the corresponding moment of the current frame image compared to before.
  • the change that is, the difference calculated above, can have a negative number.
  • the positive or negative value of the difference can indicate whether to increase or decrease the target operating parameter, and the numerical value of the difference can indicate how much the target operating parameter has been changed. Therefore, the content stated above can solve the problem of "how to adjust".
  • the optional adjustment object may be the zoom coefficient or the optical axis orientation of the shooting device, which is not specifically limited in the embodiments of the present application.
  • the specific adjustment object to be selected can also be the default, or it can also be indicated by the target gesture type in the target gesture state, such as a zoom control gesture or an optical axis direction control gesture. It should be noted that when the optical axis orientation of the shooting device needs to be adjusted, the difference can be converted into an angle.
  • the control device itself may move and move with the shooting device, and the motion process of the shooting device driven by the control device is synchronously coupled with the hand motion process, the gestures in the images captured by the shooting device The position of the coordinates in the image will remain unchanged, which will cause the movement of the hand in the real world to be misjudged as stationary. Since the shooting composition requires a series of changing gesture positions, it will slow down the shooting process. Compositional stability. By changing the distance between the subject and the gesture at different times to reflect the movement of the hand in the real world, the problem of synchronous coupling between the movement process of the shooting equipment and the movement process of the hand can be bypassed, thereby improving the stability of the shooting composition. sex.
  • the shooting composition system also includes a control device, which is used to control the movement of the shooting device; the target working parameters The number includes at least one of the zoom parameter of the photographing device, the orientation of the optical axis of the photographing device, or the position of the photographing device.
  • At least the zoom parameter or the direction or position of the optical axis of the shooting device can be determined based on the relative positional relationship between the subject and the gesture corresponding to the target gesture state, so that the composition efficiency is higher and the composition result is more accurate. It is more accurate, and because the adjustment objects and methods of shooting composition can be customized based on gestures, the operation is more flexible and convenient.
  • the target gesture state includes the target gesture type; according to the target gesture state, the target working parameters of at least one device in the shooting composition system are obtained, including:
  • the preset working parameters corresponding to the preset gesture type are obtained and used as the target working parameters.
  • the preset working parameters include the preset zoom coefficient of the shooting device.
  • the specified gesture type can be used as a trigger condition for entering the automatic shooting composition mode controlled by gestures.
  • it is mainly a process of obtaining the default value of the target working parameter of at least one device in the shooting composition system when it is determined that the target gesture type conforms to the preset gesture type.
  • the target gesture type in the target gesture state conforms to the preset gesture type. If it matches, it means that the target gesture state triggered the preset gesture. Since the default value of the target working parameter of at least one device in the shooting composition system can be set for the preset gesture in advance, when it is determined that the target gesture state triggers the preset gesture, when executing "according to the target gesture state, obtain In the step of "shooting the target working parameter of at least one piece of equipment in the composition system", the above default value can be directly used as the target working parameter of shooting at least one piece of equipment in the composition system.
  • the shooting composition can be controlled simply and conveniently.
  • the shooting composition system also includes a control device, which is used to control the movement of the shooting device; accordingly, the preset working parameters also include the preset optical axis orientation of the shooting device or the preset location of the shooting device. At least one of the locations.
  • the preset working parameters may include at least one of the "preset" optical axis orientation of the shooting device or the "preset" position of the shooting device.
  • the composition efficiency is higher and the composition result is more accurate.
  • the adjustment objects and methods of shooting composition can be customized based on gestures, the operation is more flexible and convenient.
  • embodiments of the present application also provide a photographing and composition device for implementing the above-mentioned photographing and composition method.
  • the solution to the problem provided by this device is similar to the solution recorded in the above method. Therefore, for the specific limitations in one or more embodiments of the shooting and composition device provided below, please refer to the limitations on the shooting and composition method mentioned above. I won’t go into details here.
  • a shooting composition device including: a data acquisition module 701, a gesture update module 702, a gesture determination module 703, and a device adjustment module 704, wherein:
  • the data acquisition module 701 is used to acquire the current frame image captured by the shooting device, acquire the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
  • the gesture update module 702 is used to obtain a set of historical gesture trajectories, update the set of historical gesture trajectories based on the current gesture state of at least one gesture, and obtain a set of current gesture trajectories;
  • the gesture determination module 703 is used to determine the current gesture trajectory triggered by the subject object in the current gesture trajectory set according to the state of the target subject object, and determine the target gesture state triggered by the subject object in the current gesture trajectory;
  • the equipment adjustment module 704 is used to obtain the target working parameters of at least one device in the shooting and composition system according to the target gesture state, and adjust the corresponding equipment in the shooting and composition system according to the target working parameters.
  • the data acquisition module 701 is also used to:
  • the historical subject state and the predicted subject state are integrated to obtain the target subject state of the subject in the current frame image.
  • the gesture update module 702 is also used to:
  • the gesture update module 702 is also used to:
  • a new gesture trajectory is created based on the current gesture state that does not match each historical gesture trajectory and is added to the current gesture trajectory collection.
  • the gesture update module 702 is also used to:
  • the gesture determination module 703 is also used to:
  • For each gesture trajectory in the current gesture trajectory set determine the last gesture state added in each gesture trajectory, where the gesture state includes the gesture position;
  • the last gesture state added in the current gesture trajectory is used as the target gesture state.
  • the gesture determination module 703 is further configured to: determine that the preset detection condition includes at least one of the following two conditions.
  • the following two conditions are that the number of gesture states in the current gesture trajectory is not less than the preset number.
  • the addition time sequence corresponding to the last k gesture states added in the current gesture trajectory matches the shooting time sequence corresponding to the last k frame images captured by the shooting device; where k is a positive integer.
  • the device adjustment module 704 is also used to:
  • the step of obtaining the target working parameter of at least one device in the shooting composition system is performed according to the target gesture state.
  • the device adjustment module 704 is also used to:
  • the target working parameters of at least one piece of equipment in the shooting composition system are determined.
  • the equipment adjustment module 704 is also used to determine that the shooting composition system also includes a control device, and the control device is used to control the movement of the shooting device; the target working parameters include the zoom parameters of the shooting device or the optical axis orientation of the shooting device, or At least one item of the location of the shooting device.
  • the device adjustment module 704 is also used to:
  • a target working parameter of at least one piece of equipment in the shooting composition system is determined.
  • the equipment adjustment module 704 is also used to determine that the shooting composition system also includes a control device, and the control device is used to control the movement of the shooting device; the target working parameters include the zoom parameters of the shooting device or the optical axis orientation of the shooting device, or At least one item of the location of the shooting device.
  • the device adjustment module 704 is also used to:
  • the preset working parameters corresponding to the preset gesture type are obtained and used as the target working parameters.
  • the preset working parameters include the preset zoom coefficient of the shooting device.
  • the equipment adjustment module 704 is also used to determine that the shooting composition system also includes a control device, and the control device is used to control the movement of the shooting device; accordingly, the preset working parameters also include the preset optical axis orientation of the shooting device. Or at least one of the preset positions of the shooting device.
  • Each module in the above-mentioned shooting and composition device can be realized in whole or in part by software, hardware and combinations thereof.
  • Each of the above modules may be embedded in or independent of the processor of the computer device in the form of hardware, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be shown in Figure 8 .
  • the computer device includes a processor, memory, and network interfaces connected through a system bus. Wherein, the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes non-volatile storage media and internal memory.
  • the non-volatile storage medium stores operating systems, computer programs and databases. This internal memory provides an environment for the execution of operating systems and computer programs in non-volatile storage media.
  • the database of the computer device is used to store gesture trajectory data and subject state data.
  • the network interface of the computer device is used to communicate with external terminals through a network connection.
  • the computer program implements a shooting composition method when executed by the processor.
  • Figure 8 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • Specific computer equipment can May include more or fewer parts than shown, or combine certain parts, or have a different arrangement of parts.
  • a computer device including a memory and a processor.
  • a computer program is stored in the memory.
  • the processor executes the computer program, it implements the steps in the above method embodiments.
  • a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the steps in the above method embodiments are implemented.
  • a computer program product including a computer program that implements the steps in each of the above method embodiments when executed by a processor.
  • the computer program can be stored in a non-volatile computer-readable storage.
  • the computer program when executed, may include the processes of the above method embodiments.
  • Any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory.
  • Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetic variable memory (Magnetoresistive Random Access Memory (MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc.
  • Volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory, etc.
  • RAM Random Access Memory
  • RAM random access memory
  • RAM Random Access Memory
  • the databases involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database.
  • Non-relational databases may include blockchain-based distributed databases, etc., but are not limited thereto.
  • the processors involved in the various embodiments provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to this.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)
  • Studio Devices (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present application relates to a photographing composition method and apparatus, and a computer device, a storage medium and a computer program product. The method comprises: acquiring the current frame of image, and acquiring a target subject state of a subject in the current frame of image, and the current gesture state; updating a historical gesture trajectory set on the basis of the current gesture state, so as to obtain the current gesture trajectory set; determining, from the current gesture trajectory set, the current gesture trajectory triggered by the subject and a target gesture state triggered by the subject; and acquiring target working parameters according to the target gesture state, and adjusting a corresponding device in a photographing composition system according to the target working parameters. By means of analyzing image content in real time, position and size information of a single/plurality of subjects are extracted, and a corresponding composition is generated on the basis of a composition mode; and by means of analyzing a gesture action of a photographed subject, an interactive composition function based on gesture control is realized, thereby realizing non-contact composition adjustment which can be flexibly set.

Description

拍摄构图方法、装置、计算机设备和存储介质Photography composition methods, devices, computer equipment and storage media 技术领域Technical field
本申请涉及图像处理技术领域,特别是涉及一种拍摄构图方法、装置、计算机设备、存储介质和计算机程序产品。The present application relates to the field of image processing technology, and in particular to a photographing and composition method, device, computer equipment, storage medium and computer program product.
背景技术Background technique
自动构图技术可根据构图操作实施阶段分为两个大类:一次构图,即在拍摄行为前,分析预览画面图像内容,得到当前构图与目标构图的偏差信息,进而输出相应的构图提示。二次构图,即在拍摄行为结束后,由软件自动分析所拍摄的画面内容,确认构图方式并实施相应的裁剪、缩放等操作,最后输出二次构图后的图像/视频。在相关技术中,主要是由用户手动调整拍摄设备位置与角度实现一次构图,效率较低且手动调整不够精准。Automatic composition technology can be divided into two categories according to the implementation stage of the composition operation: one-time composition, that is, before the shooting action, the image content of the preview screen is analyzed to obtain the deviation information between the current composition and the target composition, and then the corresponding composition prompts are output. Secondary composition means that after the shooting is completed, the software automatically analyzes the content of the shot, confirms the composition method and performs corresponding cropping, zooming and other operations, and finally outputs the image/video after the second composition. In related technologies, the user mainly manually adjusts the position and angle of the shooting device to achieve one-time composition, which is inefficient and manual adjustment is not accurate enough.
发明内容Contents of the invention
基于此,有必要针对上述技术问题,提供一种能够快捷无接触的拍摄构图方法、装置、计算机设备、计算机可读存储介质和计算机程序产品。Based on this, it is necessary to provide a quick and contactless shooting composition method, device, computer equipment, computer-readable storage medium and computer program product to address the above technical problems.
第一方面,本申请提供了一种拍摄构图方法。所述方法包括:In a first aspect, this application provides a photographing composition method. The methods include:
获取通过拍摄设备拍摄得到的当前帧图像,获取当前帧图像中主体物的目标主体物状态以及至少一个手势的当前手势状态;Obtain the current frame image captured by the shooting device, obtain the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
获取历史手势轨迹集合,基于至少一个手势的当前手势状态对历史手势轨迹集合进行更新,获得当前手势轨迹集合;Obtain a collection of historical gesture trajectories, update the collection of historical gesture trajectories based on the current gesture state of at least one gesture, and obtain a collection of current gesture trajectories;
根据目标主体物状态,在当前手势轨迹集合中确定由主体物所触发的当前手势轨迹,并在当前手势轨迹中,确定由主体物触发的目标手势状态;According to the state of the target subject, determine the current gesture trajectory triggered by the subject in the current gesture trajectory set, and determine the target gesture state triggered by the subject in the current gesture trajectory;
根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,并根据目标工作参数对拍摄构图系统中相应的设备进行调节。According to the target gesture state, the target working parameter of at least one device in the shooting composition system is obtained, and the corresponding device in the shooting composition system is adjusted according to the target working parameter.
在其中一个实施例中,当前帧图像从属于图像帧组,图像帧组中的图像是按照拍摄设备的拍摄时序进行排序的,当前帧图像为最后一帧图像;获取当前帧图像中主体物的目标主体物状态,包括:In one embodiment, the current frame image belongs to the image frame group, the images in the image frame group are sorted according to the shooting sequence of the shooting device, and the current frame image is the last frame image; the image of the main object in the current frame image is obtained. Target subject status, including:
获取图像帧组中第一帧图像中主体物的历史主体物状态; Obtain the historical subject status of the subject in the first frame of the image frame group;
基于图像帧组,对主体物进行目标跟踪,获得当前帧图像中主体物的预测主体物状态;Based on the image frame group, perform target tracking on the subject and obtain the predicted subject state of the subject in the current frame image;
对历史主体物状态与预测主体物状态进行整合,获得当前帧图像中主体物的目标主体物状态。The historical subject state and the predicted subject state are integrated to obtain the target subject state of the subject in the current frame image.
在其中一个实施例中,基于至少一个手势的当前手势状态对历史手势轨迹集合进行更新,获得当前手势轨迹集合,包括:In one embodiment, updating the historical gesture trajectory set based on the current gesture state of at least one gesture to obtain the current gesture trajectory set includes:
将每一手势的当前手势状态与历史手势轨迹集合中每一历史手势轨迹进行匹配,确定相互匹配的当前手势状态与历史手势轨迹;Match the current gesture state of each gesture with each historical gesture trajectory in the historical gesture trajectory collection, and determine the matching current gesture state and historical gesture trajectory;
将每一存在相匹配的历史手势轨迹的当前手势状态添加至相匹配的历史手势轨迹,获得当前手势轨迹集合。Add the current gesture state of each matching historical gesture track to the matching historical gesture track to obtain a current gesture track set.
在其中一个实施例中,将每一手势的当前手势状态与历史手势轨迹集合中每一历史手势轨迹进行匹配之后,还包括:In one embodiment, after matching the current gesture state of each gesture with each historical gesture trajectory in the historical gesture trajectory collection, the method further includes:
在存在与每一历史手势轨迹均不匹配的当前手势状态的情况下,基于与每一历史手势轨迹均不匹配的当前手势状态,新建手势轨迹,并添加至当前手势轨迹集合。In the case where there is a current gesture state that does not match each historical gesture trajectory, a new gesture trajectory is created based on the current gesture state that does not match each historical gesture trajectory and is added to the current gesture trajectory collection.
在其中一个实施例中,当前手势轨迹集合中还包括历史手势轨迹集合中未添加当前手势状态的历史手势轨迹;根据目标主体物状态,在当前手势轨迹集合中确定由主体物所触发的当前手势轨迹之前,还包括:In one embodiment, the current gesture trajectory set also includes historical gesture trajectories in which the current gesture state is not added to the historical gesture trajectory set; according to the state of the target subject, the current gesture triggered by the subject is determined in the current gesture trajectory set Before the trajectory, also included:
对于当前手势轨迹集合中每一手势轨迹,获取每一手势轨迹中最后添加的手势状态所对应的添加时刻;For each gesture trajectory in the current gesture trajectory collection, obtain the addition moment corresponding to the last gesture state added in each gesture trajectory;
计算每一添加时刻与当前帧图像的获取时刻之间的时间间隔,将大于预设时长的时间间隔所对应的手势轨迹从当前手势轨迹集合中删除。Calculate the time interval between each addition moment and the acquisition moment of the current frame image, and delete the gesture trajectories corresponding to the time interval greater than the preset time from the current gesture trajectory set.
在其中一个实施例中,目标主体物状态包括主体物的位置;根据目标主体物状态,在当前手势轨迹集合中确定由主体物所触发的当前手势轨迹,并在当前手势轨迹中,确定由主体物触发的目标手势状态,包括:In one embodiment, the target subject state includes the position of the subject; according to the target subject state, the current gesture trajectory triggered by the subject is determined in the current gesture trajectory set, and in the current gesture trajectory, the current gesture trajectory triggered by the subject is determined. Target gesture states triggered by objects, including:
对于当前手势轨迹集合中每一手势轨迹,确定每一手势轨迹中最后添加的手势状态,手势状态包括手势位置;For each gesture trajectory in the current gesture trajectory set, determine the last gesture state added in each gesture trajectory, where the gesture state includes the gesture position;
根据主体物的位置分别与每一最后添加的手势状态中的手势位置之间的距离,对当前手势轨迹集合进行筛选,获得当前手势轨迹;According to the distance between the position of the subject and the gesture position in each last added gesture state, filter the current gesture trajectory set to obtain the current gesture trajectory;
在当前手势轨迹满足预设检测条件的情况下,将当前手势轨迹中最后添加的手势状态作为目标手势状态。When the current gesture trajectory meets the preset detection conditions, the last gesture state added in the current gesture trajectory is used as the target gesture state.
在其中一个实施例中,预设检测条件包括以下两个条件中的至少一项,以下两个条件分别为当前手势轨迹中手势状态的数量不小于预设数量,以及,当前手势轨迹中最后添加的k个手势状态所对应的添加时 刻序列与拍摄设备最后拍摄得到的k帧图像所对应的拍摄时刻序列相匹配;其中,k为正整数。In one embodiment, the preset detection condition includes at least one of the following two conditions. The following two conditions are that the number of gesture states in the current gesture trajectory is not less than the preset number, and that the last addition in the current gesture trajectory is When adding k gesture states corresponding to The moment sequence matches the shooting moment sequence corresponding to the last k frames of images captured by the shooting device; where k is a positive integer.
在其中一个实施例中,目标手势状态包括目标手势类型;根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数之前,还包括:In one embodiment, the target gesture state includes the target gesture type; before obtaining the target working parameter of at least one device in the shooting composition system according to the target gesture state, the method further includes:
判断目标手势类型是否符合指定手势类型;Determine whether the target gesture type matches the specified gesture type;
在目标手势类型符合指定手势类型的情况下,则执行根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数的步骤。When the target gesture type matches the specified gesture type, the step of obtaining the target working parameter of at least one device in the shooting composition system is performed according to the target gesture state.
在其中一个实施例中,目标主体物状态包括主体物的位置,目标手势状态包括目标手势位置;根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,包括:In one embodiment, the target subject state includes the position of the subject, and the target gesture state includes the target gesture position; according to the target gesture state, the target working parameter of at least one device in the shooting composition system is obtained, including:
基于主体物的位置与目标手势位置,确定当前帧图像中主体物与目标手势状态对应的手势之间的相对位置关系;Based on the position of the subject and the position of the target gesture, determine the relative positional relationship between the gesture corresponding to the subject and the target gesture state in the current frame image;
根据相对位置关系,确定拍摄构图系统中至少一项设备的目标工作参数。According to the relative position relationship, the target working parameters of at least one piece of equipment in the shooting composition system are determined.
在其中一个实施例中,拍摄构图系统还包括操控设备,操控设备用于控制拍摄设备进行运动;目标工作参数包括所述拍摄设备的变焦参数或者拍摄设备的光轴朝向或者拍摄设备的所处位置中的至少一项。In one embodiment, the shooting composition system also includes a control device, which is used to control the movement of the shooting device; the target working parameters include the zoom parameter of the shooting device or the optical axis orientation of the shooting device or the location of the shooting device at least one of them.
在其中一个实施例中,目标主体物状态包括主体物的位置,目标手势状态包括目标手势位置;根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,包括:In one embodiment, the target subject state includes the position of the subject, and the target gesture state includes the target gesture position; according to the target gesture state, the target working parameter of at least one device in the shooting composition system is obtained, including:
获取拍摄设备所拍摄到的历史图像中主体物的历史主体物状态和由主体物触发的历史手势状态;Obtain the historical subject state of the subject in the historical image captured by the shooting device and the historical gesture state triggered by the subject;
基于主体物的位置与目标手势位置,计算当前帧图像中主体物与目标手势状态对应的手势之间的第一距离;Based on the position of the subject and the target gesture position, calculate the first distance between the subject and the gesture corresponding to the target gesture state in the current frame image;
基于历史主体物状态中的主体物的历史位置与历史手势状态中的历史手势位置,计算历史图像中主体物与历史手势状态对应的手势之间的第二距离;Based on the historical position of the subject in the historical subject state and the historical gesture position in the historical gesture state, calculate the second distance between the subject in the historical image and the gesture corresponding to the historical gesture state;
根据第一距离与第二距离之间的差值,确定拍摄构图系统中至少一项设备的目标工作参数。According to the difference between the first distance and the second distance, a target working parameter of at least one piece of equipment in the shooting composition system is determined.
在其中一个实施例中,拍摄构图系统还包括操控设备,操控设备用于控制拍摄设备进行运动;目标工作参数包括所述拍摄设备的变焦参数或者拍摄设备的光轴朝向或者拍摄设备的所处位置中的至少一项。In one embodiment, the shooting composition system also includes a control device, which is used to control the movement of the shooting device; the target working parameters include the zoom parameter of the shooting device or the optical axis orientation of the shooting device or the location of the shooting device at least one of them.
在其中一个实施例中,目标手势状态包括目标手势类型;根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,包括:In one embodiment, the target gesture state includes the target gesture type; according to the target gesture state, the target working parameters of at least one device in the shooting composition system are obtained, including:
在目标手势类型符合预设手势类型的情况下,获取预设手势类型相应的预设工作参数,并作为目标工作参数,预设工作参数包括拍摄设备的预设变焦系数。When the target gesture type matches the preset gesture type, the preset working parameters corresponding to the preset gesture type are obtained and used as the target working parameters. The preset working parameters include the preset zoom coefficient of the shooting device.
在其中一个实施例中,拍摄构图系统还包括操控设备,操控设备用于控制拍摄设备进行运动;相应地, 预设工作参数还包括拍摄设备的预设光轴朝向或者拍摄设备的预设所处位置中的至少一项。In one of the embodiments, the shooting composition system also includes a control device, and the control device is used to control the movement of the shooting device; accordingly, The preset working parameters also include at least one of the preset optical axis orientation of the shooting device or the preset position of the shooting device.
第二方面,本申请还提供了一种拍摄构图装置。装置包括:In a second aspect, this application also provides a shooting composition device. Devices include:
数据获取模块,用于获取通过拍摄设备拍摄得到的当前帧图像,获取当前帧图像中主体物的目标主体物状态以及至少一个手势的当前手势状态;A data acquisition module, used to acquire the current frame image captured by the shooting device, acquire the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
手势更新模块,用于获取历史手势轨迹集合,基于至少一个手势的当前手势状态对历史手势轨迹集合进行更新,获得当前手势轨迹集合;The gesture update module is used to obtain the historical gesture trajectory collection, update the historical gesture trajectory collection based on the current gesture state of at least one gesture, and obtain the current gesture trajectory collection;
手势确定模块,用于根据目标主体物状态,在当前手势轨迹集合中确定由主体物所触发的当前手势轨迹,并在当前手势轨迹中,确定由主体物触发的目标手势状态;The gesture determination module is used to determine the current gesture trajectory triggered by the subject object in the current gesture trajectory set according to the state of the target subject object, and determine the target gesture state triggered by the subject object in the current gesture trajectory;
设备调整模块,用于根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,并根据目标工作参数对拍摄构图系统中相应的设备进行调节。The equipment adjustment module is used to obtain the target working parameters of at least one device in the shooting composition system according to the target gesture state, and adjust the corresponding equipment in the shooting composition system according to the target working parameters.
第三方面,本申请还提供了一种计算机设备。所述计算机设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:In a third aspect, this application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
获取通过拍摄设备拍摄得到的当前帧图像,获取当前帧图像中主体物的目标主体物状态以及至少一个手势的当前手势状态;Obtain the current frame image captured by the shooting device, obtain the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
获取历史手势轨迹集合,基于至少一个手势的当前手势状态对历史手势轨迹集合进行更新,获得当前手势轨迹集合;Obtain a collection of historical gesture trajectories, update the collection of historical gesture trajectories based on the current gesture state of at least one gesture, and obtain a collection of current gesture trajectories;
根据目标主体物状态,在当前手势轨迹集合中确定由主体物所触发的当前手势轨迹,并在当前手势轨迹中,确定由主体物触发的目标手势状态;According to the state of the target subject, determine the current gesture trajectory triggered by the subject in the current gesture trajectory set, and determine the target gesture state triggered by the subject in the current gesture trajectory;
根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,并根据目标工作参数对拍摄构图系统中相应的设备进行调节。According to the target gesture state, the target working parameter of at least one device in the shooting composition system is obtained, and the corresponding device in the shooting composition system is adjusted according to the target working parameter.
第四方面,本申请还提供了一种计算机可读存储介质。所述计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:In a fourth aspect, this application also provides a computer-readable storage medium. The computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by the processor, the following steps are implemented:
获取通过拍摄设备拍摄得到的当前帧图像,获取当前帧图像中主体物的目标主体物状态以及至少一个手势的当前手势状态;Obtain the current frame image captured by the shooting device, obtain the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
获取历史手势轨迹集合,基于至少一个手势的当前手势状态对历史手势轨迹集合进行更新,获得当前手势轨迹集合;Obtain a collection of historical gesture trajectories, update the collection of historical gesture trajectories based on the current gesture state of at least one gesture, and obtain a collection of current gesture trajectories;
根据目标主体物状态,在当前手势轨迹集合中确定由主体物所触发的当前手势轨迹,并在当前手势轨迹中,确定由主体物触发的目标手势状态; According to the state of the target subject, determine the current gesture trajectory triggered by the subject in the current gesture trajectory set, and determine the target gesture state triggered by the subject in the current gesture trajectory;
根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,并根据目标工作参数对拍摄构图系统中相应的设备进行调节。According to the target gesture state, the target working parameter of at least one device in the shooting composition system is obtained, and the corresponding device in the shooting composition system is adjusted according to the target working parameter.
第五方面,本申请还提供了一种计算机程序产品。所述计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现以下步骤:In a fifth aspect, this application also provides a computer program product. The computer program product includes a computer program that implements the following steps when executed by a processor:
获取通过拍摄设备拍摄得到的当前帧图像,获取当前帧图像中主体物的目标主体物状态以及至少一个手势的当前手势状态;Obtain the current frame image captured by the shooting device, obtain the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
获取历史手势轨迹集合,基于至少一个手势的当前手势状态对历史手势轨迹集合进行更新,获得当前手势轨迹集合;Obtain a collection of historical gesture trajectories, update the collection of historical gesture trajectories based on the current gesture state of at least one gesture, and obtain a collection of current gesture trajectories;
根据目标主体物状态,在当前手势轨迹集合中确定由主体物所触发的当前手势轨迹,并在当前手势轨迹中,确定由主体物触发的目标手势状态;According to the state of the target subject, determine the current gesture trajectory triggered by the subject in the current gesture trajectory set, and determine the target gesture state triggered by the subject in the current gesture trajectory;
根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,并根据目标工作参数对拍摄构图系统中相应的设备进行调节。According to the target gesture state, the target working parameter of at least one device in the shooting composition system is obtained, and the corresponding device in the shooting composition system is adjusted according to the target working parameter.
上述拍摄构图方法、装置、计算机设备、存储介质和计算机程序产品,获取通过拍摄设备拍摄得到的当前帧图像,获取当前帧图像中主体物的目标主体物状态以及至少一个手势的当前手势状态;获取历史手势轨迹集合,基于至少一个手势的当前手势状态对历史手势轨迹集合进行更新,获得当前手势轨迹集合;根据目标主体物状态,在当前手势轨迹集合中确定由主体物所触发的当前手势轨迹,并在当前手势轨迹中,确定由主体物触发的目标手势状态;根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,并根据目标工作参数对拍摄构图系统中相应的设备进行调节。通过实时分析图像内容,提取单个/多个主体物的位置和大小信息,基于构图模式生成相应的构图,并通过对被摄主体物的手势动作进行分析,实现基于手势控制的交互式构图功能,从而实现非接触式的、可灵活设置的构图调整。The above-mentioned shooting and composition methods, devices, computer equipment, storage media and computer program products acquire the current frame image captured by the shooting device, acquire the target subject state of the subject in the current frame image and the current gesture state of at least one gesture; obtain The historical gesture trajectory collection updates the historical gesture trajectory collection based on the current gesture state of at least one gesture to obtain the current gesture trajectory collection; determines the current gesture trajectory triggered by the subject object in the current gesture trajectory collection according to the target subject state, And in the current gesture trajectory, the target gesture state triggered by the subject object is determined; according to the target gesture state, the target working parameters of at least one device in the shooting composition system are obtained, and the corresponding equipment in the shooting composition system is processed according to the target working parameters. adjust. By analyzing the image content in real time, extracting the position and size information of single/multiple subjects, generating the corresponding composition based on the composition mode, and by analyzing the gesture movements of the subjects, the interactive composition function based on gesture control is realized. This enables non-contact, flexibly set composition adjustment.
附图说明Description of drawings
图1为一个实施例中拍摄构图方法的应用环境图;Figure 1 is an application environment diagram of the shooting composition method in one embodiment;
图2为一个实施例中拍摄构图方法的流程示意图;Figure 2 is a schematic flowchart of a shooting composition method in one embodiment;
图3为一个实施例中获取主体物的目标主体物状态的流程示意图;Figure 3 is a schematic flowchart of obtaining the target subject status of the subject in one embodiment;
图4为一个实施例中确定目标手势状态的流程示意图;Figure 4 is a schematic flowchart of determining the target gesture state in one embodiment;
图5为另一个实施例中拍摄构图方法的流程示意图;Figure 5 is a schematic flowchart of a shooting composition method in another embodiment;
图6为又一个实施例中拍摄构图方法的流程示意图; Figure 6 is a schematic flowchart of a shooting composition method in yet another embodiment;
图7为一个实施例中拍摄构图装置的结构框图;Figure 7 is a structural block diagram of a shooting and composition device in one embodiment;
图8为一个实施例中计算机设备的内部结构图。Figure 8 is an internal structure diagram of a computer device in one embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
相关技术中的自动构图技术,可根据构图操作实施阶段分为两大类,其中,一次构图是指在拍摄行为之前,分析雨来画面图像内容,得到当前构图与目标构图的偏差信息,进而输出相应的构图提示,有用户手动调整拍摄设备位置与角度,达到制定位置后触发相应的拍摄操作。或者拍摄设备根据构图偏差信息,自行控制相应的执行机构达到指定构图状态,实现拍摄操作。二次构图即在拍摄行为结束后,由软件自动分析所拍摄的画面内容,确认构图方式并实施相应的裁剪、缩放等操作,最后输出二次构图后的图像/视频。针对一次构图的方案,由于是用户手动调整拍摄位置与角度,从而效率较低且手动调整不够精准。Automatic composition technology in related technologies can be divided into two categories according to the implementation stage of the composition operation. Among them, one-time composition refers to analyzing the image content of the rain screen before the shooting action, obtaining the deviation information between the current composition and the target composition, and then outputting According to the corresponding composition prompt, some users manually adjust the position and angle of the shooting equipment, and trigger the corresponding shooting operation after reaching the specified position. Or the shooting equipment can control the corresponding actuator to reach the specified composition state by itself based on the composition deviation information to realize the shooting operation. Secondary composition means that after the shooting is completed, the software automatically analyzes the content of the shot, confirms the composition method and implements corresponding cropping, zooming and other operations, and finally outputs the image/video after the second composition. For the one-time composition solution, since the user manually adjusts the shooting position and angle, the efficiency is low and the manual adjustment is not accurate enough.
本申请实施例提供的拍摄构图方法,应用于实时视频拍摄场景,具体可以应用于如图1所示的应用环境中。其中,终端102通过网络与服务器104进行通信,具体可将实时拍摄到的视频流或获取的静止图像传输至服务器104,由服务器对视频流或静止图像中的主体物进行分析,进而对拍摄设备进行调整。数据存储系统可以存储服务器104需要处理的数据。数据存储系统可以集成在服务器104上,也可以放在云上或其他网络服务器上。The shooting composition method provided by the embodiment of the present application is applied to real-time video shooting scenarios, and can be specifically applied to the application environment as shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. Specifically, the video stream captured in real time or the still image obtained can be transmitted to the server 104, and the server analyzes the main object in the video stream or still image, and then analyzes the shooting device. Make adjustments. The data storage system may store data that server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.
其中,终端102为能够获取视频流或图像的设备,可以包括但不限于具有摄像头的各种个人计算机、笔记本电脑、智能手机、平板电脑及物流网设备等。服务器104服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云计算服务的云服务器。The terminal 102 is a device capable of acquiring video streams or images, and may include but is not limited to various personal computers with cameras, laptops, smart phones, tablets, logistics network equipment, etc. Server 104 The server may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
在一些实施例中,如图2所示,本申请实施例提供了一种拍摄构图方法。可以理解的是,对于视频流中的当前帧图像,在当前帧图像中实际上可能会检测到多个主体物。而本申请实施例的主要构思是利用其中目标主体物所触发的手势,以自动调整拍摄构图。可以理解的是,这些主体物中只有目标主体物所触发的手势状态对于自动调整拍摄构图是有意义的。由此,可以对主体物对应的手势状态进行分析,进而对拍摄设备进行无接触式构图调整。以该方法应用于计算机设备(该计算机设备具体可以是图1中的终端或服务器)为例进行说明,包括以下步骤:In some embodiments, as shown in Figure 2, embodiments of the present application provide a shooting composition method. It can be understood that, for the current frame image in the video stream, multiple subject objects may actually be detected in the current frame image. The main idea of the embodiment of the present application is to use gestures triggered by the target subject to automatically adjust the shooting composition. It is understandable that among these subjects, only the gesture state triggered by the target subject is meaningful for automatically adjusting the shooting composition. In this way, the gesture status corresponding to the subject can be analyzed, and then the shooting device can be adjusted without contact. Taking this method applied to a computer device (the computer device may be a terminal or a server in Figure 1) as an example, the description includes the following steps:
步骤202,获取通过拍摄设备拍摄得到的当前帧图像,获取当前帧图像中主体物的目标主体物状态以及至少一个手势的当前手势状态; Step 202: Obtain the current frame image captured by the shooting device, obtain the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
其中,拍摄设备可以为相机,也可以为带有拍摄功能的移动终端,本申请实施例对此不作具体限定。当前帧图像可以是由拍摄设备在当前时刻拍摄得到的图像,也可以是由拍摄设备拍摄得到的视频流中当前时刻的图像帧,本申请实施例对此不作具体限定。需要说明的是,拍摄设备无论拍摄的是视频流,还是图像帧,在本申请实施例中均主要是为了获取由主体物触发的,且针对拍摄构图有意义的目标手势状态。而可以理解的是,针对拍摄构图有意义的目标手势状态,仅通过一帧图像可能不一定能够识别并获取到。因此,在申请实施例才会拍摄多帧图像,并在拍摄得到“当前帧图像”的当前时刻,结合之前拍摄得到的图像,获取由主体物触发的目标手势状态。The photographing device may be a camera or a mobile terminal with a photographing function, which is not specifically limited in the embodiments of the present application. The current frame image may be an image captured by the shooting device at the current moment, or may be an image frame at the current moment in the video stream captured by the shooting device. This is not specifically limited in the embodiment of the present application. It should be noted that, regardless of whether the shooting device captures a video stream or an image frame, in the embodiment of the present application, it is mainly to obtain a target gesture state that is triggered by the subject object and is meaningful for the shooting composition. It is understandable that the target gesture state that is meaningful for the shooting composition may not necessarily be recognized and obtained through only one frame of image. Therefore, only in the application embodiment, multiple frames of images are captured, and at the current moment when the "current frame image" is captured, the target gesture state triggered by the subject object is obtained by combining the previously captured images.
由此可以理解的是,当前帧图像的上一帧图像,同样也是采用本申请实施例提供的方法进行处理。至于当前帧图像与上一帧图像之间的关系,在拍摄设备拍摄图像帧的情况下,实际实施过程中,当前帧图像与上一帧图像可以是拍摄设备连续获取到的两帧图像,当前帧图像与上一帧图像之间也可以间隔预设帧图像,本申请实施例对此不作具体限定。在拍摄设备拍摄实时视频流的情况下,当前帧图像可以是在当前时刻从实时视频流中截取得到的,而上一帧图像与当前帧图像之间,可以是连续的,也可以间隔多个图像帧,本申请实施例对此不作具体限定。为了便于理解和说明,本申请实施例以从当前帧图像是从实时视频流中截取到的为例,对后续过程进行说明。It can be understood from this that the previous frame image of the current frame image is also processed using the method provided by the embodiment of the present application. As for the relationship between the current frame image and the previous frame image, when the shooting device captures the image frame, in the actual implementation process, the current frame image and the previous frame image can be two frames of images continuously acquired by the shooting device. A preset frame image may also be spaced between a frame image and the previous frame image, which is not specifically limited in the embodiments of the present application. When the shooting device captures a real-time video stream, the current frame image can be intercepted from the real-time video stream at the current moment, and the previous frame image and the current frame image can be continuous or separated by multiple Image frames are not specifically limited in the embodiments of this application. In order to facilitate understanding and explanation, the embodiment of the present application takes the current frame image intercepted from the real-time video stream as an example to describe the subsequent process.
主体物指的是可以触发手势的对象,在本申请实施例中,该对象可以指的是人。可以理解的是,当前帧图像中拍摄到的可能不止一个主体物,如不止一个人。这些主体物可能都触发有手势,但通常只有一个主体物可以触发与拍摄构图有关联的手势状态,而该主体物即可为目标主体物,在本步骤中提及的“目标主体物状态”主要指的是目标主体物的状态,由该目标主体物触发的手势状态即为目标手势状态。另外,以主体物为人为例,主体物在当前帧图像所呈现出的图像内容,可以是由拍摄设备拍摄得到的人的头部,人的上半身或者人的全身等,本申请实施例对此不作具体限定。The subject object refers to an object that can trigger the gesture. In the embodiment of the present application, the object may refer to a person. It is understandable that there may be more than one subject captured in the current frame image, such as more than one person. These subjects may all trigger gestures, but usually only one subject can trigger a gesture state related to the shooting composition, and this subject can be the target subject. The "target subject state" mentioned in this step It mainly refers to the state of the target subject. The gesture state triggered by the target subject is the target gesture state. In addition, taking the subject as a person as an example, the image content presented by the subject in the current frame image may be the person's head, the person's upper body, or the person's whole body captured by the shooting device. The embodiments of the present application are No specific limitation is made.
其中,目标主体物状态主要是用于表示主体物在当前帧图像中所呈现的图像内容的状态,其可以包括在当前帧图像中占据的范围或者位置中的至少一种。具体地,目标主体物状态可以包括主体物在当前帧图像中的外接框的位置和尺寸大小,并可以通过人物检测算法对当前帧图像进行检测获取得到,本申请实施例对此不作具体限定。需要说明的是,外接框的位置可以是外接框的左上角坐标,也可以是外接框的中心点坐标,本申请实施例对此不作具体限定。The target subject state is mainly used to represent the state of the image content presented by the subject in the current frame image, which may include at least one of the range or position occupied by the subject in the current frame image. Specifically, the target subject state may include the position and size of the subject's bounding box in the current frame image, and may be obtained by detecting the current frame image using a person detection algorithm, which is not specifically limited in the embodiments of this application. It should be noted that the position of the external frame may be the coordinates of the upper left corner of the external frame or the coordinates of the center point of the external frame, which is not specifically limited in the embodiment of the present application.
当前手势状态主要是用于指代主体物的手部在当前帧图像中所呈现的图像内容的状态,其同样可以包括在当前帧图像中占据的范围或者位置中的至少一种。具体地,当前手势状态可以包括手势的位置、尺寸大小和手势类别,并可以通过手势检测算法对当前帧图像进行检测获取得到。其中,手势的位置和尺寸大 小也可以通过外接框进行表示。与此同时,外接框的位置也可以是外接框的左上角坐标或者外接框的中心点坐标。需要说明的是,“当前手势状态”中的“当前”,主要强调的是在当前帧图像中获取到的手势状态,而“至少一个手势”中的“至少一个”,主要是因为主体物可能会不止一个,由此产生的当前手势状态可能也不止一个。The current gesture state is mainly used to refer to the state of the image content presented by the subject's hand in the current frame image, which may also include at least one of the range or position occupied in the current frame image. Specifically, the current gesture status may include the position, size, and gesture category of the gesture, and may be obtained by detecting the current frame image through a gesture detection algorithm. Among them, the position and size of the gesture are large Small can also be represented by an external frame. At the same time, the position of the bounding box can also be the coordinates of the upper left corner of the bounding box or the coordinates of the center point of the bounding box. It should be noted that the "current" in "current gesture state" mainly emphasizes the gesture state obtained in the current frame image, while the "at least one" in "at least one gesture" is mainly because the subject may There will be more than one, and the resulting current gesture state may also be more than one.
可以理解的是,本申请实施例提供的拍摄构图方法需同时用到主体物和手势状态。由此,若在当前帧图像未检测到手势状态,则继续沿用本申请实施例提供的方法处理当前帧图像的下一帧图像。It can be understood that the shooting composition method provided by the embodiment of the present application needs to use both the subject object and the gesture state. Therefore, if the gesture state is not detected in the current frame image, the method provided by the embodiment of the present application will continue to be used to process the next frame image of the current frame image.
步骤204,获取历史手势轨迹集合,基于至少一个手势的当前手势状态对历史手势轨迹集合进行更新,获得当前手势轨迹集合;Step 204: Obtain a historical gesture trajectory set, update the historical gesture trajectory set based on the current gesture state of at least one gesture, and obtain the current gesture trajectory set;
其中,手势轨迹是指一段时间内,按获取先后顺序所记录的一系列手势状态的集合,手势轨迹集合即为多个手势轨迹所组成的集合。之所以会产生多个手势轨迹,是因为图像帧中可能会检测到不止一个手势状态。历史手势轨迹集合是指基于当前帧图像之前的图像所确定的手势轨迹集合,而当前手势轨迹集合是基于当前帧图像对历史手势轨迹集合进行更新所得到的。Among them, the gesture trajectory refers to a collection of a series of gesture states recorded in the order of acquisition within a period of time. The gesture trajectory collection is a collection of multiple gesture trajectories. Multiple gesture trajectories are generated because more than one gesture state may be detected in an image frame. The historical gesture trajectory set refers to the gesture trajectory set determined based on the image before the current frame image, and the current gesture trajectory set is obtained by updating the historical gesture trajectory set based on the current frame image.
例如,以手势状态包括位置a、尺寸大小b和类别c,则用R=(a,b,c)表示手势状态。而将当前帧图像记为第t帧图像,在当前帧图像中获取到的当前手势状态为Rti,i=1,…,n。其中,i表示第i个手势,n表示手势总数量。第i个手势的历史手势轨迹可表示为T={R1i,…,Rt-1i}。而历史手势轨迹集合可表示为{Tj},j=1,…,m。其中,m表示历史手势轨迹集合中手势轨迹的数量,j表示历史手势轨迹集合中第j个历史手势轨迹。For example, if the gesture state includes position a, size b, and category c, then R=(a, b, c) is used to represent the gesture state. The current frame image is recorded as the t-th frame image, and the current gesture state obtained in the current frame image is R ti , i=1,...,n. Among them, i represents the i-th gesture, and n represents the total number of gestures. The historical gesture trajectory of the i-th gesture can be expressed as T={R 1i ,...,R t-1i }. The historical gesture trajectory set can be expressed as {T j }, j=1,...,m. Among them, m represents the number of gesture trajectories in the historical gesture trajectory collection, and j represents the jth historical gesture trajectory in the historical gesture trajectory collection.
本步骤中“基于所述至少一个手势的当前手势状态对所述历史手势轨迹集合进行更新”主要是将当前手势状态添加至历史手势轨迹或者形成新的手势轨迹。具体地,可以将当前手势状态与历史轨迹集合中的每一手势轨迹进行匹配,若匹配成功,则将当前手势状态加入匹配成功的手势轨迹中,若匹配失败,则可以根据当前手势状态建立新的手势轨迹。在当前手势状态与手势轨迹进行匹配时,可以采用手势状态中的手势位置进行匹配,如计算当前手势状态中的手势位置与历史手势轨迹集合中的每一手势轨迹中最后记录时刻的手势状态中的手势位置之间的距离,若所有距离中的最小值满足预设距离,则将最小距离对应的手势轨迹作为当前手势状态匹配成功的手势轨迹。再例如,可以根据当前手势状态中的手势类别进行匹配,本申请实施例对此不作具体限定。In this step, "updating the historical gesture trajectory set based on the current gesture state of the at least one gesture" mainly means adding the current gesture state to the historical gesture trajectory or forming a new gesture trajectory. Specifically, the current gesture state can be matched with each gesture track in the historical track set. If the match is successful, the current gesture state is added to the successfully matched gesture track. If the match fails, a new gesture track can be created based on the current gesture state. gesture trajectories. When matching the current gesture state with the gesture track, the gesture position in the gesture state can be used for matching, such as calculating the gesture position in the current gesture state and the gesture state at the last recorded moment of each gesture track in the historical gesture track set. The distance between the gesture positions. If the minimum value among all distances meets the preset distance, the gesture trajectory corresponding to the minimum distance will be regarded as the gesture trajectory that successfully matches the current gesture state. For another example, matching may be performed based on the gesture category in the current gesture state, which is not specifically limited in the embodiments of the present application.
步骤206,根据目标主体物状态,在当前手势轨迹集合中确定由主体物所触发的当前手势轨迹,并在当前手势轨迹中,确定由主体物触发的目标手势状态;Step 206: Determine the current gesture trajectory triggered by the subject object in the current gesture trajectory set according to the state of the target subject object, and determine the target gesture state triggered by the subject object in the current gesture trajectory;
可以理解的是,在当前帧图像中可能会存在多个手势的可能,则获取的当前手势轨迹集合中会包括多 个手势轨迹。由上述过程可知,根据当前帧图像确定主体物的目标主体物状态的过程与根据当前帧图像确定手势的当前手势状态的过程是相互独立的,而在根据主体物的手势对拍摄设备调整之前,需要在主体物和手势之间建立联系,从而在对历史手势轨迹集合更新得到当前手势轨迹集合后,可以根据主体物的目标主体物状态在当前手势轨迹集合中确定主体物对应的当前手势轨迹,进而确定由主体物所触发的目标手势状态。It is understandable that there may be multiple gestures in the current frame image, and the current gesture trajectory set obtained will include multiple gestures. gesture trajectory. It can be seen from the above process that the process of determining the target subject state of the subject based on the current frame image and the process of determining the current gesture state of the gesture based on the current frame image are independent of each other. Before adjusting the shooting device according to the subject's gesture, It is necessary to establish a connection between the subject and the gesture, so that after updating the historical gesture trajectory set to obtain the current gesture trajectory set, the current gesture trajectory corresponding to the subject can be determined in the current gesture trajectory set according to the target subject state of the subject. Then determine the target gesture state triggered by the subject object.
步骤208,根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,并根据目标工作参数对拍摄构图系统中相应的设备进行调节。Step 208: Obtain the target working parameters of at least one device in the shooting composition system according to the target gesture state, and adjust the corresponding equipment in the shooting composition system according to the target working parameters.
其中,目标手势状态是指能够用于调整拍摄构图系统的工作参数的手势状态。例如,在主体物所触发的目标手势状态的手势类别为自动构图手势时,可根据目标主体物状态中的外接框位置和预设外接框位置,调整摄像头的朝向,以使得在下一帧图像中主体物的外接框位置尽量贴合预设外接框位置。The target gesture state refers to a gesture state that can be used to adjust the working parameters of the shooting composition system. For example, when the gesture category of the target gesture state triggered by the subject is an automatic composition gesture, the orientation of the camera can be adjusted according to the position of the bounding box in the target state and the position of the preset bounding frame, so that in the next frame of the image The position of the external frame of the main object should fit as closely as possible to the position of the preset external frame.
可以理解的是,根据不同的构图需求所需要调整的工作参数可能不同。由此,根据目标手势状态所需调整的参数可能不止一个。需要说明的是,本申请实施例是通过主体物触发的手势对应的手势类别,确定构图需求,以对工作参数进行调整。可以理解的是,一种手势类别通常对应一种构图需求。It is understandable that the working parameters that need to be adjusted may be different according to different composition requirements. Therefore, more than one parameter may need to be adjusted according to the target gesture state. It should be noted that in the embodiment of the present application, the composition requirements are determined through the gesture category corresponding to the gesture triggered by the subject object, so as to adjust the working parameters. Understandably, one gesture category usually corresponds to one compositional need.
具体地,根据目标手势状态中的手势类别,可直接确定此手势类别对应的目标工作参数,或者还可以确定工作参数的调整方式,通过对工作参数进行调整以得到目标工作参数。例如,若目标手势状态中的手势类别表示对拍摄设备的焦距进行调整,则可以获取拍摄设备的上一变焦系数,然后根据主体物的位置与手势的相对位置,确定焦距变化量,通过上一变焦系数和焦距变化量确定当前变焦系数。其中,焦距变化量有正负,正数表示焦距变大,负数表示焦距变小,具体调整方式均可以基于目标手势状态中的手势类别所确定。Specifically, according to the gesture category in the target gesture state, the target working parameters corresponding to this gesture category can be directly determined, or the adjustment method of the working parameters can also be determined, and the target working parameters can be obtained by adjusting the working parameters. For example, if the gesture category in the target gesture state indicates adjusting the focal length of the shooting device, you can obtain the previous zoom coefficient of the shooting device, and then determine the amount of change in focal length based on the relative position of the subject and the gesture. The zoom factor and focal length change determine the current zoom factor. Among them, the focal length change amount is positive or negative. A positive number indicates that the focal length becomes larger, and a negative number indicates that the focal length becomes smaller. The specific adjustment method can be determined based on the gesture category in the target gesture state.
在实际实施过程中,考虑到当前帧图像与上一帧图像之间的时间间隔可能会较小,这导致不太可能通过一次调整就满足构图需求。由此,通常会通过连续几帧所现同一构图需求的相应手势,以对拍摄设备进行连续调整后,才能使得拍摄设备满足构图需求。结合上述示例,在对变焦系数进行调整时,焦距可能需要调整的值为4,但基于每帧图像所确定的焦距变化量为0.5,也即每一次只能调整0.5,故需要连续8帧图像出现变焦手势,也即需要进行连续8次调整以达到构图需求。另外,上述提及的变焦系数实际上是拍摄构图系统中拍摄设备的目标工作参数。当然,实际实施过程中还可以有其它类型的目标工作参数,如拍摄设备的拍摄角度等,本申请实施例对此不作具体限定。In the actual implementation process, considering that the time interval between the current frame image and the previous frame image may be small, this makes it unlikely to meet the composition needs with one adjustment. Therefore, the shooting device is usually adjusted continuously through corresponding gestures showing the same composition requirement in several consecutive frames, so that the shooting device can meet the composition requirement. Combined with the above example, when adjusting the zoom factor, the focal length may need to be adjusted to a value of 4, but the focal length change determined based on each frame of image is 0.5, that is, only 0.5 can be adjusted at a time, so 8 consecutive frames of images are required. The zoom gesture appears, which means you need to make 8 consecutive adjustments to meet the composition requirements. In addition, the zoom coefficient mentioned above is actually the target working parameter of the shooting equipment in the shooting composition system. Of course, there may be other types of target operating parameters during the actual implementation process, such as the shooting angle of the shooting equipment, etc., which are not specifically limited in the embodiments of the present application.
上述拍摄构图方法中,由于不需要用户手动调整拍摄设备位置与角度实现一次构图,而是通过手势即可完成自动拍摄构图,从而构图效率较高且构图结果更为精准。另外,可以基于多个连续的图像帧,获取 并记录历史手势轨迹,并基于当前帧图像所获取到的当前手势状态对历史手势轨迹进行更新,以获取用于调整拍摄构图系统的目标工作参数。也即,可以利用多个图像帧进行连续追踪,从而相较于基于一个图像帧确定目标工作参数,可以使得拍摄构图结果更加精准。最后,在获取目标手势状态时,还参考了目标主体物状态,从而可以避免无关主体物所产生的手势状态而导致目标手势状态的误判,进而也可以使得拍摄构图结果更加精准。In the above shooting composition method, since the user does not need to manually adjust the position and angle of the shooting device to achieve one composition, the automatic shooting composition can be completed through gestures, so the composition efficiency is higher and the composition result is more accurate. In addition, based on multiple consecutive image frames, we can obtain And record the historical gesture trajectories, and update the historical gesture trajectories based on the current gesture status obtained from the current frame image to obtain the target working parameters for adjusting the shooting composition system. That is to say, multiple image frames can be used for continuous tracking, which can make the shooting composition result more accurate than determining the target working parameters based on one image frame. Finally, when obtaining the target gesture state, the state of the target subject is also referenced, which can avoid misjudgment of the target gesture state caused by gesture states generated by irrelevant subjects, and in turn can make the shooting composition results more accurate.
在一些实施例中,当前帧图像从属于图像帧组,图像帧组中的图像是按照拍摄设备的拍摄时序进行排序的,当前帧图像为最后一帧图像;参见图3,获取当前帧图像中主体物的目标主体物状态,包括:In some embodiments, the current frame image belongs to the image frame group, the images in the image frame group are sorted according to the shooting timing of the shooting device, and the current frame image is the last frame image; see Figure 3 to obtain the current frame image. The target subject state of the subject, including:
步骤302,获取图像帧组中第一帧图像中主体物的历史主体物状态。Step 302: Obtain the historical subject status of the subject in the first frame of the image frame group.
其中,历史主体物状态是指主体物在当前帧图像之前的图像帧中所呈现的状态,可以包括位置或尺寸大小等,本申请实施例对此不作具体限定。图像帧组主要用于进行目标跟踪处理。需要说明的是,这里提及的“第一帧图像”,主要是强调用于进行目标跟踪的第一帧图像,而并非是拍摄设备拍摄得到的第一帧图像或者其它意义上的第一帧图像。The historical subject state refers to the state of the subject in the image frame before the current frame image, which may include position or size, etc. This embodiment of the present application does not specifically limit this. The image frame group is mainly used for target tracking processing. It should be noted that the "first frame image" mentioned here mainly emphasizes the first frame image used for target tracking, rather than the first frame image captured by the shooting device or the first frame in other senses. image.
步骤304,基于图像帧组,对主体物进行目标跟踪,获得当前帧图像中主体物的预测主体物状态。Step 304: Based on the image frame group, perform target tracking on the subject object, and obtain the predicted subject state of the subject object in the current frame image.
在实际预测过程中,可以直接利用上一帧图像中目标主体物的历史主体物状态进行预测,也可以利用当前帧图像之前的一系列图像中目标主体物的历史主体物状态进行预测,本申请实施例对此不作具体限定。具体地,可以利用目标跟踪算法,获得当前帧图像中主体物的预测主体物状态。In the actual prediction process, the historical subject state of the target subject in the previous frame image can be directly used for prediction, or the historical subject state of the target subject in a series of images before the current frame image can be used for prediction. This application The examples do not specifically limit this. Specifically, the target tracking algorithm can be used to obtain the predicted subject state of the subject in the current frame image.
步骤306,对历史主体物状态与预测主体物状态进行整合,获得当前帧图像中主体物的目标主体物状态。Step 306: Integrate the historical subject state and the predicted subject state to obtain the target subject state of the subject in the current frame image.
其中,整合过程可以是直接采用预测主体物状态,也即直接将预测主体物状态作为目标主体物状态。当然,整合过程还可以是求平均值等其它方式。具体地,结合上述内容对于主体物状态的解释说明,主体物状态可以包括主体物的外接框的位置和尺寸大小,将预测主体物状态中外接框的位置与历史主体物状态中外接框的位置取平均值,即可得到目标主体物状态中外接框的位置。同理,采用求平均值的方式,还可以计算得到目标主体物状态中外接框的尺寸大小。Among them, the integration process may be to directly use the predicted subject state, that is, directly use the predicted subject state as the target subject state. Of course, the integration process can also be other methods such as averaging. Specifically, combined with the above explanation of the subject state, the subject state may include the position and size of the subject's bounding box, and the position of the bounding box in the predicted subject state will be the same as the position of the bounding box in the historical subject state. Taking the average value, the position of the bounding box in the target subject state can be obtained. In the same way, by averaging, the size of the bounding box in the target object state can also be calculated.
需要说明的是,这里用于进行整合“历史主体物状态”可以仅包括第一帧图像中主体物的历史主体物状态,还可以包括当前帧图像之前的其它图像中主体物的历史主体物状态,本申请实施例对此不作具体限定。It should be noted that the "historical subject state" used for integration here can only include the historical subject state of the subject in the first frame image, and can also include the historical subject state of the subject in other images before the current frame image. , the embodiments of this application do not specifically limit this.
上述实施例中,由于在获得当前帧图像中主体物的目标主体物状态时,是基于当前帧图像之前的图像中主体物的历史主体物状态和通过目标跟踪得到的预测主体物状态进行整合后所得到的,而历史主体物状 态是主体物在当前帧图像之前的图像中的明确状态,从而可以使得基于历史主体物状态所获得的目标主体物状态能够尽量精准。另外,通过目标跟踪的方式方法,即使避免主体物出现短暂性被遮挡,也能够较为精准地获取目标主体物状态。In the above embodiment, when obtaining the target subject state of the subject in the current frame image, it is based on the integration of the historical subject state of the subject in the image before the current frame image and the predicted subject state obtained through target tracking. obtained, and the historical subject material state The state is the clear state of the subject in the image before the current frame image, so that the target subject state obtained based on the historical subject state can be as accurate as possible. In addition, through the target tracking method, the status of the target subject can be obtained more accurately even if the subject is prevented from being temporarily blocked.
在一些实施例中,基于至少一个手势的当前手势状态对历史手势轨迹集合进行更新,获得当前手势轨迹集合,包括:将每一手势的当前手势状态与历史手势轨迹集合中每一历史手势轨迹进行匹配,确定相互匹配的当前手势状态与历史手势轨迹;将每一存在相匹配的历史手势轨迹的当前手势状态添加至相匹配的历史手势轨迹,获得当前手势轨迹集合。In some embodiments, updating the set of historical gesture trajectories based on the current gesture state of at least one gesture to obtain the current set of gesture trajectories includes: comparing the current gesture state of each gesture with each historical gesture trajectory in the set of historical gesture trajectories. Matching determines the current gesture state and historical gesture trajectories that match each other; adds the current gesture state of each matching historical gesture trajectory to the matching historical gesture trajectories to obtain the current gesture trajectory set.
具体地,当前手势状态与历史手势轨迹进行匹配的过程可采用匈牙利算法。以当前帧图像中共检测到n个手势的当前手势状态记为{Rti},i=1,…,n为例。其中,i表示第i个手势,t表示当前帧图像为第t帧图像。历史手势轨迹集合记为{Tj},{Tj}中包括m个历史手势轨迹,j表示历史手势轨迹集合中第j个历史手势轨迹。将n个手势的手势状态与m个历史手势轨迹中每一历史手势轨迹进行匈牙利匹配,可以得到匹配矩阵An×mSpecifically, the process of matching the current gesture state with the historical gesture trajectory may adopt the Hungarian algorithm. Take the current gesture state of a total of n gestures detected in the current frame image as {R ti }, i=1,...,n as an example. Among them, i represents the i-th gesture, and t represents the current frame image as the t-th frame image. The set of historical gesture trajectories is recorded as {T j }, {T j } includes m historical gesture trajectories, and j represents the jth historical gesture trajectory in the set of historical gesture trajectories. By performing Hungarian matching between the gesture states of n gestures and each of the m historical gesture trajectories, a matching matrix A n×m can be obtained.
例如,以匹配矩阵中的元素存在两种取值为例。其中,取值为1表示为匹配,取值为-1表示为不匹配。对于匹配矩阵中的某一元素aij,其表示当前帧图像中的第i个手势状态与历史手势轨迹集合中第j个历史手势轨迹之间的匹配情况。若aij=1,则表示第i个当前手势状态与第j个历史手势轨迹匹配成功,也即第j个历史手势轨迹实则是基于第i个当前手势状态相应的手势所产生的。由此,可将Rti添加至相匹配的历史手势轨迹,也即添加至第j个历史手势轨迹。而若对于任意j=1,…,m,都有aij=-1,则说明该第i个当前手势状态与每一历史手势轨迹均不匹配,也即历史手势轨迹集合中的历史手势轨迹均不是基于第i个当前手势状态相应的手势所产生的。For example, take the element in the matching matrix that has two values as an example. Among them, a value of 1 indicates a match, and a value of -1 indicates a mismatch. For a certain element a ij in the matching matrix, it represents the matching situation between the i-th gesture state in the current frame image and the j-th historical gesture trajectory in the historical gesture trajectory set. If a ij =1, it means that the i-th current gesture state and the j-th historical gesture trajectory are successfully matched, that is, the j-th historical gesture trajectory is actually generated based on the gesture corresponding to the i-th current gesture state. Thus, R ti can be added to the matching historical gesture trajectory, that is, added to the jth historical gesture trajectory. And if for any j=1,...,m, there is a ij =-1, it means that the i-th current gesture state does not match every historical gesture trajectory, that is, the historical gesture trajectory in the historical gesture trajectory set None of them are generated based on the gesture corresponding to the i-th current gesture state.
上述实施例中,通过将当前帧图像中的当前手势状态添加至相匹配的历史手势轨迹中,形成当前手势轨迹集合,后续可基于当前手势轨迹,获取用于调整拍摄构图系统的目标工作参数。由于可以利用多个图像帧进行连续追踪,从而相较于基于一个图像帧确定目标工作参数,可以使得拍摄构图结果更加精准。In the above embodiment, the current gesture state in the current frame image is added to the matching historical gesture trajectories to form a current gesture trajectory set. Subsequently, the target working parameters for adjusting the shooting composition system can be obtained based on the current gesture trajectories. Since multiple image frames can be used for continuous tracking, compared to determining target working parameters based on one image frame, the shooting composition results can be more accurate.
在一些实施例中,将每一手势的当前手势状态与历史手势轨迹集合中每一历史手势轨迹进行匹配之后,还包括:In some embodiments, after matching the current gesture state of each gesture with each historical gesture trajectory in the historical gesture trajectory set, the method further includes:
在存在与每一历史手势轨迹均不匹配的当前手势状态的情况下,基于与每一历史手势轨迹均不匹配的当前手势状态,新建手势轨迹,并添加至当前手势轨迹集合。In the case where there is a current gesture state that does not match each historical gesture trajectory, a new gesture trajectory is created based on the current gesture state that does not match each historical gesture trajectory and is added to the current gesture trajectory collection.
可以理解的是,本申请实施例之所以针对没有匹配上的当前手势状态,为其新建手势轨迹,主要是考虑到主体物可能之前对着拍摄设备一直没有做手势,或者没有做与拍摄构图相关联的手势,而在当前帧图像相应的时刻才开始做,并被呈现在当前帧图像中。由此,才会存在与每一历史手势轨迹均不匹配的当前 手势状态。很明显,与每一历史手势轨迹均不匹配的当前手势状态,因可能与拍摄构图相关而不应当被忽视掉。因此,本申请实施例中可以新建手势轨迹,用于记录该当前手势状态,并作为当前手势轨迹集合中的新建手势轨迹。It can be understood that the reason why the embodiment of the present application creates a new gesture trajectory for the current gesture state that does not match is mainly because the subject may not have made a gesture towards the shooting device before, or has not made any gesture related to the shooting composition. The associated gestures are started at the corresponding moment of the current frame image and are presented in the current frame image. Therefore, there will be a current gesture that does not match each historical gesture trajectory. Gesture status. Obviously, the current gesture state, which does not match every historical gesture trajectory, should not be ignored because it may be related to the composition of the shot. Therefore, in the embodiment of the present application, a new gesture trajectory can be created to record the current gesture state and serve as a new gesture trajectory in the current gesture trajectory set.
上述实施例中,由于可以为与每一历史手势轨迹均不匹配的当前手势状态新建手势轨迹,并添加至当前手势轨迹集合以用于拍摄构图,从而可以避免遗漏之前未出现过但实际上是作用于拍摄构图的手势,以提高通过手势操控拍摄构图的成功率。In the above embodiment, since a new gesture trajectory can be created for the current gesture state that does not match each historical gesture trajectory and added to the current gesture trajectory collection for shooting composition, it is possible to avoid missing a gesture that has not appeared before but is actually Gestures that act on the composition of a shot to improve the success rate of controlling the composition of the shot through gestures.
在一些实施例中,当前手势轨迹集合中还包括历史手势轨迹集合中未添加当前手势状态的历史手势轨迹;根据目标主体物状态,在当前手势轨迹集合中确定由主体物所触发的当前手势轨迹之前,还包括:In some embodiments, the current gesture trajectory set also includes historical gesture trajectories in which the current gesture state is not added to the historical gesture trajectory set; the current gesture trajectory triggered by the subject object is determined in the current gesture trajectory set according to the state of the target subject. Previously, this also included:
对于当前手势轨迹集合中每一手势轨迹,获取每一手势轨迹中最后添加的手势状态所对应的添加时刻;计算每一添加时刻与当前帧图像的获取时刻之间的时间间隔,将大于预设时长的时间间隔所对应的手势轨迹从当前手势轨迹集合中删除。For each gesture trajectory in the current gesture trajectory set, obtain the adding moment corresponding to the last gesture state added in each gesture trajectory; calculate the time interval between each adding moment and the acquisition moment of the current frame image, which will be greater than the preset The gesture trajectory corresponding to the time interval is deleted from the current gesture trajectory collection.
可以理解的是,在获取到某一当前手势状态后,若该当前手势状态就随即被添加至某一历史手势轨迹中,形成当前手势轨迹集合中的某一手势轨迹,则该手势轨迹中最后添加的手势状态,由于是当前帧图像中获取到的当前手势状态,从而该手势轨迹中最后添加的手势状态所对应的添加时刻,与当前帧图像的获取时刻之间的时间间隔不会差距过大。只有是基于当前帧图像没有得到更新的历史手势轨迹,或者甚至是基于当前帧图像之前的多帧图像也没有得到更新的历史手势轨迹,被遗留至当前手势轨迹集合中后,作为当前手势轨迹集合中的某一手势轨迹;该手势轨迹中最后添加的手势状态所对应的添加时刻,与当前帧图像的获取时刻之间的时间间隔才会差距过大。It can be understood that after obtaining a certain current gesture state, if the current gesture state is immediately added to a certain historical gesture track to form a certain gesture track in the current gesture track set, then the last gesture track in the gesture track will be Since the added gesture state is the current gesture state obtained in the current frame image, the time interval between the addition time corresponding to the last gesture state added in the gesture trajectory and the acquisition time of the current frame image will not exceed big. Only historical gesture trajectories that have not been updated based on the current frame image, or even historical gesture trajectories that have not been updated based on multiple frames of images before the current frame image, are left to the current gesture trajectory collection as the current gesture trajectory collection. A certain gesture trajectory in the gesture trajectory; the time interval between the addition time corresponding to the last gesture state added in the gesture trajectory and the acquisition time of the current frame image will be too large.
而在本申请实施例中也即是通过预设时长来筛选出时间间隔较大的手势轨迹。同样可以理解的是,之所以选择将大于预设时长的时间间隔所对应的手势轨迹从当前手势轨迹集合中删除,主要是因为这样的手势轨迹,通常太长时间得不到更新,主体物不太可能以这样的手势轨迹作为基础,继续在此基础上做手势以控制拍摄构图。因此,为了保证后续在确定由主体物所触发的当前手势轨迹时确定结果的精准性,可以选择将大于预设时长的时间间隔所对应的手势轨迹从当前手势轨迹集合中删除。In this embodiment of the present application, gesture trajectories with larger time intervals are filtered out through a preset duration. It is also understandable that the reason why we choose to delete gesture trajectories corresponding to time intervals greater than the preset duration from the current gesture trajectory collection is mainly because such gesture trajectories usually cannot be updated for too long, and the main object cannot be updated. It is very possible to use such a gesture trajectory as a basis and continue to make gestures on this basis to control the composition of the shot. Therefore, in order to ensure the accuracy of the subsequent determination of the current gesture trajectory triggered by the subject, you may choose to delete the gesture trajectory corresponding to a time interval greater than the preset time from the current gesture trajectory set.
上述实施例中,由于可将太长时间得不到更新的手势轨迹从当前手势轨迹集合中删除,从而可以保证后续在确定由主体物所触发的当前手势轨迹时确定结果的精准性。另外,由于从当前手势轨迹中删除了太长时间得不到更新的手势轨迹,从而也可以减少当前手势轨迹集合中的数据量,以节省资源。In the above embodiment, since gesture trajectories that have not been updated for too long can be deleted from the current gesture trajectory set, the accuracy of subsequent determination results when determining the current gesture trajectory triggered by the subject object can be ensured. In addition, since gesture trajectories that have not been updated for too long are deleted from the current gesture trajectories, the amount of data in the current gesture trajectory collection can also be reduced to save resources.
在一些实施例中,目标主体物状态包括主体物的位置;参见图4,根据目标主体物状态,在当前手势轨迹集合中确定由主体物所触发的当前手势轨迹,并在当前手势轨迹中,确定由主体物触发的目标手势状 态,包括:In some embodiments, the target subject state includes the position of the subject; see Figure 4, according to the target subject state, the current gesture trajectory triggered by the subject is determined in the current gesture trajectory set, and in the current gesture trajectory, Determine the target gesture state triggered by the subject object status, including:
步骤402,对于当前手势轨迹集合中每一手势轨迹,确定每一手势轨迹中最后添加的手势状态,手势状态包括手势位置。Step 402: For each gesture trajectory in the current gesture trajectory set, determine the gesture state last added in each gesture trajectory, where the gesture state includes the gesture position.
其中,每一手势轨迹中的手势状态通常是按照添加时刻的先后顺序进行排列的,而最后添加的手势状态即为排列在最后的手势状态。而手势位置可以通过外接框的中心点坐标进行表示,也可以通过其它方式进行表示,本申请实施例对此不作具体限定。Among them, the gesture states in each gesture trajectory are usually arranged in the order of adding time, and the gesture state added last is the gesture state arranged last. The gesture position can be represented by the coordinates of the center point of the external frame, or can be represented by other methods, which are not specifically limited in the embodiments of the present application.
步骤404,根据主体物的位置分别与每一最后添加的手势状态中的手势位置之间的距离,对当前手势轨迹集合进行筛选,获得当前手势轨迹。Step 404: Filter the current gesture trajectory set according to the distance between the position of the subject and the gesture position in each last added gesture state to obtain the current gesture trajectory.
可以理解的是,若某一手势状态是由主体物所触发的,则由于手部与主体物的一体性,该手势状态中的手势位置不会与主体物的位置距离太远。因此,在本步骤中,可以根据两者之间的距离,对当前手势轨迹集合进行筛选。具体地,若某一手势轨迹中最后添加的手势状态中的手势位置与主体物的位置之间的距离大于预设阈值或者不处于某一范围内,则可以在当前手势轨迹集合中筛除该手势轨迹。由于是按照距离对当前手势轨迹集合中的手势轨迹的筛选,从而该过程也可以理解为从当前手势轨迹集合中选取与主体物匹配的当前手势轨迹。It can be understood that if a certain gesture state is triggered by the subject object, due to the integration of the hand and the subject object, the gesture position in the gesture state will not be too far away from the position of the subject object. Therefore, in this step, the current gesture trajectory collection can be filtered according to the distance between the two. Specifically, if the distance between the gesture position in the last gesture state added in a certain gesture trajectory and the position of the subject is greater than a preset threshold or is not within a certain range, the gesture can be filtered out from the current gesture trajectory collection. Gesture trajectories. Since the gesture trajectories in the current gesture trajectory collection are screened based on distance, this process can also be understood as selecting the current gesture trajectory that matches the subject object from the current gesture trajectory collection.
步骤406,在当前手势轨迹满足预设检测条件的情况下,将当前手势轨迹中最后添加的手势状态作为目标手势状态。Step 406: When the current gesture trajectory meets the preset detection conditions, the last gesture state added in the current gesture trajectory is used as the target gesture state.
需要说明的是,在将手势轨迹与主体物匹配成功后,可以进一步判断所匹配成功的手势轨迹是否为正确的手势轨迹,以保证确定的目标手势状态更加精准。由此,在本步骤中,可以进一步判断当前手势轨迹是否满足预设检测条件。其中,预设检测条件基于当前手势轨迹作为确定目标手势状态的基础,需要满足哪些合理性条件进行设置。例如,既然需要从当前手势轨迹中确定目标手势状态,则该当前手势轨迹应当是稳定的。该“稳定”可以体现在该当前手势轨迹中不同手势状态的添加时刻之间的时间间隔是均匀的,之所以上述内容可以体现“稳定”,主要是若主体物需要控制拍摄构图,其通常是会在一段时间内做相同的手势以使得产生稳定的识别结果,由此会产生添加时刻之间时间间隔较均匀的一系列手势状态。当然,实际实施过程中,预设检测条件还可以存在其它设置依据,本申请实施例对此不作具体限定。It should be noted that after successfully matching the gesture trajectory with the subject object, it can be further determined whether the successfully matched gesture trajectory is the correct gesture trajectory to ensure that the determined target gesture state is more accurate. Therefore, in this step, it can be further determined whether the current gesture trajectory meets the preset detection conditions. Among them, the preset detection conditions are based on the current gesture trajectory as the basis for determining the target gesture state, and what rational conditions need to be met are set. For example, since the target gesture state needs to be determined from the current gesture trajectory, the current gesture trajectory should be stable. This "stability" can be reflected in the fact that the time intervals between the adding moments of different gesture states in the current gesture trajectory are uniform. The reason why the above content can reflect "stability" is mainly because if the subject needs to control the shooting composition, it is usually The same gesture will be performed over a period of time to produce stable recognition results, thus producing a series of gesture states with even time intervals between adding moments. Of course, during actual implementation, the preset detection conditions may also have other setting bases, which are not specifically limited in the embodiments of this application.
还需要说明的是,之所以这里选取当前手势轨迹中最后添加的手势状态作为目标手势状态,主要是因为最后添加的手势状态是当前手势轨迹中最新的手势状态,其能反映主体物最新的拍摄构图意向,从而进行精准拍摄构图控制。It should also be noted that the reason why the last added gesture state in the current gesture trajectory is selected as the target gesture state is mainly because the last added gesture state is the latest gesture state in the current gesture trajectory, which can reflect the latest shooting of the subject. Composition intention, so as to achieve precise shooting composition control.
上述实施例中,通过按照主体物与手势之间的距离,在当前手势轨迹集合中筛选出与主体物匹配的当 前手势轨迹。由于计算过程比较简单,从而能够提高处理效率。另外,由于基于距离初步筛选出当前手势轨迹之后,还需要基于预设检测条件对当前手势轨迹作进一步检测,从而能够获取更为精准的目标手势状态。In the above embodiment, according to the distance between the main object and the gesture, the current gesture track set matching the main object is filtered out. Pre-gesture trajectories. Since the calculation process is relatively simple, the processing efficiency can be improved. In addition, after the current gesture trajectory is initially screened based on distance, the current gesture trajectory needs to be further detected based on preset detection conditions, so that a more accurate target gesture state can be obtained.
在一些实施例中,预设检测条件包括以下两个条件中的至少一项,以下两个条件分别为当前手势轨迹中手势状态的数量不小于预设数量,以及,当前手势轨迹中最后添加的k个手势状态所对应的添加时刻序列与拍摄设备最后拍摄得到的k帧图像所对应的拍摄时刻序列相匹配;其中,k为正整数。In some embodiments, the preset detection conditions include at least one of the following two conditions. The following two conditions are that the number of gesture states in the current gesture trajectory is not less than the preset number, and that the number of gesture states last added in the current gesture trajectory is not less than the preset number. The added time sequence corresponding to the k gesture states matches the shooting time sequence corresponding to the k frames of images last captured by the shooting device; where k is a positive integer.
需要说明的是,之所以将手势轨迹中手势状态的数量作为设置预设检测条件的依据,主要是因为只有手势轨迹中手势状态达到一定的数量,才能说明该手势轨迹是“稳定”的,而“稳定”的手势轨迹更有利于精准确定目标手势状态。It should be noted that the reason why the number of gesture states in the gesture trajectory is used as the basis for setting the preset detection conditions is mainly because only when the number of gesture states in the gesture trajectory reaches a certain number, can the gesture trajectory be "stable", and "Stable" gesture trajectories are more conducive to accurately determining the target gesture state.
而当前手势轨迹中最后添加的k个手势状态所对应的添加时刻序列与拍摄设备最后拍摄得到的k帧图像所对应的拍摄时刻序列相匹配,能够说明针对最后添加的k个手势状态的这一时段内,当前手势轨迹的更新进度基本上与拍摄设备拍摄图像的拍摄进度是同步的,也即基本上拍摄设备每拍一帧图像,当前手势轨迹均会基于拍摄的图像在自身内部添加手势状态。从这里也能看出,满足该条件的当前手势轨迹应当会逐渐形成用于控制拍摄构图的手势指令,也即满足该条件的当前手势轨迹应当是“有效”的。其中,所谓的“相匹配”,可以是针对添加时刻序列与拍摄时刻序列,相同序位上的添加时刻与拍摄时刻完全一致,也可以是误差在可接受范围内,本申请实施例对此不作具体限定。The addition time sequence corresponding to the last k gesture states added to the current gesture trajectory matches the shooting time sequence corresponding to the last k frames of images captured by the shooting device, which can explain this problem for the last k gesture states added. During this period, the update progress of the current gesture track is basically synchronized with the shooting progress of the image taken by the shooting device. That is, basically every time the shooting device takes a frame of image, the current gesture track will add the gesture state inside itself based on the captured image. . It can also be seen from here that the current gesture trajectory that meets this condition should gradually form gesture instructions for controlling the shooting composition, that is, the current gesture trajectory that meets this condition should be "valid". Among them, the so-called "matching" can mean that the adding time sequence and the shooting time sequence are completely consistent with the adding time and shooting time in the same sequence, or it can be that the error is within an acceptable range, which is not the case in the embodiment of the present application. Specific limitations.
上述实施例中,在基于距离初步筛选出当前手势轨迹之后,还需要基于预设检测条件对当前手势轨迹作进一步检测,从而能够获取更为精准的目标手势状态。In the above embodiment, after the current gesture trajectory is initially screened based on distance, the current gesture trajectory needs to be further detected based on preset detection conditions, so that a more accurate target gesture state can be obtained.
在一些实施例中,目标手势状态包括目标手势类型;根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数之前,还包括:In some embodiments, the target gesture state includes the target gesture type; before obtaining the target working parameter of at least one device in the shooting composition system according to the target gesture state, the method further includes:
判断目标手势类型是否符合指定手势类型;在目标手势类型符合指定手势类型的情况下,则执行根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数的步骤。Determine whether the target gesture type matches the specified gesture type; if the target gesture type matches the specified gesture type, perform the step of obtaining the target working parameter of at least one device in the shooting composition system according to the target gesture state.
在本申请实施例中主要针对的是基于指定手势,开启自动拍摄构图模式的过程。具体地,可将指定手势作为进入通过手势控制的自动拍摄构图模式的触发条件,也即在识别出指定手势的情况下,才执行“根据所述目标手势状态,获取所述拍摄构图系统中至少一项设备的目标工作参数”的步骤,后续再根据目标工作参数控制控制拍摄构图。The embodiment of the present application mainly focuses on the process of starting the automatic shooting composition mode based on a specified gesture. Specifically, the specified gesture can be used as a trigger condition for entering the automatic shooting composition mode controlled by gestures, that is, only when the specified gesture is recognized, "according to the target gesture state, obtain at least one of the shooting composition modes in the shooting composition system" "Target working parameters of an equipment" step, and then control the shooting composition according to the target working parameters.
需要说明的是,实际实施过程中,是否已进入自动拍摄构图模式,拍摄构图系统可以通过外显性质的指示灯发出提醒,以告知使用者拍摄构图系统当前是否处于自动拍摄构图模式。其中,可以通过指示灯的 颜色区分自动拍摄构图模式与非自动拍摄构图模式。另外,既然可以通过指定手势进入自动拍摄构图模式,当然也可以通过指定手势退出自动拍摄构图模式。其中,进入与推出自动拍摄构图模式各自所预设的指定手势可以相同,也可以不同,本申请实施例对此不作具体限定。It should be noted that during the actual implementation process, whether the automatic shooting composition mode has been entered, the shooting composition system can issue a reminder through an external indicator light to inform the user whether the shooting composition system is currently in the automatic shooting composition mode. Among them, you can use the indicator light Color distinguishes automatic shooting composition modes from non-automatic shooting composition modes. In addition, since you can enter the automatic shooting composition mode through designated gestures, you can also exit the automatic shooting composition mode through designated gestures. The preset designated gestures for entering and exiting the automatic shooting composition mode may be the same or different, and this is not specifically limited in the embodiments of the present application.
上述实施例中,通过判定是否识别出指定手势,以作为是否进入自动拍摄构图模式的触发条件,从而可以通过指定手势先进入自动拍摄构图模式,再控制拍摄构图。通过上述两层控制逻辑,可以提升操作精准性,避免手势误触发。In the above embodiment, by determining whether the specified gesture is recognized as a trigger condition for entering the automatic shooting composition mode, the automatic shooting composition mode can be entered first through the specified gesture, and then the shooting composition can be controlled. Through the above two layers of control logic, the accuracy of operation can be improved and false triggering of gestures can be avoided.
在一些实施例中,参见图5,目标主体物状态包括主体物的位置,目标手势状态包括目标手势位置;根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,包括:In some embodiments, referring to Figure 5, the target subject state includes the position of the subject, and the target gesture state includes the target gesture position; according to the target gesture state, the target working parameter of at least one device in the shooting composition system is obtained, including:
步骤502,基于主体物的位置与目标手势位置,确定当前帧图像中主体物与目标手势状态对应的手势之间的相对位置关系。Step 502: Based on the position of the main object and the position of the target gesture, determine the relative positional relationship between the main object and the gesture corresponding to the target gesture state in the current frame image.
其中,主体物与手势之间的相对位置关系是指在二维图像中所呈现的相对位置关系。该相对位置关系具体可以根据主体物的外接框的中心坐标(xhead,yhead)与手势的外接框的中心坐标(xhand,yhand)之间的关系确定。既然是坐标值,则相对位置关系可以包括多种。以主体物为用户头部为例,则相对位置关系可以包括手在头上方、手在头下方或者手在头左上方等。The relative positional relationship between the subject and the gesture refers to the relative positional relationship presented in the two-dimensional image. The relative position relationship can be specifically determined based on the relationship between the center coordinates of the subject's bounding box (x head , y head ) and the center coordinates of the gesture's bounding box (x hand , y hand ). Since it is a coordinate value, the relative position relationship can include multiple types. Taking the subject object as the user's head as an example, the relative position relationship may include the hand above the head, the hand below the head, or the hand above the left side of the head, etc.
步骤504,根据相对位置关系,确定拍摄构图系统中至少一项设备的目标工作参数。Step 504: Determine the target working parameter of at least one piece of equipment in the shooting composition system based on the relative position relationship.
可以理解的是,本步骤主要是解析手势含义的过程。解析过程包含依次推进的两个方面,第一个方面是针对拍摄构图“调整什么”的过程,第二个方面是针对拍摄构图“怎么调”的过程。针对“调整什么”,可参考上述实施例中的说明,可选的调整对象可以为拍摄设备的变焦系数或者光轴朝向等,本申请实施例对此不作具体限定。而具体选取哪个调整对象,则可以是默认的,或者由目标手势状态中的目标手势类型所指示,如变焦控制手势或者光轴朝向控制手势等。It can be understood that this step is mainly a process of parsing the meaning of the gesture. The analysis process includes two aspects that are advanced in sequence. The first aspect is the process of "what to adjust" for the shooting composition, and the second aspect is the process of "how to adjust" the shooting composition. Regarding "what to adjust", reference may be made to the description in the above embodiments. Optional adjustment objects may be the zoom coefficient or the optical axis orientation of the shooting device, etc. This is not specifically limited in the embodiments of the present application. The specific adjustment object to be selected can be the default, or indicated by the target gesture type in the target gesture state, such as a zoom control gesture or an optical axis direction control gesture.
而针对“怎么调”,可以基于相对位置关系相应提前设置的调整方式所确定。例如,以主体物为用户头部为例。若相对位置关系为“手在头上方”,则调整对象可以为变焦系数,且调整方式为增大变焦系数。其中,变焦系数的调整过程可以是,固定主体物的比例,但放大或者缩小主体物的尺寸大小。需要说明的是,实际实施过程中,“调整什么”和“怎么调”均可以提供个性化定制的渠道,以满足不同需求,本申请实施例对此不作具体限定。As for "how to adjust", it can be determined based on the adjustment method set in advance based on the relative position relationship. For example, take the subject object as the user's head. If the relative position relationship is "hand above head", the adjustment object can be the zoom coefficient, and the adjustment method is to increase the zoom coefficient. The adjustment process of the zoom coefficient may be to fix the proportion of the main object but enlarge or reduce the size of the main object. It should be noted that during the actual implementation process, both "what to adjust" and "how to adjust" can provide personalized customization channels to meet different needs. This is not specifically limited in the embodiments of this application.
上述实施例中,由于根据主体物与目标手势状态对应的手势之间的相对位置关系,即可完成自动拍摄构图,从而构图效率较高且构图结果更为精准,且因拍摄构图的调整对象和调整方式可以依托于手势进行个性化定制,从而操作更加灵活和便捷。 In the above embodiment, since the automatic shooting composition can be completed according to the relative positional relationship between the subject and the gesture corresponding to the target gesture state, the composition efficiency is higher and the composition result is more accurate, and due to the adjustment object and the composition of the shooting The adjustment method can be personalized based on gestures, making the operation more flexible and convenient.
在一些实施例中,拍摄构图系统还包括操控设备,操控设备用于控制拍摄设备进行运动;目标工作参数包括拍摄设备的变焦参数或者拍摄设备的光轴朝向或者拍摄设备的所处位置中的至少一项。In some embodiments, the shooting composition system further includes a control device, which is used to control the movement of the shooting device; the target working parameters include at least one of the zoom parameters of the shooting device or the orientation of the optical axis of the shooting device or the position of the shooting device. One item.
其中,操控设备是指能够通过调整自身的位置或者形态,而改变拍摄设备的拍摄范围或者拍摄视角的机械设备。例如,操控设备可以为云台,云台可以包括一条机械臂,在机械臂的承载部可以放置有拍摄设备。其中,承载部可以跟随机械臂伸缩和平移而伸缩和平移,承载部还能旋转,从而使得机械臂的承载部上放置的拍摄设备,可以跟着承载部伸缩、平移或者旋转。很明显地,若机械臂伸缩,则会改变拍摄设备的取景范围。若机械臂平移,则会改变拍摄设备的取景区域。若机械臂翻转,则会改变拍摄设备的取景视角。在本申请实施例中,通过伸缩和平移,可以改变拍摄设备的所处位置。而通过旋转,可以改变拍摄设备的光轴朝向。通过云台的调焦功能,可以改变拍摄设备的变焦参数。Among them, the control device refers to a mechanical device that can change the shooting range or shooting angle of the shooting device by adjusting its own position or shape. For example, the control device may be a pan/tilt, and the pan/tilt may include a robotic arm, and a shooting device may be placed on the carrying portion of the robotic arm. Among them, the bearing part can expand and contract and translate along with the expansion and contraction of the mechanical arm, and the bearing part can also rotate, so that the shooting equipment placed on the bearing part of the robotic arm can expand, contract, translate or rotate along with the bearing part. Obviously, if the robotic arm expands and contracts, it will change the viewing range of the shooting equipment. If the robotic arm translates, the viewing area of the shooting device will change. If the robotic arm flips, it will change the viewing angle of the shooting equipment. In the embodiment of the present application, the position of the shooting device can be changed by telescopic and panning. By rotating, the orientation of the optical axis of the shooting device can be changed. Through the focusing function of the gimbal, you can change the zoom parameters of the shooting device.
上述实施例中,由于根据主体物与目标手势状态对应的手势之间的相对位置关系,即可至少确定拍摄设备的变焦参数或者光轴朝向或者所处位置,从而构图效率较高且构图结果更为精准,且因拍摄构图的调整对象和调整方式可以依托于手势进行个性化定制,从而操作更加灵活和便捷。In the above embodiments, at least the zoom parameter or the direction or position of the optical axis of the shooting device can be determined based on the relative positional relationship between the subject and the gesture corresponding to the target gesture state, so that the composition efficiency is higher and the composition result is more accurate. It is more accurate, and because the adjustment objects and methods of shooting composition can be customized based on gestures, the operation is more flexible and convenient.
在一些实施例中,参见图6,目标主体物状态包括主体物的位置,目标手势状态包括目标手势位置;根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,包括:In some embodiments, referring to Figure 6, the target subject state includes the position of the subject, and the target gesture state includes the target gesture position; according to the target gesture state, the target working parameter of at least one device in the shooting composition system is obtained, including:
步骤602,获取拍摄设备所拍摄到的历史图像中主体物的历史主体物状态和由主体物触发的历史手势状态。Step 602: Obtain the historical subject state of the subject in the historical image captured by the shooting device and the historical gesture state triggered by the subject.
由上述实施例的内容可知,目标手势状态是在当前手势轨迹中所确定的,而当前手势轨迹中的手势状态是基于添加时刻依次排序的,而由主体物触发的历史手势状态可以指的是当前手势轨迹中目标手势状态之前的手势状态。而历史手势状态是从历史图像中获取到的,从而还可以在历史图像中获取主体物的历史主体物状态。It can be seen from the content of the above embodiment that the target gesture state is determined in the current gesture trajectory, and the gesture states in the current gesture trajectory are sequentially sorted based on the adding time, and the historical gesture states triggered by the subject object can refer to The gesture state preceding the target gesture state in the current gesture trajectory. The historical gesture state is obtained from the historical image, so the historical subject state of the subject can also be obtained in the historical image.
例如,将当前手势轨迹记为{R1,R2,R3,R4,R5}。其中,R5为在当前帧图像中确定的目标手势状态,R1、R2、R3和R4分别为在当前帧图像之前获取的连续4帧历史图像中的历史手势状态。而连续4帧历史图像中的历史主体物状态可以分别为W1、W2、W3和W4,而当前帧图像中目标主体物状态可以为W5For example, record the current gesture trajectory as {R 1 , R 2 , R 3 , R 4 , R 5 }. Among them, R 5 is the target gesture state determined in the current frame image, and R 1 , R 2 , R 3 and R 4 are the historical gesture states in the 4 consecutive frames of historical images obtained before the current frame image. The historical subject states in the four consecutive frames of historical images can be W 1 , W 2 , W 3 and W 4 respectively, and the target subject state in the current frame image can be W 5 .
步骤604,基于主体物的位置与目标手势位置,计算当前帧图像中主体物与目标手势状态对应的手势之间的第一距离。Step 604: Based on the position of the main object and the position of the target gesture, calculate the first distance between the main object in the current frame image and the gesture corresponding to the target gesture state.
具体地,根据W5中主体物的位置和R5中的目标手势位置,可以计算当前帧图像中主体物与手势之间的第一距离bias5=(xhand5,yhand5)-(xhead5,yhead5)。其中,(xhand5,yhand5)表示目标手势位置,(xhead5,yhead5)表示主体物的位置。 Specifically, according to the position of the subject in W5 and the target gesture position in R5, the first distance bias 5 between the subject and the gesture in the current frame image can be calculated = (x hand5 ,y hand5 )-(x head5 ,y head5 ). Among them, (x hand5 , y hand5 ) represents the target gesture position, (x head5 , y head5 ) represents the position of the subject object.
步骤606,基于历史主体物状态中的主体物的历史位置与历史手势状态中的历史手势位置,计算历史图像中主体物与历史手势状态对应的手势之间的第二距离。Step 606: Calculate the second distance between the subject in the historical image and the gesture corresponding to the historical gesture state based on the historical position of the subject in the historical subject state and the historical gesture position in the historical gesture state.
由上述步骤可得知,因在当前手势轨迹中历史手势状态不止一个,从而历史手势位置也不止一个。而在本步骤中,在计算第二距离时,可以仅基于某一个历史手势位置计算一个第二距离。例如,在上述示例中,R1、R2、R3和R4分别为在当前帧图像之前获取的连续4帧图像中的历史手势状态。在本步骤中,可以仅基于R4中的历史手势位置和R4对应的历史主体物状态中的历史位置W4,计算第二距离bias4=(xhand4,yhand4)-(xhead4,yhead4)。其中,(xhand4,yhand4)表示第4帧图像中的历史手势位置,(xhead4,yhead4)表示第4帧图像中主体物的历史位置。需要说明的是,实际实施过程中,第二距离可以不一定是基于第4帧图像计算得到,还可以基于其它帧历史图像计算得到,如作为初始帧的第1帧图像,本申请实施例对此不作具体限定。It can be known from the above steps that because there is more than one historical gesture state in the current gesture trajectory, there is also more than one historical gesture position. In this step, when calculating the second distance, a second distance may be calculated based only on a certain historical gesture position. For example, in the above example, R 1 , R 2 , R 3 and R 4 are respectively the historical gesture states in the 4 consecutive frames of images acquired before the current frame image. In this step, the second distance bias 4 = (x hand4 ,yh and4 )- ( x head4 , y head4 ). Among them, (x hand4 , y hand4 ) represents the historical gesture position in the 4th frame image, (x head4 , y head4 ) represents the historical position of the subject in the 4th frame image. It should be noted that during the actual implementation process, the second distance may not necessarily be calculated based on the 4th frame image, but may also be calculated based on other frame historical images, such as the 1st frame image as the initial frame. The embodiment of the present application is This is not specifically limited.
步骤608,根据第一距离与第二距离之间的差值,确定拍摄构图系统中至少一项设备的目标工作参数。Step 608: Determine the target working parameter of at least one device in the shooting composition system based on the difference between the first distance and the second distance.
具体地,第一距离与第二距离之间的差值可以表示为Δbiasc=bias5-bias4。以主体物为头部为例,可以理解的是,该差值表示在当前帧图像相应时刻时,手部与头部之间的距离相较于之前变化了多少。其中,该变化,也即上述计算得到的差值是可以存在负数的。可以理解的是,通过差值的正负可以指示对目标工作参数是调大还是调小,而差值的数值可以指示对目标工作参数改变多少数值。由此,上述陈述的内容可以解决“怎么调”的问题。Specifically, the difference between the first distance and the second distance can be expressed as Δbias c =bias 5 -bias 4 . Taking the subject as the head as an example, it can be understood that the difference represents how much the distance between the hand and the head has changed at the corresponding moment of the current frame image compared to before. Among them, the change, that is, the difference calculated above, can have a negative number. It can be understood that the positive or negative value of the difference can indicate whether to increase or decrease the target operating parameter, and the numerical value of the difference can indicate how much the target operating parameter has been changed. Therefore, the content stated above can solve the problem of "how to adjust".
结合上述实施例的内容可知,不仅需要解决“怎么调”的问题,还需要解决“调整什么”的问题。而参考上述实施例中的说明,可选的调整对象可以为拍摄设备的变焦系数或者光轴朝向等,本申请实施例对此不作具体限定。而具体选取哪个调整对象,则也可以是默认的,或者同样由目标手势状态中的目标手势类型所指示,如变焦控制手势或者光轴朝向控制手势等。需要说明的是,当需要调整拍摄设备的光轴朝向时,可以对将差值转换为角度。Based on the contents of the above embodiments, it can be seen that not only the problem of "how to adjust" needs to be solved, but also the problem of "what to adjust" needs to be solved. Referring to the description in the above embodiments, the optional adjustment object may be the zoom coefficient or the optical axis orientation of the shooting device, which is not specifically limited in the embodiments of the present application. The specific adjustment object to be selected can also be the default, or it can also be indicated by the target gesture type in the target gesture state, such as a zoom control gesture or an optical axis direction control gesture. It should be noted that when the optical axis orientation of the shooting device needs to be adjusted, the difference can be converted into an angle.
上述实施例中,由于控制设备自身可能会运动,且会带着拍摄设备一起运动,而拍摄设备因控制设备所带动的运动过程与手部运动过程同步耦合时,拍摄设备拍摄得到的图像中手势坐标会在图像中的位置保持不变,这会导致手部在真实世界中的运动状态被误判为是静止不动的,因拍摄构图需要利用到一系列变化的手势位置,从而会降低拍摄构图的稳定性。而通过不同时刻时,主体物与手势之间距离的变化以反映真实世界中手部的运动,可以绕过拍摄设备的运动过程与手部运动过程同步耦合的问题,从而能够提高拍摄构图的稳定性。In the above embodiment, since the control device itself may move and move with the shooting device, and the motion process of the shooting device driven by the control device is synchronously coupled with the hand motion process, the gestures in the images captured by the shooting device The position of the coordinates in the image will remain unchanged, which will cause the movement of the hand in the real world to be misjudged as stationary. Since the shooting composition requires a series of changing gesture positions, it will slow down the shooting process. Compositional stability. By changing the distance between the subject and the gesture at different times to reflect the movement of the hand in the real world, the problem of synchronous coupling between the movement process of the shooting equipment and the movement process of the hand can be bypassed, thereby improving the stability of the shooting composition. sex.
在一些实施例中,拍摄构图系统还包括操控设备,操控设备用于控制拍摄设备进行运动;目标工作参 数包括拍摄设备的变焦参数或者拍摄设备的光轴朝向或者拍摄设备的所处位置中的至少一项。In some embodiments, the shooting composition system also includes a control device, which is used to control the movement of the shooting device; the target working parameters The number includes at least one of the zoom parameter of the photographing device, the orientation of the optical axis of the photographing device, or the position of the photographing device.
其中,具体解释说明可参考上述实施例的内容,此处不再赘述。For specific explanations, reference may be made to the contents of the above embodiments, which will not be described again here.
上述实施例中,由于根据主体物与目标手势状态对应的手势之间的相对位置关系,即可至少确定拍摄设备的变焦参数或者光轴朝向或者所处位置,从而构图效率较高且构图结果更为精准,且因拍摄构图的调整对象和调整方式可以依托于手势进行个性化定制,从而操作更加灵活和便捷。In the above embodiments, at least the zoom parameter or the direction or position of the optical axis of the shooting device can be determined based on the relative positional relationship between the subject and the gesture corresponding to the target gesture state, so that the composition efficiency is higher and the composition result is more accurate. It is more accurate, and because the adjustment objects and methods of shooting composition can be customized based on gestures, the operation is more flexible and convenient.
在一些实施例中,目标手势状态包括目标手势类型;根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,包括:In some embodiments, the target gesture state includes the target gesture type; according to the target gesture state, the target working parameters of at least one device in the shooting composition system are obtained, including:
在目标手势类型符合预设手势类型的情况下,获取预设手势类型相应的预设工作参数,并作为目标工作参数,预设工作参数包括拍摄设备的预设变焦系数。When the target gesture type matches the preset gesture type, the preset working parameters corresponding to the preset gesture type are obtained and used as the target working parameters. The preset working parameters include the preset zoom coefficient of the shooting device.
在上述关于指定手势类型的解释说明中提到,指定手势类型可以作为进入通过手势控制的自动拍摄构图模式的触发条件。而在本申请实施例中,主要是在判定目标手势类型符合预设手势类型的情况下,获取拍摄构图系统中至少一项设备的目标工作参数的默认值的过程。It is mentioned in the above explanation about the specified gesture type that the specified gesture type can be used as a trigger condition for entering the automatic shooting composition mode controlled by gestures. In the embodiment of the present application, it is mainly a process of obtaining the default value of the target working parameter of at least one device in the shooting composition system when it is determined that the target gesture type conforms to the preset gesture type.
具体地,通过预先设置预设手势类型,在通过上述过程获取目标手势状态后,可以判断目标手势状态中的目标手势类型是否符合预设手势类型。若符合,则说明目标手势状态触发了预设手势。由于提前可以为预设手势设置拍摄构图系统中至少一项设备的目标工作参数的默认值,从而在判定目标手势状态触发了预设手势的情况下,在执行“根据所述目标手势状态,获取所述拍摄构图系统中至少一项设备的目标工作参数”的步骤时,可以直接采用上述默认值作为拍摄构图系统中至少一项设备的目标工作参数。Specifically, by setting the preset gesture type in advance, and after obtaining the target gesture state through the above process, it can be determined whether the target gesture type in the target gesture state conforms to the preset gesture type. If it matches, it means that the target gesture state triggered the preset gesture. Since the default value of the target working parameter of at least one device in the shooting composition system can be set for the preset gesture in advance, when it is determined that the target gesture state triggers the preset gesture, when executing "according to the target gesture state, obtain In the step of "shooting the target working parameter of at least one piece of equipment in the composition system", the above default value can be directly used as the target working parameter of shooting at least one piece of equipment in the composition system.
在上述实施例中,由于可以通过识别出指定手势,采用指定手势相应的默认值设置拍摄构图系统中至少一项设备的目标工作参数,从而能够简单便捷地控制拍摄构图。In the above embodiment, since the specified gesture can be recognized and the target working parameter of at least one device in the shooting composition system can be set using the default value corresponding to the specified gesture, the shooting composition can be controlled simply and conveniently.
在其中一个实施例中,拍摄构图系统还包括操控设备,操控设备用于控制拍摄设备进行运动;相应地,预设工作参数还包括拍摄设备的预设光轴朝向或者拍摄设备的预设所处位置中的至少一项。In one embodiment, the shooting composition system also includes a control device, which is used to control the movement of the shooting device; accordingly, the preset working parameters also include the preset optical axis orientation of the shooting device or the preset location of the shooting device. At least one of the locations.
其中,具体解释说明可参考上述实施例的内容,此处不再赘述。需要说明的是,这里因使用的实际上是默认值,从而预设工作参数可以包括拍摄设备的“预设”光轴朝向或者拍摄设备的“预设”所处位置中的至少一项。For specific explanations, reference may be made to the contents of the above embodiments, which will not be described again here. It should be noted that since the default values used here are actually default values, the preset working parameters may include at least one of the "preset" optical axis orientation of the shooting device or the "preset" position of the shooting device.
上述实施例中,由于根据主体物与目标手势状态对应的手势之间的相对位置关系,即可至少确定拍摄设备的光轴朝向或者所处位置,从而构图效率较高且构图结果更为精准,且因拍摄构图的调整对象和调整方式可以依托于手势进行个性化定制,从而操作更加灵活和便捷。In the above embodiment, since at least the orientation or position of the optical axis of the shooting device can be determined based on the relative positional relationship between the subject and the gesture corresponding to the target gesture state, the composition efficiency is higher and the composition result is more accurate. And because the adjustment objects and methods of shooting composition can be customized based on gestures, the operation is more flexible and convenient.
应该理解的是,虽然如上的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是 这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence as indicated by arrows, These steps are not necessarily performed in the order indicated by the arrows. Unless explicitly stated in this article, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的拍摄构图方法的拍摄构图装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个拍摄构图装置实施例中的具体限定可以参见上文中对于拍摄构图方法的限定,在此不再赘述。Based on the same inventive concept, embodiments of the present application also provide a photographing and composition device for implementing the above-mentioned photographing and composition method. The solution to the problem provided by this device is similar to the solution recorded in the above method. Therefore, for the specific limitations in one or more embodiments of the shooting and composition device provided below, please refer to the limitations on the shooting and composition method mentioned above. I won’t go into details here.
在一个实施例中,如图7所示,提供了一种拍摄构图装置,包括:数据获取模块701、手势更新模块702、手势确定模块703和设备调整模块704,其中:In one embodiment, as shown in Figure 7, a shooting composition device is provided, including: a data acquisition module 701, a gesture update module 702, a gesture determination module 703, and a device adjustment module 704, wherein:
数据获取模块701,用于获取通过拍摄设备拍摄得到的当前帧图像,获取当前帧图像中主体物的目标主体物状态以及至少一个手势的当前手势状态;The data acquisition module 701 is used to acquire the current frame image captured by the shooting device, acquire the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
手势更新模块702,用于获取历史手势轨迹集合,基于至少一个手势的当前手势状态对历史手势轨迹集合进行更新,获得当前手势轨迹集合;The gesture update module 702 is used to obtain a set of historical gesture trajectories, update the set of historical gesture trajectories based on the current gesture state of at least one gesture, and obtain a set of current gesture trajectories;
手势确定模块703,用于根据目标主体物状态,在当前手势轨迹集合中确定由主体物所触发的当前手势轨迹,并在当前手势轨迹中,确定由主体物触发的目标手势状态;The gesture determination module 703 is used to determine the current gesture trajectory triggered by the subject object in the current gesture trajectory set according to the state of the target subject object, and determine the target gesture state triggered by the subject object in the current gesture trajectory;
设备调整模块704,用于根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数,并根据目标工作参数对拍摄构图系统中相应的设备进行调节。The equipment adjustment module 704 is used to obtain the target working parameters of at least one device in the shooting and composition system according to the target gesture state, and adjust the corresponding equipment in the shooting and composition system according to the target working parameters.
在其中一个实施例中,数据获取模块701还用于:In one of the embodiments, the data acquisition module 701 is also used to:
获取图像帧组中第一帧图像中主体物的历史主体物状态;Obtain the historical subject status of the subject in the first frame of the image frame group;
基于图像帧组,对主体物进行目标跟踪,获得当前帧图像中主体物的预测主体物状态;Based on the image frame group, perform target tracking on the subject and obtain the predicted subject state of the subject in the current frame image;
对历史主体物状态与预测主体物状态进行整合,获得当前帧图像中主体物的目标主体物状态。The historical subject state and the predicted subject state are integrated to obtain the target subject state of the subject in the current frame image.
在其中一个实施例中,手势更新模块702还用于:In one of the embodiments, the gesture update module 702 is also used to:
将每一手势的当前手势状态与历史手势轨迹集合中每一历史手势轨迹进行匹配,确定相互匹配的当前手势状态与历史手势轨迹;Match the current gesture state of each gesture with each historical gesture trajectory in the historical gesture trajectory collection, and determine the matching current gesture state and historical gesture trajectory;
将每一存在相匹配的历史手势轨迹的当前手势状态添加至相匹配的历史手势轨迹,获得当前手势轨迹集合。Add the current gesture state of each matching historical gesture track to the matching historical gesture track to obtain a current gesture track set.
在其中一个实施例中,手势更新模块702还用于: In one of the embodiments, the gesture update module 702 is also used to:
在存在与每一历史手势轨迹均不匹配的当前手势状态的情况下,基于与每一历史手势轨迹均不匹配的当前手势状态,新建手势轨迹,并添加至当前手势轨迹集合。In the case where there is a current gesture state that does not match each historical gesture trajectory, a new gesture trajectory is created based on the current gesture state that does not match each historical gesture trajectory and is added to the current gesture trajectory collection.
在其中一个实施例中,手势更新模块702还用于:In one of the embodiments, the gesture update module 702 is also used to:
对于当前手势轨迹集合中每一手势轨迹,获取每一手势轨迹中最后添加的手势状态所对应的添加时刻;For each gesture trajectory in the current gesture trajectory collection, obtain the addition moment corresponding to the last gesture state added in each gesture trajectory;
计算每一添加时刻与当前帧图像的获取时刻之间的时间间隔,将大于预设时长的时间间隔所对应的手势轨迹从当前手势轨迹集合中删除。Calculate the time interval between each addition moment and the acquisition moment of the current frame image, and delete the gesture trajectories corresponding to the time interval greater than the preset time from the current gesture trajectory set.
在其中一个实施例中,手势确定模块703还用于:In one of the embodiments, the gesture determination module 703 is also used to:
对于当前手势轨迹集合中每一手势轨迹,确定每一手势轨迹中最后添加的手势状态,手势状态包括手势位置;For each gesture trajectory in the current gesture trajectory set, determine the last gesture state added in each gesture trajectory, where the gesture state includes the gesture position;
根据主体物的位置分别与每一最后添加的手势状态中的手势位置之间的距离,对当前手势轨迹集合进行筛选,获得当前手势轨迹;According to the distance between the position of the subject and the gesture position in each last added gesture state, filter the current gesture trajectory set to obtain the current gesture trajectory;
在当前手势轨迹满足预设检测条件的情况下,将当前手势轨迹中最后添加的手势状态作为目标手势状态。When the current gesture trajectory meets the preset detection conditions, the last gesture state added in the current gesture trajectory is used as the target gesture state.
在其中一个实施例中,手势确定模块703还用于:确定预设检测条件包括以下两个条件中的至少一项,以下两个条件分别为当前手势轨迹中手势状态的数量不小于预设数量,以及,当前手势轨迹中最后添加的k个手势状态所对应的添加时刻序列与拍摄设备最后拍摄得到的k帧图像所对应的拍摄时刻序列相匹配;其中,k为正整数。In one embodiment, the gesture determination module 703 is further configured to: determine that the preset detection condition includes at least one of the following two conditions. The following two conditions are that the number of gesture states in the current gesture trajectory is not less than the preset number. , and, the addition time sequence corresponding to the last k gesture states added in the current gesture trajectory matches the shooting time sequence corresponding to the last k frame images captured by the shooting device; where k is a positive integer.
在其中一个实施例中,设备调整模块704还用于:In one embodiment, the device adjustment module 704 is also used to:
判断目标手势类型是否符合指定手势类型;Determine whether the target gesture type matches the specified gesture type;
在目标手势类型符合指定手势类型的情况下,则执行根据目标手势状态,获取拍摄构图系统中至少一项设备的目标工作参数的步骤。When the target gesture type matches the specified gesture type, the step of obtaining the target working parameter of at least one device in the shooting composition system is performed according to the target gesture state.
在其中一个实施例中,设备调整模块704还用于:In one embodiment, the device adjustment module 704 is also used to:
基于主体物的位置与目标手势位置,确定当前帧图像中主体物与目标手势状态对应的手势之间的相对位置关系;Based on the position of the subject and the position of the target gesture, determine the relative positional relationship between the gesture corresponding to the subject and the target gesture state in the current frame image;
根据相对位置关系,确定拍摄构图系统中至少一项设备的目标工作参数。According to the relative position relationship, the target working parameters of at least one piece of equipment in the shooting composition system are determined.
在其中一个实施例中,设备调整模块704还用于确定拍摄构图系统还包括操控设备,操控设备用于控制拍摄设备进行运动;目标工作参数包括拍摄设备的变焦参数或者拍摄设备的光轴朝向或者拍摄设备的所处位置中的至少一项。 In one embodiment, the equipment adjustment module 704 is also used to determine that the shooting composition system also includes a control device, and the control device is used to control the movement of the shooting device; the target working parameters include the zoom parameters of the shooting device or the optical axis orientation of the shooting device, or At least one item of the location of the shooting device.
在其中一个实施例中,设备调整模块704还用于:In one embodiment, the device adjustment module 704 is also used to:
获取拍摄设备所拍摄到的历史图像中主体物的历史主体物状态和由主体物触发的历史手势状态;Obtain the historical subject state of the subject in the historical image captured by the shooting device and the historical gesture state triggered by the subject;
基于主体物的位置与目标手势位置,计算当前帧图像中主体物与目标手势状态对应的手势之间的第一距离;Based on the position of the subject and the target gesture position, calculate the first distance between the subject and the gesture corresponding to the target gesture state in the current frame image;
基于历史主体物状态中的主体物的历史位置与历史手势状态中的历史手势位置,计算历史图像中主体物与历史手势状态对应的手势之间的第二距离;Based on the historical position of the subject in the historical subject state and the historical gesture position in the historical gesture state, calculate the second distance between the subject in the historical image and the gesture corresponding to the historical gesture state;
根据第一距离与第二距离之间的差值,确定拍摄构图系统中至少一项设备的目标工作参数。According to the difference between the first distance and the second distance, a target working parameter of at least one piece of equipment in the shooting composition system is determined.
在其中一个实施例中,设备调整模块704还用于确定拍摄构图系统还包括操控设备,操控设备用于控制拍摄设备进行运动;目标工作参数包括拍摄设备的变焦参数或者拍摄设备的光轴朝向或者拍摄设备的所处位置中的至少一项。In one embodiment, the equipment adjustment module 704 is also used to determine that the shooting composition system also includes a control device, and the control device is used to control the movement of the shooting device; the target working parameters include the zoom parameters of the shooting device or the optical axis orientation of the shooting device, or At least one item of the location of the shooting device.
在其中一个实施例中,设备调整模块704还用于:In one embodiment, the device adjustment module 704 is also used to:
在目标手势类型符合预设手势类型的情况下,获取预设手势类型相应的预设工作参数,并作为目标工作参数,预设工作参数包括拍摄设备的预设变焦系数。When the target gesture type matches the preset gesture type, the preset working parameters corresponding to the preset gesture type are obtained and used as the target working parameters. The preset working parameters include the preset zoom coefficient of the shooting device.
在其中一个实施例中,设备调整模块704还用于确定拍摄构图系统还包括操控设备,操控设备用于控制拍摄设备进行运动;相应地,预设工作参数还包括拍摄设备的预设光轴朝向或者拍摄设备的预设所处位置中的至少一项。In one embodiment, the equipment adjustment module 704 is also used to determine that the shooting composition system also includes a control device, and the control device is used to control the movement of the shooting device; accordingly, the preset working parameters also include the preset optical axis orientation of the shooting device. Or at least one of the preset positions of the shooting device.
上述拍摄构图装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above-mentioned shooting and composition device can be realized in whole or in part by software, hardware and combinations thereof. Each of the above modules may be embedded in or independent of the processor of the computer device in the form of hardware, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图8所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储手势轨迹数据和主体物状态数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种拍摄构图方法。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be shown in Figure 8 . The computer device includes a processor, memory, and network interfaces connected through a system bus. Wherein, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes non-volatile storage media and internal memory. The non-volatile storage medium stores operating systems, computer programs and databases. This internal memory provides an environment for the execution of operating systems and computer programs in non-volatile storage media. The database of the computer device is used to store gesture trajectory data and subject state data. The network interface of the computer device is used to communicate with external terminals through a network connection. The computer program implements a shooting composition method when executed by the processor.
本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。 Those skilled in the art can understand that the structure shown in Figure 8 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Specific computer equipment can May include more or fewer parts than shown, or combine certain parts, or have a different arrangement of parts.
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, it implements the steps in the above method embodiments.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer program product is provided, including a computer program that implements the steps in each of the above method embodiments when executed by a processor.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage. In the media, when executed, the computer program may include the processes of the above method embodiments. Any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetic variable memory (Magnetoresistive Random Access Memory (MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in many forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM). The databases involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include blockchain-based distributed databases, etc., but are not limited thereto. The processors involved in the various embodiments provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to this.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined in any way. To simplify the description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, all possible combinations should be used. It is considered to be within the scope of this manual.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。 The above-described embodiments only express several implementation modes of the present application, and their descriptions are relatively specific and detailed, but should not be construed as limiting the patent scope of the present application. It should be noted that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all fall within the protection scope of the present application. Therefore, the scope of protection of this application should be determined by the appended claims.

Claims (18)

  1. 一种拍摄构图方法,其特征在于,所述方法应用于包括拍摄设备的拍摄构图系统;所述方法包括:A photographing composition method, characterized in that the method is applied to a photographing composition system including photographing equipment; the method includes:
    获取通过所述拍摄设备拍摄得到的当前帧图像,获取所述当前帧图像中主体物的目标主体物状态以及至少一个手势的当前手势状态;Obtain the current frame image captured by the shooting device, obtain the target subject state of the subject in the current frame image and the current gesture state of at least one gesture;
    获取历史手势轨迹集合,基于所述至少一个手势的当前手势状态对所述历史手势轨迹集合进行更新,获得当前手势轨迹集合;Obtain a set of historical gesture trajectories, update the set of historical gesture trajectories based on the current gesture state of the at least one gesture, and obtain a set of current gesture trajectories;
    根据所述目标主体物状态,在所述当前手势轨迹集合中确定由所述主体物所触发的当前手势轨迹,并在所述当前手势轨迹中,确定由所述主体物触发的目标手势状态;According to the target subject state, determine the current gesture trajectory triggered by the subject object in the current gesture trajectory set, and determine the target gesture state triggered by the subject object in the current gesture trajectory;
    根据所述目标手势状态,获取所述拍摄构图系统中至少一项设备的目标工作参数,并根据所述目标工作参数对所述拍摄构图系统中相应的设备进行调节。According to the target gesture state, a target working parameter of at least one device in the shooting and composition system is obtained, and the corresponding device in the shooting and composition system is adjusted according to the target working parameter.
  2. 根据权利要求1所述的方法,其特征在于,所述当前帧图像从属于图像帧组,所述图像帧组中的图像是按照所述拍摄设备的拍摄时序进行排序的,所述当前帧图像为最后一帧图像;所述获取所述当前帧图像中主体物的目标主体物状态,包括:The method according to claim 1, characterized in that the current frame image belongs to an image frame group, the images in the image frame group are sorted according to the shooting timing of the shooting device, and the current frame image is the last frame image; obtaining the target subject state of the subject in the current frame image includes:
    获取所述图像帧组中第一帧图像中所述主体物的历史主体物状态;Obtain the historical subject status of the subject in the first frame image in the image frame group;
    基于所述图像帧组,对所述主体物进行目标跟踪,获得所述当前帧图像中所述主体物的预测主体物状态;Based on the image frame group, perform target tracking on the subject object, and obtain the predicted subject state of the subject object in the current frame image;
    对所述历史主体物状态与所述预测主体物状态进行整合,获得所述当前帧图像中所述主体物的目标主体物状态。The historical subject state and the predicted subject state are integrated to obtain the target subject state of the subject in the current frame image.
  3. 根据权利要求1所述的方法,其特征在于,所述基于所述至少一个手势的当前手势状态对所述历史手势轨迹集合进行更新,获得当前手势轨迹集合,包括:The method according to claim 1, characterized in that, updating the historical gesture trajectory set based on the current gesture state of the at least one gesture to obtain the current gesture trajectory set includes:
    将每一手势的当前手势状态与所述历史手势轨迹集合中每一历史手势轨迹进行匹配,确定相互匹配的当前手势状态与历史手势轨迹;Match the current gesture state of each gesture with each historical gesture trajectory in the historical gesture trajectory set, and determine the matching current gesture state and historical gesture trajectory;
    将每一存在相匹配的历史手势轨迹对应的当前手势状态添加至相匹配的历史手势轨迹,获得当前手势轨迹集合。Add the current gesture state corresponding to each matching historical gesture trajectory to the matching historical gesture trajectory to obtain a current gesture trajectory set.
  4. 根据权利要求3所述的方法,其特征在于,所述将每一手势的当前手势状态与所述历史手势轨迹集合中每一历史手势轨迹进行匹配之后,还包括:The method according to claim 3, characterized in that after matching the current gesture state of each gesture with each historical gesture trajectory in the historical gesture trajectory set, it further includes:
    在存在与每一历史手势轨迹均不匹配的当前手势状态的情况下,基于与每一历史手势轨迹均不匹配的当前手势状态,新建手势轨迹,并添加至所述当前手势轨迹集合。In the case where there is a current gesture state that does not match each historical gesture trajectory, a new gesture trajectory is created based on the current gesture state that does not match each historical gesture trajectory and is added to the current gesture trajectory set.
  5. 根据权利要求3所述的方法,其特征在于,所述当前手势轨迹集合中还包括所述历史手势轨迹集 合中未添加当前手势状态的历史手势轨迹;所述根据所述目标主体物状态,在所述当前手势轨迹集合中确定由所述主体物所触发的当前手势轨迹之前,还包括:The method according to claim 3, characterized in that the current gesture trajectory set also includes the historical gesture trajectory set The historical gesture trajectories of the current gesture state are not added to the combination; before determining the current gesture trajectory triggered by the subject object in the current gesture trajectory set according to the target subject state, it also includes:
    对于所述当前手势轨迹集合中每一手势轨迹,获取每一手势轨迹中最后添加的手势状态所对应的添加时刻;For each gesture trajectory in the current gesture trajectory set, obtain the addition moment corresponding to the last gesture state added in each gesture trajectory;
    计算每一添加时刻与所述当前帧图像的获取时刻之间的时间间隔,将大于预设时长的时间间隔所对应的手势轨迹从所述当前手势轨迹集合中删除。Calculate the time interval between each addition moment and the acquisition moment of the current frame image, and delete the gesture trajectories corresponding to the time interval greater than the preset time from the current gesture trajectory set.
  6. 根据权利要求1所述的方法,其特征在于,所述目标主体物状态包括所述主体物的位置;所述根据所述目标主体物状态,在所述当前手势轨迹集合中确定由所述主体物所触发的当前手势轨迹,并在所述当前手势轨迹中,确定由所述主体物触发的目标手势状态,包括:The method according to claim 1, characterized in that the target subject state includes the position of the subject; and according to the target subject state, it is determined by the subject in the current gesture trajectory set. The current gesture trajectory triggered by the object, and in the current gesture trajectory, determine the target gesture state triggered by the main object, including:
    对于所述当前手势轨迹集合中每一手势轨迹,确定每一手势轨迹中最后添加的手势状态,所述手势状态包括手势位置;For each gesture trajectory in the current gesture trajectory set, determine the gesture state last added in each gesture trajectory, where the gesture state includes a gesture position;
    根据所述主体物的位置分别与每一最后添加的手势状态中的手势位置之间的距离,对所述当前手势轨迹集合进行筛选,获得当前手势轨迹;According to the distance between the position of the subject and the gesture position in each last added gesture state, filter the current gesture trajectory set to obtain the current gesture trajectory;
    在所述当前手势轨迹满足预设检测条件的情况下,将所述当前手势轨迹中最后添加的手势状态作为目标手势状态。When the current gesture trajectory satisfies the preset detection condition, the gesture state last added to the current gesture trajectory is used as the target gesture state.
  7. 根据权利要求6所述的方法,其特征在于,所述预设检测条件包括以下两个条件中的至少一项,所述以下两个条件分别为所述当前手势轨迹中手势状态的数量不小于预设数量,以及,所述当前手势轨迹中最后添加的k个手势状态所对应的添加时刻序列与所述拍摄设备最后拍摄得到的k帧图像所对应的拍摄时刻序列相匹配;其中,所述k为正整数。The method according to claim 6, characterized in that the preset detection condition includes at least one of the following two conditions, the following two conditions are respectively that the number of gesture states in the current gesture trajectory is not less than The preset number, and the addition time sequence corresponding to the last k gesture states added in the current gesture trajectory match the shooting time sequence corresponding to the k frame images last captured by the shooting device; wherein, the k is a positive integer.
  8. 根据权利要求1所述的方法,其特征在于,所述目标手势状态包括目标手势类型;所述根据所述目标手势状态,获取所述拍摄构图系统中至少一项设备的目标工作参数之前,还包括:The method of claim 1, wherein the target gesture state includes a target gesture type; before obtaining the target working parameter of at least one device in the shooting composition system according to the target gesture state, include:
    判断所述目标手势类型是否符合指定手势类型;Determine whether the target gesture type conforms to the specified gesture type;
    在所述目标手势类型符合所述指定手势类型的情况下,则执行根据所述目标手势状态,获取所述拍摄构图系统中至少一项设备的目标工作参数的步骤。If the target gesture type conforms to the specified gesture type, then perform the step of obtaining the target working parameter of at least one device in the shooting composition system according to the target gesture state.
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,所述目标主体物状态包括所述主体物的位置,所述目标手势状态包括目标手势位置;所述根据所述目标手势状态,获取所述拍摄构图系统中至少一项设备的目标工作参数,包括:The method according to any one of claims 1 to 8, characterized in that the target subject state includes the position of the subject object, the target gesture state includes the target gesture position; Status, obtain the target working parameters of at least one piece of equipment in the shooting composition system, including:
    基于所述主体物的位置与所述目标手势位置,确定所述当前帧图像中所述主体物与所述目标手势状态 对应的手势之间的相对位置关系;Based on the position of the main object and the target gesture position, determine the status of the main object and the target gesture in the current frame image. The relative positional relationship between corresponding gestures;
    根据所述相对位置关系,确定所述拍摄构图系统中至少一项设备的目标工作参数。According to the relative position relationship, the target operating parameter of at least one device in the shooting composition system is determined.
  10. 根据权利要求9所述的方法,其特征在于,所述拍摄构图系统还包括操控设备,所述操控设备用于控制所述拍摄设备进行运动;所述目标工作参数包括所述拍摄设备的变焦参数或者所述拍摄设备的光轴朝向或者所述拍摄设备的所处位置中的至少一项。The method according to claim 9, characterized in that the shooting composition system further includes a control device, the control device is used to control the movement of the shooting device; the target working parameters include zoom parameters of the shooting device Or at least one of the direction of the optical axis of the photographing device or the position of the photographing device.
  11. 根据权利要求1至8中任一项所述的方法,其特征在于,所述目标主体物状态包括所述主体物的位置,所述目标手势状态包括目标手势位置;所述根据所述目标手势状态,获取所述拍摄构图系统中至少一项设备的目标工作参数,包括:The method according to any one of claims 1 to 8, characterized in that the target subject state includes the position of the subject object, the target gesture state includes the target gesture position; Status, obtain the target working parameters of at least one piece of equipment in the shooting composition system, including:
    获取所述拍摄设备所拍摄到的历史图像中所述主体物的历史主体物状态和由所述主体物触发的历史手势状态;Obtain the historical subject state of the subject in the historical image captured by the shooting device and the historical gesture state triggered by the subject;
    基于所述主体物的位置与所述目标手势位置,计算所述当前帧图像中所述主体物与所述目标手势状态对应的手势之间的第一距离;Based on the position of the main object and the target gesture position, calculate a first distance between the main object and the gesture corresponding to the target gesture state in the current frame image;
    基于所述历史主体物状态中的所述主体物的历史位置与所述历史手势状态中的历史手势位置,计算所述历史图像中所述主体物与所述历史手势状态对应的手势之间的第二距离;Based on the historical position of the subject in the historical subject state and the historical gesture position in the historical gesture state, calculate the distance between the gesture corresponding to the subject in the historical image and the historical gesture state. second distance;
    根据所述第一距离与所述第二距离之间的差值,确定所述拍摄构图系统中至少一项设备的目标工作参数。According to the difference between the first distance and the second distance, a target operating parameter of at least one device in the shooting composition system is determined.
  12. 根据权利要求11所述的方法,其特征在于,所述拍摄构图系统还包括操控设备,所述操控设备用于控制所述拍摄设备进行运动;所述目标工作参数包括所述拍摄设备的变焦参数或者所述拍摄设备的光轴朝向或者所述拍摄设备的所处位置中的至少一项。The method according to claim 11, characterized in that the shooting composition system further includes a control device, the control device is used to control the movement of the shooting device; the target working parameters include zoom parameters of the shooting device Or at least one of the direction of the optical axis of the photographing device or the position of the photographing device.
  13. 根据权利要求1至7中任一项所述的方法,其特征在于,所述目标手势状态包括目标手势类型;所述根据所述目标手势状态,获取所述拍摄构图系统中至少一项设备的目标工作参数,包括:The method according to any one of claims 1 to 7, characterized in that the target gesture state includes a target gesture type; and according to the target gesture state, obtaining the information of at least one device in the shooting composition system Target operating parameters, including:
    在所述目标手势类型符合预设手势类型的情况下,获取所述预设手势类型相应的预设工作参数,并作为所述目标工作参数,所述预设工作参数包括所述拍摄设备的预设变焦系数。When the target gesture type conforms to the preset gesture type, the preset working parameters corresponding to the preset gesture type are obtained and used as the target working parameters. The preset working parameters include the preset parameters of the shooting device. Set the zoom factor.
  14. 根据权利要求13所述的方法,其特征在于,所述拍摄构图系统还包括操控设备,所述操控设备用于控制所述拍摄设备进行运动;相应地,所述预设工作参数还包括所述拍摄设备的预设光轴朝向或者所述拍摄设备的预设所处位置中的至少一项。The method according to claim 13, characterized in that the shooting composition system further includes a control device, the control device is used to control the movement of the shooting device; accordingly, the preset working parameters further include the At least one of a preset optical axis orientation of the photographing device or a preset position of the photographing device.
  15. 一种拍摄构图装置,其特征在于,所述装置包括:A shooting and composition device, characterized in that the device includes:
    数据获取模块,用于获取通过拍摄设备拍摄得到的当前帧图像,获取所述当前帧图像中主体物的目标 主体物状态以及至少一个手势的当前手势状态;A data acquisition module, used to obtain the current frame image captured by the shooting device, and obtain the target of the subject in the current frame image. The state of the subject and the current gesture state of at least one gesture;
    手势更新模块,用于获取历史手势轨迹集合,基于所述至少一个手势的当前手势状态对所述历史手势轨迹集合进行更新,获得当前手势轨迹集合;A gesture update module, configured to obtain a set of historical gesture trajectories, update the set of historical gesture trajectories based on the current gesture state of the at least one gesture, and obtain a set of current gesture trajectories;
    手势确定模块,用于根据所述目标主体物状态,在所述当前手势轨迹集合中确定由所述主体物所触发的当前手势轨迹,并在所述当前手势轨迹中,确定由所述主体物触发的目标手势状态;A gesture determination module, configured to determine the current gesture trajectory triggered by the subject object in the current gesture trajectory set according to the state of the target subject object, and determine the current gesture trajectory triggered by the subject object in the current gesture trajectory. Triggered target gesture state;
    设备调整模块,用于根据所述目标手势状态,获取所述拍摄构图系统中至少一项设备的目标工作参数,并根据所述目标工作参数对所述拍摄构图系统中相应的设备进行调节。An equipment adjustment module is configured to obtain a target working parameter of at least one device in the shooting and composition system according to the target gesture state, and adjust the corresponding device in the shooting and composition system according to the target working parameter.
  16. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至14中任一项所述的方法的步骤。A computer device includes a memory and a processor, the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of the method described in any one of claims 1 to 14 are implemented.
  17. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至14中任一项所述的方法的步骤。A computer-readable storage medium with a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 14 are implemented.
  18. 一种计算机程序产品,包括计算机程序,其特征在于,该计算机程序被处理器执行时实现权利要求1至14中任一项所述的方法的步骤。 A computer program product, comprising a computer program, characterized in that, when executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 14.
PCT/CN2023/102488 2022-06-27 2023-06-26 Photographing composition method and apparatus, and computer device and storage medium WO2024002022A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210733732.6A CN115022549B (en) 2022-06-27 2022-06-27 Shooting composition method, shooting composition device, computer equipment and storage medium
CN202210733732.6 2022-06-27

Publications (1)

Publication Number Publication Date
WO2024002022A1 true WO2024002022A1 (en) 2024-01-04

Family

ID=83077543

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/102488 WO2024002022A1 (en) 2022-06-27 2023-06-26 Photographing composition method and apparatus, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN115022549B (en)
WO (1) WO2024002022A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022549B (en) * 2022-06-27 2024-04-16 影石创新科技股份有限公司 Shooting composition method, shooting composition device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8400532B2 (en) * 2010-02-01 2013-03-19 Samsung Electronics Co., Ltd. Digital image capturing device providing photographing composition and method thereof
CN104935810A (en) * 2015-05-29 2015-09-23 努比亚技术有限公司 Photographing guiding method and device
CN111367415A (en) * 2020-03-17 2020-07-03 北京明略软件系统有限公司 Equipment control method and device, computer equipment and medium
CN112766191A (en) * 2021-01-25 2021-05-07 睿魔智能科技(深圳)有限公司 Camera view finding method and system
CN115022549A (en) * 2022-06-27 2022-09-06 影石创新科技股份有限公司 Shooting composition method, shooting composition device, computer equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150201124A1 (en) * 2014-01-15 2015-07-16 Samsung Electronics Co., Ltd. Camera system and method for remotely controlling compositions of self-portrait pictures using hand gestures
CN107105093A (en) * 2017-04-18 2017-08-29 广东欧珀移动通信有限公司 Camera control method, device and terminal based on hand track
CN107257439B (en) * 2017-07-26 2019-05-17 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN111652017B (en) * 2019-03-27 2023-06-23 上海铼锶信息技术有限公司 Dynamic gesture recognition method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8400532B2 (en) * 2010-02-01 2013-03-19 Samsung Electronics Co., Ltd. Digital image capturing device providing photographing composition and method thereof
CN104935810A (en) * 2015-05-29 2015-09-23 努比亚技术有限公司 Photographing guiding method and device
CN111367415A (en) * 2020-03-17 2020-07-03 北京明略软件系统有限公司 Equipment control method and device, computer equipment and medium
CN112766191A (en) * 2021-01-25 2021-05-07 睿魔智能科技(深圳)有限公司 Camera view finding method and system
CN115022549A (en) * 2022-06-27 2022-09-06 影石创新科技股份有限公司 Shooting composition method, shooting composition device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN115022549A (en) 2022-09-06
CN115022549B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
TWI677252B (en) Vehicle damage image acquisition method, device, server and terminal device
US10547790B2 (en) Camera area locking
WO2020098076A1 (en) Method and apparatus for positioning tracking target, device, and storage medium
WO2018133666A1 (en) Method and apparatus for tracking video target
US10489917B2 (en) Technique for automatically tracking an object in a defined tracking window by a camera based on identification of an object
CN103916587B (en) For generating the filming apparatus of composograph and using the method for described device
TW201839666A (en) Vehicle loss assessment image obtaining method and apparatus, server and terminal device
CN109299703B (en) Method and device for carrying out statistics on mouse conditions and image acquisition equipment
WO2024002022A1 (en) Photographing composition method and apparatus, and computer device and storage medium
EP3084577A1 (en) Selection and tracking of objects for display partitioning and clustering of video frames
WO2018228413A1 (en) Method and device for capturing target object and video monitoring device
CN110555377B (en) Pedestrian detection and tracking method based on fish eye camera overlooking shooting
CN104243796B (en) Camera, method for imaging, template creating device and template establishment method
WO2023221790A1 (en) Image encoder training method and apparatus, device, and medium
CN115278014B (en) Target tracking method, system, computer equipment and readable medium
CN113362441A (en) Three-dimensional reconstruction method and device, computer equipment and storage medium
WO2023077754A1 (en) Target tracking method and apparatus, and storage medium
CN112524069B (en) Fan and fan head-shaking control method
US11790483B2 (en) Method, apparatus, and device for identifying human body and computer readable storage medium
CN116095462B (en) Visual field tracking point position determining method, device, equipment, medium and product
CN117294831B (en) Time calibration method, time calibration device, computer equipment and storage medium
CN115294508B (en) Focus following method and system based on static space three-dimensional reconstruction and camera system
JP2019185541A (en) Image processing apparatus, image processing method, and program
CN115550552A (en) Image acquisition method and device, computer equipment and storage medium
CN116055898A (en) Recovery terminal camera control system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23830199

Country of ref document: EP

Kind code of ref document: A1