Video recording method, device, equipment and storage medium
The video capturing method enables real-time salient object segmentation and merging with the video scene, addressing the limitations of fixed effects in conventional short video creation, thereby enhancing user experience and reducing shooting time.
Patent Information
- Application Number
- JP2023503179
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-09-09
- Filing Date
- 2021-08-30
- Publication Date
- 2024-08-26
- Estimated Expiration
- 2041-08-30
AI Technical Summary
Conventional video shooting technologies for creating short videos limit user experience by allowing only fixed additive effects, resulting in a single and unengaging video creation method.
A video capturing method that allows real-time salient object segmentation on a camera's collection screen, enabling users to select, adjust, and merge segmented objects with the video scene using Simultaneous Localization and Mapping (SLAM) technology, and generate videos in real-time.
Enhances user experience by allowing dynamic video creation with real-time object segmentation and merging, reducing video shooting time and improving the quality of noticeable object segmentation.
Smart Images

Figure 0007540073000002 
Figure 0007540073000007 
Figure 0007540073000009
Abstract
Description
[Technical field]
[0001] This application claims priority to Chinese Patent Application No. 202010937922.0, filed on September 9, 2020, the entire contents of which are incorporated herein by reference as part of this application.
[0002] SUMMARY OF THE DISCLOSURE Embodiments of the present disclosure relate to video capture methods, devices, equipment, and storage media. [Background technology]
[0003] With the development of the Internet, short videos have gradually become more popular among people, and more and more people prefer to shoot short videos and upload them to Internet platforms to share.
[0004] Currently, the realization of creating a short video is to select a preset additive effect, such as a sticker, in a short video shooting application and then create the short video.
[0005] However, the inventor discovered that traditional video shooting has at least one technical problem in that there is only one way to create a short video, and users can only select fixed additive effects to create a short video, resulting in a poor user experience. Summary of the Invention [Problem to be solved by the invention]
[0006] The embodiments of the present disclosure provide a video shooting method, device, equipment, and storage medium, thereby solving the problem that there is a single method for creating short videos, and users can only select fixed additive objects to create short videos, resulting in a poor user experience. [Means for solving the problem]
[0007] In a first aspect, an embodiment of the present disclosure provides a video shooting method, which is applied to a terminal device, and includes: in response to an input event of selecting a segmentation object from a plurality of objects presented on a collection screen of the camera, segmenting the segmentation object to obtain a target segmentation result; displaying the target segmentation result; and in response to a trigger operation of adjusting the target segmentation result, generating a video by fusing the adjusted target segmentation result with a video scene to be fused.
[0008] In a second aspect, an embodiment of the present disclosure provides a video shooting device, including: a first segmentation module used to segment a segmentation object to obtain a target segmentation result in response to an input event of selecting the segmentation object from a plurality of objects presented on a collection screen of a camera of a terminal device; a display module used to display the target segmentation result; and a video generation module used to generate a video by fusing the adjusted target segmentation result with a video scene to be fused in response to a trigger operation of adjusting the target segmentation result.
[0009] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising at least one processor and a memory, the memory storing computer-executable commands, and the at least one processor executing the computer-executable commands stored in the memory, such that the at least one processor performs the video capture method as described in the first aspect above and various possible designs of the first aspect.
[0010] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer-executable commands stored thereon, the computer-readable storage medium realizing a video capture method as set forth in the first aspect above and various possible designs of the first aspect when executed by a processor.
[0011] This embodiment provides a video shooting method, device, equipment, and storage medium, which responds to an input event of selecting a segmentation target from a plurality of objects presented on a camera collection screen, segments the segmentation target to obtain a target segmentation result, displays the target segmentation result, and responds to a trigger operation of adjusting the target segmentation result to fuse the adjusted target segmentation result with a video scene to be merged to generate a video. This embodiment can split the segmentation target in real time during the video shooting process, which can shorten the video shooting time and improve the noticeable object segmentation time in the video shooting process compared with a means of splitting the segmentation target offline, and can also edit the target segmentation result in real time and create a video for the segmented object in real time by fusing the adjusted target segmentation result with the video scene to be merged in response to a trigger operation of adjusting the target segmentation result, thereby providing a new video creation method for the user and improving the user experience.
[0012] In order to more clearly describe the embodiments of the present disclosure or the technical solutions of known technologies, the following briefly introduces drawings that need to be used to describe the embodiments or known technologies, and it is obvious that the drawings described below are some embodiments of the present disclosure, and those skilled in the art can obtain other drawings based on these drawings without requiring creative labor. [Brief description of the drawings]
[0013] [Figure 1] FIG. 1 is an illustration of a known technique for videography. [Diagram 2] FIG. 2 is a flowchart 1 of a video capture method according to an embodiment of the present disclosure. [Diagram 3] FIG. 3 shows a schematic diagram of one of the collection screens of a terminal device. [Figure 4] FIG. 4 shows a schematic diagram of aligning the segmentation object with a preset cursor by moving a terminal device. [Diagram 5]FIG. 5 shows a schematic diagram of aligning a preset cursor with an object to be segmented by moving the position of the preset cursor. [Figure 6] FIG. 6 is a flow chart 2 of a video capture method according to an embodiment of the present disclosure. [Figure 7A] FIG. 7A shows a schematic diagram 1 of division according to a first division model and a second division model. [Figure 7B] FIG. 7B shows a schematic diagram 2 of division according to the first division model and the second division model. [Figure 8] FIG. 8 shows a schematic diagram in which strokes resulting from division are displayed in broken lines. [Figure 9] FIG. 9 shows a schematic diagram in which the strokes of the covered part of the segmentation object are displayed in a dominant display manner, and the strokes of the uncovered part are displayed in a semi-transparent display manner. [Figure 10] FIG. 10 is a flowchart 3 of a video capture method according to an embodiment of the present disclosure. [Figure 11A] FIG. 11A shows a schematic diagram of a user selecting and dragging a target segmentation result onto the collection screen. [Figure 11B] FIG. 11B shows a schematic diagram of a user dragging a portion of a segmentation object that is not covered by other objects. [Figure 12] FIG. 12 is a structural block diagram of a video shooting device according to an embodiment of the present disclosure. [Figure 13] FIG. 13 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] In order to make the objectives, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions of the embodiments of the present disclosure will be described below clearly and completely with reference to the drawings of the embodiments of the present disclosure, and it is obvious that the described embodiments are only some embodiments of the present disclosure, and not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments that a person skilled in the art can obtain without creative labor fall within the scope of protection of the present disclosure.
[0015] Please refer to Fig. 1, which is an example diagram of a video capture of a known technique. In the known technique, performing salient object segmentation on a plurality of objects is to capture a scene including a plurality of objects, and then perform salient object segmentation on the captured image with an image processing algorithm.
[0016] In addition, when a user shoots a short video, the user selects a preset additive effect, such as a sticker, in the short video shooting application and then generates the short video. This short video creation method is single to the user, and the user can only select a fixed additive effect to add to the short video, which is a poor user experience.
[0017] An embodiment of the present disclosure provides a new video creation method that solves the above problems by performing salient object segmentation in real time on the screen collected by the camera, editing the target segmentation objects in real time, and creating short videos for the salient objects segmented and edited in real time.
[0018] Please refer to Fig. 2, which is a flowchart 1 of a video shooting method according to an embodiment of the present disclosure. The method of this embodiment can be applied to a terminal device, and the video shooting method includes the following S201 to S203.
[0019] S201, in response to an input event of selecting a segmentation target from a plurality of objects presented on a collection screen of a camera, the segmentation target is segmented to obtain a target segmentation result.
[0020] In this embodiment, after the terminal device starts the camera, a plurality of objects are presented on the collection screen of the camera, and the user can select one of the plurality of objects as the object to be divided. After the user selects the object to be divided, a step of dividing the object to be divided is performed, thereby obtaining a target division result.
[0021] Optionally, in order to facilitate the user's understanding of the operation steps of the video shooting process of this embodiment, presentation information may be displayed on the shooting interface of the terminal device, thereby prompting the user to input the object to be divided into the terminal device.
[0022] Referring to Fig. 3, Fig. 3 shows a schematic diagram of a collection screen of a terminal device. Illustratively, when a user opens the camera of the terminal device, a prompting word "align with the object, scan, drag and copy" appears on the collection screen, thereby prompting the user to input the divided object into the terminal device and copy the divided object.
[0023] S202, display the target division result.
[0024] Specifically, the target segmentation result is displayed on the collection screen of the camera, and the target segmentation result can be displayed in a different display manner from other objects on the collection screen.
[0025] S203, in response to a trigger operation for adjusting the target segmentation result, a video is generated by fusing the adjusted target segmentation result with a video scene to be merged.
[0026] In this embodiment, the trigger operation for adjusting the target segmentation result includes at least one of shrinking, enlarging, moving, and rotating. Specifically, the user can perform operations such as shrinking, enlarging, moving, and rotating by touching the screen.
[0027] Alternatively, the video scene to be fused may be a real environment captured by a camera, without any restriction on whether the camera is a front camera or a rear camera.
[0028] Specifically, fusing the adjusted target segmentation result with the video scene to be fused may involve placing the target segmentation result in the actual environment captured by the camera through Simultaneous Localization and Mapping (SLAM) technology, i.e., Concurrent Mapping and Localization (CML) technology, and fusing the adjusted target segmentation result with the actual environment captured by the camera.
[0029] In the embodiment of the present disclosure, in response to an input event of selecting a segmentation target from a plurality of objects presented on a collection screen of a camera, the segmentation target is segmented to obtain a target segmentation result, and the target segmentation result is displayed; in response to a trigger operation of adjusting the target segmentation result, the adjusted target segmentation result is merged with a video scene to be merged to generate a video. In the video shooting process, the embodiment can segment the segmentation target in real time, and compared with a means of previously segmenting the segmentation target offline and adding it to a short video as a sticker, the video shooting time can be shortened and the timeliness of the object segmentation in the video shooting process can be improved; and in response to a trigger operation of adjusting the target segmentation result, the adjusted target segmentation result is merged with a video scene to be merged, so that the target segmentation result can be edited in real time and a video can be created for the object segmented in real time, thereby providing a new video creation method for the user and improving the user experience.
[0030] In one embodiment of the present disclosure, based on the embodiment of Figure 2 above, in the process of identifying the object to be divided, in order to facilitate the user to select the desired cut-out area and improve the cut-out accuracy, it is possible to detect whether the screen area in which the object displayed on the collection screen is located includes a preset cursor, and if the screen area in which the object displayed on the collection screen is located includes the preset cursor, the object displayed in the current screen area is identified as the object to be divided.
[0031] Alternatively, the preset cursor can select any area position on the collection screen as the position where the preset cursor is located.
[0032] In an alternative embodiment, the position of the preset cursor may be fixed, and the preset cursor is aligned with the object to be divided by moving the terminal device. Exemplarily, the position of the preset cursor may be fixed as the center position of the display screen of the terminal device. Referring to FIG. 4, FIG. 4 shows a schematic diagram of aligning the object to be divided with the preset cursor by moving the terminal device.
[0033] In another alternative embodiment, the position of the preset cursor may not be fixed, and the preset cursor is aligned with the object to be divided by moving the position of the preset cursor. Refer to FIG. 5, which shows a schematic diagram of aligning the preset cursor with the object to be divided by moving the position of the preset cursor. It should be understood that the box-shaped cursor shown in FIG. 3, FIG. 4 and FIG. 5 is an exemplary illustration, and does not limit the specific display manner of the cursor.
[0034] Based on the embodiment shown in Fig. 5, in order to avoid erroneous recognition, when it is detected that the preset cursor is aligned with the object displayed on the collection screen for more than a preset time, the object aligned with the preset cursor on the collection screen can be identified as the object to be divided. Alternatively, the preset time can be set to 3 to 5 s, and it should be understood that a person skilled in the art can set the preset time based on actual needs, and the present disclosure does not specifically limit it.
[0035] Specifically, the step of detecting whether a predetermined cursor is included in the screen area in which the object displayed on the collection screen is located includes the steps of identifying the coordinate position of the predetermined cursor on the collection screen, identifying the coordinate positions included in the screen area in which the object displayed on the collection screen is located and obtaining a range of coordinate positions, comparing the coordinate position of the predetermined cursor with the range of coordinate positions of the object displayed on the collection screen, and, if the coordinate position of the predetermined cursor is within the range of coordinate positions of the object displayed on the collection screen, identifying that the object currently displayed on the collection screen is the object to be divided.
[0036] For example, when comparing the coordinate position of the preset cursor with the range of coordinate positions of the object displayed on the collection screen, the range of coordinate positions includes an abscissa range and an ordinate range, and the coordinate position of the preset cursor includes an abscissa and an ordinate, it is determined whether the abscissa of the preset cursor is within the abscissa range of the object displayed on the collection screen and whether the ordinate of the preset cursor is within the ordinate range of the object displayed on the collection screen, respectively. If the abscissa of the preset cursor is within the abscissa range of the object displayed on the collection screen and the ordinate of the preset cursor is within the ordinate range of the object displayed on the collection screen, the object currently displayed on the collection screen is identified as a division target.
[0037] Referring to Fig. 6, Fig. 6 is a flow chart 2 of a video shooting method according to an embodiment of the present disclosure. Based on the embodiment shown in Fig. 2, S201 specifically includes the following S601 to S603.
[0038] S601: In response to an input event of selecting a division target from a plurality of objects displayed on a collection screen of a camera, the division target is divided in advance to obtain a division result in advance.
[0039] In this embodiment, the terminal device receives an input event for selecting an object to be divided, the input event includes an object to be divided selected by a user. In response to the input event, the terminal device pre-divides the object to be divided among a plurality of objects displayed on the collection screen of the camera, where the pre-division can be understood as coarse grain division, and the pre-division is intended to quickly divide the object to be divided, and therefore the pre-division may be to divide the rough outline of the object to be divided.
[0040] S602, the division result is displayed in advance.
[0041] In this embodiment, the division result can be displayed in advance on the acquisition screen of the camera, thereby making it easier for the user to check in advance whether the desired division object is included in the division result.
[0042] S603, in response to a trigger operation performed within a display area in which the segmentation result is previously located, the segmentation object is segmented to obtain a target segmentation result.
[0043] In this embodiment, the division of the object to be divided can be understood as fine-grained division, which aims to divide the object to be divided precisely, and therefore the division precision of the target division result is greater than the division precision of the pre-division result.
[0044] When the pre-segmentation result is displayed in step S602, the user can intuitively see the pre-segmentation result, which makes it easy for the user to confirm whether the pre-segmentation result includes the object to be segmented that the user desires. When the user performs a trigger operation within the display area where the pre-segmentation result is located, it indicates that the user has confirmed the pre-segmentation result, and further triggers an operation to perform fine-grained segmentation on the object to be segmented, thereby obtaining a target segmentation result with higher accuracy.
[0045] In this embodiment, the trigger operation for checking the pre-division result may be realized by the user touching the screen, for example, by clicking on the pre-division result, sliding on the display area of the pre-division result, etc., or may be realized in a voice control manner or an air gesture control manner.
[0046] In an embodiment of the present disclosure, in response to an input event of selecting a segmentation object from a plurality of objects presented on a collection screen of a camera, the segmentation object is segmented in advance, a segmentation result is obtained in advance, and the segmentation result is displayed in advance, and in response to a trigger operation performed within a display area in which the segmentation result is located in advance, the segmentation object is segmented to obtain a target segmentation result. Since the segmentation object is segmented in advance, the time-stable nature of the prominent object segmentation is ensured, and then, the segmentation object is finely segmented to obtain a target segmentation result whose segmentation accuracy is greater than that of the pre-segmentation result, thereby ensuring the quality of the prominent object segmentation, thereby achieving both time-stable nature and segmentation quality.
[0047] In one embodiment of the present disclosure, based on the embodiment of FIG. 2 above, the assurance on timeliness and segmentation quality may be realized by different salient object segmentation algorithms.
[0048] Specifically, the step of pre-dividing the object to be divided and obtaining a division result in advance in response to an input event of selecting the object to be divided from a plurality of objects presented on the collection screen of the camera includes the step of pre-dividing the object to be divided based on a first salient object division algorithm in response to an input event of selecting the object to be divided from a plurality of objects presented on the collection screen of the camera and obtaining a division result in advance.
[0049] Specifically, the step of dividing the object to be divided to obtain a target division result in response to a trigger operation performed within the display area in which the division result is previously located includes the step of dividing the object to be divided based on a second salient object division algorithm in response to a trigger operation performed within the display area in which the division result is previously located to obtain a target division result.
[0050] The division speed of the first salient object division algorithm is faster than a preset division speed, and the division accuracy of the first salient object division algorithm is smaller than that of the second salient object division algorithm. The first salient object division algorithm and the second salient object division algorithm may be selected from known salient object division algorithms, and any salient object division algorithm having a division speed faster than a preset division speed can be the first salient object division algorithm, and any salient object division algorithm having a fast division speed and a high division quality can be applied to the embodiments of the present disclosure, and the present disclosure does not limit the specific types of the first salient object division algorithm and the second salient object division algorithm.
[0051] Optionally, in this embodiment, the pre-set segmentation speed may be specified based on an average of segmentation speeds achievable by known salient object segmentation methods.
[0052] In another embodiment of the present disclosure, based on the embodiment of FIG. 2 above, the assurance on aging and splitting quality may be further realized by a model obtained by training a neural network.
[0053] Referring to FIG. 7A, FIG. 7A shows a schematic diagram 1 of division according to a first division model and a second division model.
[0054] Specifically, the step of pre-dividing the object to be divided and obtaining a division result in advance in response to an input event of selecting the object to be divided from a plurality of objects presented on the collection screen of the camera includes the step of pre-dividing the object to be divided based on a first division model in response to an input event of selecting the object to be divided from a plurality of objects presented on the collection screen of the camera and obtaining a division result in advance, the first division model being obtained by training a neural network based on a plurality of training images, each training image including a plurality of objects, and the plurality of objects in the training images may be any objects.
[0055] Specifically, the step of dividing the segmentation object to obtain a target segmentation result in response to a trigger operation performed within the display area in which the segmentation result is previously located includes the step of dividing the segmentation object to obtain a target segmentation result in response to a trigger operation performed within the display area in which the segmentation result is previously located, and dividing the segmentation object based on a second segmentation model to obtain the target segmentation result, where the second segmentation model is obtained by training a neural network based on a plurality of training images, and each training image includes a plurality of objects.
[0056] The division speed of the first division model is faster than a preset division speed, and the division accuracy of the first division model is smaller than that of the second division model.
[0057] In this embodiment, the pre-set segmentation speed may also be specified based on an average value of segmentation speeds achievable by known salient object segmentation methods.
[0058] Optionally, in order to improve the segmentation speed of the second segmentation model, the second segmentation model may further perform secondary segmentation based on the pre-segmentation result. Referring to FIG. 7B, FIG. 7B shows a schematic diagram 2 of segmentation by the first segmentation model and the second segmentation model. Specifically, the method includes the steps of: in response to an input event of selecting a segmentation object from a plurality of objects presented on the collection screen of the camera, segmenting the segmentation object based on the first segmentation model in advance to obtain a pre-segmentation result; and in response to a trigger operation performed in the display area where the pre-segmentation result is located, performing re-segmentation on the pre-segmentation result based on the second segmentation model based on the pre-segmentation result to obtain a target segmentation result.
[0059] In an embodiment of the present disclosure, the step of displaying the segmentation result in advance includes the steps of performing a stroke on the segmentation result in advance, and displaying the stroke of the segmentation result in advance.
[0060] Alternatively, the strokes may be displayed in different forms, such as colored lines, dashed lines, solid lines, etc., and the present disclosure does not particularly limit this. Referring to Fig. 8, Fig. 8 shows a schematic diagram of a stroke that is a result of pre-segmentation and is displayed in dashed lines.
[0061] Specifically, the step of displaying strokes of the division result in advance includes a step of, when a part of the object to be divided is covered by an object other than the object to be divided, displaying strokes of the covered part of the object to be divided in a first display state and displaying strokes of the uncovered part of the object to be divided in a second display state, and the display attributes of the first display state and the second display state are different.
[0062] In this embodiment, the display attributes include dominant display, semi-transparent display and transparent display, the display attribute of the first display state can be any display attribute among the display attributes, and the display attribute of the second display state can also be any display attribute among the display attributes, as long as the display attributes of the first display state and the second display state are different.
[0063] Exemplarily, the first display state may be a semi-transparent display state, and the second display state may be a dominant display state. Referring to Fig. 9, Fig. 9 shows a schematic diagram in which the strokes of the covered part of the segmentation object are displayed in a dominant display manner, and the strokes of the uncovered part are displayed in a semi-transparent display manner.
[0064] Optionally, after detecting the contour boundary of the object to be segmented and displaying the contour boundary in the form of a stroke, the method of the present embodiment may further include a step of detecting whether the contour boundary is stable, and a step of performing a stability process on the contour boundary if the contour boundary is not stable. Whether the contour boundary is stable may be determined by whether there is blinking in the stroke and a phenomenon such as jumping between multiple objects. In the pre-segmentation process, the pre-segmentation process is performed in real time, and if there is no blinking in the stroke and no jumping between multiple objects, the contour boundary is deemed to be stable. The stability process on the contour boundary may be realized by the segmentation time of a prominent object segmentation algorithm, that is, if the contour boundary of the pre-segmentation result is not stable, the user may not check the pre-segmentation result, but may check the pre-segmentation result after the contour boundary of the pre-segmentation result becomes stable.
[0065] The embodiment of the present disclosure performs a stroke on the division result in advance and displays the stroke of the division result in advance, thereby making it easier for the user to confirm in advance whether the division result matches the expected division effect.
[0066] 10, which is a flowchart 3 of a video shooting method according to an embodiment of the present disclosure. In this embodiment, based on any of the above embodiments, S203 includes the following S1001 to S1003.
[0067] S1001: When a trigger operation is detected for a display area in which the target division result is located, it is detected whether or not there is a plane in the actual environment within the field of view of the camera, the distance between which is within a first preset distance range from the camera.
[0068] In this embodiment, the plane to be detected is the plane used to place the target segmentation result, which may be any plane in the collection screen, such as any plane in space, such as a wall, a table surface, the ground, the surface of a cabinet, etc.
[0069] For example, if the first preset distance is 5 meters, this step detects a plane within the viewing range of the camera of the terminal device, the plane being located at a distance of 5 meters or less from the camera.
[0070] S1002, if a plane exists in the actual environment and the distance between the plane and the camera is within a first preset distance range, the target segmentation result is placed on the plane.
[0071] For example, if a plane that can be used to place the target segmentation result is detected within a field of view of a camera at a distance of 5 meters, the target segmentation result is directly placed on the detected plane.
[0072] Optionally, when the target division result is placed on the detected plane, the contact surface shadow between the target division result and the plane can be displayed, thereby obtaining a better display effect. Regarding how to display the contact surface shadow, refer to the introduction of known techniques, and a detailed introduction is not provided here.
[0073] S1003: If there is no plane in the actual environment whose distance from the camera is within a first preset distance range, the target division result is placed in space, and the distance between the placement position in space and the camera is set to a second preset distance.
[0074] For example, if the second preset distance is 0.5 meters, if this step does not detect a plane that can be used to place the target segmentation result within the field of view of the camera at a distance of 5 meters, the target segmentation result is directly placed in the space at a distance of 0.5 meters from the camera, where the specific placement position is not limited as long as the placement position meets the condition that the distance from the shooting member is 0.5 meters.
[0075] As should be understood, there is no restriction on the order in which steps S1002 and S1003 are performed.
[0076] In one embodiment of the present disclosure, after a step of obtaining a target segmentation result by segmenting the object to be segmented in response to a trigger operation performed within a display area in which the segmentation result is previously located, the method of the present embodiment further includes a step of, when detecting a trigger operation by a user on the display area in which the target segmentation result is located, determining that the user has confirmed the target segmentation result, and detecting whether or not there is a plane in the actual environment within the field of view of the camera, the distance between which is within a first preset distance range from the camera.
[0077] In this embodiment, the trigger operation performed in the display area in which the division result is located may be triggered by the user touching the screen, or may be triggered by the user's air gesture operation.
[0078] Specifically, the trigger operation by the user on the display area in which the target division result is located includes an operation of dragging the target division result for a preset time and then releasing the target division result.
[0079] For example, when a user selects a target segmentation result on the collection screen and drags the target segmentation result, it is deemed that the user has confirmed that he or she has reviewed the target segmentation result and intends to perform an operation to blend the target segmentation result with the actual scene captured by the camera.
[0080] Refer to FIG. 11A, which shows a schematic diagram of a user selecting and dragging a target segmentation result onto a collection screen.
[0081] In one situation of this embodiment, when a part of the segmentation object is covered by other objects other than the segmentation object, the user needs to drag the area corresponding to the part of the segmentation object that is not covered by other objects, and it is deemed that the user has confirmed that he / she has checked the target segmentation result and intends to perform an operation of fusing the target segmentation result with the video scene to be merged. As can be seen, when the user drags the segmentation object corresponding to the dominant display part, it is deemed that the user has confirmed that he / she has checked the target segmentation result and intends to perform an operation of fusing the target segmentation result with the video scene to be merged.
[0082] Please refer to FIG. 11B, which shows a schematic diagram of a user dragging a portion of a segmentation object that is not covered by other objects.
[0083] Optionally, in the process of dragging the target division result, the user can adjust the placement angle of the target division result by performing operations such as rotating, scaling, and moving on the target division result, and adjust the target angle to match the detected plane angle. After the user releases his / her finger, the adjusted target division result is placed on the detected plane.
[0084] In the embodiment of the present disclosure, when a user detects an operation of releasing the target segmentation result after dragging the target segmentation result for a preset time, it is deemed that the user has confirmed the target segmentation result, and starts to perform an operation of fusing the target segmentation result with the video scene to be fused, thereby completing the step of the user confirming the target segmentation result and the step of placing the target segmentation result in the actual environment collected by the camera in one operation step, simplifying the user's operation, shortening the entire time of the video shooting process, and achieving the effect of improving the efficiency of video shooting and the efficiency of user operation, and further improving the user experience.
[0085] In one embodiment of the present disclosure, before the step of segmenting the segmentation object to obtain a target segmentation result in response to an input event of selecting a segmentation object from a plurality of objects presented on the collection screen of the camera, the method of this embodiment further includes a step of collecting a screen of the segmentation process of the segmentation object in response to a trigger operation of the shooting function, where the screen includes an actual environment captured by the camera, and correspondingly, in response to a trigger operation of adjusting the target segmentation result, the step of generating a video by fusing the adjusted target segmentation result with the video scene to be fused includes a step of generating a video based on the screen of the segmentation process of the segmentation object.
[0086] In this embodiment, the trigger operation of the photographing function may be understood as triggering the photographing function when the terminal device activates the camera and enters the collection screen, and the camera photographs the entire segmentation process and the process of the user adjusting the target segmentation object and fusing the adjusted target segmentation object with the video scene to be merged, and generates a video. For example, continue to refer to FIG. 9, under the state of the rear camera, the object collected by the camera includes a cat and a person, the person is the object to be segmented, and the entire process of segmenting the person and adjusting the person is photographed and generated a video.
[0087] In this embodiment, the trigger operation of the photographing function of the terminal device may be a touch operation on the photographing button (the circular icon at the bottom of the collection screen in Figures 3, 4, 5, 8, 9, 11A, and 11B) on the collection screen.
[0088] Specifically, the user may trigger the shooting function of the terminal device by clicking a shooting button on the collection screen, the user may trigger the shooting function of the terminal device by voice control, or the user may trigger the shooting function of the terminal device by air gesture operation.
[0089] In another embodiment of the present disclosure, the step of generating a video by fusing the adjusted target segmentation result with the actual environment captured by the camera in response to a trigger operation to adjust the target segmentation result includes a step of generating a video based on the adjusted target segmentation result and a video scene to be fused in response to a trigger operation of a shooting function and a trigger operation to adjust the target segmentation result, where the video scene to be fused is a video scene other than the actual environment captured by the camera.
[0090] In this embodiment, when the user triggers the shooting function, the terminal device generates a video based on the target segmentation result, that is, the screen of the cut-out segmented object. The trigger operation of the shooting function may be understood as the terminal device starts the camera and enters the collection screen, does not trigger the shooting function, segments the target segmentation result, and triggers the shooting function after the user adjusts the target segmentation result, and merges the adjusted target segmentation result with the video scene to be merged, and generates a video. For example, continue to refer to FIG. 9, under the state of the rear camera, the object collected by the camera includes a cat and a person, and the person is the segmentation object, and after the person is segmented, the camera may be the front camera, and the screen captured by the front camera may be merged with the person.
[0091] Corresponding to the video shooting method of the above embodiment, FIG. 12 is a structural block diagram of a video shooting device according to an embodiment of the present disclosure. For ease of explanation, only parts related to the embodiment of the present disclosure are shown. As shown in FIG. 12, the device includes a segmentation module 120, a display module 121 and a fusion module 122, the segmentation module 120 is used to segment a segmentation object to obtain a target segmentation result in response to an input event of selecting a segmentation object from a plurality of objects presented on a collection screen of a camera of a terminal device, the display module 121 is used to display the target segmentation result, and the fusion module 122 is used to generate a video by fusing the adjusted target segmentation result with the video scene to be fused in response to a trigger operation of adjusting the target segmentation result.
[0092] In one embodiment of the present disclosure, the device further includes an identification module 123, which is used to identify an object displayed on the collection screen as a segmentation target when a screen area in which the object is located includes a pre-defined cursor.
[0093] In one embodiment of the present disclosure, the segmentation module 120 is specifically used for pre-segmenting the segmentation object in response to an input event of selecting a segmentation object from multiple objects presented on the camera's collection screen, obtaining a pre-segmentation result, and displaying the pre-segmentation result; and for segmenting the segmentation object in response to a trigger operation performed within the display area where the pre-segmentation result is located, obtaining a target segmentation result.
[0094] In one embodiment of the present disclosure, the segmentation module 120 is specifically used to pre-segment the segmentation object based on a first segmentation model to obtain a pre-segmentation result in response to an input event of selecting a segmentation object from a plurality of objects presented on the collection screen of the camera, the first segmentation model being obtained by training a neural network based on a plurality of training images, each training image including a plurality of objects; and to segment the segmentation object to obtain a target segmentation result in response to a trigger operation performed within a display area where the pre-segmentation result is located, and to segment the segmentation object based on a second segmentation model to obtain a target segmentation result, the second segmentation model being obtained by training a neural network based on a plurality of training images, each training image including a plurality of objects, a segmentation speed of the first segmentation model is faster than a pre-set segmentation speed, and a segmentation accuracy of the first segmentation model is smaller than that of the second segmentation model.
[0095] In one embodiment of the present disclosure, the display module 121 is specifically used for performing strokes on the pre-segmentation result and displaying the strokes of the pre-segmentation result.
[0096] In one embodiment of the present disclosure, the display module 121 is specifically used for displaying strokes of the covered part of the object to be divided in a first display state and displaying strokes of the uncovered part of the object to be divided in a second display state when a part of the object to be divided is covered by an object other than the object to be divided, and the display attributes of the first display state and the second display state are different.
[0097] In one embodiment of the present disclosure, the first display state is a translucent display state and the second display state is a dominant display state.
[0098] In one embodiment of the present disclosure, the fusion module 122 is specifically used for detecting whether or not there is a plane in the actual environment within the field of view of the camera, the distance from which is within a first preset distance range from the camera, when a trigger operation is detected for a display area in which the target segmentation result is located; if there is a plane in the actual environment, the distance from which is within the first preset distance range from the camera, placing the target segmentation result on the plane; and if there is no plane in the actual environment, the distance from which is within the first preset distance range from the camera, placing the target segmentation result in space, wherein the distance between the placement position in the space and the camera is set to a second preset distance.
[0099] In one embodiment of the present disclosure, the identification module 123 is further used for performing a step of, when detecting a trigger operation by a user on a display area in which the target division result is located, determining that the user has confirmed the target division result, and detecting whether there is a plane in the actual environment within the field of view of the camera, the distance between which is within a first preset distance range from the camera.
[0100] In one embodiment of the present disclosure, the trigger operation by the user on the display area in which the target division result is located includes an operation of dragging the target division result for a preset time and then releasing the target division result.
[0101] In one embodiment of the present disclosure, the device further includes an acquisition module 124, which is used for acquiring a screen during the segmentation process of the segmentation object in response to a trigger operation of a shooting function, where the screen includes an actual environment captured by the camera, and the fusion module 123 is specifically used for generating the video based on the screen during the segmentation process of the segmentation object.
[0102] In one embodiment of the present disclosure, the fusion module 123 is specifically used to generate the video based on the adjusted target segmentation result and a video scene to be fused in response to a trigger operation of a shooting function and a trigger operation of adjusting the target segmentation result, where the video scene to be fused is a video scene other than the actual environment captured by the camera.
[0103] In one embodiment of the present disclosure, the trigger operation for adjusting the target segmentation result includes at least one of shrinking, enlarging, moving, and rotating.
[0104] The video shooting device of this embodiment can be used to implement the technical solutions of the above method embodiments, and the realization principles and technical effects are similar, so this embodiment will not be described repeatedly here.
[0105] Referring to FIG. 13, a structural schematic diagram of an electronic device 130 for implementing an embodiment of the present disclosure is shown, and the electronic device 130 may be a terminal device or a server. The terminal device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (abbreviated as PDA), a tablet PC (abbreviated as Portable Android Device, PAD), a portable multimedia player (abbreviated as PMP), an in-vehicle terminal (e.g., an in-vehicle navigation terminal), and a fixed terminal such as a digital TV and a desk-type computer. The electronic device shown in FIG. 13 is merely an example, and should not impose any limitations on the functions and scope of use of the embodiment of the present disclosure.
[0106] As shown in Fig. 13, the electronic device 130 may include a processing unit (e.g., a central processor, a graphic processor, etc.) 131, which can execute various appropriate operations and processes based on programs stored in a read only memory (ROM) 132 or programs loaded from a storage device 138 into a random access memory (RAM) 133. The RAM 133 further stores various programs and data necessary for the operation of the electronic device 130. The processing unit 131, the ROM 132, and the RAM 133 are connected to each other via a bus 134. An input / output (I / O) interface 135 is also connected to the bus 134.
[0107] Typically, input devices 136 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyro, etc., output devices 137 including, for example, a liquid crystal display (LCD), a speaker, an oscillator, etc., storage devices 138 including, for example, a tape, a hard disk, etc., and communication devices 139 may be connected to the I / O interface 135. The communication devices 139 may allow the electronic device 130 to communicate wirelessly or wired with other devices to exchange data. Although the electronic device 130 is shown in FIG. 13 with various devices, it should be understood that it is not required to implement or include all the devices shown. Alternatively, more or fewer devices may be implemented or included.
[0108] In particular, according to the embodiment of the present disclosure, the above process described with reference to the flowchart may be implemented as a computer software program. For example, the embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network by the communication device 139, or installed from the storage device 138, or installed from the ROM 132. When the computer program is executed by the processing device 131, it performs the above-mentioned functions limited to the method of the embodiment of the present disclosure.
[0109] It should be noted that the above computer readable medium of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the above. The computer readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer readable storage medium may include, but are not limited to, an electrical connection having one or more conductors, a portable computer magnetic disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in combination with a command execution system, apparatus, or device. In the present disclosure, the computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which has computer readable program code. Such a propagated data signal may take a number of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may transmit, propagate, or transmit a program for use by or in connection with a command execution system, apparatus, or device. The program code contained in the computer readable medium may be transmitted by any suitable medium, including, but not limited to, wire, cable, RF (radio frequency), etc., or any suitable combination of the above.
[0110] The computer-readable medium may be included in the electronic device, or may exist separately and not be assembled into the electronic device.
[0111] One or more programs are loaded on the computer-readable medium, and when the one or more programs are executed by the electronic device, the electronic device performs the method shown in the above embodiments.
[0112] Computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages or combinations thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and also including conventional procedural programming languages such as "C" or similar. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the context of a remote computer, the remote computer may be connected to the user's computer via any network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).
[0113] The flowcharts and block diagrams in the drawings show possible organizational structures, functions and operations of the systems, methods and computer program products according to the embodiments of the present disclosure. In this regard, each box in the flowcharts or block diagrams may represent a module, program segment or part of code, which includes one or more executable commands for implementing a specified logical function. It should be noted that in some alternative implementations, the functions depicted in the boxes may occur in a different order than depicted in the drawings. For example, two consecutive boxes may actually be essentially executed in parallel, but may also be executed in the opposite order in some cases, as determined by the functions involved. It should be noted that each box in the block diagrams and / or flowcharts, and combinations of boxes in the block diagrams and / or flowcharts may be implemented in a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer commands.
[0114] The units related to the embodiments of the present disclosure may be implemented in a software manner or a hardware manner, and the names of the units may not constitute limitations on the units themselves in some circumstances, for example, the first acquiring unit may be further described as "a unit for acquiring at least two Internet Protocol addresses".
[0115] The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that may be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), etc.
[0116] In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain or store a program used by or in combination with a command execution system, device, or appliance. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or appliance, or any suitable combination of the above. More specific examples of machine-readable storage media include one or more wire-based electrical connections, portable computer disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0117] In a first aspect, according to one or more embodiments of the present disclosure, a video shooting method is provided, applied to a terminal device, the terminal device including a camera, the method including: in response to an input event of selecting a segmentation object from a plurality of objects presented on a collection screen of the camera, segmenting the segmentation object to obtain a target segmentation result; displaying the target segmentation result; and in response to a trigger operation of adjusting the target segmentation result, generating a video by fusing the adjusted target segmentation result with a video scene to be fused.
[0118] According to one or more embodiments of the present disclosure, prior to the step of dividing a segmentation object to obtain a target segmentation result in response to an input event of selecting the segmentation object from a plurality of objects presented on the collection screen of the camera, the method further includes a step of identifying the object as the segmentation object when a screen area in which the object displayed on the collection screen is located includes a preset cursor.
[0119] According to one or more embodiments of the present disclosure, the step of dividing the object to be divided to obtain a target division result in response to an input event of selecting the object to be divided from a plurality of objects presented on the collection screen of the camera includes the steps of: dividing the object to be divided in advance to obtain a division result in advance in response to an input event of selecting the object to be divided from a plurality of objects presented on the collection screen of the camera; displaying the division result in advance; and dividing the object to be divided in response to a trigger operation performed within a display area in which the division result in advance is located to obtain the target division result.
[0120] According to one or more embodiments of the present disclosure, the step of pre-dividing the segmentation object in response to an input event of selecting a segmentation object from a plurality of objects presented on the collection screen of the camera and obtaining a pre-segmentation result includes the step of pre-dividing the segmentation object based on a first segmentation model in response to an input event of selecting a segmentation object from a plurality of objects presented on the collection screen of the camera and obtaining a pre-segmentation result, the first segmentation model being obtained by training a neural network based on a plurality of training images, each training image including a plurality of objects; the step of dividing the segmentation object in response to a trigger operation performed in a display area in which the pre-segmentation result is located in response to a trigger operation performed in a display area in which the pre-segmentation result is located in response to a trigger operation performed in the display area in which the pre-segmentation result is located in response to a trigger operation performed in the display area in which the pre-segmentation result is located in response to a second segmentation model to obtain a target segmentation result, the second segmentation model being obtained by training a neural network based on a plurality of training images, each training image including a plurality of objects, a segmentation speed of the first segmentation model is faster than a preset segmentation speed, and a segmentation accuracy of the first segmentation model is smaller than that of the second segmentation model.
[0121] According to one or more embodiments of the present disclosure, the step of displaying the pre-segmented result includes the steps of: performing a stroke on the pre-segmented result; and displaying the stroke of the pre-segmented result.
[0122] According to one or more embodiments of the present disclosure, the step of displaying the strokes of the pre-division result includes, when a portion of the object to be divided is covered by an object other than the object to be divided, displaying the strokes of the covered portion of the object to be divided in a first display state and displaying the strokes of the uncovered portion of the object to be divided in a second display state, wherein the display attributes of the first display state and the second display state are different.
[0123] According to one or more embodiments of the present disclosure, the first display state is a semi-transparent display state and the second display state is a dominant display state.
[0124] According to one or more embodiments of the present disclosure, the method further includes placing the target segmentation result in a real environment.
[0125] According to one or more embodiments of the present disclosure, the step of generating a video by fusing the adjusted target segmentation result with a video scene to be fused in response to a trigger operation for adjusting the target segmentation result includes the steps of: detecting whether or not a plane exists in the actual environment within the field of view of the camera, the distance from which is within a first preset distance range from the camera, when a trigger operation is detected for a display area in which the target segmentation result is located; placing the target segmentation result on the plane, if a plane exists in the actual environment, the distance from which is within the first preset distance range from the camera; and placing the target segmentation result in space, if a plane exists in the actual environment, the distance from which is within the first preset distance range from the camera, wherein the distance between the placement position in the space and the camera is a second preset distance.
[0126] According to one or more embodiments of the present disclosure, after the step of dividing the object to be divided in response to a trigger operation performed within a display area in which the pre-divided segmentation result is located, to obtain the target segmentation result, the method further includes a step of, when a trigger operation by a user on the display area in which the target segmentation result is located is detected, determining that the user has confirmed the target segmentation result, and detecting whether or not there is a plane in the actual environment within the field of view of the camera, the distance between which is within a first preset distance range from the camera.
[0127] According to one or more embodiments of the present disclosure, the trigger operation by the user on the display area in which the target division result is located includes an operation of releasing the target division result after dragging the target division result for a preset time.
[0128] According to one or more embodiments of the present disclosure, before the step of segmenting the segmentation object to obtain a target segmentation result in response to an input event of selecting the segmentation object from a plurality of objects presented on the collection screen of the camera, the method further includes a step of collecting a screen of the segmentation process of the segmentation object in response to a trigger operation of a shooting function, the screen including an actual environment captured by the camera, and a step of generating a video by fusing the adjusted target segmentation result with a video scene to be fused in response to a trigger operation of adjusting the target segmentation result includes a step of generating the video based on the screen of the segmentation process of the segmentation object.
[0129] According to one or more embodiments of the present disclosure, the step of generating a video by fusing the adjusted target segmentation result with the actual environment captured by the camera in response to a trigger operation to adjust the target segmentation result includes a step of generating the video based on the adjusted target segmentation result and a video scene to be fused in response to a trigger operation of a shooting function and a trigger operation to adjust the target segmentation result, wherein the video scene to be fused is a video scene other than the actual environment captured by the camera.
[0130] According to one or more embodiments of the present disclosure, the trigger operation for adjusting the target segmentation result includes at least one of shrinking, enlarging, moving, and rotating.
[0131] In a second aspect, according to one or more embodiments of the present disclosure, a video shooting device is provided, including: a segmentation module, adapted to segment a segmentation object to obtain a target segmentation result in response to an input event of selecting the segmentation object from a plurality of objects presented on a collection screen of a camera of a terminal device; a display module, adapted to display the target segmentation result; and a fusion module, adapted to generate a video by fusing the adjusted target segmentation result with a video scene to be fused in response to a trigger operation of adjusting the target segmentation result.
[0132] According to one or more embodiments of the present disclosure, the device further includes an identification module used to identify an object displayed on the collection screen as a segmentation target when a screen area in which the object is located includes a pre-defined cursor.
[0133] According to one or more embodiments of the present disclosure, the segmentation module is specifically used for pre-segmenting the segmentation object in response to an input event of selecting a segmentation object from a plurality of objects presented on the collection screen of the camera, obtaining a pre-segmentation result, and displaying the pre-segmentation result, and for segmenting the segmentation object in response to a trigger operation performed within a display area where the pre-segmentation result is located, obtaining a target segmentation result.
[0134] According to one or more embodiments of the present disclosure, the segmentation module is specifically used to pre-segment the segmentation object based on a first segmentation model in response to an input event of selecting a segmentation object from a plurality of objects presented on the collection screen of the camera, the first segmentation model being obtained by training a neural network based on a plurality of training images, each training image including a plurality of objects; and to segment the segmentation object to obtain a target segmentation result in response to a trigger operation performed within a display area in which the pre-segmentation result is located, and to segment the segmentation object based on a second segmentation model to obtain a target segmentation result, the second segmentation model being obtained by training a neural network based on a plurality of training images, each training image including a plurality of objects, a segmentation speed of the first segmentation model is faster than a preset segmentation speed, and a segmentation accuracy of the first segmentation model is smaller than that of the second segmentation model.
[0135] According to one or more embodiments of the present disclosure, a display module is specifically used for performing a stroke on the pre-segmentation result and displaying the stroke of the pre-segmentation result.
[0136] According to one or more embodiments of the present disclosure, the display module is specifically used for, when a portion of the object to be divided is covered by an object other than the object to be divided, displaying strokes of the covered portion of the object to be divided in a first display state and displaying strokes of the uncovered portion of the object to be divided in a second display state, and the display attributes of the first display state and the second display state are different.
[0137] According to one or more embodiments of the present disclosure, the first display state is a semi-transparent display state and the second display state is a dominant display state.
[0138] According to one or more embodiments of the present disclosure, the fusion module is specifically used for, when detecting a trigger operation on a display area in which the target segmentation result is located, detecting whether or not there is a plane in the actual environment within the field of view of the camera, the distance between which is within a first preset distance range from the camera; if there is a plane in the actual environment, the distance between which is within the first preset distance range from the camera, placing the target segmentation result on the plane; and if there is no plane in the actual environment, the distance between which is within the first preset distance range from the camera, placing the target segmentation result in space, wherein the distance between the placement position in the space and the camera is a second preset distance.
[0139] According to one or more embodiments of the present disclosure, the identification module is further used for performing a step of, when detecting a trigger operation by a user on a display area in which the target division result is located, determining that the user has confirmed the target division result, and detecting whether there is a plane in the actual environment within the field of view of the camera, the distance between which is within a first preset distance range from the camera.
[0140] According to one or more embodiments of the present disclosure, the trigger operation by the user on the display area in which the target division result is located includes an operation of releasing the target division result after dragging the target division result for a preset time.
[0141] According to one or more embodiments of the present disclosure, the apparatus further includes a collection module, which is used for collecting a screen during the division process of the division object in response to a trigger operation of a shooting function, the screen including an actual environment captured by the camera, and a fusion module, which is specifically used for generating the video based on the screen during the division process of the division object.
[0142] According to one or more embodiments of the present disclosure, the fusion module is specifically used for generating the video based on the adjusted target segmentation result and a video scene to be fused in response to a trigger operation of a shooting function and a trigger operation of adjusting the target segmentation result, where the video scene to be fused is a video scene other than the actual environment captured by the camera.
[0143] According to one or more embodiments of the present disclosure, the trigger operation for adjusting the target segmentation result includes at least one of shrinking, enlarging, moving, and rotating.
[0144] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device comprising at least one processor and a memory, the memory storing computer-executable commands, the at least one processor executing the computer-executable commands stored in the memory, such that the at least one processor performs a method according to the first aspect above and various possible designs of the first aspect.
[0145] In a fourth aspect, according to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium having computer-executable instructions stored thereon, the computer-executable instructions, when executed by a processor, realizing a method according to the first aspect above and various possible designs of the first aspect.
[0146] The above description is merely a description of the possible embodiments of the present disclosure and the technical principles used. As should be understood by those skilled in the art, the disclosure scope of the present disclosure is not limited to the technical solutions based on the specific combination of the above technical features, but should also include other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the idea of the above disclosure. For example, the above features and technical features having similar functions (but not limited to) disclosed in the present disclosure may be substituted for each other to form a technical solution.
[0147] Also, although operations have been described in a particular order, this should not be understood as requiring that these operations be performed in the particular order shown or in a sequential order. In some cases, multitasking and parallel processing may be advantageous. Similarly, although the above description includes some specific implementation details, these should not be construed as limitations on the scope of the disclosure. Some features that are described in the context of a single embodiment may be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment may be implemented in multiple embodiments alone or in any suitable subcombination.
[0148] Although the present subject matter has been described in particular language for structural features and / or method logic operations, it should be understood that the subject matter defined in the appended claims is not limited to the specific features or operations described above. On the contrary, the specific features and operations described above are merely example forms of implementing the claims.
Claims
1. 1. A video capture method, applied to a terminal device, the terminal device including a camera, the method comprising: In response to an input event of selecting a segmentation target from a plurality of objects presented on a collection screen of the camera, segmenting the segmentation target to obtain a target segmentation result; displaying the target segmentation result; In response to a trigger operation for adjusting the target segmentation result, a video is generated by fusing the adjusted target segmentation result with a video scene to be merged; The step of generating a video by fusing the adjusted target segmentation result with a video scene to be fusing includes: placing the target segmentation result in an actual environment photographed by the camera through a simultaneous localization and mapping (SLAM) technique; and fusing the adjusted target segmentation result with the actual environment photographed by the camera. How to shoot video.
2. In response to an input event of selecting a segmentation target from a plurality of objects presented on a collection screen of the camera, before a step of segmenting the segmentation target to obtain a target segmentation result, the method includes: The method of claim 1 , further comprising the step of identifying an object displayed on the collection screen as the object to be divided if a screen region in which the object is located includes a preset cursor.
3. In response to an input event of selecting a segmentation target from a plurality of objects presented on the collection screen of the camera, the step of segmenting the segmentation target to obtain a target segmentation result includes: In response to an input event of selecting a segmentation target from a plurality of objects presented on a collection screen of the camera, pre-segmenting the segmentation target to obtain a segmentation result in advance; displaying the division result in advance; The method according to claim 1 or 2, further comprising: dividing the object to be divided in response to a trigger operation performed within a display area in which the pre-divided result is located, to obtain the target divided result.
4. The step of pre-dividing the object to be divided in response to an input event of selecting the object to be divided from a plurality of objects presented on the collection screen of the camera and pre-obtaining a division result includes: In response to an input event of selecting a segmentation target from a plurality of objects presented on a collection screen of the camera, the method includes a step of pre-segmenting the segmentation target based on a first segmentation model to obtain a pre-segmentation result, the first segmentation model being obtained by training a neural network based on a plurality of training images, each training image including a plurality of objects; The step of obtaining the target segmentation result by segmenting the segmentation object in response to a trigger operation performed within a display area in which the segmentation result is located in advance includes: In response to a trigger operation performed within a display area in which the pre-segmented segmentation results are located, the method includes the steps of: segmenting the segmented object to obtain a target segmentation result; and segmenting the segmented object based on a second segmentation model to obtain a target segmentation result, the second segmentation model being obtained by training a neural network based on a plurality of training images, each training image including a plurality of objects; The method according to claim 3 , wherein a division speed of the first division model is faster than a preset division speed, and a division accuracy of the first division model is smaller than that of the second division model.
5. The step of displaying the division result in advance includes: A step of performing a stroke on the pre-segmentation result; The method according to claim 3 or 4, further comprising the step of: displaying the pre-segmented strokes.
6. The step of displaying the strokes obtained by dividing the strokes in advance includes:
6. The method of claim 5, further comprising the step of: if a portion of the object to be divided is covered by an object other than the object to be divided, displaying strokes of the covered portion of the object to be divided in a first display state and displaying strokes of the uncovered portion of the object to be divided in a second display state, wherein display attributes of the first display state and the second display state are different.
7. 7. The method of claim 6, wherein the first display state is a translucent display state and the second display state is a dominant display state.
8. In response to the trigger operation of adjusting the target segmentation result, a step of generating a video by fusing the adjusted target segmentation result with a video scene to be fused includes: When a trigger operation for a display area in which the target division result is located is detected, detecting whether or not a plane exists in the actual environment within a field of view of the camera, the distance between the plane and the camera being within a first preset distance range; If a plane exists in the actual environment and the distance between the plane and the camera is within a first preset distance range, placing the target segmentation result on the plane; The method according to any one of claims 3 to 7, further comprising: if there is no plane in the actual environment whose distance from the camera is within a first preset distance range, placing the target segmentation result in space, wherein the distance between the placement position in the space and the camera is set to a second preset distance.
9. After the step of obtaining the target segmentation result by segmenting the segmentation object in response to a trigger operation performed in a display area in which the pre-segmented segmentation result is located, the method further comprises: The method of claim 8, further comprising the step of: when detecting a trigger operation by a user on a display area in which the target division result is located, determining that the user has confirmed the target division result, and detecting whether there is a plane in the actual environment within the field of view of the camera, the distance between which is within a first preset distance range from the camera.
10. The method according to claim 9 , wherein the trigger operation by the user on the display area in which the target segmentation result is located includes an operation of releasing the target segmentation result after dragging the target segmentation result for a preset time.
11. In response to an input event of selecting a segmentation target from a plurality of objects presented on a collection screen of the camera, before a step of segmenting the segmentation target to obtain a target segmentation result, the method includes: The method further includes the step of collecting a screen image during the division process of the division object in response to a trigger operation of a photographing function, the screen image including the actual environment photographed by the camera; In response to a trigger operation for adjusting the target segmentation result, a step of generating a video by fusing the adjusted target segmentation result with a video scene to be fused includes: The method according to any one of claims 1 to 7, further comprising the step of generating the video based on a screen during the segmentation of the segmentation object.
12. In response to a trigger operation for adjusting the target segmentation result, a step of generating a video by fusing the adjusted target segmentation result with an actual environment captured by the camera is performed, A method according to any one of claims 1 to 7, comprising a step of generating the video based on the adjusted target segmentation result and a video scene to be fused in response to a trigger operation of a shooting function and a trigger operation of adjusting the target segmentation result, wherein the video scene to be fused is a video scene other than the actual environment captured by the camera.
13. The trigger operation for adjusting the target division result includes: The method of any one of claims 1 to 12, comprising at least one of shrinking, enlarging, translating and rotating.
14. A video recording device, A segmentation module is used for segmenting a segmentation object to obtain a target segmentation result in response to an input event of selecting a segmentation object from a plurality of objects presented on a collection screen of a camera of a terminal device, and segmenting the segmentation object to obtain a target segmentation result; A display module for displaying the target segmentation result; A fusion module is used to generate a video by fusing the adjusted target segmentation result with a video scene to be fused in response to a trigger operation to adjust the target segmentation result; generating the video by fusing the adjusted target segmentation result with the fusion target video scene, placing the target segmentation result in an actual environment photographed by the camera through a simultaneous localization and mapping (SLAM) technique; and fusing the adjusted target segmentation result with the actual environment photographed by the camera. Videography equipment.
15. An electronic device comprising at least one processor and a memory; the memory storing computer-executable commands; An electronic device, wherein the at least one processor executes computer-executable commands stored in the memory, such that the at least one processor performs the method of any one of claims 1 to 13.
16. A computer readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implements a method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Entertainment video producing method and terminal
CN109286760A
Video processing method and device and storage medium
CN110290425A
Video processing method, electronic equipment and computer readable storage medium
CN111093026A
Image processing device, image processing method, and program
JP2014096757A
Image pick-up device and method for capturing composite image
JP2014131281A
