Digital special effect simulation online preview platform

By adopting dynamic position and dynamic shape segmentation methods in the digital special effect simulation online preview platform, the problem of inaccurate and insufficient flexibility of special effect elements in the existing technology is solved, and the special effect segmentation with high accuracy and high efficiency is achieved, which improves the playability and attractiveness of the game.

CN120088276APending Publication Date: 2025-06-03ZHENGZHOU MINGJIANG NETWORK TECH CO LTD

Patent Information

Application Number
CN202510155106.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

In the prior art, the special effect element segmentation method often adopts fixed positions and shapes, which is difficult to meet the complex and variable shapes and position requirements of special effect elements, resulting in inaccurate segmentation and insufficient flexibility.

Method used

By applying dynamic position and dynamic shape segmentation methods in the digital special effect simulation online preview platform, the segmented area is more consistent with the actual content and shape of the special effect image, and the accuracy and flexibility of segmentation are improved.

Benefits of technology

It realizes high accuracy and efficiency of special effects segmentation, ensures the accuracy and completeness of special effects elements, enhances the flexibility of segmentation, shortens the cycle of special effects design and verification, and improves the playability and attractiveness of the game.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120088276A_ABST
    Figure CN120088276A_ABST
Patent Text Reader

Abstract

The invention discloses a digital special effect simulation online preview platform, which comprises a segmentation module, a splicing module and a special effect simulation system, the special effect simulation system comprises a simulation module, a special effect integration module and a special effect generation module, and the segmentation module is used for collecting historical existing special effect videos, extracting special effect images from the collected special effect videos and generating the special effect images; determining a segmentation position and a segmentation shape of the special effect image according to the position of the special effect element in the special effect image, and segmenting the special effect image to form sub-images; calculating sub-image segmentation values according to the sub-images; building a special effect simulation system according to the formed special effect elements; the method comprises the following steps: setting a virtual camera, shooting special effect elements by using the virtual camera, evaluating the special effect elements shot by the virtual camera, adjusting parameters of a virtual special effect according to an evaluation result, and selecting a corresponding segmentation method according to a segmentation position and a segmentation shape, so that the accuracy and efficiency of special effect segmentation are improved, and the accuracy and integrity of sub-images are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of special effect simulation, and particularly to a digital special effect simulation online preview platform. Background Art

[0002] With the wide application of digital special effect technology in fields such as games, movies, and animations, the demand for special effect simulation and preview is increasing day by day. The traditional special effect production process often requires the evaluation of the effect after production is completed, which is not only time-consuming and laborious, but also difficult to adjust and optimize the special effect in a timely manner. Therefore, the digital special effect simulation online preview platform emerges as the times require, aiming to provide a real-time and efficient special effect preview and evaluation environment. In the digital special effect simulation online preview platform, the segmentation, splicing, and simulation of special effect elements are key technical links. The segmentation of special effect elements refers to accurately extracting special effect elements from special effect pictures or videos, such as characters, scenes, light effects, etc. The accuracy of this step directly affects the subsequent special effect simulation effect.

[0003] For example, Chinese Patent Application No. 202010828974.4 discloses a live broadcast scheme simulation design verification method, including the following steps: S1, automatically learning the trajectory and attitude parameters of the live broadcast camera during shooting from the existing live broadcast video;

[0004] S2, building a preview simulation system including the live broadcast content; S3, generating multiple virtual cameras in the preview simulation system according to the camera parameters obtained in step S1; S4, obtaining the videos captured by each virtual camera in the preview simulation system and rendering and outputting them; S5, modifying the virtual camera parameters according to the effect of the output video until a live broadcast video satisfactory to the user is obtained; S6, outputting the live broadcast scheme.

[0005] In the existing patent technology, the segmentation method often segments the image with fixed positions and shapes. However, special effect elements usually have complex and changeable shapes and positions, and the fixed segmentation method is difficult to meet the actual needs. Summary of the Invention

[0006] The present application provides a digital special effect simulation online preview platform. By applying dynamic positions and dynamic shapes, the segmentation area is more in line with the actual content and shape of the special effect image, improving the segmentation accuracy. It is no longer limited to fixed positions and shapes, and can perform dynamic segmentation according to the characteristics and requirements of the special effect image, enhancing the flexibility of segmentation.

[0007] The present application provides a digital special effect simulation online preview platform, including: a segmentation module, a splicing module, and a special effect simulation system. The special effect simulation system includes a simulation module, a special effect integration module, and a special effect generation module. The segmentation module is used to segment special effect elements from special effect pictures. The splicing module is used to splice sub-images to form special effect elements. The simulation module simulates a game scene according to the special effect elements segmented by the segmentation module. The segmentation module is used for:

