Rendering method and system for animation picture
By performing a series of automated processing on the cartoon picture, including color gamut conversion, semantic mining and light intersection calculation, the problem of poor adaptability of the existing rendering methods is solved, and the rendering quality and visual reality of the cartoon picture are improved.
Patent Information
- Application Number
- CN202411454817.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing cartoon picture rendering methods rely on manual settings of parameters and adjustments, which have poor adaptability and low rendering quality.
By performing color gamut conversion, pixel reconstruction, noise filtering, semantic mining, light source radiation angle calculation, element radiation density calculation and light intersection processing on the cartoon picture, the elements to be rendered are automatically extracted and rendered and output.
It improves the rendering quality of the cartoon picture, enhances the depth of understanding of the cartoon picture, and improves the visual reality and overall rendering effect.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a rendering method and system for cartoon images, belonging to the technical field of image processing. Background Art
[0002] The animation industry is developing rapidly in today's cultural and entertainment field. Exquisite animation pictures are one of the key factors to attract audiences. In the animation production process, picture rendering plays a vital role, which can transform two-dimensional or three-dimensional models into realistic and artistic images.
[0003] Existing animation scene rendering is mainly achieved through traditional rendering software. The needs and style requirements of the rendering scene are determined, and the appropriate rendering software is selected according to the scene complexity, hardware configuration, special effects requirements and other requirements. The rendering software and its plug-ins are installed, and the corresponding graphics processing hardware is connected. The interface and tools provided by the rendering software are used, and the rendering settings are written according to the art design. Common settings include lighting parameters, material properties, texture mapping, etc. The set parameters are applied to the scene model, and the rendering process is started. The rendering software renders the picture frame by frame according to the preset parameters and algorithms. However, this method mainly relies on manual setting of parameters and adjustments, and has poor adaptability to complex and changeable animation scenes, which in turn reduces the rendering quality of the animation picture. Summary of the invention
[0004] The present invention provides a rendering method and system for cartoon pictures, the main purpose of which is to solve the problem of reducing the rendering quality of cartoon pictures.
[0005] To achieve the above object, the present invention provides a method for rendering an animation picture, comprising:
[0006] Acquire a cartoon picture to be rendered, perform color gamut conversion processing on the cartoon picture to obtain a target color gamut cartoon picture, perform pixel reconstruction processing on the target color gamut cartoon picture to obtain a reconstructed color gamut cartoon picture, and perform noise filtering processing on the reconstructed color gamut cartoon picture to obtain a noise-filtered color gamut cartoon picture;
[0007] Performing semantic mining on the noise-filtered color gamut animation picture to obtain a picture semantic representation, analyzing the picture characteristic style corresponding to the noise-filtered color gamut animation picture based on the picture semantic representation, and extracting the elements to be rendered in the noise-filtered color gamut animation picture based on the picture characteristic style;
[0008] Identify the screen light source in the noise-filtered color gamut animation screen, and measure the light source radiation angle of the screen light source with respect to the element to be rendered, calculate the radiation power of the screen light source to the element to be rendered in combination with the light source radiation angle, and calculate the element radiation density corresponding to the element to be rendered in combination with the light source radiation angle and the radiation power;
[0009] In combination with the element radiation density and the radiation power, the outgoing radiation intensity corresponding to the element to be rendered is calculated, and in combination with the radiation power and the outgoing radiation intensity, a light conversion mechanism in the noise-filtered color gamut animation picture is determined, and according to the light conversion mechanism and the element to be rendered, a light intersection calculation operation is performed on the picture light source to obtain a rendering light intersection point;
[0010] Based on the picture light source, the element to be rendered is rendered and output to obtain a rendering element, and the noise-filtered color gamut animation picture is updated and processed using the rendering element to obtain a rendered animation picture.
[0011] Optionally, performing noise filtering on the reconstructed color gamut animation picture to obtain a noise-filtered color gamut animation picture includes:
[0012] Performing block processing on the reconstructed color gamut animation picture to obtain a block color gamut animation picture;
[0013] Performing weighted smoothing processing on the block color gamut animation picture to obtain a smooth color gamut animation picture;
[0014] The smooth color gamut animation picture is collaboratively stitched to obtain a noise-filtered color gamut animation picture.
[0015] Optionally, performing weighted smoothing processing on the block color gamut animation picture to obtain a smooth color gamut animation picture includes:
[0016] Identifying a central pixel in the block color gamut animation picture;
[0017] Based on the central pixel, the spatial distance weights corresponding to other pixels in the block color gamut animation picture are calculated by the following formula:
[0018]
[0019] Among them, A represents the spatial distance weight corresponding to other pixels in the block color gamut animation picture, i and j represent the coordinate values corresponding to the center pixel, a and b represent the coordinates outside the center pixel in the block color gamut animation picture, β represents the pixel standard deviation,
[0020] Based on the spatial distance weight and the central pixel, other pixels in the block color gamut animation picture are smoothed to obtain smoothed pixel values;
[0021] The smoothed pixel values are used to perform pixel replacement processing on the block color gamut animation picture to obtain a smoothed color gamut animation picture.
[0022] Optionally, the performing semantic mining on the noise-filtered color gamut animation picture to obtain a picture semantic representation includes:
[0023] Performing target detection on the noise-filtered color gamut animation picture to obtain an animation picture target, and performing label assignment on the animation picture target to obtain a target label;
[0024] Performing scene recognition on the noise-filtered color domain animation picture to obtain the animation picture scene, and performing emotion analysis on the animation picture scene to obtain the scene emotion;
[0025] Analyzing the mapping relationship between the animation picture target and the animation picture scene;
[0026] Performing semantic fusion on the target label, the scene emotion and the mapping relationship to obtain animation picture semantics;
[0027] The animation picture semantics are encoded to obtain a picture semantic representation.
[0028] Optionally, extracting the elements to be rendered in the noise-filtered color gamut animation picture based on the picture characteristics and style includes:
[0029] Identify the image composition elements in the noise-filtered color gamut animation image, and analyze the style features corresponding to the image characteristic style;
[0030] Calculating the matching coefficient between the picture composition elements and the style features;
[0031] Based on the matching coefficient, analyzing the degree of fit between the picture composition elements and the style features;
[0032] Based on the degree of fit, elements to be rendered in the noise-filtered color gamut animation picture are extracted from the picture constituent elements.
[0033] Optionally, the calculating the radiation power of the picture light source to the element to be rendered in combination with the radiation angle of the light source includes:
[0034] Measuring the regional screen brightness corresponding to the screen light source, and calculating the average screen brightness corresponding to the regional screen brightness;
[0035] Calculating the light source intensity corresponding to the picture light source based on the average picture brightness and a preset brightness-light intensity conversion coefficient;
[0036] The radiation power of the picture light source to the element to be rendered is calculated based on the light source intensity and the light source radiation angle.
[0037] Optionally, the calculating the element radiation density corresponding to the element to be rendered by combining the light source radiation angle and the radiation power includes:
[0038] Draw an element normal corresponding to the element to be rendered, and determine the light incident angle corresponding to the element to be rendered based on the element normal and the light source radiation angle;
[0039] The element radiation area corresponding to the element to be rendered is measured, and the element radiation density corresponding to the element to be rendered is calculated by combining the element radiation area, the light incident angle, the light source radiation angle and the radiation power through the following formula:
[0040]
[0041] Among them, B represents the element radiation density corresponding to the element to be rendered, E represents the radiation power, and d 2 E represents the second-order differential of the radiation power, F represents the radiation area of the element, δ represents the radiation angle of the light source, θ represents the incident angle of light, dF represents a small change in the radiation area of the element, and dδ represents a small change in the radiation angle of the light source.
[0042] Optionally, the calculating the outgoing radiation intensity corresponding to the element to be rendered by combining the element radiation density and the radiation power includes:
[0043] Measuring the self-luminous intensity corresponding to the element to be rendered;
[0044] Combining the element radiation density, the radiation power and the self-luminous intensity, the emitted radiation intensity corresponding to the element to be rendered is calculated by the following formula:
[0045]
[0046] Where D represents the emitted radiation intensity corresponding to the element to be rendered, G e represents the self-luminous intensity corresponding to the e-th element in the element to be rendered, e represents the serial number corresponding to the element to be rendered, H() represents the reflection conversion ratio function, Ω represents the hemispherical space where the element to be rendered is located, Indicates that the e-th element in the element to be rendered is at point N along the direction , μ represents the angle between the normal of the e-th element to be rendered at point N and the incident light, and dμ represents the change in the angle between the normal of the e-th element to be rendered at point N and the incident light.
[0047] Optionally, the rendering and outputting the element to be rendered based on the picture light source to obtain the rendered element includes:
[0048] Analyze the light source color attribute corresponding to the picture light source, and calculate the full lighting effect corresponding to the rendering light intersection point using a preset lighting model based on the light source color attribute;
[0049] Based on the full lighting effect, determining the light color attribute corresponding to the rendering light intersection point;
[0050] Performing attribute synthesis processing on the light color attribute to obtain a pixel color value;
[0051] The pixel color value is used to perform pixel output on the element to be rendered to obtain a rendering element.
[0052] A rendering system for an animation picture, characterized in that the system comprises:
[0053] A picture noise filtering module is used to obtain a cartoon picture to be rendered, perform a color gamut conversion process on the cartoon picture to obtain a target color gamut cartoon picture, perform a pixel reconstruction process on the target color gamut cartoon picture to obtain a reconstructed color gamut cartoon picture, and perform a noise filtering process on the reconstructed color gamut cartoon picture to obtain a noise-filtered color gamut cartoon picture;
[0054] An element extraction module is used to perform semantic mining on the noise-filtered color gamut animation picture to obtain a picture semantic representation, analyze the picture characteristic style corresponding to the noise-filtered color gamut animation picture based on the picture semantic representation, and extract the elements to be rendered in the noise-filtered color gamut animation picture based on the picture characteristic style;
[0055] A radiation density calculation module is used to identify the screen light source in the noise-filtered color gamut animation screen, and measure the light source radiation angle of the screen light source with respect to the element to be rendered, and calculate the radiation power of the screen light source to the element to be rendered in combination with the light source radiation angle, and calculate the element radiation density corresponding to the element to be rendered in combination with the light source radiation angle and the radiation power;
[0056] A light intersection processing module is used to calculate the outgoing radiation intensity corresponding to the element to be rendered by combining the element radiation density and the radiation power, determine the light conversion mechanism in the noise-filtered color gamut animation picture by combining the radiation power and the outgoing radiation intensity, and perform a light intersection calculation operation on the picture light source according to the light conversion mechanism and the element to be rendered to obtain a rendering light intersection;
[0057] A rendering processing module is used to render and output the elements to be rendered based on the picture light source to obtain rendering elements, and use the rendering elements to update the noise-filtered color gamut animation picture to obtain a rendered animation picture.
[0058] Compared with the problems described in the background technology, the present invention can convert the animation picture into a color space that is more suitable for rendering by performing color gamut conversion processing on the animation picture, and can adjust the resolution of the target color gamut picture to an appropriate value by performing pixel reconstruction processing on the target color gamut animation picture to improve the clarity of the target color gamut picture. The present invention can increase the depth of understanding of the noise-filtered color gamut animation picture through the picture semantic representation by performing semantic mining on the noise-filtered color gamut animation picture, thereby facilitating the subsequent analysis and processing of the picture characteristic style corresponding to the noise-filtered color gamut animation picture. The present invention can calculate the radiation power of the picture light source to the element to be rendered by combining the radiation angle of the light source, so as to understand the picture. The energy radiated by the surface light source to the element to be rendered, thus laying an important foundation for the subsequent calculation of the element radiation density corresponding to the element to be rendered. The present invention calculates the outgoing radiation intensity corresponding to the element to be rendered by combining the element radiation density and the radiation power, so as to understand the light intensity value after the image light source irradiates the element to be rendered and is reflected, thereby providing a basis for the subsequent determination of the light conversion mechanism in the noise-filtered color domain animation image. The present invention renders and outputs the element to be rendered based on the image light source, and can obtain the element after the visual effect of the element to be rendered is enhanced, thereby improving the visual realism of the element to be rendered, and then improving the rendering quality of the noise-filtered color domain animation image. Therefore, the present invention proposes a rendering method and system for animation images, thereby improving the rendering quality of animation images. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 A schematic diagram of a flow chart of a method for rendering an animation screen provided by an embodiment of the present invention;
[0060] Figure 2 A functional module diagram of a rendering system for animation images provided in accordance with an embodiment of the present invention.
[0061] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0062] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0063] The embodiment of the present application provides a rendering method for an animation screen. The execution subject of the rendering method for an animation screen includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the rendering method for an animation screen can be executed by software or hardware installed on a terminal device or a server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0064] Embodiment 1:
[0065] Reference Figure 1 FIG. 1 is a flow chart of a method for rendering an animation screen provided by an embodiment of the present invention. In this embodiment, the method for rendering an animation screen includes:
[0066] S1. Obtain an animation picture to be rendered, perform color gamut conversion processing on the animation picture to obtain a target color gamut animation picture, perform pixel reconstruction processing on the target color gamut animation picture to obtain a reconstructed color gamut animation picture, and perform noise filtering processing on the reconstructed color gamut animation picture to obtain a noise-filtered color gamut animation picture.
[0067] The present invention can convert the animation picture into a color space that is more suitable for rendering by performing color gamut conversion processing on the animation picture, and can adjust the resolution of the target color gamut picture to an appropriate value by performing pixel reconstruction processing on the target color gamut animation picture to improve the clarity of the target color gamut picture.
[0068] It should be explained that the animation picture is the original image content that has not been rendered, the target color gamut animation picture is the animation picture obtained after the animation picture is converted and processed by a specific color gamut, and the reconstructed color gamut animation picture is the animation picture obtained after the resolution of the target color gamut animation picture is adjusted. Exemplarily, the color gamut conversion processing of the animation picture can be achieved by a color gamut conversion tool, and the color gamut conversion tool is compiled by a scripting language, such as JS scripting language; the pixel reshaping processing of the target color gamut animation picture can be achieved by Adobe Photoshop tools.
[0069] The present invention can remove noise points in the reconstructed color gamut animation picture by performing noise filtering processing on the reconstructed color gamut animation picture to improve the picture quality of the reconstructed color gamut animation picture. It should be explained that the noise-filtered color gamut animation picture is the animation picture obtained after removing the noise interference in the reconstructed color gamut animation picture.
[0070] In detail, the performing noise filtering on the reconstructed color gamut animation picture to obtain the noise filtered color gamut animation picture includes:
[0071] Performing block processing on the reconstructed color gamut animation picture to obtain a block color gamut animation picture;
[0072] Performing weighted smoothing processing on the block color gamut animation picture to obtain a smooth color gamut animation picture;
[0073] The smooth color gamut animation picture is collaboratively stitched to obtain a noise-filtered color gamut animation picture.
[0074] It should be explained that the blocked color gamut animation picture is a picture in which the reconstructed color gamut animation picture is divided into many image sub-blocks, and the smooth color gamut animation picture is a picture obtained after the blocked color gamut animation picture is processed by noise filtering. Furthermore, the block processing of the reconstructed color gamut animation picture can be implemented through a computer vision programming library, such as OpenCV; the collaborative stitching processing of the smooth color gamut animation picture can be implemented through a Poisson fusion algorithm.
[0075] Further, as an optional embodiment of the present invention, the weighted smoothing process is performed on the block color gamut animation picture to obtain a smooth color gamut animation picture, including:
[0076] Identifying a central pixel in the block color gamut animation picture;
[0077] Based on the central pixel, the spatial distance weights corresponding to other pixels in the block color gamut animation picture are calculated by the following formula:
[0078]
[0079] Among them, A represents the spatial distance weight corresponding to other pixels in the block color gamut animation picture, i and j represent the coordinate values corresponding to the center pixel, a and b represent the coordinates outside the center pixel in the block color gamut animation picture, β represents the pixel standard deviation,
[0080] Based on the spatial distance weight and the central pixel, other pixels in the block color gamut animation picture are smoothed to obtain smoothed pixel values;
[0081] The smoothed pixel values are used to perform pixel replacement processing on the block color gamut animation picture to obtain a smoothed color gamut animation picture.
[0082] It should be explained that the center pixel is the reference base point of the block color gamut animation picture, the spatial distance weight represents the importance of the relative positions of other pixels in the block color gamut animation picture, and the smoothed pixel value is the pixel value obtained after weighting other pixels in the block color gamut animation picture by the spatial distance weight.
[0083] Furthermore, the identification of the central pixel in the block color gamut animation picture can be achieved through a uniform blocking method; the pixel standard deviation can be achieved through a standard deviation calculator, which is compiled by a programming language; the spatial distance weight and the pixel values of the RGB three channels in the central pixel are multiplied and summed to obtain a smoothed pixel value.
[0084] S2. Perform semantic mining on the noise-filtered color gamut animation picture to obtain a picture semantic representation, analyze the picture characteristic style corresponding to the noise-filtered color gamut animation picture based on the picture semantic representation, and extract the elements to be rendered in the noise-filtered color gamut animation picture based on the picture characteristic style.
[0085] By performing semantic mining on the noise-filtered color gamut animation picture, the present invention can increase the depth of understanding of the noise-filtered color gamut animation picture through the picture semantic representation, thereby facilitating subsequent analysis and processing of the picture characteristic style corresponding to the noise-filtered color gamut animation picture.
[0086] It should be explained that the picture semantic representation is an abstract expression of the noise-filtered color gamut animation picture, such as a set of semantic information formed by refining and summarizing the scenes, characters, actions, emotions and other elements presented in the noise-filtered color gamut animation picture. It can help people understand the core content and theme meaning of the noise-filtered color gamut animation picture more quickly and accurately.
[0087] Specifically, the semantic mining of the noise-filtered color gamut animation picture to obtain the picture semantic representation includes:
[0088] Performing target detection on the noise-filtered color gamut animation picture to obtain an animation picture target, and performing label assignment on the animation picture target to obtain a target label;
[0089] Performing scene recognition on the noise-filtered color domain animation picture to obtain the animation picture scene, and performing emotion analysis on the animation picture scene to obtain the scene emotion;
[0090] Analyzing the mapping relationship between the animation picture target and the animation picture scene;
[0091] Performing semantic fusion on the target label, the scene emotion and the mapping relationship to obtain animation picture semantics;
[0092] The animation picture semantics are encoded to obtain a picture semantic representation.
[0093] It should be explained that the animation picture target is the picture subject in the noise-filtered color gamut animation picture, such as characters, animals and objects, etc., the target label is the category information of the animation picture target, the animation picture scene is the situational atmosphere of the noise-filtered color gamut animation picture, the scene emotion is the emotional atmosphere expressed by the animation picture scene, the mapping relationship is the association method between the animation picture target and the animation picture scene, and the animation picture semantics is the comprehensive embodiment of the target label, the scene emotion and the mapping relationship.
[0094] Furthermore, the target detection of the noise-filtered color domain animation picture can be achieved through the Canny edge detection algorithm; the label assignment of the animation picture target can be achieved through a supervised learning method, such as a support vector machine; the scene recognition of the noise-filtered color domain animation picture can be achieved through a convolutional neural network, such as using different convolutional layers and pooling layers to extract features at different levels, and finally classifying through a fully connected layer to determine the scene type; the sentiment analysis of the animation picture scene can be achieved through a sentiment analysis model, such as an attention mechanism model; the physical interaction relationship between the animation picture target and the animation picture scene, based on the physical interaction relationship, a mapping relationship is obtained, such as the character's walking, jumping, climbing and other actions in the scene. These interactions can show the target's degree of adaptation to the scene and its close connection with the scene; the semantics of the animation picture can be obtained by vectorizing the target label, the scene emotion and the mapping relationship, and fusing the obtained vectors; the encoding processing of the animation picture semantics can be achieved through an encoding algorithm, such as an autoencoder algorithm.
[0095] The present invention analyzes the picture characteristic style corresponding to the noise-filtered color gamut animation picture based on the picture semantic representation, so as to understand the overall style of the noise-filtered color gamut animation picture, and extracts the elements to be rendered in the noise-filtered color gamut animation picture based on the picture characteristic style, so as to obtain the targets to be rendered in the noise-filtered color gamut animation picture, thereby providing a clear processing direction for subsequent rendering processing.
[0096] It should be explained that the picture characteristic style is to understand the overall style of the noise-filtered color gamut animation picture, such as realism, cartoon and watercolor styles. The element to be rendered is the target that needs to be rendered in the noise-filtered color gamut animation picture. Further, the expression meaning corresponding to the picture semantic representation can be analyzed, and the picture characteristic style corresponding to the noise-filtered color gamut animation picture is analyzed based on the expression meaning. For example, there is a cute elf flying in the gorgeous flowers in the picture, and colorful lights are flashing around it. The expression meaning is full of vitality and fantasy. Based on this, the picture characteristic style is lively and cheerful, with bright and rich colors, full of fantasy, and conveys a relaxed and pleasant atmosphere.
[0097] Specifically, extracting the elements to be rendered in the noise-filtered color gamut animation picture based on the picture characteristics and style includes:
[0098] Identify the image composition elements in the noise-filtered color gamut animation image, and analyze the style features corresponding to the image characteristic style;
[0099] Calculating the matching coefficient between the picture composition elements and the style features;
[0100] Based on the matching coefficient, analyzing the degree of fit between the picture composition elements and the style features;
[0101] Based on the degree of fit, elements to be rendered in the noise-filtered color gamut animation picture are extracted from the picture constituent elements.
[0102] It should be explained that the picture composition elements are the visual components in the noise-filtered color gamut animation picture, the style features are the key attributes of the picture characteristic style, the matching coefficient represents the degree of matching between the picture composition elements and the style features, and the fit represents the degree of proximity between the picture composition elements and the style features. Furthermore, the recognition of the picture composition elements in the noise-filtered color gamut animation picture can be achieved through the GIMP tool; the analysis of the style features corresponding to the picture characteristic style can be achieved through feature analysis algorithms, such as SIFT (Scale-Invariant Feature Transform), HOG (Histogram of Oriented Graphics), and the like. Gradients) etc.; the calculation of the matching coefficient between the picture constituent elements and the style features can be realized by the cosine similarity algorithm, and the matching coefficient is obtained by calculating the vector similarity corresponding to the picture constituent elements and the style features; based on the matching coefficient, the degree of fit between the picture constituent elements and the style features is analyzed. For example, when the matching coefficient is 0.2, it can be considered that the fit is low. For example, there is a red circular pattern in the picture as a picture constituent element, and the style feature is a simple style with cold tones and mainly straight lines. This red circular pattern is quite different from both the cold tones and the straight line style, so the fit is low. When the matching coefficient is 0.5, the degree of fit is medium. For example, there is a polygonal pattern of alternating blue and green in the picture. The style feature is natural and fresh style, with certain cold colors and the shape is not particularly regular. It has a certain sense of naturalness, but it is not completely fit, so it is in medium fit. When the matching coefficient is 0.8, the degree of fit is high. For example, there is a light blue cloud-shaped pattern in the picture. The style feature is dreamy and soft style. The light blue color fits the soft feeling, and the shape of the cloud is also dreamy, so the degree of fit is high. The element with the highest degree of fit is extracted from the elements constituting the picture as the element to be rendered in the noise-filtered color gamut animation picture.
[0103] S3, identifying the screen light source in the noise-filtered color gamut animation screen, and measuring the light source radiation angle of the screen light source with respect to the element to be rendered, combining the light source radiation angle, calculating the radiation power of the screen light source to the element to be rendered, combining the light source radiation angle and the radiation power, calculating the element radiation density corresponding to the element to be rendered.
[0104] The present invention calculates the radiation power of the picture light source to the element to be rendered by combining the radiation angle of the light source, so as to understand the energy radiated by the picture light source to the element to be rendered, thereby laying an important basis for the subsequent calculation of the element radiation density corresponding to the element to be rendered.
[0105] It needs to be explained that the picture light source is the source of illumination in the noise-filtered color gamut animation picture. It provides brightness and light and shadow effects for the picture, determines the light and dark distribution of objects in the picture, the formation of shadows and the expressiveness of colors, and is one of the key elements in creating picture atmosphere and three-dimensional sense. The light source radiation angle is the illumination angle range of the picture light source on the elements to be rendered, and the radiation power is the total energy radiated by the picture light source to the elements to be rendered. Furthermore, the picture light source in the noise-filtered color gamut animation picture can be identified through professional optical analysis software, such as zemax software; the measurement of the picture light source radiation angle of the elements to be rendered can be achieved through measurement tools, such as the LightTools tool.
[0106] In detail, the step of calculating the radiation power of the image light source to the element to be rendered in combination with the radiation angle of the light source includes:
[0107] Measuring the regional screen brightness corresponding to the screen light source, and calculating the average screen brightness corresponding to the regional screen brightness;
[0108] Calculating the light source intensity corresponding to the picture light source based on the average picture brightness and a preset brightness-light intensity conversion coefficient;
[0109] The radiation power of the picture light source to the element to be rendered is calculated based on the light source intensity and the light source radiation angle.
[0110] It should be explained that the regional screen brightness is the brightness value of the screen area where the screen light source is located, and the brightness-light intensity conversion coefficient is the conversion coefficient between the brightness value and the light intensity, which can be calculated by optical simulation software. Professional optical simulation software, such as TracePro, is used to establish a model of the light source and the optical system, and the parameters of the light source (such as light intensity, spectral distribution, etc.) and the optical system (such as reflectivity, refractive index, etc.) are input into the software, and then ray tracing and optical analysis are performed to calculate the brightness-light intensity conversion coefficient. The light source intensity is a quantitative indicator of the luminous ability corresponding to the screen light source. Furthermore, the measurement of the regional screen brightness corresponding to the screen light source can be achieved by ImageJ software; the average screen brightness corresponding to the regional screen brightness can be achieved by an average function, such as an average function; the average screen brightness and the preset brightness-light intensity conversion coefficient are calculated to obtain the light source intensity corresponding to the screen light source; the radiation power of the screen light source to the element to be rendered can be obtained by calculating the product of the light source intensity and the radiation angle of the light source.
[0111] The present invention calculates the element radiation density corresponding to the element to be rendered by combining the radiation angle of the light source and the radiation power, so as to understand the degree of light received by the element to be rendered, and provides a basis for the subsequent calculation of the emitted radiation intensity. It should be explained that the element radiation density represents the degree of light received by the element to be rendered.
[0112] Specifically, the calculating the element radiation density corresponding to the element to be rendered by combining the radiation angle of the light source and the radiation power includes:
[0113] Draw an element normal corresponding to the element to be rendered, and determine the light incident angle corresponding to the element to be rendered based on the element normal and the light source radiation angle;
[0114] The element radiation area corresponding to the element to be rendered is measured, and the element radiation density corresponding to the element to be rendered is calculated by combining the element radiation area, the light incident angle, the light source radiation angle and the radiation power through the following formula:
[0115]
[0116] Among them, B represents the element radiation density corresponding to the element to be rendered, E represents the radiation power, and d 2 E represents the second-order differential of the radiation power, F represents the radiation area of the element, δ represents the radiation angle of the light source, θ represents the incident angle of light, dF represents a small change in the radiation area of the element, and dδ represents a small change in the radiation angle of the light source.
[0117] It should be explained that the element normal is a vector perpendicular to the plane of the element to be rendered, the light incidence angle is the angle between the element normal and the radiation angle of the light source, and the element radiation area is the area of the element to be rendered that can receive light.
[0118] S4. Calculate the outgoing radiation intensity corresponding to the element to be rendered by combining the element radiation density and the radiation power, determine the light conversion mechanism in the noise-filtered color gamut animation picture by combining the radiation power and the outgoing radiation intensity, and perform a light intersection calculation operation on the picture light source according to the light conversion mechanism and the element to be rendered to obtain a rendering light intersection.
[0119] The present invention calculates the outgoing radiation intensity corresponding to the element to be rendered by combining the element radiation density and the radiation power, so as to understand the light intensity value after the picture light source irradiates the element to be rendered and is reflected, thereby providing a basis for determining the subsequent light conversion mechanism in the noise-filtered color gamut animation picture. It should be explained that the outgoing radiation intensity is the light intensity reflected after the picture light source irradiates the surface of the element to be rendered.
[0120] In detail, the combining the element radiation density and the radiation power to calculate the emitted radiation intensity corresponding to the element to be rendered includes:
[0121] Measuring the self-luminous intensity corresponding to the element to be rendered;
[0122] Combining the element radiation density, the radiation power and the self-luminous intensity, the emitted radiation intensity corresponding to the element to be rendered is calculated by the following formula:
[0123]
[0124] Where D represents the emitted radiation intensity corresponding to the element to be rendered, G e represents the self-luminous intensity corresponding to the e-th element in the element to be rendered, e represents the serial number corresponding to the element to be rendered, H() represents the reflection conversion ratio function, Ω represents the hemispherical space where the element to be rendered is located, Indicates that the e-th element in the element to be rendered is at point N along the direction , μ represents the angle between the normal of the e-th element to be rendered at point N and the incident light, and dμ represents the change in the angle between the normal of the e-th element to be rendered at point N and the incident light.
[0125] It should be explained that the self-luminous intensity represents the self-luminous brightness corresponding to the element to be rendered. Furthermore, the self-luminous intensity corresponding to the element to be rendered can be measured by a photometer; the reflection conversion ratio function can be obtained by measuring the material reflection characteristics of the element to be rendered; the hemispherical space where the element to be rendered is located can be limited by an angle range.
[0126] The present invention combines the radiation power and the outgoing radiation intensity to determine the light conversion mechanism in the noise-filtered color gamut animation picture, so that the light transformation method in the noise-filtered color gamut animation picture can be understood, and by performing a light intersection calculation operation on the picture light source based on the light conversion mechanism and the element to be rendered, the propagation and interaction of light in the noise-filtered color gamut animation picture can be more accurately simulated, thereby improving the subsequent rendering effect. It should be explained that the light conversion mechanism represents the light transformation method and law in the noise-filtered color gamut animation picture, and the rendering light intersection is the point where the picture light source intersects with the surface of the element to be rendered. Furthermore, the ratio between the radiation power and the outgoing radiation intensity is calculated to obtain the light in the noise-filtered color gamut. The conversion efficiency in the animation picture can be analyzed based on the conversion efficiency, so as to determine the light conversion mechanism in the noise-filtered color domain animation picture; analyze the refractive index of the element to be rendered to the light, and according to the light conversion mechanism and refractive index, use the ray tracing algorithm to perform the light intersection calculation operation on the picture light source, and then obtain the rendering light intersection. The light conversion mechanism describes the behavior of light propagation, reflection, refraction, scattering, etc. under different conditions, which provides an important basis for the ray tracing algorithm, so that the algorithm can accurately simulate the path of light according to different scenes and object properties. In the ray tracing algorithm, the known refractive index can be used to accurately calculate the refraction direction and path changes of light when passing through different media.
[0127] S5. Based on the picture light source, the element to be rendered is rendered and output to obtain a rendering element, and the noise-filtered color gamut animation picture is updated and processed by using the rendering element to obtain a rendered animation picture.
[0128] The present invention renders and outputs the element to be rendered based on the picture light source, and can obtain an element after the visual effect of the element to be rendered is enhanced, so as to improve the visual realism of the element to be rendered, and then improve the rendering quality of the noise-filtered color gamut animation picture. It should be explained that the rendering element is an element obtained after the visual effect of the element to be rendered is enhanced. Furthermore, the update processing of the noise-filtered color gamut animation picture using the rendering element can be achieved through an online image editing tool, such as the Canva tool.
[0129] Specifically, the rendering output of the element to be rendered based on the picture light source to obtain the rendered element includes:
[0130] Analyze the light source color attribute corresponding to the picture light source, and calculate the full lighting effect corresponding to the rendering light intersection point using a preset lighting model based on the light source color attribute;
[0131] Based on the full lighting effect, determining the light color attribute corresponding to the rendering light intersection point;
[0132] Performing attribute synthesis processing on the light color attribute to obtain a pixel color value;
[0133] The pixel color value is used to perform pixel output on the element to be rendered to obtain a rendering element.
[0134] It should be explained that the light source color attribute is the color feature corresponding to the light source of the picture, the preset lighting model is a mathematical model used to simulate the interaction between light and the surface of an object to calculate the lighting effect, such as the Phong lighting model, and the total lighting effect is the lighting performance corresponding to the rendered light intersection, including diffuse reflection, specular reflection, ambient occlusion and other lighting components. The light color attribute is the color and brightness corresponding to the rendered light intersection, and the pixel color value is the final pixel color obtained by merging the color and brightness in the light color attribute.
[0135] Furthermore, the analysis of the light source color attributes corresponding to the light source of the picture can be achieved through a spectral analysis method; based on the full lighting effect, the light color attributes corresponding to the rendering light intersection are determined. For example, in an animated picture, if there is a sunny forest scene, first, based on the color and intensity of the sunlight in the full lighting effect, the basic hue of the rendering light intersection directly shining on the trees is determined, and then, considering the indirect lighting formed by the reflection of light by leaves, etc., it is comprehensively determined that the intersection presents a bright green dimming color attribute; the attribute synthesis processing of the light color attributes can be achieved through a color fusion algorithm; and the pixel output of the element to be rendered using the pixel color value can be achieved through a GPU processor.
[0136] Compared with the problems described in the background technology, the present invention can convert the animation picture into a color space that is more suitable for rendering by performing color gamut conversion processing on the animation picture, and can adjust the resolution of the target color gamut picture to an appropriate value by performing pixel reconstruction processing on the target color gamut animation picture to improve the clarity of the target color gamut picture. The present invention can increase the depth of understanding of the noise-filtered color gamut animation picture through the picture semantic representation by performing semantic mining on the noise-filtered color gamut animation picture, thereby facilitating the subsequent analysis and processing of the picture characteristic style corresponding to the noise-filtered color gamut animation picture. The present invention can calculate the radiation power of the picture light source to the element to be rendered by combining the radiation angle of the light source, so as to understand the picture. The energy radiated by the surface light source to the element to be rendered, thus laying an important foundation for the subsequent calculation of the element radiation density corresponding to the element to be rendered. The present invention calculates the outgoing radiation intensity corresponding to the element to be rendered by combining the element radiation density and the radiation power, so as to understand the light intensity value after the image light source irradiates the element to be rendered and is reflected, thereby providing a basis for the subsequent determination of the light conversion mechanism in the noise-filtered color domain animation image. The present invention renders and outputs the element to be rendered based on the image light source, and can obtain the element after the visual effect of the element to be rendered is enhanced, thereby improving the visual realism of the element to be rendered, and then improving the rendering quality of the noise-filtered color domain animation image. Therefore, the rendering method for animation images proposed in the present invention improves the rendering quality of animation images.
[0137] Embodiment 2:
[0138] like Figure 2 FIG. 1 is a functional module diagram of a rendering system for animation images provided by an embodiment of the present invention.
[0139] The rendering system 100 for animation images described in the present invention can be installed in an electronic device. According to the functions implemented, the rendering system 100 for animation images can include an image noise filtering module 101, an element extraction module 102, a radiation density calculation module 103, a light intersection processing module 104 and a rendering processing module 105. The module described in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0140] In this embodiment, the functions of each module / unit are as follows:
[0141] The picture noise filtering module 101 is used to obtain a cartoon picture to be rendered, perform color gamut conversion processing on the cartoon picture to obtain a target color gamut cartoon picture, perform pixel reconstruction processing on the target color gamut cartoon picture to obtain a reconstructed color gamut cartoon picture, and perform noise filtering processing on the reconstructed color gamut cartoon picture to obtain a noise-filtered color gamut cartoon picture;
[0142] The element extraction module 102 is used to perform semantic mining on the noise-filtered color gamut animation picture to obtain a picture semantic representation, analyze the picture characteristic style corresponding to the noise-filtered color gamut animation picture based on the picture semantic representation, and extract the elements to be rendered in the noise-filtered color gamut animation picture based on the picture characteristic style;
[0143] The radiation density calculation module 103 is used to identify the screen light source in the noise-filtered color gamut animation screen, and measure the light source radiation angle of the screen light source with respect to the element to be rendered, and calculate the radiation power of the screen light source to the element to be rendered in combination with the light source radiation angle, and calculate the element radiation density corresponding to the element to be rendered in combination with the light source radiation angle and the radiation power;
[0144] The light intersection processing module 104 is used to calculate the outgoing radiation intensity corresponding to the element to be rendered by combining the element radiation density and the radiation power, determine the light conversion mechanism in the noise-filtered color gamut animation picture by combining the radiation power and the outgoing radiation intensity, and perform a light intersection calculation operation on the picture light source according to the light conversion mechanism and the element to be rendered to obtain a rendering light intersection;
[0145] The rendering processing module 105 is used to render and output the elements to be rendered based on the picture light source to obtain rendering elements, and use the rendering elements to update the noise-filtered color gamut animation picture to obtain a rendered animation picture.
[0146] In detail, each module described in the rendering system 100 for an animation screen described in the embodiment of the present application is used in the same manner as described above. Figure 1 The same technical means as the rendering method for animation pictures described in , and can produce the same technical effects, will not be repeated here.
[0147] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A rendering method for an animation screen, characterized in that: The method comprises: Acquire a cartoon picture to be rendered, perform color gamut conversion processing on the cartoon picture to obtain a target color gamut cartoon picture, perform pixel reconstruction processing on the target color gamut cartoon picture to obtain a reconstructed color gamut cartoon picture, and perform noise filtering processing on the reconstructed color gamut cartoon picture to obtain a noise-filtered color gamut cartoon picture; Performing semantic mining on the noise-filtered color gamut animation picture to obtain a picture semantic representation, analyzing the picture characteristic style corresponding to the noise-filtered color gamut animation picture based on the picture semantic representation, and extracting the elements to be rendered in the noise-filtered color gamut animation picture based on the picture characteristic style; Identify the screen light source in the noise-filtered color gamut animation screen, and measure the light source radiation angle of the screen light source with respect to the element to be rendered, calculate the radiation power of the screen light source to the element to be rendered in combination with the light source radiation angle, and calculate the element radiation density corresponding to the element to be rendered in combination with the light source radiation angle and the radiation power; In combination with the element radiation density and the radiation power, the outgoing radiation intensity corresponding to the element to be rendered is calculated, and in combination with the radiation power and the outgoing radiation intensity, a light conversion mechanism in the noise-filtered color gamut animation picture is determined, and according to the light conversion mechanism and the element to be rendered, a light intersection calculation operation is performed on the picture light source to obtain a rendering light intersection point; Based on the picture light source, the element to be rendered is rendered and output to obtain a rendering element, and the noise-filtered color gamut animation picture is updated and processed using the rendering element to obtain a rendered animation picture.
2. The rendering method for an animation picture according to claim 1, characterized in that: The performing noise filtering on the reconstructed color gamut animation picture to obtain the noise filtered color gamut animation picture includes: Performing block processing on the reconstructed color gamut animation picture to obtain a block color gamut animation picture; Performing weighted smoothing processing on the block color gamut animation picture to obtain a smooth color gamut animation picture; The smooth color gamut animation picture is collaboratively stitched to obtain a noise-filtered color gamut animation picture.
3. The rendering method for an animation picture according to claim 2, characterized in that: The step of performing weighted smoothing on the block color gamut animation picture to obtain a smooth color gamut animation picture includes: Identifying a central pixel in the block color gamut animation picture; Based on the central pixel, the spatial distance weights corresponding to other pixels in the block color gamut animation picture are calculated by the following formula: Among them, A represents the spatial distance weight corresponding to other pixels in the block color gamut animation picture, i and j represent the coordinate values corresponding to the center pixel, a and b represent the coordinates outside the center pixel in the block color gamut animation picture, β represents the pixel standard deviation, Based on the spatial distance weight and the central pixel, other pixels in the block color gamut animation picture are smoothed to obtain smoothed pixel values; The smoothed pixel values are used to perform pixel replacement processing on the block color gamut animation picture to obtain a smoothed color gamut animation picture.
4. The rendering method for an animation picture according to claim 1, characterized in that: The performing semantic mining on the noise-filtered color gamut animation picture to obtain a picture semantic representation includes: Performing target detection on the noise-filtered color gamut animation picture to obtain an animation picture target, and performing label assignment on the animation picture target to obtain a target label; Performing scene recognition on the noise-filtered color domain animation picture to obtain the animation picture scene, and performing emotion analysis on the animation picture scene to obtain the scene emotion; Analyzing the mapping relationship between the animation picture target and the animation picture scene; Performing semantic fusion on the target label, the scene emotion and the mapping relationship to obtain animation picture semantics; The animation picture semantics are encoded to obtain a picture semantic representation.
5. The rendering method for an animation picture according to claim 1, characterized in that: The extracting the elements to be rendered in the noise-filtered color gamut animation picture based on the picture characteristics and style includes: Identify the image composition elements in the noise-filtered color gamut animation image, and analyze the style features corresponding to the image characteristic style; Calculating the matching coefficient between the picture composition elements and the style features; Based on the matching coefficient, analyzing the degree of fit between the picture composition elements and the style features; Based on the degree of fit, elements to be rendered in the noise-filtered color gamut animation picture are extracted from the picture constituent elements.
6. The method for rendering an animation picture according to claim 1, characterized in that: The calculating the radiation power of the image light source to the element to be rendered in combination with the radiation angle of the light source includes: Measuring the regional screen brightness corresponding to the screen light source, and calculating the average screen brightness corresponding to the regional screen brightness; Calculating the light source intensity corresponding to the picture light source based on the average picture brightness and a preset brightness-light intensity conversion coefficient; The radiation power of the picture light source to the element to be rendered is calculated based on the light source intensity and the light source radiation angle.
7. The rendering method for an animation picture according to claim 1, characterized in that: The calculating the element radiation density corresponding to the element to be rendered by combining the radiation angle of the light source and the radiation power includes: Draw an element normal corresponding to the element to be rendered, and determine the light incident angle corresponding to the element to be rendered based on the element normal and the light source radiation angle; The element radiation area corresponding to the element to be rendered is measured, and the element radiation density corresponding to the element to be rendered is calculated by combining the element radiation area, the light incident angle, the light source radiation angle and the radiation power through the following formula: Among them, B represents the element radiation density corresponding to the element to be rendered, E represents the radiation power, and d 2 E represents the second-order differential of the radiation power, F represents the radiation area of the element, δ represents the radiation angle of the light source, θ represents the incident angle of light, dF represents a small change in the radiation area of the element, and dδ represents a small change in the radiation angle of the light source.
8. The rendering method for an animation picture according to claim 1, characterized in that: The calculating the emitted radiation intensity corresponding to the element to be rendered by combining the element radiation density and the radiation power includes: Measuring the self-luminous intensity corresponding to the element to be rendered; Combining the element radiation density, the radiation power and the self-luminous intensity, the emitted radiation intensity corresponding to the element to be rendered is calculated by the following formula: Where D represents the emitted radiation intensity corresponding to the element to be rendered, G e represents the self-luminous intensity corresponding to the e-th element in the element to be rendered, e represents the serial number corresponding to the element to be rendered, H() represents the reflection conversion ratio function, Ω represents the hemispherical space where the element to be rendered is located, Indicates that the e-th element in the element to be rendered is at point N along the direction , μ represents the angle between the normal of the e-th element to be rendered at point N and the incident light, and dμ represents the change in the angle between the normal of the e-th element to be rendered at point N and the incident light.
9. The rendering method for an animation picture according to claim 1, characterized in that: The step of rendering and outputting the element to be rendered based on the picture light source to obtain the rendered element includes: Analyze the light source color attribute corresponding to the picture light source, and calculate the full lighting effect corresponding to the rendering light intersection point using a preset lighting model based on the light source color attribute; Based on the full lighting effect, determining the light color attribute corresponding to the rendering light intersection point; Performing attribute synthesis processing on the light color attribute to obtain a pixel color value; The pixel color value is used to perform pixel output on the element to be rendered to obtain a rendering element.
10. A rendering system for animation images, characterized in that: The system comprises: A picture noise filtering module is used to obtain a cartoon picture to be rendered, perform a color gamut conversion process on the cartoon picture to obtain a target color gamut cartoon picture, perform a pixel reconstruction process on the target color gamut cartoon picture to obtain a reconstructed color gamut cartoon picture, and perform a noise filtering process on the reconstructed color gamut cartoon picture to obtain a noise-filtered color gamut cartoon picture; An element extraction module is used to perform semantic mining on the noise-filtered color gamut animation picture to obtain a picture semantic representation, analyze the picture characteristic style corresponding to the noise-filtered color gamut animation picture based on the picture semantic representation, and extract the elements to be rendered in the noise-filtered color gamut animation picture based on the picture characteristic style; A radiation density calculation module is used to identify the screen light source in the noise-filtered color gamut animation screen, and measure the light source radiation angle of the screen light source with respect to the element to be rendered, and calculate the radiation power of the screen light source to the element to be rendered in combination with the light source radiation angle, and calculate the element radiation density corresponding to the element to be rendered in combination with the light source radiation angle and the radiation power; A light intersection processing module is used to calculate the outgoing radiation intensity corresponding to the element to be rendered by combining the element radiation density and the radiation power, determine the light conversion mechanism in the noise-filtered color gamut animation picture by combining the radiation power and the outgoing radiation intensity, and perform a light intersection calculation operation on the picture light source according to the light conversion mechanism and the element to be rendered to obtain a rendering light intersection; A rendering processing module is used to render and output the elements to be rendered based on the picture light source to obtain rendering elements, and use the rendering elements to update the noise-filtered color gamut animation picture to obtain a rendered animation picture.