Video generation method and device, computer equipment and storage medium
Through projection mapping and feature values, the transition effect is adjusted, and the problem of low efficiency in traditional video production is solved, and a smooth and natural video transition is achieved quickly, and the speed and visual effect of video generation is improved.
Patent Information
- Application Number
- CN202410979859.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-12
AI Technical Summary
Traditional video production methods rely on manual operations, are inefficient and have a long time to generate videos, making it difficult to quickly generate transitional smooth videos.
By obtaining panoramic video, projecting mapping is performed to obtain panoramic flat video, divide the video clips according to the characteristic values of the multi-frame panoramic flat image, and adjust the transition effect according to the difference of adjacent clips to generate the target video.
It realizes a rapid generation of smooth and natural video transition, improves video generation speed and visual coherence, reduces manual operations, and improves the visual appeal and consistency of videos.
Smart Images

Figure CN118945418A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to a video generation method, apparatus, computer equipment, and storage medium. Background Art
[0002] With the popularity of various video software, more and more users will create videos and upload them to the video software. Usually, when making videos, users will manually perform various operations, such as adding transition animations at a certain node in the video, adding transition animations, adding audio, etc. However, the traditional methods rely on various manual operations to generate videos, which is inefficient and takes a long time to generate videos. Summary of the invention
[0003] Based on this, it is necessary to provide a video generation method, device, computer equipment, and storage medium that can quickly generate a video with a smooth transition in order to solve the above technical problems.
[0004] In a first aspect, the present disclosure provides a video generation method, the method comprising:
[0005] Acquire a panoramic video, and perform projection mapping on each panoramic image frame in the panoramic video to obtain a panoramic plane video, wherein the panoramic plane video contains multiple panoramic plane images;
[0006] Dividing the multiple frames of panoramic plane images into multiple video segments according to feature values of at least a portion of regions in the multiple frames of panoramic plane images;
[0007] Determining the difference between adjacent video segments according to the feature values of the panoramic plane images in the adjacent video segments;
[0008] A transition effect matching the difference is determined, and according to the transition effect matching the difference, a transition between adjacent video segments is adjusted to generate a target video.
[0009] In one embodiment, the feature value includes: a pixel value; and dividing the multiple frames of panoramic plane images into multiple video segments according to the feature value of at least a portion of the region in the multiple frames of panoramic plane images includes:
[0010] Determine a difference value between adjacent panoramic plane images in the multiple frames of panoramic plane images based on pixel values of at least a partial area in a first panoramic plane image in the multiple frames of panoramic plane images and pixel values of an area matching the at least partial area in a second panoramic plane image in the multiple frames of panoramic plane images; wherein the second panoramic plane image is a panoramic plane image in the multiple frames of panoramic plane images other than the first panoramic plane image;
[0011] According to the difference values between adjacent panoramic plane images, the multiple frames of panoramic plane images are divided into a plurality of video segments, wherein the difference value between the panoramic plane images contained in each of the video segments is greater than a preset difference threshold.
[0012] In one of the embodiments, determining the difference value between adjacent panoramic plane images in the multiple frames of panoramic plane images based on the pixel value of at least a partial area in a first panoramic plane image in the multiple frames of panoramic plane images and the pixel value of an area matching the at least partial area in a second panoramic plane image in the multiple frames of panoramic plane images includes:
[0013] determining an area in the second panoramic planar image that matches at least a portion of an area in the first panoramic planar image;
[0014] Calculating pixel feature values of the first panoramic plane image according to the pixel values of at least the partial area;
[0015] Calculating pixel feature values of the second panoramic plane image according to pixel values of the area matching the at least partial area;
[0016] The difference values between adjacent panoramic plane images in the plurality of frames of panoramic plane images are determined according to the pixel feature values of the first panoramic plane image and the pixel feature values of the second panoramic plane image.
[0017] In one embodiment, the method further comprises:
[0018] In response to the difference values between the adjacent panoramic plane images being less than a preset difference threshold, dividing the multiple frames of panoramic plane images into a plurality of video segments based on a preset time period;
[0019] Determine a first quantity in which the difference values between adjacent panoramic planar images are greater than the difference threshold, and in response to the first quantity being less than a preset first quantity threshold, divide the multiple frames of panoramic planar images into multiple video segments based on the time period and the difference values between the adjacent panoramic planar images.
[0020] In one embodiment, the feature value includes: a pixel value; and dividing the multiple frames of panoramic plane images into multiple video segments according to the feature value of at least a portion of the region in the multiple frames of panoramic plane images includes:
[0021] determining an area in the second panoramic planar image that matches at least a portion of an area in the first panoramic planar image;
[0022] Calculating pixel feature values of the first panoramic plane image according to the pixel values of at least the partial area;
[0023] Calculating pixel feature values of the second panoramic plane image according to pixel values of the area matching the at least partial area;
[0024] Determining a variation relationship between the pixel characteristic value and the frame number according to the pixel characteristic value of the first panoramic plane image, the pixel characteristic value of the second panoramic plane image, and the frame number of the plurality of panoramic plane images;
[0025] Based on the relationship between the pixel characteristic value and the frame number, the multiple frames of panoramic plane images are divided into multiple video segments.
[0026] In one of the embodiments, dividing the multiple frames of panoramic plane images into multiple video segments based on the relationship between the pixel feature value and the frame number includes:
[0027] Determine a relationship point where a trend of a pixel characteristic value changes in a relationship between a change in the pixel characteristic value and a change in the frame number;
[0028] Dividing the multiple frames of panoramic plane images into multiple video segments according to the relationship points where the trend of the pixel feature values changes;
[0029] In response to the relationship points at which the trend of the pixel feature values changes are less than a preset second quantity threshold, the multiple frames of panoramic plane images are divided into multiple video segments based on a preset time period and the relationship points at which the trend of the pixel feature values changes.
[0030] In one embodiment, the feature value includes: a feature vector, and the step of dividing the multiple frames of panoramic plane images into multiple video segments according to the feature value of at least a portion of the region in the multiple frames of panoramic plane images includes:
[0031] Calculating the similarity between adjacent panoramic plane images in the multiple frames of panoramic plane images using a preset similarity algorithm according to feature vectors of at least a portion of the region in the multiple frames of panoramic plane images;
[0032] Based on the similarity between adjacent panoramic plane images, the multiple frames of panoramic plane images are divided into a plurality of video segments, wherein the similarity between the panoramic plane images contained in each of the video segments is greater than a preset similarity threshold.
[0033] In a second aspect, the present disclosure further provides a video generation device. The device comprises:
[0034] A video projection module is used to obtain a panoramic video, and perform projection mapping on each panoramic image frame in the panoramic video to obtain a panoramic plane video, wherein the panoramic plane video contains multiple panoramic plane images;
[0035] A video segmentation module, configured to divide the multiple frames of panoramic plane images into multiple video segments according to feature values of at least a portion of regions in the multiple frames of panoramic plane images;
[0036] A difference determination module, used to determine the difference between adjacent video segments according to the feature values of the panoramic plane images in the adjacent video segments;
[0037] The target video generation module is used to determine a transition effect that matches the difference, and adjust the transition between adjacent video clips according to the transition effect that matches the difference to generate a target video.
[0038] In a third aspect, the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps in any of the above method embodiments are implemented.
[0039] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0040] In a fifth aspect, the present disclosure further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0041] In the above embodiments, a panoramic video is obtained, and each frame of the panoramic image in the panoramic video is projected and mapped, so that the three-dimensional video can be mapped into a two-dimensional video, thereby improving the speed and accuracy of video generation, and the viewing experience of the two-dimensional video will be better. According to the feature values of at least part of the area in the multi-frame panoramic plane image, the multi-frame panoramic plane image is divided into a plurality of video clips. Using the feature values to divide the video clips can increase the visual appeal of the video. The feature values of each video clip are different, which helps to help users watch each video clip and pay attention to the content in each video clip. According to the feature values of the panoramic plane images in adjacent video clips, the difference between adjacent video clips is determined; the transition effect matching the difference is determined, and the transition between adjacent video clips is adjusted according to the transition effect matching the difference, and the target video is generated. By selecting a matching transition effect according to the difference between the video clips, a smoother and more natural transition can be achieved. This helps to eliminate the abruptness between the video clips and make the video look more coherent and smooth. It helps to ensure that the target video is visually consistent and coherent. When watching the video, the audience will feel that the transition is natural without being disturbed by inharmonious or abrupt transitions. And the whole process does not require manual operation and can quickly generate the target video. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 A schematic diagram of an application environment of a video generation method in an embodiment;
[0044] Figure 2 is a flow chart of a video generation method in one embodiment;
[0045] Figure 3 A schematic diagram of a flow chart of step S204 in an embodiment;
[0046] Figure 4 Schematic diagram of the process of step S302 in one embodiment;
[0047] Figure 5 Another schematic diagram of a flow chart of step S204 in one embodiment;
[0048] Figure 6 is a schematic flow chart of step S510 in one embodiment;
[0049] Figure 7 A schematic diagram of a change relationship in an embodiment;
[0050] Figure 8 Another schematic diagram of a change relationship in an embodiment;
[0051] Fig. 9 1 is another schematic flow chart of step S204 in one embodiment;
[0052] Fig.10 A schematic diagram of at least a portion of an area in one embodiment;
[0053] Fig.11 A schematic diagram of a structural block diagram of a video generating device in one embodiment;
[0054] Fig.12 is a schematic diagram of the internal structure of a computer device in one embodiment;
[0055] Fig.13 Schematic diagram of the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.
[0057] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0058] In this article, the term "and / or" is only a description of the association relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the related objects before and after are in an "or" relationship.
[0059] The present disclosure provides a video generation method, which can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The data storage system can store panoramic videos. The terminal 102 can obtain the panoramic video stored in the server 104. The panoramic video can be captured by a panoramic camera or other terminal device and transmitted to the server 104. The terminal 102 performs projection mapping on each frame of the panoramic image in the panoramic video to obtain a panoramic plane video. The panoramic plane video contains multiple frames of panoramic plane images. The terminal 102 divides the multiple frames of panoramic plane images into multiple video segments according to the feature values of at least part of the area in the multiple frames of panoramic plane images. The terminal 102 determines the difference between adjacent video segments according to the feature values of adjacent panoramic plane images in adjacent video segments. The terminal 102 determines the transition effect matching the difference. The terminal 102 adjusts the transition between adjacent video segments according to the transition effect matching the difference to generate a target video. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers. It should be noted that this solution can also be applied to a terminal or a server alone.
[0060] In one embodiment, Figure 2 As shown, a video generation method is provided, which is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:
[0061] S202, obtaining a panoramic video, and performing projection mapping on each panoramic image frame in the panoramic video to obtain a panoramic plane video, wherein the panoramic plane video includes multiple panoramic plane image frames.
[0062] Among them, panoramic video is a video that records a 360-degree landscape or scene through special camera technology. The audience can watch the panoramic video through virtual reality equipment or mobile phone apps, and can change the viewing angle through mobile devices or mice, as if they were on the scene. Panoramic videos can usually be shot by fisheye cameras or panoramic cameras. Projection mapping in some embodiments of the present disclosure can be a way of projecting a panoramic image into a flat image, that is, a way of converting three-dimensional into two-dimensional.
[0063] Specifically, a panoramic video may be obtained. A panoramic video is usually composed of multiple panoramic images, so each panoramic image in the panoramic video may be projected and mapped to obtain multiple panoramic plane images. Multiple panoramic plane images are combined to form a panoramic plane video.
[0064] S204: Divide the multiple frames of panoramic planar images into multiple video segments according to feature values of at least a portion of regions in the multiple frames of panoramic planar images.
[0065] The feature value may include, for example, a pixel value, a feature vector, a texture feature, a shape feature, etc. The partial area may be a POI (Point of Interest) area in the panoramic plane image, which refers to an area of interest.
[0066] Specifically, one panoramic plane image can be selected from multiple panoramic plane images, and the POI area can be determined from the selected panoramic plane image. Then, the portion corresponding to the POI area in the remaining panoramic plane images is determined, and the characteristic value of the partial area is determined according to the POI area and the portion corresponding to the POI area. The panoramic plane images are grouped according to the characteristic value, and each group of panoramic plane images is a video clip, thereby obtaining multiple video clips. In some embodiments of the present disclosure, there is no restriction on how to determine the POI area. For example, an interest point detection algorithm such as SIFT (Scale Invariant Feature Transform), SURF (Speeded Robust Features), etc. can be used to detect the POI area in the image, or a pre-trained model such as YOLO (You Only Look Once), Faster R-CNN, etc. can be used to quickly and accurately locate the POI area in the image.
[0067] In addition, the POI area may not be determined, and the feature value of each frame of the panoramic plane image (the entire area) may be determined. The panoramic plane images may be grouped according to the feature value of each frame of the panoramic plane image, and each group of panoramic plane images may be a video clip, thereby obtaining multiple video clips.
[0068] S206: Determine the difference between adjacent video segments according to the feature values of the panoramic plane images in the adjacent video segments.
[0069] The difference degree may generally be an indicator representing the degree of difference or correlation between two adjacent video clips.
[0070] Specifically, the video clips that are adjacent to each other in a plurality of video clips may be determined first, and then the panoramic plane images contained in each video clip may be determined. The difference between the adjacent video clips may be determined based on the characteristic values of the panoramic plane images in the adjacent video clips. For example, the difference between the adjacent video clips may be determined based on the difference between the characteristic values of the adjacent panoramic plane images in the adjacent video clips. For another example, the characteristic mean of the video clip may be determined based on the mean of the characteristic values of all the panoramic plane images contained in the adjacent video clips, and the difference between the adjacent video clips may be determined based on the difference between the characteristic means of the video clips. In addition, the characteristic value of the panoramic plane image in the video clip mentioned in the present embodiment may be the characteristic value of all parts of the panoramic plane image, or may be the characteristic value of a partial area of the panoramic plane image.
[0071] S208, determining a transition effect that matches the difference, and adjusting transitions between adjacent video clips according to the transition effect that matches the difference, to generate a target video.
[0072] Among them, transition effects usually refer to the process of gradually transitioning to the next video clip through a visual or effect processing method at the end of a video clip. Transition effects can help make video transitions smoother and more visually attractive. Transition effects can include: fade, dissolve, slide, wipe, zoom, rotate, etc. Fade: A smooth transition effect is achieved by gradually increasing or decreasing the transparency of the picture. Dissolve: A smooth transition is achieved by gradually blending between two pictures. Slide: One picture slides smoothly to another picture. Wipe: A transition effect is achieved by covering one picture with another picture, which can be from top to bottom, from left to right, or other different directions. Zoom: A transition effect is achieved by gradually enlarging or reducing the picture. Rotate: A transition effect is achieved by rotating the picture. In addition, according to different differences, the corresponding transition effects are also different. For example, for clips with a small difference, you can choose a fade or blur transition effect; for clips with a large difference, you can use more complex effects such as overlapping transition or motion transition.
[0073] Specifically, after determining the degree of difference, a transition effect matching the degree of difference can be determined from a pre-set database according to the degree of difference. The database can usually store a mapping relationship between different degrees of difference and transition effects. According to the transition effect matching the degree of difference, the transition between adjacent video clips is adjusted to finally generate a target video. Usually, different transition effects can be selected for transition between video clips. For example, the video clips include A, B, C, and D, where fade-in and fade-out and blur transition effects can be selected between A and B, and fade-in and fade-out and blur transition effects can also be selected between B and C. In order to ensure that aesthetic fatigue does not occur, the transition effect between A and B and the transition effect between B and C are usually not the same. Therefore, a fade-in and fade-out effect can be selected between A and B, and a blur transition effect can be selected between B and C.
[0074] In the above-mentioned video generation method, a panoramic video is obtained, and each frame of the panoramic image in the panoramic video is projected and mapped, so that the three-dimensional video can be mapped into a two-dimensional video, thereby improving the speed and accuracy of video generation, and the viewing experience of the two-dimensional video will be better. According to the feature values of at least part of the area in the multi-frame panoramic plane image, the multi-frame panoramic plane image is divided into a plurality of video clips. Using the feature values to divide the video clips can increase the visual appeal of the video. The feature values of each video clip are different, which helps to help users watch each video clip and pay attention to the content in each video clip. According to the feature values of the panoramic plane images in adjacent video clips, the difference between adjacent video clips is determined; the transition effect matching the difference is determined, and the transition between adjacent video clips is adjusted according to the transition effect matching the difference, and the target video is generated. By selecting a matching transition effect according to the difference between the video clips, a smoother and more natural transition can be achieved. This helps to eliminate the abruptness between the video clips and make the video look more coherent and smooth. It helps to ensure that the target video is visually consistent and coherent. When watching the video, the audience will feel that the transition is natural without being disturbed by inharmonious or abrupt transitions. And the whole process does not require manual operation and can quickly generate the target video.
[0075] In one embodiment, the feature value includes: a pixel value, such as Figure 3 As shown, the method of dividing the multiple frames of panoramic plane images into multiple video segments according to the feature values of at least a part of the regions in the multiple frames of panoramic plane images includes:
[0076] S302, determining a difference value between adjacent panoramic plane images in the multiple frames of panoramic plane images based on pixel values of at least a partial area in a first panoramic plane image in the multiple frames of panoramic plane images and pixel values of an area matching the at least partial area in a second panoramic plane image in the multiple frames of panoramic plane images, wherein the second panoramic plane image is a panoramic plane image in the multiple frames of panoramic plane images other than the first panoramic plane image.
[0077] Specifically, one panoramic plane image can be selected from multiple panoramic plane images as the first panoramic plane image, and the remaining panoramic plane images can be selected as the second panoramic plane image. At least a partial area is determined from the first panoramic plane image, and the pixel value of at least the partial area is determined. Then, an area matching at least a partial area in the first panoramic plane image is determined from each second panoramic plane image, and the pixel value of the area matching at least a partial area is determined. The difference value between adjacent panoramic plane images is calculated based on the pixel value.
[0078] In some exemplary embodiments, pixel values of at least a partial area in the first panoramic plane image may be fused to obtain a first pixel fusion value, pixel values of an area matching at least a partial area in each second panoramic plane image may be fused to obtain a second pixel fusion value of each second panoramic plane image, and then the difference value between adjacent panoramic plane images may be calculated based on the first pixel fusion value and the second pixel fusion value.
[0079] S304, dividing the multiple frames of panoramic plane images into a plurality of video segments according to difference values between adjacent panoramic plane images, wherein the difference value between the panoramic plane images contained in each of the video segments is greater than a preset difference threshold.
[0080] Specifically, according to the difference values between adjacent panoramic plane images, adjacent panoramic plane images with the same or smaller difference values may be grouped into one video segment, thereby obtaining a plurality of video segments.
[0081] In some exemplary embodiments, for example, a plurality of panoramic plane images include 5 panoramic plane images, the difference value between the first panoramic plane image and the second panoramic plane image is 1, the difference value between the second panoramic plane image and the third panoramic plane image is 5, the difference value between the third panoramic plane image and the fourth panoramic plane image is 1, and the difference value between the fourth panoramic plane image and the fifth panoramic plane image is 0, then the first panoramic plane image and the second panoramic plane image can be divided into one video segment, and the third panoramic plane image, the fourth panoramic plane image and the fifth panoramic plane image can be divided into another video segment, thereby obtaining multiple video segments.
[0082] In this embodiment, the difference values between adjacent panoramic plane images can be accurately determined through pixel values, so that the panoramic plane images can be accurately grouped according to the difference values, thereby obtaining multiple groups of video clips.
[0083] In one embodiment, Figure 4 As shown, the determining of the difference value between adjacent panoramic plane images in the multiple frames of panoramic plane images based on the pixel value of at least a partial area in the first panoramic plane image in the multiple frames of panoramic plane images and the pixel value of an area matching the at least partial area in the second panoramic plane image in the multiple frames of panoramic plane images includes:
[0084] S402: Determine an area in the second panoramic planar image that matches at least a portion of the area in the first panoramic planar image.
[0085] S404: Calculate pixel feature values of the first panoramic planar image according to the pixel values of at least the partial area.
[0086] S406: Calculate pixel feature values of the second panoramic planar image according to pixel values of the area matching the at least partial area.
[0087] S408: Determine a difference value between adjacent panoramic plane images in the multiple frames of panoramic plane images according to the pixel feature value of the first panoramic plane image and the pixel feature value of the second panoramic plane image.
[0088] The pixel characteristic value may be a pixel average value, a mean square error, or other numerical values.
[0089] Specifically, since at least a partial area in the first panoramic plane image has been determined, the remaining areas of the second panoramic plane image that match at least a partial area can be determined. It should be noted that if the entire area of the first panoramic plane image is determined here, the area that matches the entire area also needs to be the entire area of the second panoramic plane image. Then, the pixel feature value of the first panoramic plane image can be obtained by calculating the average value or the mean square error based on the pixel values of at least a partial area. The second panoramic plane image can be calculated in the same way as the first panoramic plane image, and the pixel feature value of each second panoramic plane image is calculated based on the pixel value of the area that matches at least a partial area in each second panoramic plane image. Then, the pixel feature values of adjacent panoramic plane images are determined, and the pixel feature values of adjacent panoramic plane images are subtracted to obtain the difference value between adjacent panoramic plane images.
[0090] In some exemplary embodiments, when calculating pixel feature values, if the pixel feature values are obtained based on pixel average values, the image of at least a portion of the area and an area matching at least a portion of the area can be grayscaled, and then the grayscale pixel values can be averaged.
[0091] In this embodiment, the pixel feature value is calculated by using the pixel value. Since the pixel value is a data representation, the complexity of the calculation can be reduced during the calculation process, thereby improving the efficiency of determining the difference value. In addition, the pixel value can objectively reflect the composition of each part, so the difference value between adjacent panoramic plane images can be accurately evaluated by using the pixel value.
[0092] In one embodiment, the method further comprises:
[0093] In response to the difference values between the adjacent panoramic plane images being less than a preset difference threshold, the multiple frames of panoramic plane images are divided into a plurality of video segments based on a preset time period.
[0094] Specifically, when the difference values between adjacent panoramic plane images in a plurality of panoramic plane images are less than a preset difference threshold, the plurality of panoramic plane images cannot be grouped according to the difference values. Therefore, the plurality of panoramic plane images can be grouped according to a preset time period, thereby being divided into a plurality of video segments.
[0095] Determine a first quantity in which the difference values between adjacent panoramic planar images are greater than the difference threshold, and in response to the first quantity being less than a preset first quantity threshold, divide the multiple frames of panoramic planar images into multiple video segments based on the time period and the difference values between the adjacent panoramic planar images.
[0096] Specifically, in order to ensure the transition effect of the generated video, it is usually necessary to divide it into multiple video segments. When the number of difference values in the multiple frames of panoramic plane images that are greater than the preset difference threshold is relatively small, and is less than the preset first number threshold, when the panoramic plane images are grouped, more video segments cannot be obtained. Therefore, the panoramic plane images can be grouped using the difference value and the time period, so as to be divided into multiple video segments.
[0097] In some exemplary embodiments, taking a multi-frame panoramic plane image including fifteen frames of panoramic plane images as an example, when the difference value between the panoramic plane images between the first frame to the tenth frame is 1, the difference value between the tenth frame and the eleventh frame of the panoramic plane image is 15, and the difference value between the eleventh frame to the fifteenth frame of the panoramic plane image is 1, if the multi-frame panoramic plane image needs to be divided into five video clips, then the panoramic plane image can only be divided into two video clips (1-10 frames, 11-15 frames) according to the difference degree. Therefore, after grouping according to the difference degree, the two video clips can be grouped again according to the preset time period. Frames 1-3 can be grouped into one group, frames 4-6 can be grouped into one group, frames 6-10 can be grouped into one group, frames 11-12 can be grouped into one group, and frames 13-15 can be grouped into one group. Thus, five video clips are obtained. It can be understood that the above is only for illustration.
[0098] In this embodiment, the panoramic plane image is divided into a plurality of video segments by a preset time period, and different transition effects can be added between the plurality of video segments when producing a video, thereby improving the viewing experience of the video.
[0099] In one embodiment, the feature value includes: a pixel value, such as Figure 5 As shown, the method of dividing the multiple frames of panoramic plane images into multiple video segments according to the feature values of at least a part of the regions in the multiple frames of panoramic plane images includes:
[0100] S502: Determine an area in the second panoramic planar image that matches at least a portion of the area in the first panoramic planar image.
[0101] S504: Calculate pixel feature values of the first panoramic planar image according to the pixel values of at least the partial area.
[0102] S506: Calculate pixel feature values of the second panoramic planar image according to pixel values of the area matching the at least partial area.
[0103] Specifically, the specific implementation methods and limitations of this embodiment can be found in the above embodiments, and will not be repeated here.
[0104] S508: Determine a variation relationship between the pixel characteristic value and the frame number according to the pixel characteristic value of the first panoramic plane image, the pixel characteristic value of the second panoramic plane image, and the frame number of the plurality of panoramic plane images.
[0105] Specifically, after the pixel feature values of the first panoramic plane image and the second panoramic plane image are calculated, a relationship between the frame number and the pixel feature value may be established according to the frame numbers of the first panoramic plane image and the second panoramic plane image.
[0106] In some exemplary embodiments, taking the panoramic plane image including five frames as an example, the first panoramic plane image is the third panoramic plane image of the five frames, and its pixel feature value is 5. The pixel feature value of the first panoramic plane image is 7, the pixel feature value of the second panoramic plane image is 10, the pixel feature value of the fourth panoramic plane image is 12, and the pixel feature value of the fifth panoramic plane image is 10, then the following can be obtained: Figure 5 The relationship between the frame number and the pixel feature value is shown.
[0107] S510, dividing the multiple frames of panoramic planar images into multiple video segments based on the relationship between the pixel characteristic value and the frame number.
[0108] Specifically, according to the relationship between the pixel feature value and the frame number, the panoramic plane images with continuously rising pixel feature values can be grouped into one group, and the panoramic plane images with continuously falling pixel feature values can be grouped into another group, so that the multiple frames of panoramic plane images can be divided into multiple video clips. The panoramic video images can also be divided into multiple video clips according to the change of pixel feature values.
[0109] In this embodiment, according to the changes in pixel characteristic values and frame numbers, the changing trend of the pixel characteristic values with the frame number can be accurately determined, so that the panoramic plane images can be accurately grouped according to the changing trend, ensuring that the panoramic plane images in the obtained video clips change less.
[0110] In one embodiment, Figure 6 As shown, the multi-frame panoramic plane image is divided into a plurality of video segments based on the relationship between the pixel characteristic value and the frame number, including:
[0111] S602, determining a relationship point where a trend of a pixel characteristic value changes in the relationship between the pixel characteristic value and the frame number.
[0112] S604: Divide the multiple frames of panoramic plane images into multiple video segments according to the relationship points where the trends of the pixel feature values change.
[0113] In some exemplary embodiments, Figure 7 As shown, the relationship point where the trend of the pixel feature value changes can be the relationship point corresponding to the third frame of the panoramic plane image. Before the third frame, the pixel feature value is continuously rising, and before the third frame, the pixel feature value is continuously rising, so the first frame and the second frame of the panoramic plane image can be divided into a group. After the third frame, starting from the fourth frame, the pixel feature value is continuously decreasing, so the fourth frame and the fifth frame of the panoramic plane image can be divided into a group. Then the third frame of the panoramic plane image is divided into a separate group, so as to obtain three groups of panoramic plane images, and then the multiple frames of panoramic plane images are divided into three video clips. Figure 8As shown in the figure, if the pixel feature value does not continuously rise or continuously fall, then the pixel feature value can be changed from Figure 8 The panoramic plane images corresponding to the pixel feature values with small changes are found in the video, and the panoramic plane images with small changes in pixel feature values are divided into a group. The first panoramic plane image and the second panoramic plane image can be divided into a group, the fourth panoramic plane image and the fifth panoramic plane image can be divided into a first group, and the third panoramic plane image can be divided into another group, thereby obtaining three video clips. It can be understood that the above is only for illustration.
[0114] S606, in response to the relationship points at which the trend of the pixel feature values changes are less than a preset second quantity threshold, the multiple frames of panoramic plane images are divided into multiple video segments based on a preset time period and the relationship points at which the trend of the pixel feature values changes.
[0115] Specifically, when the number of relationship points at which the trend of pixel feature values changes is relatively small and is less than a preset second quantity threshold, in order to be able to be divided into multiple video frequency bands, the multiple frames of panoramic plane images can be divided into multiple video segments again according to the preset time period and the relationship points at which the trend of pixel feature values changes.
[0116] In this embodiment, the video segments are divided using the relationship points where the trend of pixel feature values changes, which can ensure that the differences between the pixel feature values between each video segment will not change significantly, thereby improving the viewing experience. In addition, the multi-frame panoramic plane images are further divided into multiple groups of panoramic plane images using the time period, which can increase various transition effects and thus improve the video viewing experience.
[0117] In one embodiment, Fig. 9 As shown, the feature value includes: a feature vector, and the multi-frame panoramic plane image is divided into a plurality of video segments according to the feature value of at least a part of the region in the multi-frame panoramic plane image, including:
[0118] S702: Calculate similarities between adjacent panoramic plane images in the multiple frames of panoramic plane images using a preset similarity algorithm according to feature vectors of at least a portion of the regions in the multiple frames of panoramic plane images.
[0119] Among them, similarity algorithms can include: Euclidean distance algorithm, cosine similarity algorithm, and Hamming distance algorithm. A feature vector is a set of values that describe the content and features of an image. These values can represent the color, texture, shape, edge and other features of an image. Feature vectors can be used for tasks such as image classification, target detection, and image recognition. Common feature vectors include color histograms, gradient histograms, Haar features, SIFT features, etc.
[0120] Specifically, at least part of the area can be preprocessed, including grayscale, denoising, scaling and other operations of the image, so as to facilitate the operation of the subsequent feature extraction algorithm. Select a suitable feature extraction algorithm. Common feature extraction algorithms include edge detection, corner detection, texture feature extraction, etc. These algorithms can extract key information from the image for subsequent calculation of feature vectors. It should be noted that at least part of the area mentioned in the embodiments of the present disclosure is located at the same position of the panoramic plane images of different frames. For example, Fig.10 As shown, there are three panoramic plane images in total, wherein at least part of the regions are respectively A1 position of the first panoramic plane image, A2 position of the second panoramic plane image, and A3 position of the third panoramic plane image. Among them, A1 position, A2 position, and A3 position are the same. The features extracted from at least part of the region are processed to calculate a feature vector. Principal component analysis (PCA), singular value decomposition (SVD), etc. can be used for processing to reduce the dimension of high-dimensional feature data and obtain a more compact feature vector. Then, a preset similarity algorithm is used to calculate the similarity between two adjacent panoramic plane images.
[0121] In some exemplary embodiments, the similarity can be calculated in the following manner, for example, the Euclidean distance between two vectors is calculated as the similarity between them. For two feature vectors X and Y, the Euclidean distance between them is calculated as follows: For example, the cosine value of the angle between two feature vectors X and Y can also be calculated. The cosine value of the angle is the similarity between them. The formula for calculating the cosine similarity between them is:
[0122]
[0123] For two feature vectors X and Y, the Hamming distance between them is calculated as:
[0124] In the above three formulas, Xi and Yi represent the i-th eigenvalue of the eigenvectors X and Y respectively, and n represents the dimension of the eigenvector.
[0125] S704, dividing the multiple frames of panoramic plane images into a plurality of video segments based on similarities between adjacent panoramic plane images, wherein the similarity between the panoramic plane images contained in each of the video segments is greater than a preset similarity threshold.
[0126] Specifically, according to the similarity between adjacent panoramic plane images, adjacent panoramic plane images with the same similarity or a small similarity difference can be divided into a video segment, thereby obtaining multiple video segments. (For how to divide here, please refer to the above-mentioned difference value method, which will not be repeated here.)
[0127] In this embodiment, similarity is calculated by using feature vectors. Converting an image into a feature vector can reduce the high-dimensional data of the image to a low-dimensional space, which helps to simplify the data and reduce the complexity of processing and storage. Using feature vectors can make image processing and analysis faster, because for large-scale image data sets, the computational cost of directly processing the original image is very high, and feature vectors can improve computational efficiency. By extracting the feature vector of an image, irrelevant information can be reduced while retaining key feature information, thereby improving processing speed and accuracy.
[0128] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0129] Based on the same inventive concept, the embodiment of the present disclosure also provides a video generation device for implementing the video generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more video generation device embodiments provided below can refer to the limitations of the video generation method above, and will not be repeated here.
[0130] In one embodiment, Fig.11 As shown, a video generation device 800 is provided, comprising: a video projection module 802, a video segmentation module 804, a difference determination module 806 and a target video generation module 808, wherein:
[0131] The video projection module 802 is used to obtain a panoramic video, and perform projection mapping on each panoramic image frame in the panoramic video to obtain a panoramic plane video, wherein the panoramic plane video includes multiple panoramic plane images.
[0132] The video segmentation module 804 is configured to divide the multiple frames of panoramic planar images into multiple video segments according to feature values of at least a portion of regions in the multiple frames of panoramic planar images.
[0133] The difference determination module 806 is used to determine the difference between adjacent video segments according to the feature values of the panoramic plane images in the adjacent video segments.
[0134] The target video generation module 808 is used to determine a transition effect that matches the difference, and adjust the transition between adjacent video clips according to the transition effect that matches the difference to generate a target video.
[0135] In one embodiment of the apparatus, the feature value includes: a pixel value; the video segmentation module 804 includes:
[0136] a difference value determination module, configured to determine a difference value between adjacent panoramic plane images in the plurality of panoramic plane images based on a pixel value of at least a partial area in a first panoramic plane image in the plurality of panoramic plane images and a pixel value of an area matching the at least partial area in a second panoramic plane image in the plurality of panoramic plane images; wherein the second panoramic plane image is a panoramic plane image in the plurality of panoramic plane images other than the first panoramic plane image;
[0137] The segmentation submodule is used to divide the multiple frames of panoramic plane images into multiple video segments according to the difference values between adjacent panoramic plane images, wherein the difference value between the panoramic plane images contained in each of the video segments is greater than a preset difference threshold.
[0138] In one embodiment of the device, the difference value determination module includes:
[0139] The matching region determining module is used to determine a region in the second panoramic planar image that matches at least a portion of the region in the first panoramic planar image.
[0140] The pixel characteristic value calculation module is used to calculate the pixel characteristic value of the first panoramic plane image according to the pixel value of the at least partial area, and to calculate the pixel characteristic value of the second panoramic plane image according to the pixel value of the area matching the at least partial area.
[0141] The feature value processing module is used to determine the difference value between adjacent panoramic plane images in the multiple frames of panoramic plane images according to the pixel feature value of the first panoramic plane and the pixel feature value of the second panoramic plane image.
[0142] In one embodiment of the device, the device further comprises:
[0143] A periodic segmentation module is used to divide the multiple frames of panoramic plane images into multiple video segments based on a preset time period in response to the difference values between the adjacent panoramic plane images being less than a preset difference threshold; and is also used to determine a first number of difference values between adjacent panoramic plane images that are greater than the difference threshold, and in response to the first number being less than a preset first number threshold, divide the multiple frames of panoramic plane images into multiple video segments based on the time period and the difference value between the adjacent panoramic plane images.
[0144] In one embodiment of the apparatus, the feature value includes: a pixel value; the video segmentation module 804 includes:
[0145] The matching region determining module is used to determine a region in the second panoramic planar image that matches at least a portion of the region in the first panoramic planar image.
[0146] The pixel characteristic value calculation module is used to calculate the pixel characteristic value of the first panoramic plane image according to the pixel value of the at least partial area, and to calculate the pixel characteristic value of the second panoramic plane image according to the pixel value of the area matching the at least partial area.
[0147] The relationship determination module is used to determine the relationship between the pixel characteristic value and the frame number according to the pixel characteristic value of the first panoramic plane image, the pixel characteristic value of the second panoramic plane image and the frame number of the multiple frames of panoramic plane images.
[0148] The segment division module is used to divide the multiple frames of panoramic plane images into multiple video segments based on the relationship between the pixel feature value and the frame number.
[0149] In one embodiment of the device, the segment division module is further used to determine the relationship points at which the trend of the pixel feature value changes in the relationship between the pixel feature value and the frame number; according to the relationship points at which the trend of the pixel feature value changes, the multiple frames of panoramic plane images are divided into multiple video segments; in response to the relationship points at which the trend of the pixel feature value changes being less than a preset second quantity threshold, the multiple frames of panoramic plane images are divided into multiple video segments based on a preset time period and the relationship points at which the trend of the pixel feature value changes.
[0150] In one embodiment of the apparatus, the feature value includes: a feature vector, and the video segmentation module 804 includes:
[0151] The similarity calculation module is used to calculate the similarity between adjacent panoramic plane images in the multiple frames of panoramic plane images using a preset similarity algorithm based on the feature vectors of at least a part of the area in the multiple frames of panoramic plane images.
[0152] The similarity division module is used to divide the multiple frames of panoramic plane images into multiple video segments based on the similarity between adjacent panoramic plane images, wherein the similarity between the panoramic plane images contained in each of the video segments is greater than a preset similarity threshold.
[0153] Each module in the above video generation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0154] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.12 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as video clips, panoramic videos, and panoramic plane videos. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a video generation method is implemented.
[0155] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.13 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a video generation method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0156] Those skilled in the art will understand that Fig.11 or Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0157] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in any of the above method embodiments when executing the computer program.
[0158] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0159] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in any of the above method embodiments when executed by a processor.
[0160] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided by the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.
[0161] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0162] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.
Claims
1. A video generation method, characterized in that: The method comprises: Acquire a panoramic video, and perform projection mapping on each panoramic image frame in the panoramic video to obtain a panoramic plane video, wherein the panoramic plane video contains multiple panoramic plane images; Dividing the multiple frames of panoramic plane images into multiple video segments according to feature values of at least a portion of regions in the multiple frames of panoramic plane images; Determining the difference between adjacent video segments according to the feature values of the panoramic plane images in the adjacent video segments; A transition effect matching the difference is determined, and according to the transition effect matching the difference, a transition between adjacent video segments is adjusted to generate a target video.
2. The method according to claim 1, characterized in that The characteristic value includes: a pixel value; and dividing the multiple frames of panoramic plane images into multiple video segments according to the characteristic value of at least a part of the region in the multiple frames of panoramic plane images includes: Determine a difference value between adjacent panoramic plane images in the multiple frames of panoramic plane images based on pixel values of at least a partial area in a first panoramic plane image in the multiple frames of panoramic plane images and pixel values of an area matching the at least partial area in a second panoramic plane image in the multiple frames of panoramic plane images; wherein the second panoramic plane image is a panoramic plane image in the multiple frames of panoramic plane images other than the first panoramic plane image; According to the difference values between adjacent panoramic plane images, the multiple frames of panoramic plane images are divided into a plurality of video segments, wherein the difference value between the panoramic plane images contained in each of the video segments is greater than a preset difference threshold.
3. The method according to claim 2, characterized in that The determining, based on pixel values of at least a partial area in a first panoramic plane image in the multiple frames of panoramic plane images and pixel values of an area matching the at least partial area in a second panoramic plane image in the multiple frames of panoramic plane images, a difference value between adjacent panoramic plane images in the multiple frames of panoramic plane images comprises: determining an area in the second panoramic planar image that matches at least a portion of an area in the first panoramic planar image; Calculating pixel feature values of the first panoramic plane image according to the pixel values of at least the partial area; Calculating pixel feature values of the second panoramic plane image according to pixel values of the area matching the at least partial area; The difference values between adjacent panoramic plane images in the plurality of frames of panoramic plane images are determined according to the pixel feature values of the first panoramic plane image and the pixel feature values of the second panoramic plane image.
4. The method according to claim 2, characterized in that: The method further comprises: In response to the difference values between the adjacent panoramic plane images being less than a preset difference threshold, dividing the multiple frames of panoramic plane images into a plurality of video segments based on a preset time period; Determine a first quantity in which the difference values between adjacent panoramic planar images are greater than the difference threshold, and in response to the first quantity being less than a preset first quantity threshold, divide the multiple frames of panoramic planar images into multiple video segments based on the time period and the difference values between the adjacent panoramic planar images.
5. The method according to claim 2, characterized in that: The characteristic value includes: a pixel value; and dividing the multiple frames of panoramic plane images into multiple video segments according to the characteristic value of at least a part of the region in the multiple frames of panoramic plane images includes: determining an area in the second panoramic planar image that matches at least a portion of an area in the first panoramic planar image; Calculating pixel feature values of the first panoramic plane image according to the pixel values of at least the partial area; Calculating pixel feature values of the second panoramic plane image according to pixel values of the area matching the at least partial area; Determining a variation relationship between the pixel characteristic value and the frame number according to the pixel characteristic value of the first panoramic plane image, the pixel characteristic value of the second panoramic plane image, and the frame number of the plurality of panoramic plane images; Based on the relationship between the pixel characteristic value and the frame number, the multiple frames of panoramic plane images are divided into multiple video segments.
6. The method according to claim 5, characterized in that The dividing the multiple frames of panoramic plane images into multiple video segments based on the relationship between the pixel characteristic value and the frame number includes: Determine a relationship point where a trend of a pixel characteristic value changes in a relationship between a change in the pixel characteristic value and a change in the frame number; Dividing the multiple frames of panoramic plane images into multiple video segments according to the relationship points where the trend of the pixel feature values changes; In response to the relationship points at which the trend of the pixel feature values changes are less than a preset second quantity threshold, the multiple frames of panoramic plane images are divided into multiple video segments based on a preset time period and the relationship points at which the trend of the pixel feature values changes.
7. The method according to claim 1, characterized in that The feature value includes: a feature vector, and the step of dividing the multiple frames of panoramic plane images into multiple video segments according to the feature value of at least a part of the region in the multiple frames of panoramic plane images includes: Calculating the similarity between adjacent panoramic plane images in the multiple frames of panoramic plane images using a preset similarity algorithm according to feature vectors of at least a portion of the region in the multiple frames of panoramic plane images; Based on the similarity between adjacent panoramic plane images, the multiple frames of panoramic plane images are divided into a plurality of video segments, wherein the similarity between the panoramic plane images contained in each of the video segments is greater than a preset similarity threshold.
8. A video generating device, characterized in that: The device comprises: A video projection module is used to obtain a panoramic video, and perform projection mapping on each panoramic image frame in the panoramic video to obtain a panoramic plane video, wherein the panoramic plane video contains multiple panoramic plane images; A video segmentation module, configured to divide the multiple frames of panoramic plane images into multiple video segments according to feature values of at least a portion of regions in the multiple frames of panoramic plane images; A difference determination module, used to determine the difference between adjacent video segments according to the feature values of the panoramic plane images in the adjacent video segments; The target video generation module is used to determine a transition effect that matches the difference, and adjust the transition between adjacent video clips according to the transition effect that matches the difference to generate a target video.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