[0008] S101: Collect existing special effect videos in history, extract special effect pictures from the existing special effect videos in history, determine the segmentation positions and segmentation shapes of the special effect pictures according to the positions of the special effect elements in the special effect pictures, and segment the special effect pictures according to the segmentation positions and segmentation shapes to form sub-images;

[0009] S102: Calculate the sub-image segmentation value according to the sub-images formed in step S101;

[0010] S103: Arrange the obtained sub-images in chronological order to form special effect elements according to the obtained sub-images, and store the formed special effect elements in a special effect element library;

[0011] S104: The simulation module builds a special effect simulation system using a game engine according to the formed special effect elements. The special effect integration module integrates the special effects in the special effect element library into the special effect simulation system. The special effect generation module simulates various special effects according to the special effect parameters integrated into the special effect simulation system;

[0012] S105: Set a virtual camera according to the built special effect simulation system, use the virtual camera to shoot special effect elements, evaluate the special effect elements shot by the virtual camera, and adjust the parameters of the virtual special effects according to the evaluation results.

[0013] Preferably, identify the positions of the special effect elements in the special effect pictures according to the extracted special effect pictures, select several reference points in the special effect pictures. The reference points are the center points or edge points of the special effect elements. Enclose the selected several reference points to form a reference area. Divide the segmentation boundary into an arc-shaped boundary and a straight-sided boundary according to the reference area. Calculate the curvature of each point on the boundary by calculating the tangent direction between adjacent points on the boundary. Preset a curvature threshold range. When the curvature of each point on the boundary is within the curvature threshold range, this boundary is an arc-shaped boundary; otherwise, it is a straight-sided boundary.

[0014] Preferably, the sub - graph segmentation value is calculated by calculating the area and perimeter of the sub - image. For the area, according to the reference region, each pixel point in the region is traversed, and a counter is used to count each pixel point belonging to the sub - image. After the traversal is completed, the value of the counter is the area of the sub - graph, and the area is in units of pixels. For the perimeter, after the obtained sub - image is represented in binary according to the reference region, the external edge pixels are identified. When traversing each external edge pixel, a calculation is set as \(wA\times A + wP\times P\), where \(wA\) is the weight of the area feature, \(wP\) is the weight of the perimeter feature, \(S\) is the sub - graph segmentation value, \(A\) is the area of the sub - image, and \(P\) is the perimeter of the sub - image. Among them, the external edge pixels refer to the pixels located on the boundary of the sub - image region and at least one adjacent pixel belongs to the background. All pixels in the sub - graph region are traversed, and the neighborhood of each pixel is checked. If there is a pixel belonging to the background in the neighborhood of a pixel, then this pixel is considered an external edge pixel.

[0015] Preferably, the specific steps of splicing the obtained sub - images to form a special - effect element are as follows:

[0016] S201, copy the segmented sub - image and splice the copied sub - image into the next - frame sub - image;

[0017] S202, according to the spliced sub - image after splicing, arrange the obtained spliced sub - images in chronological order to form a special - effect element, and judge whether the special - effect elements are coherent by calculating the similarity of the overlapping regions between adjacent frames.

[0018] Preferably, the similarity is calculated by calculating the mean square error of the pixel values in the overlapping regions between adjacent frames.

[0019] Preferably, the segmentation module is further used for:

[0020] S301, according to the special - effect images extracted from the existing historical special - effect videos, use machine - learning algorithms to identify special - effect elements in the extracted images;

[0021] S302, according to the identified special - effect elements, extract the position, distribution, shape, and size of the special - effect elements, and divide the image into several segmentation regions;

[0022] S303, according to the formation of several segmentation regions, dynamically select a target segmentation region from the several segmentation regions, and segment the image according to the target segmentation region;

[0023] S304, calculate the dynamic sub - graph segmentation value according to the selected target segmentation region, and judge whether the special - effect elements are coherent according to the obtained dynamic sub - graph segmentation value.

[0024] Preferably, a plurality of formed segmentation regions are included in a region list to be processed, and importance scoring and complexity scoring are performed on each segmentation region; the region list is sorted in descending order according to the importance score, so that regions with high importance are ranked in the front. At the same time, the complexity score is retained; a selection flag is set. If the selection flag indicates to select a region with high importance, from the sorted region list, the region with the highest importance score and not yet selected is selected as the segmentation object. After the selection is completed, the selection flag is updated. The selection flag indicates to select a region with high complexity next time. The selection flag indicates to select a region with high complexity. Among the unselected regions, the region with the highest complexity score is selected as the segmentation object to form a target segmentation region.

