Shooting method, device and storage medium thereof
By switching the shooting mode in response to the target object's gesture, the flexibility of close-up shooting of hand is improved, the problem of insufficient flexibility in the conventional shooting mode is solved, and the user's shooting convenience is improved.
Patent Information
- Application Number
- CN202410096887.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-23
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-01-23
AI Technical Summary
Conventional close-up shooting is less flexible and it is difficult to cope with complex and changeable actual shooting scenes or specific needs of customers.
By obtaining the panoramic image captured by the image acquisition device and responding to the gesture trigger command of the target object, switching the shooting mode to the close-up shooting mode of the hand to achieve flexible close-up shooting of the hand.
It improves the flexibility of close-up shooting of hand, especially in handmade scenes, users can quickly adjust the shooting screen through simple gestures, which improves the user's shooting convenience.
Smart Images

Figure CN118075608B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image communication technology, and in particular to a shooting method, device and storage medium thereof. Background Art
[0002] Vision is one of the most important senses of human beings. The images derived from it are the most commonly used information carriers in human social activities. Image processing and computer vision technology have always been a major direction for in-depth research and development of computer technology. Thanks to the booming development of deep learning technology, image processing and computer vision technology have developed rapidly.
[0003] In the actual production and life process, with the gradual development of deep learning and the continuous expansion of computer vision application fields, terminal equipment can replace professional cameramen to track people and shoot close-up pictures. However, close-up pictures are often implemented based on pre-designed rules, which is difficult to cope with complex and changeable actual shooting scenes or specific needs of customers, resulting in poor flexibility in close-up shooting.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present application is to provide a shooting method, a device and a storage medium thereof, aiming to solve or at least partially solve the technical problem of poor flexibility of conventional close-up shooting.
[0006] To achieve the above object, the present application provides a shooting method, which is applied to close-up shooting of hands, and includes the following steps:
[0007] Acquire a panoramic image captured by an image acquisition device, wherein the image acquisition device is in a tracking shooting mode;
[0008] In response to a shooting mode switching instruction triggered by a gesture of a target object in the panoramic image, the shooting mode of the image acquisition device is controlled to switch to a hand close-up shooting mode.
[0009] Optionally, before the step of responding to the shooting mode switching instruction triggered by the gesture of the target object in the panoramic image, the method further includes:
[0010] determining a hand detection region associated with the target object in the panoramic image;
[0011] If a hand is detected in the hand detection area, a command triggered by the hand gesture is identified.
[0012] Optionally, the step of determining a hand detection area associated with the target object in the panoramic image includes:
[0013] Identifying a human-shaped area corresponding to the target object in the panoramic image;
[0014] The hand detection area is determined according to the area boundary and size of the human-shaped area.
[0015] Optionally, the step of identifying a human-shaped area corresponding to the target object in the panoramic image includes:
[0016] Performing target detection on the panoramic image to obtain multiple target detection frames, wherein the target detection includes: head detection, face detection and body detection;
[0017] The target detection frames are fused to obtain a human-shaped frame, and the area included in the human-shaped frame is determined as the human-shaped area.
[0018] Optionally, the size of the human-shaped area includes a first width, and the step of determining the hand detection area according to the area boundary of the human-shaped area and the first width includes:
[0019] Determine the upper boundary of the human-shaped area as the target upper boundary of the hand detection area;
[0020] Determine a point at a first distance from the upper boundary of the human-shaped area and close to the lower boundary of the human-shaped area as the target lower boundary of the hand detection area, wherein the first distance is a preset first multiple of the first width;
[0021] Determine a second distance from the side boundary of the human-shaped area as a target side boundary of the hand detection area, wherein the second distance is a preset second multiple of the first width;
[0022] The hand detection area is determined according to the target upper boundary, the target lower boundary and the target side boundary.
[0023] Optionally, the step of controlling the shooting mode of the image acquisition device to switch to a hand close-up shooting mode comprises:
[0024] Determining a target offset value of the image acquisition device according to a first position of a target hand in the panoramic image, wherein the target hand is a hand corresponding to a gesture that triggers the shooting mode switching instruction;
[0025] The image acquisition device is controlled to move based on the target offset value, and the captured image is adjusted based on a preset zoom factor so that the target hand is located at the center of the adjusted captured image.
[0026] Optionally, the first position includes: a first center point position of the target hand, and the step of determining the target offset value of the image acquisition device according to the first position of the target hand in the panoramic image includes:
[0027] Determining a target difference value between a second center point position of the panoramic image and the first center point position;
[0028] The target offset value is determined according to the field of view angle of the image acquisition device, the size of the panoramic image, and the target difference value.
[0029] Optionally, after the step of controlling the image acquisition device to move based on the target offset value and adjusting the captured image based on a preset zoom factor so that the target hand is located at the center of the adjusted captured image, the method further includes:
[0030] If the target hand is not detected, then when another hand is detected in the adjusted captured image, the other hand is determined as a new target hand, and the step of determining the target offset value of the image acquisition device is performed based on the first position of the target hand in the panoramic image.
[0031] The present application also provides an electronic device, which includes: a memory, a processor, and a shooting program stored in the memory and executable on the processor, wherein the shooting program is configured to implement the steps of the above-mentioned shooting method.
[0032] The present application also provides a storage medium, which is a computer-readable storage medium. A shooting program is stored on the computer-readable storage medium, and the shooting program is executed by a processor to implement the steps of the above-mentioned shooting method.
[0033] The present application discloses a shooting method, which is applied to hand close-up shooting, by acquiring a panoramic image taken by an image acquisition device, wherein the image acquisition device is in a tracking shooting mode during shooting, and can move according to the movement of a target object to avoid loss of the target object; then, in response to a shooting mode switching instruction triggered by a gesture of the target object in the panoramic image, the shooting mode of the image acquisition device is controlled to switch to a hand close-up shooting mode; when there is a need to shoot a close-up of the hand of the target object, the shooting screen of the image acquisition device can be quickly adjusted through simple gestures, thereby achieving a close-up of the hand, with convenient operation, effectively improving the flexibility of hand close-up shooting, especially hand close-up shooting in hand-made scenes, and improving the convenience of user shooting. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1A schematic diagram of the structure of an electronic device in a hardware operating environment involved in an embodiment of the present application;
[0035] Figure 2 This is a flowchart of a photographing method according to the first embodiment of the present application;
[0036] Figure 3 This is a schematic diagram of a scene of a shooting method according to a second embodiment of the present application;
[0037] Figure 4 This is a flowchart of a photographing method according to a third embodiment of the present application;
[0038] Figure 5 This is a scene diagram of the shooting method involved in the third embodiment of the present application.
[0039] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0040] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0041] In addition, the descriptions of "first", "second", etc. in this application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, "and / or" in the full text includes three solutions. Taking A and / or B as an example, it includes technical solution A, technical solution B, and technical solution that satisfies both A and B; in addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0042] Reference Figure 1 , Figure 1 A schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiment of the present application.
[0043] like Figure 1As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0044] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0045] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and a shooting program.
[0046] exist Figure 1 In the electronic device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present application can be set in the electronic device, and the electronic device calls the shooting program stored in the memory 1005 through the processor 1001, and performs the following operations:
[0047] Acquire a panoramic image captured by an image acquisition device, wherein the image acquisition device is in a tracking shooting mode;
[0048] In response to a shooting mode switching instruction triggered by a gesture of a target object in the panoramic image, the shooting mode of the image acquisition device is controlled to switch to a hand close-up shooting mode.
[0049] Further, the processor 1001 may call a shooting program stored in the memory 1005, and further perform the following operations:
[0050] Before the operation of the shooting mode switching instruction triggered by the gesture of the target object in the panoramic image, the method further includes:
[0051] determining a hand detection region associated with the target object in the panoramic image;
[0052] If a hand is detected in the hand detection area, a command triggered by the hand gesture is identified.
[0053] Further, the operation of determining a hand detection area associated with the target object in the panoramic image includes:
[0054] Identifying a human-shaped area corresponding to the target object in the panoramic image;
[0055] The hand detection area is determined according to the area boundary and size of the human-shaped area.
[0056] Furthermore, the operation of identifying the human-shaped area corresponding to the target object in the panoramic image includes:
[0057] Performing target detection on the panoramic image to obtain multiple target detection frames, wherein the target detection includes: head detection, face detection and body detection;
[0058] The target detection frames are fused to obtain a human-shaped frame, and the area included in the human-shaped frame is determined as the human-shaped area.
[0059] Further, the size of the human-shaped area includes a first width, and the operation of determining the hand detection area according to the area boundary of the human-shaped area and the first width includes:
[0060] Determine the upper boundary of the human-shaped area as the target upper boundary of the hand detection area;
[0061] Determine a point at a first distance from the upper boundary of the human-shaped area and close to the lower boundary of the human-shaped area as the target lower boundary of the hand detection area, wherein the first distance is a preset first multiple of the first width;
[0062] Determine a second distance from the side boundary of the human-shaped area as a target side boundary of the hand detection area, wherein the second distance is a preset second multiple of the first width;
[0063] The hand detection area is determined according to the target upper boundary, the target lower boundary and the target side boundary.
[0064] Furthermore, the operation of controlling the shooting mode of the image acquisition device to switch to the hand close-up shooting mode includes:
[0065] Determining a target offset value of the image acquisition device according to a first position of a target hand in the panoramic image, wherein the target hand is a hand corresponding to a gesture that triggers the shooting mode switching instruction;
[0066] The image acquisition device is controlled to move based on the target offset value, and the captured image is adjusted based on a preset zoom factor so that the target hand is located at the center of the adjusted captured image.
[0067] Further, the first position includes: a first center point position of the target hand, and the operation of determining the target offset value of the image acquisition device according to the first position of the target hand in the panoramic image includes:
[0068] Determining a target difference value between a second center point position of the panoramic image and the first center point position;
[0069] The target offset value is determined according to the field of view angle of the image acquisition device, the size of the panoramic image, and the target difference value.
[0070] Further, the processor 1001 may call a shooting program stored in the memory 1005, and further perform the following operations:
[0071] After the operation of controlling the image acquisition device to move based on the target offset value and adjusting the captured image based on a preset zoom factor so that the target hand is located at the center of the adjusted captured image, the method further includes:
[0072] If the target hand is not detected, then when another hand is detected in the adjusted captured image, the other hand is determined as a new target hand, and an operation of determining the target offset value of the image acquisition device is performed based on the first position of the target hand in the panoramic image.
[0073] Based on the above structure, various embodiments of the shooting method are proposed.
[0074] Reference Figure 2 , Figure 2 This is a flowchart of the first embodiment of the photographing method of the present application.
[0075] In this embodiment, the execution subject of the shooting method may be an electronic device, which may be a local device, such as an image acquisition device, or an additional control device that is connected to the image acquisition device for communication; the electronic device may also be a network device, which is not limited in this embodiment. For the sake of convenience, the following description of each embodiment is omitted. In this embodiment, the shooting method is applied to close-up shooting of hands, and includes the following steps:
[0076] Step S10, acquiring a panoramic image captured by an image acquisition device, wherein the image acquisition device is in a tracking shooting mode;
[0077] In a feasible embodiment, when a user has a shooting demand, a picture is shot through a pre-set image acquisition device, and the shooting mode of the image acquisition device includes a tracking shooting mode; in this mode, the image acquisition device can track the target object in real time to capture the entire picture including the target object; and then obtain the image taken by the image acquisition device in the tracking shooting mode. Since the image acquisition device does not take a close-up shot of the picture in the tracking shooting mode, the image captured in the tracking shooting mode is called a panoramic image.
[0078] Optionally, the image acquisition device may include one or more cameras, and the acquired panoramic image may be an image acquired in real time by the image acquisition device or an image in a video stream acquired in real time, or may be an image acquired in advance by the image acquisition device or a continuous video image acquired in advance.
[0079] Step S20, in response to a shooting mode switching instruction triggered by a gesture of the target object in the panoramic image, controlling the shooting mode of the image acquisition device to switch to a hand close-up shooting mode.
[0080] In a feasible embodiment, the target object within the shooting range of the image acquisition device can switch the shooting mode of the image acquisition device through hand gestures; then, when the gesture made by the hand of the target object is detected, the instruction corresponding to the gesture is identified; then, in response to the instruction triggered by the gesture (i.e., the shooting mode switching instruction), the shooting mode of the image acquisition device is controlled to switch from the tracking shooting mode to the hand close-up shooting mode. In the hand close-up shooting mode, the image acquisition device will adjust the shooting picture to achieve a close-up shot of the hand of the target object, thereby meeting the hand close-up shooting requirements. Specifically, it can meet the hand close-up shooting requirements during hand-made, which refers to the production of items through hand operation using various materials and tools; it can include: embroidery, pottery, carving, paper cutting, woodworking, jade carving, etc., which are not limited in this embodiment.
[0081] Optionally, the gestures of the target object may include: one-hand gestures, two-hand gestures; for example, one hand or two hands gesture the numbers 1 to 9, "thumbs-up", "OK", "heart", "call", "fist", "dislike", etc. The specific settings can be based on different needs and are not limited in this embodiment.
[0082] Optionally, the target object may be a person selected from the panoramic image according to preset conditions; after determining the target object, the image acquisition device always maintains real-time tracking and shooting of the target object; and the target object of the image acquisition device may be changed according to shooting requirements.
[0083] In this embodiment, a panoramic image taken by an image acquisition device is obtained, wherein the image acquisition device is in a tracking shooting mode during shooting and can move according to the movement of the target object to avoid loss of the target object; and then in response to a shooting mode switching instruction triggered by a gesture of the target object in the panoramic image, the shooting mode of the image acquisition device is controlled to switch to a hand close-up shooting mode; when there is a need to shoot a close-up of the hand of the target object, the shooting screen of the image acquisition device can be quickly adjusted through simple gestures, thereby achieving a close-up of the hand, which is easy to operate, effectively improves the flexibility of hand close-up shooting, especially hand close-up shooting in hand-made scenes, and improves the convenience of user shooting.
[0084] Further, based on the above first embodiment, a second embodiment of the shooting method of the present application is proposed. In this embodiment, before the step of responding to the shooting mode switching instruction triggered by the gesture of the target object in the panoramic image in step S20, it also includes:
[0085] Step S11, determining a hand detection area associated with the target object in the panoramic image;
[0086] In a feasible embodiment, when the image acquisition device is in tracking shooting mode and is shooting the target object, in order to realize hand gesture recognition of the target object, at least one hand detection area associated with the target object is determined in the panoramic image to realize hand detection of the target object in the hand detection area. Since there may be multiple objects in the panoramic image, there may be multiple hands and gestures that are not related to the target object during hand detection and gesture recognition; therefore, in order to reduce the amount of calculation for hand detection and gesture recognition, a hand detection area associated with the target object is set in the panoramic image; by only performing hand detection on the image content in this area, the amount of calculation is effectively reduced while ensuring the detection accuracy.
[0087] In a feasible implementation manner, step S11, the step of determining a hand detection area associated with the target object in the panoramic image includes:
[0088] Step S111, identifying a human-shaped area corresponding to the target object in the panoramic image;
[0089] In a feasible embodiment, a human-shaped area corresponding to the target object is identified in the panoramic image, and the human-shaped area may be a rectangle.
[0090] Optionally, when the image acquisition device is in the tracking shooting mode, the first human-shaped areas corresponding to the objects contained in the first frame panoramic image are identified, and then the first human-shaped images in each of the first human-shaped areas are cropped out from the first frame panoramic image; then, each of the first human-shaped images is input into a preset pedestrian re-identification model to obtain the first human-shaped features corresponding to each of them, wherein the human-shaped features corresponding to the target object are the target human-shaped features; and according to the target human-shaped features, the tracking and matching of the target object is achieved. Among them, the tracking and matching of the target object includes: identifying the second human-shaped areas corresponding to the objects contained in the second frame (next frame) panoramic image, and then cropping the second human-shaped images in each of the second human-shaped areas from the second frame panoramic image; then inputting each of the second human-shaped images into a preset pedestrian re-recognition model to obtain the second human-shaped features corresponding to each of them; matching each of the second human-shaped features with the target human-shaped features, which may include: cascade matching and overlap matching, and may also introduce Mahalanobis distance and cosine distance as matching restrictions; obtaining a matching result, and determining the position of the target object in the second frame panoramic image according to the matching result, and adjusting the shooting position of the image acquisition device according to the position to achieve real-time tracking.
[0091] In a feasible implementation manner, step S111, the step of identifying the human-shaped area corresponding to the target object in the panoramic image includes:
[0092] Step A10, performing target detection on the panoramic image to obtain multiple target detection frames, wherein the target detection includes: head detection, face detection and body detection;
[0093] Step A20, fusing the target detection frames to obtain a human-shaped frame, and determining the area included in the human-shaped frame as the human-shaped area.
[0094] In a feasible embodiment, target detection is performed on the panoramic image to obtain multiple target detection frames; the target detection includes: head detection, face detection and body detection; the obtained head detection frame, face detection frame and body detection frame are then fused to obtain a human frame, and the area contained in the human frame is determined as the human area. The fusion method can be implemented by a bipartite graph matching algorithm or a greedy method.
[0095] In this embodiment, through the target detection of human face, human body and human head and the fusion strategy, it is possible to prevent the target object from being missed or misdetected, thereby improving the detection accuracy.
[0096] Step S112: determining the hand detection area according to the area boundary and size of the human-shaped area.
[0097] In a feasible embodiment, after determining the human-shaped area corresponding to the target object, the hand detection area is further determined according to the area boundary and size of the human-shaped area; the area boundary includes: upper boundary, lower boundary and side boundary, the side boundary includes: left boundary and right boundary; the size includes: length and / or width of the human-shaped area. The hand detection area can be a rectangle.
[0098] In a feasible implementation manner, the size of the human-shaped area includes a first width, and step S112, the step of determining the hand detection area according to the area boundary and the size of the human-shaped area includes:
[0099] Step B10, determining the upper boundary of the human-shaped area as the target upper boundary of the hand detection area;
[0100] In a feasible embodiment, since this embodiment is applied to close-up shooting of hands during hand-made production, according to common experience, the hands of the target object will be located near the chest of the target object during hand-made production, and the upper boundary of the human-shaped area is close to the top of the target object's head; therefore, the upper boundary of the human-shaped area is determined as the target upper boundary of the hand detection area.
[0101] Step B20, determining a first distance from the upper boundary of the human-shaped area and close to the lower boundary of the human-shaped area as the target lower boundary of the hand detection area, wherein the first distance is a preset first multiple of the first width;
[0102] In a feasible embodiment, the lower boundary of the human-shaped area close to the upper boundary of the human-shaped area is determined as the target lower boundary of the hand detection area; wherein the first distance is the first width preset as a first multiple. Since the first width is the width of the human-shaped area, which is similar to the shoulder width of the target object, the target lower boundary is determined according to the first width, so that the range where the target object's hand may be when performing hand-made work can be included in the hand detection area; wherein the distance refers to the vertical distance.
[0103] Optionally, if the identified lower boundary of the target exceeds the range of the panoramic image, the lower boundary of the panoramic image is determined as the lower boundary of the target.
[0104] Exemplarily, the first multiple is preset to be twice, and the first distance is twice the first width.
[0105] Step B30, determining a second distance from the side boundary of the human-shaped area as a target side boundary of the hand detection area, wherein the second distance is a preset second multiple of the first width;
[0106] In a feasible embodiment, the side boundary includes: a left boundary and a right boundary, and the target side boundary includes: a target left boundary and a target right boundary. The second distance from the left boundary of the human-shaped area and close to the right boundary of the human-shaped area is determined as the target left boundary of the hand detection area; the second distance from the right boundary of the human-shaped area and close to the left boundary of the human-shaped area is determined as the target right boundary of the hand detection area. Since the left and right movement range of the target object's hand will not exceed the length of its single arm when the target object is making things by hand, the left and right boundaries of the hand detection area can be determined based on the first width that is close to the shoulder width of the target object.
[0107] Optionally, a second side distance from the center point of the human-shaped area may be determined as a target side boundary of the hand detection area.
[0108] Optionally, if the identified side boundary of the target exceeds the range of the panoramic image, the side boundary of the panoramic image is determined as the side boundary of the target.
[0109] Step B40, determining the hand detection area according to the target upper boundary, the target lower boundary and the target side boundary.
[0110] In a feasible embodiment, the hand detection area is a rectangle, and then the hand detection area is framed out according to the target upper boundary, the target lower boundary, the target left boundary and the target right boundary.
[0111] To assist in understanding the above technical solution, a scene diagram of a third embodiment of a specific shooting method is used as an auxiliary explanation below. Figure 3 , obtain a panoramic image 10 including a target object 20 captured by an image acquisition device, identify a human-shaped area 30 corresponding to the target object 20 in the panoramic image 10; determine the hand detection area 40 according to the area boundary and size of the human-shaped area 30; if a hand is detected in the hand detection area 40, further determine the area corresponding to the gesture (gesture area 50), and identify the instruction triggered by the gesture in the gesture area 50; if the triggered instruction is a shooting mode switching instruction, control the shooting mode of the image acquisition device to switch to a hand close-up shooting mode, so that the hand of the target object 20 is located at the center of the adjusted shot image 60.
[0112] In the present embodiment, since the present embodiment is applied to close-up shooting of hands, specifically, close-up shooting of hands during hand-made production; according to common experience, the hands of the target object will be located near the chest of the target object during hand-made production, and the chest range and size of the target object can be determined based on the regional boundary and size of the human-shaped area of the target object; therefore, the hand detection area determined based on the human-shaped area of the target object conforms to the movement range of the hand of the target object during hand-made production, and can effectively reduce the detection calculation amount while ensuring the comprehensiveness of recognition.
[0113] Step S12: if a hand is detected in the hand detection area, identify the instruction triggered by the hand gesture.
[0114] In a feasible embodiment, hand detection is performed in a hand detection area, and if a hand is detected in the hand detection area, the hand gesture is further identified to determine the instruction triggered by the hand gesture.
[0115] Optionally, the local image in the panoramic image that is located in the hand detection area is input into a preset hand detection model to determine whether there is a hand in the hand detection area. Since the hand detection area may include other non-hand objects, such as the arms, chest, shoulders, neck, head, etc. of the target object, when the hand detection model performs hand recognition on the input image, it can output the specific position of the hand detected in the input image; in order to further reduce the amount of calculation during gesture recognition and improve recognition efficiency; then, according to the output result of the hand detection model, a gesture image is cropped from the panoramic image; the gesture image is input into a preset gesture recognition model, and matched with a preset gesture to determine the target gesture that matches the gesture image, and then determine the instruction corresponding to the target gesture.
[0116] It should be understood that gesture recognition of the target object can not only control the switching of the shooting mode of the image acquisition device, but also control, for example, the power on and off of the image acquisition device, or the control of other related devices, such as audio, lighting, etc.
[0117] In this embodiment, by setting a hand detection area associated with the target object in the panoramic image and then performing hand detection only on the image content within the area, the amount of calculation can be effectively reduced and the detection efficiency can be improved while ensuring the detection accuracy.
[0118] Further, based on the above-mentioned first and / or second embodiments, a third embodiment of the photographing method of the present application is proposed. In this embodiment, referring to Figure 4 , step S20, the step of controlling the shooting mode of the image acquisition device to switch to the hand close-up shooting mode comprises:
[0119] Step S21, determining a target offset value of the image acquisition device according to a first position of a target hand in the panoramic image, wherein the target hand is a hand corresponding to a gesture that triggers the shooting mode switching instruction;
[0120] In a feasible embodiment, after the image acquisition device enters the hand close-up shooting mode, the hand of the target object will be used as the central shooting position; then, according to the position (first position) of the target hand corresponding to the gesture that triggers the shooting mode switching instruction in the panoramic image, the target offset value of the image acquisition device is determined, wherein the target offset value includes: a horizontal offset value and a vertical offset value.
[0121] In a feasible implementation manner, the first position includes: a first center point position of the target hand, and step S21, according to the first position of the target hand in the panoramic image, the step of determining the target offset value of the image acquisition device includes:
[0122] Step S211, determining a target difference value between a second center point position of the panoramic image and the first center point position;
[0123] In a feasible embodiment, the coordinate difference (target difference value) between the center point coordinates of the panoramic image (the second center point position) and the center point coordinates of the target hand (the first center point position) is calculated.
[0124] For example, refer to Figure 5 , the target difference value is (D x , D y ), the target difference value calculation formula includes:
[0125] D x =(G x +G w / 2-w / 2)
[0126] D y =(G y +G h / 2-w / 2)
[0127] Among them, D x is the horizontal coordinate difference between the center point of the panoramic image and the center point of the target hand, (G x , G y ) is the upper left corner coordinate of the hand image (i.e., gesture image) corresponding to the target hand, D y is the vertical coordinate difference between the center point of the panoramic image and the center point of the target hand, G w is the width of the hand image, G y is the height of the hand image.
[0128] Step S212: determining the target offset value according to the field of view of the image acquisition device, the size of the panoramic image, and the target difference value.
[0129] In a feasible embodiment, the target offset value includes a horizontal offset value and a vertical offset value, and the calculation formula of the target offset value includes:
[0130] O p =(p+D x / A w ×p a )
[0131] O t =(t+D y / A h ×t a )
[0132] Among them, O p is the horizontal offset value, O t is the vertical offset value, p is the current horizontal offset value of the image acquisition device, t is the current vertical offset value of the image acquisition device, D x is the horizontal coordinate difference between the center point of the panoramic image and the center point of the target hand, D y is the vertical coordinate difference between the center point of the panoramic image and the center point of the target hand, A w is the width of the panoramic image, A h is the height of the panoramic image, p a is the horizontal field of view of the image acquisition device, p t is the vertical field of view of the image acquisition device.
[0133] Step S22, controlling the image acquisition device to move based on the target offset value, and adjusting the captured image based on a preset zoom factor, so that the target hand is located at the center of the adjusted captured image.
[0134] In a feasible embodiment, the image acquisition device is controlled to move based on the calculated target offset value, and the captured image is adjusted based on a preset zoom factor so that the target hand is located at the center position of the adjusted captured image, wherein the center position may include a position within a preset center range in the adjusted captured image.
[0135] Optionally, the preset zoom multiple calculation formula includes:
[0136] O z =(z×A w ×α / G w )
[0137] Among them, O zZoom factor, z is the current zoom factor of the image acquisition device, A w is the width of the panoramic image, α is the ratio of the gesture width to the panoramic image width after zooming (can be set according to user needs), G w is the width of the gesture image in the panoramic image.
[0138] Optionally, after the image acquisition device enters the hand close-up shooting mode, its shooting position can be fixed or can move according to the target hand, that is, to achieve real-time tracking of the target hand, which is not limited in this embodiment.
[0139] Exemplarily, after the image acquisition device enters the hand close-up shooting mode, the close-up image (i.e., the adjusted shot image) shot by the image acquisition device is obtained, and the central area in the close-up image is determined, wherein the central area can be determined according to the pre-set central range parameters. It is determined in real time whether the target hand is in the central area of the close-up image; if so, the current shooting position of the image acquisition device is maintained to avoid the occurrence of image shaking due to frequent hand movements during manual production, and to ensure the stability of the shot; if not, the shooting position of the image acquisition device is adjusted according to the real-time position of the target hand to ensure that the target hand is located in the central area of the close-up image.
[0140] In this embodiment, after the image acquisition device enters the hand close-up shooting mode, the position and focal length of the image acquisition device are automatically adjusted according to the position of the target hand, so that the target hand is located at the center of the adjusted captured image, thereby achieving a close-up of the hands, especially a close-up of the hands during hand-made work, meeting the needs of hand close-up shooting and improving shooting flexibility.
[0141] In a feasible implementation manner, after the step of controlling the image acquisition device to move based on the target offset value and adjusting the captured image based on a preset zoom factor so that the target hand is located at the center position of the adjusted captured image in step S22, the method further includes:
[0142] Step S23, if the target hand is not detected, then when another hand is detected in the adjusted captured image, the other hand is determined as a new target hand, and the step of determining the target offset value of the image acquisition device according to the first position of the target hand in the panoramic image is executed.
[0143] In a feasible embodiment, after the image acquisition device enters the hand close-up shooting mode, it will perform real-time tracking with the target hand as the tracking target to ensure that the target hand is in the center position of the shooting picture, wherein the center position can be a preset range in the shooting picture. During close-up photography of hands, especially during hand-made works, the target hand initially determined may be blocked by other objects; for example, during embroidery, the target object holds the needle with the right hand and makes a gesture with the left hand that can trigger the shooting mode switching command, and then the left hand of the target object is used as the target hand; in the further embroidery process, the target object moves the left hand to other objects (e.g., embroidery, desktop) due to embroidery needs, so that the left hand cannot be recognized in the shooting picture; at this time, if the target hand (left hand) cannot be detected, the current shooting position is maintained within a preset time length; if the target hand (left hand) is still not detected after the preset time length, it is further detected whether there is another hand in the adjusted shot image; if it is detected that there is another hand in the adjusted shot image, the other hand is determined as the new target hand, and the step of determining the target offset value of the image acquisition device according to the first position of the target hand in the panoramic image is performed; so as to meet the demand for close-up photography of hands in handmade scenes and improve shooting flexibility.
[0144] Optionally, when the image acquisition device is in the hand close-up shooting mode, gesture recognition is performed on the close-up image (adjusted shot image) to determine the instruction triggered by the gesture in the close-up image; and then in response to the shooting mode switching instruction triggered by the gesture of the target object in the close-up image, the shooting mode of the image acquisition device is controlled to switch to the tracking shooting mode, or to switch to the default shooting mode according to the instruction. The target object can further adjust the shooting mode of the image acquisition device through gestures to exit the hand close-up shooting mode.
[0145] Optionally, the step of controlling the shooting mode of the image acquisition device to switch to the tracking shooting mode includes: adjusting the captured image of the image acquisition device based on an initial zoom factor, wherein the initial zoom factor may be a preset default zoom factor, or may be the current zoom factor of the image acquisition device before entering the hand close-up shooting mode; for the position movement of the image acquisition device, it may be moved based on an initial offset value, wherein the initial offset value may be the current offset value of the image acquisition device before entering the hand close-up shooting mode; and it may also be readjusted according to the position of the target object.
[0146] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0147] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0148] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A shooting method, characterized in that: The shooting method is applied to close-up shooting of hands during hand-made work, and the method comprises the following steps: Acquire a panoramic image captured by an image acquisition device, wherein the image acquisition device is in a tracking shooting mode; Identifying a human-shaped area corresponding to a target object in the panoramic image; Determine the upper boundary of the human-shaped area as the target upper boundary of the hand detection area; Determine a point at a first distance from the upper boundary of the human-shaped area and close to the lower boundary of the human-shaped area as the target lower boundary of the hand detection area, wherein the first distance is a first width that is a preset first multiple, and the first width is the width of the human-shaped area; Determine a second distance from the side boundary of the human-shaped area as a target side boundary of the hand detection area, wherein the second distance is a preset second multiple of the first width; Determining the hand detection area according to the target upper boundary, the target lower boundary and the target side boundary; If a hand is detected in the hand detection area, identifying a command triggered by the hand gesture; In response to a shooting mode switching instruction triggered by a gesture of a target object in the panoramic image, controlling the shooting mode of the image acquisition device to switch to a hand close-up shooting mode, wherein, in the hand close-up shooting mode, the target hand corresponding to the gesture that triggers the shooting mode switching instruction is located at the center of the captured image; If the target hand is not detected within the preset time, the current shooting position is maintained; or, If the target hand is not detected after exceeding a preset time period, when another hand is detected in the captured image, the other hand is determined as a new target hand.
2. The shooting method according to claim 1, characterized in that: The step of identifying the human-shaped area corresponding to the target object in the panoramic image comprises: Performing target detection on the panoramic image to obtain multiple target detection frames, wherein the target detection includes: head detection, face detection and body detection; The target detection frames are fused to obtain a human-shaped frame, and the area included in the human-shaped frame is determined as the human-shaped area.
3. The shooting method according to claim 1 or 2, characterized in that: The step of controlling the shooting mode of the image acquisition device to switch to a hand close-up shooting mode comprises: Determining a target offset value of the image acquisition device according to a first position of the target hand in the panoramic image; The image acquisition device is controlled to move based on the target offset value, and the captured image is adjusted based on a preset zoom factor so that the target hand is located at the center of the adjusted captured image.
4. The shooting method according to claim 3, characterized in that: The first position includes: the first center point position of the target hand, and the step of determining the target offset value of the image acquisition device according to the first position of the target hand in the panoramic image includes: Determining a target difference value between a second center point position of the panoramic image and the first center point position; The target offset value is determined according to the field of view angle of the image acquisition device, the size of the panoramic image, and the target difference value.
5. An electronic device, characterized in that: The device comprises: a memory, a processor, and a shooting program stored in the memory and executable on the processor, wherein the shooting program is configured to implement the steps of the shooting method according to any one of claims 1 to 4.
6. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a shooting program is stored on the storage medium. When the shooting program is executed by a processor, the steps of the shooting method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Multi-mode fusion intelligent view finding method and device and camera shooting equipment
CN115499580A