[0025] Preferably, the selection flag is used to indicate whether to select a region with high importance or a region with high complexity currently. wMES×(1 - MES)+wEMP×EMP+wTSM×TSM, where wMES, wEMP, and wTSM are the mean squares respectively, and wMES + wEMP + wTSM = 1; DSSV is the sub - graph dynamic segmentation value.

[0026] 1N(I(i,j)-K(i,j))2, where I(i,j) and K(i,j) respectively represent the images of the original image and the segmented sub - image at the position (i,j). MT×100%, where M is the number of matching edge points, T is the total number of edge points, and EMP is the percentage matching degree.

[0027] One or more technical solutions provided in this application have at least the following technical effects or advantages: corresponding segmentation methods are selected according to the segmentation position and segmentation shape, improving the accuracy and efficiency of special effect segmentation. By calculating the sub - graph segmentation value, the accuracy and integrity of the sub - image are ensured, realizing the real - time generation and rendering of special effect elements. By building a special effect simulation system, the simulation and verification of game special effects are realized, shortening the cycle of special effect design and verification, providing a rich special effect element library, providing more choices and possibilities for game development, and improving the playability and attractiveness of the game;

[0028] By copying and splicing sub - images, adjacent two sub - images can be connected more coherently. By calculating the similarity of the overlapping regions between adjacent frames and adjusting the discontinuous frame pairs, the high visual consistency of special effect elements is ensured. By using the memory copy function to copy sub - images, the efficiency and accuracy of the copying process are ensured, avoiding visual differences during splicing;

[0029] The application of dynamic position and dynamic shape makes the segmented area more conform to the actual content and shape of the special effect image, improving the accuracy of segmentation. It is no longer limited to fixed positions and shapes and can perform dynamic segmentation according to the characteristics and requirements of the special effect image, enhancing the flexibility of segmentation. By calculating the sub-image segmentation value, the segmentation effect can be quantitatively evaluated, providing a basis for optimizing the segmentation algorithm and parameters. By verifying the sub-image segmentation value, it can be ensured that the special effect elements after segmentation maintain visual coherence, enhancing the overall effect of the special effect. Brief Description of the Drawings

[0030] Figure 1 It is a schematic flowchart of a digital special effect simulation online preview platform according to the present invention;

[0031] Figure 2 It is a schematic flowchart of splicing the obtained sub-images to form special effect elements according to an embodiment of the present invention;

[0032] Figure 3 It is a schematic flowchart of segmenting an image using dynamic position and dynamic shape according to an embodiment of the present invention. Detailed Embodiments

[0033] To facilitate the understanding of the present invention, the present application will be described more comprehensively with reference to the relevant drawings; the drawings show preferred embodiments of the present invention. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein; on the contrary, these embodiments are provided to make the disclosure of the present invention more thorough and comprehensive.

[0034] It should be noted that the terms "vertical", "horizontal", "upper", "lower", "left", "right" and similar expressions used herein are for illustrative purposes only and do not represent the only embodiments.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs; the terms used in the description of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0036] Embodiment 1: Figure 1It is a schematic flow chart of a digital special effect simulation online preview platform according to an embodiment of the present invention, including: a segmentation module, a splicing module, and a special effect simulation system. The special effect simulation system includes a simulation module, a special effect integration module, and a special effect generation module. The segmentation module is used to segment special effect elements from a special effect picture, and the splicing module is used to splice sub-images to form special effect elements. The simulation module simulates a game scene according to the special effect elements segmented by the segmentation module.

[0037] S101, collect existing historical special effect videos, extract special effect pictures from the existing historical special effect videos, determine the segmentation positions and segmentation shapes of the special effect pictures according to the positions of the special effect elements in the special effect pictures, and segment the special effect pictures according to the segmentation positions and segmentation shapes to form sub-images;

[0038] Further, collect historical special effect videos, store the collected videos in a video library, use the video processing software Adobe Premiere Pro to extract special effect pictures from the videos, identify the positions of special effect elements in the extracted special effect pictures, select multiple reference points in the picture. The reference point is the center point or edge point of the special effect element. The multiple selected reference points enclose a reference area. According to the reference area, set the fixed position coordinates of the segmentation area. The coordinates are absolute coordinates (relative to the position of the lower right corner of the picture). According to the reference area, divide the segmentation boundary into an arc-shaped boundary and a straight-sided boundary. The curvature change of the arc boundary is smooth and continuous, presenting a smooth curve form. There are no straight line segments, sharp corners or mutated points on the arc boundary. Calculate the curvature of each point on the boundary by calculating the change in the tangent direction between adjacent points on the boundary. Preset the curvature threshold range. When the curvature changes of all points on the boundary are within the curvature threshold range, it can be determined that the boundary is an arc-shaped boundary. Otherwise, it is a straight-sided boundary. The straight-sided boundary is mainly composed of straight line segments, and these straight line segments are connected to form a polygon or rectangular shape. The straight-sided boundary contains sharp corners or right angles, that is, the included angle between adjacent straight line segments is an acute angle, a right angle or an obtuse angle. The straight-sided boundary presents a regular or irregular geometric shape in the picture.

[0039] Select a segmentation method according to the boundary type. For the arc-shaped boundary, select the active contour model. The active contour model is a segmentation method based on curve fitting or contour tracking. This type of segmentation method can well adapt to the smooth curve characteristics of the arc-shaped boundary and improve the segmentation accuracy; for the straight-sided boundary, select the Canny edge detection. The Canny edge detection is a segmentation method based on edge detection or morphology. This type of method can effectively identify and process the straight line segments and sharp corner features in the straight-sided boundary and improve the segmentation efficiency. According to the selected segmentation method, segment the special effect area in the picture and extract the sub-images containing special effect elements.

[0040] S102. Calculate the sub - graph segmentation value according to the sub - images formed in step S101.

[0041] Specifically, calculate the area and perimeter of the sub - image. For the area, according to the determined reference region, traverse each pixel point within the region. During the traversal, count each pixel point belonging to the sub - graph. By setting a counter variable and, when traversing each pixel, if the pixel belongs to the sub - graph, increment the counter. After the traversal is completed, the value of the counter is the area of the sub - graph, in units of pixels. For the perimeter, after binarizing the obtained sub - graph according to the determined reference region (i.e., the sub - graph region is white or 1, and the background is black or 0), identify the external edge pixels. An external edge pixel refers to a pixel located on the boundary of the sub - graph region and having at least one adjacent pixel belonging to the background. Traverse all the pixels in the sub - graph region and check the neighborhood of each pixel. If there is a pixel belonging to the background in the neighborhood of a pixel, then that pixel is considered an external edge pixel. Set a counter variable and, when traversing each external edge pixel, if the external edge pixel belongs to the sub - graph, increment the counter. After the traversal is completed, the value of the counter is the perimeter of the sub - graph, in units of pixels.

[0042] wA×A + wP×P, where wA is the weight of the area feature, representing the relative importance of the area in the sub - graph segmentation value, wP is the weight of the perimeter feature, representing the relative importance of the perimeter in the sub - graph segmentation value. wA and wP are determined according to specific requirements. S is the sub - graph segmentation value, A is the area of the sub - graph, and P is the perimeter of the sub - graph.

[0043] If wA = 0.7 and wP = 0.3. Then, according to the formula, the sub - graph segmentation value S can be calculated as: S = 0.7×1000+0.3×120 = 700 + 36 = 736. This segmentation value reflects the comprehensive characteristics of the sub - graph in terms of area and perimeter.

[0044] S103. According to the obtained sub - images, arrange the obtained sub - images in chronological order to form special - effect elements, and store the formed special - effect elements in the special - effect element library.

[0045] Furthermore, arrange the obtained sub - images in chronological order. Arrange the sub - images in sequence according to the order in which they appear in the original video. The sub - images after arrangement and processing are combined into a special - effect element with temporal continuity, and the formed special - effect element is stored in the special - effect element library.

[0046] S104. According to the formed special - effect elements, use a game engine to build a special - effect simulation system. The special - effect simulation system includes a simulation module, a special - effect integration module, and a special - effect generation module.

[0047] Specifically, the terrain editor and building model library in the game engine Unreal Engine in the simulation module build a virtual game scene. The special effect integration module integrates the special effect element library into the game scene simulation system. The special effect generation module writes scripts or plugins to enable the system to simulate various special effects according to the parameters in the special effect element library. The scripts or plugins are responsible for generating and rendering special effects in real time in the game scene. According to the parameters and scripts in the special effect element library, virtual special effects are generated in real time. The generation process of the special effects is synchronized with the simulation process of the game scene, so that the special effects are integrated with the scene.

[0048] S105. According to the built special effect simulation system, set up a virtual camera, use the virtual camera to capture special effect elements, evaluate the special effect elements captured by the virtual camera, and adjust the parameters of the virtual special effects according to the evaluation results;

[0049] Furthermore, in the game special effect simulation system, set up a virtual camera, adjust the parameters of the virtual camera so that the virtual camera can capture special effect elements, render the special effect elements captured by the virtual camera, output the rendered special effect video, and experts evaluate the special effect video. Adjust the special effect parameters in the special effect element library according to the expert evaluation results to ensure that the modified parameters can more accurately simulate real game special effects.

[0050] The technical solutions in the embodiments of the present application at least have the following technical effects or advantages: Select the corresponding segmentation method according to the segmentation position and segmentation shape, improve the accuracy and efficiency of special effect segmentation, ensure the accuracy and integrity of sub-images by calculating the sub-image segmentation value, realize the real-time generation and rendering of special effect elements, and realize the simulation and verification of game special effects by building a special effect simulation system, shorten the cycle of special effect design and verification, provide a rich special effect element library, provide more choices and possibilities for game development, and improve the playability and attractiveness of the game.

[0051] Embodiment 2: Based on the sub-images obtained in Embodiment 1, arrange the obtained sub-images in chronological order to form special effect elements. In Embodiment 1, the special effect elements formed only by arranging in chronological order will have jams and poor coherence. In this embodiment, the obtained sub-images are copied and spliced so that two adjacent sub-images can be more coherently connected together.

[0052] Such as Figure 2 As shown, the specific steps of splicing the obtained sub-images to form special effect elements are as follows:

[0053] S201. Copy the sub-images obtained by segmentation and splice the copied sub-images into the next frame of sub-images;

[0054] Specifically, the sub-image data is stored in the memory of a computer. For the sub-images stored in the memory, the copy operation copies the data from one memory area to another. The sub-images are copied through the memory copy function provided by the programming language to ensure the efficiency and accuracy of the copying process, so that the copied sub-images are exactly the same as the original sub-images in terms of content, color, and resolution, in order to avoid visual differences during stitching.

[0055] Identify the features of the current sub-image and the next-frame sub-image. Use SIFT (Scale-Invariant Feature Transform) to extract the features of the sub-images, extracting the edges, corners, and textures of the sub-images. Edges are the places where the brightness or color in the image changes sharply, defining the contours and shapes of objects; corners are the places where two edges intersect in the image, with a high local contrast and being important features in image matching and alignment; textures are the recurring patterns or structures in the image, providing information about the surface material and details of the object. Store the extracted edge, corner, and texture features of the sub-images. Use the image processing software Photoshop to label the feature points identified in the current sub-image and the next-frame sub-image. According to the labeled feature points, use the programming tool OpenCV to match the feature points of the current sub-image with those of the next-frame sub-image to obtain the stitching position of the next-frame sub-image. The stitching position is the position of the feature points of the next-frame sub-image where the feature points of the two sub-images are successfully matched. Align the current sub-image to the stitching position of the next-frame sub-image, and use image synthesis technology to superimpose and fuse the two sub-images to achieve stitching.

[0056] According to the above stitching of sub-images, in this embodiment, a stitching module is introduced. The stitching module can read and load sub-images stored in different formats, and the position adjustment of the stitching module can be based on the stitching position specified by the user or automatically calculated by an algorithm. The position of the sub-image is adjusted, and the position adjustment includes translation, rotation, and scaling operations to ensure that the sub-image can be accurately superimposed on the specified position of the next-frame sub-image. The image synthesis of the stitching module can stitch the two sub-images, and save and output the stitched image.

[0057] S202. According to the stitched sub-images, arrange the obtained stitched sub-images in chronological order to form special effect elements, and judge whether the special effect elements are coherent by calculating the similarity of the overlapping areas between adjacent frames;

[0058] Further, by calculating the mean square error of the pixel values in the overlapping region between adjacent frames, calculating the similarity based on the value of the mean square error, setting a similarity threshold according to the requirements of the application scenario and visual effect, comparing the calculated similarity with the set similarity threshold, if the similarity is greater than the similarity threshold, it indicates that the visual consistency of adjacent frames in the overlapping region is high and they are considered coherent. If the similarity is less than or equal to the similarity threshold, if the similarity value is less than or equal to the similarity threshold, it means that there is incoherence between adjacent frames in the overlapping region. Record the frame pairs with incoherence, and adjust the segmentation method and splicing position of the sub-images according to the sub-images corresponding to the incoherent frame pairs to adjust the incoherence between adjacent frames.

[0059] The technical solutions in the embodiments of the present application at least have the following technical effects or advantages: By copying and splicing sub-images, adjacent two sub-images can be connected more coherently. By calculating the similarity of the overlapping region between adjacent frames and adjusting the incoherent frame pairs, the high visual consistency of the special effect elements is ensured. By using the memory copy function to copy the sub-images, the efficiency and accuracy of the copying process are ensured, and visual differences during splicing are avoided.

[0060] Embodiment 3: Based on the fixed position and fixed shape segmentation of the image in Embodiment 1 and Embodiment 2, this embodiment uses dynamic position and dynamic shape to segment the image, making the segmented regions more conform to the actual content and shape of the special effect image, and improving the segmentation accuracy.

[0061] As Figure 3 shown, the specific steps of segmenting the special effect image using dynamic position and dynamic shape are as follows:

[0062] S301, according to the images extracted from the historical special effect videos, use a convolutional neural network to identify the special effect elements in the extracted images;

[0063] Specifically, select a trained convolutional neural network (CNN), which has strong feature extraction and object recognition capabilities. Input the image into the convolutional neural network. The convolutional neural network includes multiple convolutional layers and pooling layers. The convolutional layers and pooling layers are responsible for extracting low-level and high-level features in the image. The low-level features include edges, corners, and textures, while the high-level features represent the parts or overall shapes of objects. Through convolutional and pooling operations, the network converts the image into a series of feature maps. The convolutional neural network combines the extracted features through fully connected layers, and maps the features to predefined categories, including people, scenery, and light effects. The convolutional neural network identifies special effect elements such as people, scenery, and light effects in the image.

[0064] S302. Extract the position, distribution, shape, and size of the special effect elements based on the recognized special effect elements, and divide the image into several segmentation regions.

[0065] Specifically, based on the recognized special effect elements, extract the position, distribution, shape, and size of the special effect elements. According to the shape characteristics of the recognized special effect elements, select the shape of the segmentation region. For regular-shaped special effect elements, such as buildings or people, use rectangles as the segmentation regions. For circular or approximately circular special effect elements, such as light spots or certain ornaments, select circles as the segmentation regions. For special effect elements with irregular shapes or complex distributions, such as natural landscapes or complex light effects, use polygons as the segmentation regions. According to the selected shape of the segmentation region, use the image processing software Photoshop to divide the image into several initial segmentation regions. During the division process, make each segmentation region tightly enclose the special effect elements within it. At the same time, ensure that the segmentation regions do not overlap. After the initial segmentation is completed, verify the segmentation regions and evaluate the accuracy of the segmentation through visual inspection.

[0066] S303. Based on the formed several segmentation regions, dynamically select a target segmentation region from the several segmentation regions, and segment the image according to the target segmentation region.

[0067] Furthermore, include the several initial segmentation regions formed by segmentation in a region list to be processed. The region list is used to track the importance score and complexity score of each region, as well as record whether each region has been selected and the order of selection. Evaluate the importance of each segmentation region, which is determined based on the amount of main characters, core scenery, or key information contained in the region, and assign an importance score to each region. Evaluate the complexity of each segmentation region, which is determined based on the irregularity degree of the region's shape, the complexity of the edge, or the diversity of the internal texture, and assign a complexity score to each region. Sort the region list in descending order according to the importance score, so that regions with higher importance are ranked in the front. At the same time, retain the complexity score. Set a selection flag, which is used to indicate whether to select the region with the highest importance or the highest complexity currently. If the selection flag indicates to select the region with the highest importance, select the region with the highest importance score and not yet selected as the segmentation object from the sorted region list. After the selection is completed, update the selection flag to indicate to select the region with high complexity next time. If the selection flag indicates to select the region with the highest complexity, select the region with the highest complexity score as the segmentation object among the regions not yet selected (if the complexity scores are the same, you can select randomly or according to other secondary criteria). After selecting the target segmentation region, update the status record, mark that the region has been selected, and record the order of selection. Segment the image according to the selected target segmentation region, and the segmentation method uses the segmentation scheme of Embodiment 1, which will not be elaborated here.

[0068] S304. Calculate the dynamic sub - graph segmentation value based on the selected target segmentation area, and determine whether the special effect elements are coherent according to the obtained dynamic sub - graph segmentation value;

[0069] Specifically, calculate the dynamic sub - graph threshold by calculating the pixel value difference, edge matching degree, and texture similarity. The pixel value difference is to compare the distribution of pixel values within the sub - image, calculate the difference between pixel values, and use it to evaluate the uniformity and change degree of the image. The mean square error (MSE) is used to calculate the average degree of pixel value difference. The smaller the MSE, the more uniform the image. \(MSE=\frac{1}{N}\sum_{i,j}(I(i,j)-K(i,j))^{2}\), where \(I(i,j)\) and \(K(i,j)\) respectively represent the pixel values of the original image and the sub - image after segmentation at the position \((i,j)\), and \(N\) is the total number of pixels. The edge matching degree is to calculate the matching degree between the edges of the sub - image to evaluate whether the boundary of the segmentation area is accurate. The percentage matching degree is used to calculate the matching degree of the edge or texture. The higher the percentage, the higher the matching degree. \(EMP = \frac{M}{T}\times100\%\), where \(M\) is the number of matching edge points, \(T\) is the total number of edge points, and \(EMP\) is the percentage matching degree. The texture similarity is used to evaluate the consistency of the texture within the segmentation area. The gray - level co - occurrence matrix (GLCM) is used to calculate the similarity between textures. \(DSV=w_{MES}\times(1 - MES)+w_{EMP}\times EMP+w_{TSM}\times TSM\), where \(w_{MES}\), \(w_{EMP}\), and \(w_{TSM}\) are the mean square weights respectively, and \(w_{MES}+w_{EMP}+w_{TSM}=1\). \(1 - MSE\) is because the smaller the MSE, the more uniform or less variable the image, so \(1 - MSE\) is used as the dynamic sub - graph segmentation value.

[0070] According to the experimental data, empirical values, or the requirements of specific application scenarios, set the threshold range of the dynamic sub - graph segmentation value. Compare the calculated dynamic sub - graph segmentation value with the threshold range of the dynamic sub - graph segmentation value. If the sub - graph segmentation value is within the threshold range, it is considered that the special effect elements after segmentation are coherent; otherwise, it is considered that the special effect elements are not coherent. If the special effect elements are not coherent, adjust the segmentation method and splicing position of the sub - image to adjust the incoherence between adjacent frames.

[0071] The technical solutions in the embodiments of the present application at least have the following technical effects or advantages: The application of dynamic position and dynamic shape makes the segmentation area more conform to the actual content and shape of the special effect image, improves the accuracy of segmentation, is no longer limited to fixed positions and shapes, can perform dynamic segmentation according to the characteristics and requirements of the special effect image, enhances the flexibility of segmentation. By calculating the sub - graph segmentation value, the segmentation effect can be quantitatively evaluated, providing a basis for optimizing the segmentation algorithm and parameters. By verifying the sub - graph segmentation value, it can ensure that the special effect elements after segmentation are visually coherent, improving the overall effect of the special effect.

[0072] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A digital special effects simulation online preview platform, characterized in that: include: A segmentation module and a special effect simulation system, wherein the special effect simulation system comprises a simulation module, a special effect integration module and a special effect generation module; The segmentation module is used to collect special effect videos that already exist in the past, extract special effect images from the special effect videos that already exist in the past, determine the segmentation position and segmentation boundary of the special effect image according to the position of the special effect elements in the special effect image, segment the special effect image according to the segmentation position and segmentation boundary to form sub-images, and calculate the sub-image segmentation value according to the formed sub-images; According to the obtained sub-images, the obtained sub-images are arranged in time sequence to form special effect elements, the formed special effect elements are stored in a special effect element library, and whether the special effect elements are coherent is determined according to the sub-image segmentation values; Wherein, a threshold range of the sub-image segmentation value is set, and the calculated sub-image segmentation value is compared with the threshold range of the sub-image segmentation value. If the sub-image segmentation value is within the threshold range, it is determined that the special effect element after segmentation is coherent; otherwise, it is determined that the special effect element is incoherent; The simulation module uses a game engine to build a special effect simulation system based on the formed special effect elements, the special effect integration module integrates the special effects in the special effect element library into the special effect simulation system, and the special effect generation module simulates various special effects based on the special effect parameters integrated into the special effect simulation system; According to the constructed special effects simulation system, a virtual camera is set up, special effects elements are shot with the virtual camera, the special effects elements shot by the virtual camera are evaluated, and the parameters of the virtual special effects are adjusted according to the evaluation results. Based on the adjusted parameters, a simulated game scene is generated.

2. A digital special effects simulation online preview platform as claimed in claim 1, characterized in that: The method for determining the segmentation boundary is as follows: the segmentation module extracts special effect images from historical special effect videos, identifies the position of special effect elements in the special effect images based on the extracted special effect images, selects several reference points in the special effect images, the reference points are the center points or edge points of the special effect elements, and the selected several reference points are enclosed into a reference area. According to the reference area, the segmentation boundary is divided into an arc boundary and a straight-edge boundary. By calculating the curvature between adjacent points on the boundary, a curvature threshold range is preset. When the curvature between adjacent points on the boundary is within the curvature threshold range, the boundary is an arc boundary, otherwise, it is a straight-edge boundary.

3. A digital special effects simulation online preview platform as claimed in claim 2, characterized in that: The sub-image segmentation value is obtained by calculating the area and perimeter of the sub-image. For the area, each pixel point in the area is traversed according to the reference area, and a counter is used to count each pixel point belonging to the sub-image. After the traversal is completed, the value of the counter is the area of ​​the sub-image, and the area is in pixels. For the perimeter, after binarizing the obtained sub-image according to the reference area, identify the external edge pixels, set a counter when traversing each external edge pixel, and after the traversal is completed, count wA×A+wP×P, where wA is the weight of the area feature, wP is the weight of the perimeter feature, S is the sub-image segmentation value, A is the area of ​​the sub-image, and P is the perimeter of the sub-image; wherein, the external edge pixel refers to a pixel located on the boundary of the sub-image area and at least one adjacent pixel belongs to the background. All pixels in the sub-image area are traversed and the neighborhood of each pixel is checked. If there is a pixel belonging to the background in the neighborhood of a pixel, the pixel is considered to be an external edge pixel.

4. A digital special effects simulation online preview platform as claimed in claim 1, characterized in that: The special effect simulation system further includes a splicing module, which is specifically used for: The sub-image obtained by segmentation is copied, and the copied sub-image is spliced ​​into the sub-image of the next frame; According to the stitched sub-images, the obtained stitched sub-images are arranged in time sequence to form special effect elements, and whether the special effect elements are coherent is determined by calculating the similarity of overlapping areas between adjacent frames.

5. A digital special effects simulation online preview platform as claimed in claim 4, characterized in that: The similarity is calculated by calculating the mean square error of the pixel values ​​in the overlapping area between adjacent frames.

6. A digital special effects simulation online preview platform as claimed in claim 1, characterized in that: The segmentation module is also used to identify special effect elements of special effect images extracted from historical special effect videos using a machine learning algorithm; Used to extract the position, distribution, shape and size of the special effect elements according to the identified special effect elements, and divide the special effect image into a number of segmented areas; Used to form a number of segmentation areas according to the division, dynamically select a target segmentation area from the number of segmentation areas, and segment the special effect image according to the target segmentation area; as well as It is used to calculate the dynamic sub-image segmentation value according to the selected target segmentation area, and judge whether the special effect elements are coherent according to the obtained dynamic sub-image segmentation value.

7. A digital special effects simulation online preview platform as claimed in claim 6, characterized in that: List the formed several segmented regions into a list of regions to be processed, and perform importance and complexity scores on each segmented region; sort the region list in descending order according to the importance scores, so that regions with high importance are placed at the front, and at the same time, retain the complexity scores; Set a selection flag. If the selection flag indicates to select the region with the highest importance, select the region with the highest importance score and not selected as the segmentation object from the sorted region list. After the selection is completed, update the selection flag. If the selection flag indicates to select the region with the highest complexity, select the region with the highest complexity score among the unselected regions as the segmentation object to form the target segmentation region.

8. A digital special effects simulation online preview platform as claimed in claim 7, characterized in that: The selection flag is used to indicate whether the region with the highest importance or the region with the highest complexity is currently selected.

9. A digital special effects simulation online preview platform as claimed in claim 6, characterized in that: By calculating the pixel value difference wMES×(1-MES)+wEMP×EMP+wTSM×TSM, where wMES, wEMP and wTSM are the mean square wMES+wEMP+wTSM=1 respectively; DSSV is the sub-image dynamic segmentation value; MES is the mean square error, EMP is the percentage matching degree, and TSM is the texture similarity.

10. A digital special effects simulation online preview platform as claimed in claim 9, characterized in that: The mean square error is calculated as 1N(I(i,j)-K(i,j))2, where I(i,j) and K(i,j) represent the image MT×100% of the original image and the segmented sub-image at the (i,j) position, respectively, where M is the number of matching edge points, T is the total number of edge points, and EMP is the percentage matching degree.

Citation Information

Patent Citations

  • A Simulation Design and Verification Method for Live Streaming Solutions

    CN111711733B

Cited By

  • Special effect positioning generation method and device, equipment and medium

    CN121266116A