An image feature extraction method and system for animated content generation

By dividing the image into regions and performing bidirectional traversal of contour boundaries for feature verification, the problem of inaccurate contour extraction in traditional methods is solved, achieving efficient and accurate image feature extraction and providing a reliable data foundation for animation content generation.

CN123181670APending Publication Date: 2026-11-27HANGZHOU FRAME SPACE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611333635.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Traditional image feature extraction methods are easily affected by noise in animation content generation, resulting in broken contours or false edges. They lack effective verification and correction, which affects the smoothness and visual quality of the generated animation.

Method used

By dividing the image into multiple regions and selecting the target region, the contour boundaries are traversed in clockwise and counterclockwise directions to perform feature verification and correct abnormal contour segments, thus constructing image feature data.

Benefits of technology

It improves the accuracy and efficiency of image feature extraction, provides precise image feature data, and enhances the quality of animation content generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181670A_ABST
    Figure CN123181670A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, and relates to an image feature extraction method and system for animation content generation.The method comprises the following steps: obtaining an image to be processed, dividing the image to be processed into multiple image regions, confirming a contour reference point and a contour boundary corresponding to the target image region, independently traversing the contour boundary along a preset clockwise direction and a preset counterclockwise direction according to the contour reference point, obtaining a clockwise adjacent feature sequence and a counterclockwise adjacent feature sequence, determining an abnormal contour section if a feature verification result is not passed, and constructing image feature data according to multiple image regions after the feature verification result of each target image region in the multiple target image regions is passed, so as to realize image feature extraction for animation content generation.The application can provide accurate image feature data for animation content generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to an image feature extraction method and system for generating animation content. Background Technology

[0002] With the booming development of the digital entertainment industry, the demand for animation content production is increasing, placing higher demands on production efficiency and quality. Image feature extraction, as a core step in animation content generation, requires extracting structure and contours from images to provide a reliable data foundation for subsequent automated generation. Efficient and accurate feature extraction technology is a key support for achieving automated animation generation and has significant practical implications for promoting the intelligent upgrading of the animation industry.

[0003] Traditional image feature extraction methods often suffer from many drawbacks when dealing with the complex images required for animation content generation. For example, edge detection algorithms based on fixed thresholds are susceptible to noise interference, leading to broken contours or a large number of false edges. Furthermore, they lack effective verification and correction for contour consistency and integrity. When the extracted contours are abnormal or discontinuous, manual intervention is required for frame-by-frame correction, which is not only inefficient but also seriously affects the smoothness and visual quality of the generated animation. Summary of the Invention

[0004] This invention provides an image feature extraction method and a computer-readable storage medium for animation content generation, the main purpose of which is to provide accurate image feature data for animation content generation.

[0005] To achieve the above objectives, the present invention provides an image feature extraction method for animation content generation, comprising: The image to be processed is acquired and divided into multiple image regions, each of which is identified by a region identifier. Multiple target image regions are selected from multiple image regions, and the following operation is performed on each target image region: Confirm the contour reference points and contour boundaries corresponding to the target image region; Based on the contour reference point, the contour boundary is traversed independently along a preset clockwise direction and a preset counterclockwise direction to obtain a clockwise adjacent feature sequence and a counterclockwise adjacent feature sequence. The counterclockwise adjacency feature sequence is normalized to obtain a normalized adjacency feature sequence. The clockwise adjacency feature sequence and the normalized adjacency feature sequence are subjected to feature extraction and verification to obtain feature verification results, wherein the feature verification results are either verification passed or verification failed. If the feature verification result is that the verification fails, the abnormal contour segment is identified, and the abnormal contour segment is resampled and normalized in the image to be processed to obtain the corrected clockwise adjacent feature sequence and the corrected normalized adjacent feature sequence. The process involves taking the modified clockwise adjacency feature sequence and the modified normalized adjacency feature sequence as the clockwise adjacency feature sequence and the normalized adjacency feature sequence, respectively, and returning to the step of performing feature extraction verification on the clockwise adjacency feature sequence and the normalized adjacency feature sequence to obtain the feature verification result. This process continues until the feature verification result is verified. When the feature verification result corresponding to each target image region in multiple target image regions is verified, image feature data is constructed based on multiple image regions to realize image feature extraction for animation content generation.

[0006] Optionally, dividing the image to be processed into multiple image regions includes: The pixels corresponding to the image to be processed are identified to obtain a set of pixels, wherein each pixel is identified by a row number, column number and color value; Perform the following operation on each pixel in the pixel set: Within a preset adjacent radius, the adjacent pixels of the pixel are identified to obtain a set of adjacent pixels, wherein the adjacent radius is 1; Calculate the absolute difference between the color value corresponding to each adjacent pixel in the adjacent pixel set and the color value corresponding to the pixel to obtain the absolute color difference set; If there is an absolute difference in the absolute color difference set that is not greater than a preset color difference threshold, then all adjacent pixels with absolute color differences not greater than the color difference threshold are aggregated with the pixel to obtain a pixel merging group; otherwise, the pixel is confirmed as a single pixel. The pixel merging groups and individual pixels are summarized separately to obtain m pixel merging groups and n individual pixels; Calculate the mean color value of all pixels in each pixel merging group in the m pixel merging group respectively, and obtain the m merged color mean values; The color values ​​corresponding to n individual pixels are used as n single color values; Based on m merged color mean values ​​and n individual color values, color clustering is performed on the image to be processed to obtain multiple image regions, where each image region includes one or more pixels.

[0007] Optionally, the step of filtering multiple target image regions from multiple image regions includes: Image regions are extracted sequentially from multiple image regions, and the following operations are performed on the extracted image regions: Identify the adjacent region group and adjacent identifier group corresponding to the image region, wherein the adjacent regions in the adjacent region group correspond one-to-one with the region identifiers in the adjacent identifier group; If the number of adjacent regions in the adjacent region group is greater than 3, then combine the region identifiers in the adjacent identifier group to obtain a clockwise combined region identifier sequence; Based on a clockwise combination region identifier sequence, obtain a counterclockwise combination region identifier sequence, wherein the clockwise combination region identifier sequence and the counterclockwise combination region identifier sequence correspond one-to-one; A one-to-one combination of a clockwise combined region identifier sequences and a counterclockwise combined region identifier sequences is performed to obtain a bidirectional sequence group; If each of the a bidirectional sequence groups satisfies the preset directional asymmetry condition, then the image region is identified as the target image region. By summing up the target image regions, multiple target image regions are obtained.

[0008] Optionally, confirming the contour reference points and contour boundaries corresponding to the target image region includes: Identify the contour boundary and b intersection points corresponding to the target image region, and use the b intersection points to divide the contour boundary into b contour segments; Measure the length of each of the b contour segments to obtain the b contour lengths; The longest contour length is selected from b contour lengths to obtain the longest contour length. The contour segment corresponding to the longest contour length is taken as the reference contour segment. The center contour point of the reference contour segment is identified and taken as the contour reference point.

[0009] Optionally, the step of independently traversing the contour boundary along a preset clockwise direction and a preset counterclockwise direction based on the contour reference point to obtain a clockwise adjacent feature sequence and a counterclockwise adjacent feature sequence includes: Using the contour reference point as the first contour point, the contour points in the contour boundary are obtained sequentially along the clockwise direction until the first contour point is reached again, thus obtaining a clockwise contour point sequence, wherein the clockwise contour point sequence contains multiple contour points. Contour points are extracted sequentially from the clockwise contour point sequence. Within the adjacent radius, the adjacent pixels of the contour points are identified to obtain the outer adjacent pixel set. The adjacent pixels in the outer adjacent pixel set are all located within the adjacent radius of the contour points and do not belong to the target image region. Determine the region identifier of the image region to which each adjacent pixel in the outer adjacent pixel set belongs, and determine the region identifier that appears most frequently as the adjacent region identifier of the contour point; According to the arrangement order of each contour point in the clockwise contour point sequence, the contour points that continuously correspond to the same adjacent area identifier are merged to obtain clockwise adjacent contour segments. Summarize the clockwise adjacent contour segments to obtain multiple clockwise adjacent contour segments; Each clockwise adjacent contour segment in a plurality of clockwise adjacent contour segments is identified as having an adjacent node, wherein the adjacent node includes: an adjacent region identifier, a starting contour point, an ending contour point, and a contour segment length. Summarize the adjacent nodes to obtain multiple adjacent nodes. Arrange the multiple adjacent nodes according to the traversal order of each clockwise adjacent contour segment to obtain a clockwise adjacent feature sequence. Using the contour reference point as the first contour point, a counterclockwise adjacent feature sequence is obtained along the counterclockwise direction.

[0010] Optionally, the step of performing feature extraction and verification on the clockwise adjacent feature sequence and the normalized adjacent feature sequence to obtain the feature verification result includes: In the order from front to back, the adjacent region identifiers, contour segment lengths, starting contour points and ending contour points are extracted from the clockwise adjacent feature sequence, and sorted in the order from front to back to obtain the clockwise region identifier sequence, the clockwise contour segment length sequence, the clockwise starting contour point sequence and the clockwise ending contour point sequence. The normalized region identifier sequence, normalized contour segment length sequence, normalized start contour point sequence, and normalized end contour point sequence are obtained based on the normalized adjacency feature sequence. If the clockwise region identifier sequence is the same as the normalized region identifier sequence, the clockwise contour segment length sequence is the same as the normalized contour segment length sequence, the clockwise starting contour point sequence is the same as the normalized starting contour point sequence, and the clockwise ending contour point sequence is the same as the normalized ending contour point sequence, then the feature verification result is confirmed as verification passed; otherwise, the feature verification result is confirmed as verification failed.

[0011] Optionally, determining the abnormal contour segment includes: Based on the feature verification results, the abnormal starting contour points are parsed out to obtain the abnormal starting contour point set. The number of abnormal starting contour points in the abnormal starting contour point set is counted to obtain the number of abnormalities. The number of starting contour points in the clockwise starting contour point sequence is counted to obtain the total number of contour points. Calculate the ratio of the number of anomalies to the number of contour points to obtain the anomaly ratio; If the anomaly ratio is greater than the preset anomaly threshold, then the contour boundary is taken as the anomaly contour segment. Otherwise, using the abnormal starting contour point set, multiple acquisition paths are identified in the contour boundary, where each acquisition path is marked with an acquisition length. The abnormal contour segment is the acquisition path with the shortest acquisition length among multiple acquisition paths.

[0012] Optionally, constructing image feature data based on multiple image regions includes: Based on multiple target image regions, multiple non-target image regions are identified from these regions. For each of the multiple target image regions, perform the following operation: Confirm the total length of the contour boundary corresponding to the target image region, and extract the adjacent nodes sequentially from the clockwise adjacent feature sequence corresponding to the target image region; Calculate the ratio of the length of the contour segment in adjacent nodes to the total length of the contour boundary to obtain the adjacent length ratio; By associating the adjacency length ratio with the adjacent nodes, the characteristic nodes of the target region are obtained. By summarizing the characteristic nodes of the target region, the characteristic data of the target region is obtained. Obtain feature data of non-target regions based on multiple non-target image regions; The image feature data is obtained by summarizing the feature data of the target area and the feature data of the non-target area.

[0013] Optionally, the step of obtaining non-target region feature data based on multiple non-target image regions includes: Non-target image regions are extracted sequentially from multiple non-target image regions. The non-target pixel set, contour boundary and adjacent label group corresponding to each non-target image region are obtained. The mean color value of each pixel in the non-target pixel set is calculated to obtain the mean color value of the region. By associating the mean color of the non-target image region with the region identifier, the set of non-target pixels, the contour boundary and the adjacent identifier group, the corresponding non-target region feature nodes are obtained. By summarizing the feature nodes of non-target regions, we obtain the feature data of non-target regions.

[0014] To achieve the above objectives, the present invention also provides an image feature extraction system for animation content generation, comprising: The image region segmentation module is used to acquire the image to be processed and divide the image to be processed into multiple image regions, wherein each image region is identified by a region identifier. The contour feature extraction module is used to filter out multiple target image regions from multiple image regions. For each target image region, the following operations are performed: Confirm the contour reference points and contour boundaries corresponding to the target image region; Based on the contour reference point, the contour boundary is traversed independently along a preset clockwise direction and a preset counterclockwise direction to obtain a clockwise adjacent feature sequence and a counterclockwise adjacent feature sequence. The feature verification module is used to normalize the counterclockwise adjacent feature sequence to obtain a normalized adjacent feature sequence, and to perform feature extraction verification on the clockwise adjacent feature sequence and the normalized adjacent feature sequence to obtain a feature verification result, wherein the feature verification result is either verification passed or verification failed. An abnormal feature correction module is used to determine abnormal contour segments if the feature verification result is that the verification fails, and to resample and normalize the abnormal contour segments in the image to be processed to obtain a corrected clockwise adjacent feature sequence and a corrected normalized adjacent feature sequence. The process involves taking the modified clockwise adjacency feature sequence and the modified normalized adjacency feature sequence as the clockwise adjacency feature sequence and the normalized adjacency feature sequence, respectively, and returning to the step of performing feature extraction verification on the clockwise adjacency feature sequence and the normalized adjacency feature sequence to obtain the feature verification result. This process continues until the feature verification result is verified. When the feature verification result corresponding to each target image region in multiple target image regions is verified, image feature data is constructed based on multiple image regions to realize image feature extraction for animation content generation.

[0015] To address the above problems, the present invention also provides an electronic device, the electronic device comprising: Memory, storing at least one instruction; The processor executes the instructions stored in the memory to implement the image feature extraction method for generating animation content described above.

[0016] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one instruction, which is executed by a processor in an electronic device to implement the image feature extraction method for animation content generation described above.

[0017] To address the problems described in the background art, this invention acquires an image to be processed and divides it into multiple image regions, each labeled with a region identifier. This invention achieves initial pixel-level aggregation by judging the color similarity of adjacent pixels, and then performs global clustering based on the aggregated color features and spatial locations, improving the accuracy and efficiency of image region segmentation. Multiple target image regions are then selected from these regions. Furthermore, this invention filters out image regions with complex contours by setting directional asymmetry conditions, and utilizes the difference between forward and reverse traversal sequences as a verification benchmark. This method enables timely detection of feature extraction errors, improving the accuracy of image feature extraction. It identifies the contour reference points and contour boundaries corresponding to the target image region. Based on these reference points, the contour boundaries are independently traversed along preset clockwise and counterclockwise directions to obtain clockwise and counterclockwise adjacent feature sequences. The counterclockwise adjacent feature sequences are then normalized to obtain normalized adjacent feature sequences. Feature extraction verification is performed on both the clockwise and normalized adjacent feature sequences to obtain feature verification results. These results are either successful or unsuccessful. The verification result was a failure. An abnormal contour segment was identified, and this segment was resampled and normalized in the image to be processed, resulting in a corrected clockwise adjacent feature sequence and a corrected normalized adjacent feature sequence. It is evident that this invention, through abnormal starting contour point localization and acquisition path analysis, can quickly pinpoint the concentrated area of ​​contour extraction errors, avoiding a complete resampling of the entire contour boundary. Simultaneously, by comparing the lengths of each acquisition path and selecting the shortest path as the abnormal contour segment, the verification efficiency of feature extraction is improved. The corrected clockwise adjacent feature sequence and the corrected normalized adjacent feature sequence are used respectively. The process involves generating clockwise adjacent feature sequences and normalized adjacent feature sequences, and then returning to the step of performing feature extraction verification on these sequences to obtain feature verification results. This process continues until the feature verification results are successful. Once the feature verification results for each target image region in multiple target image regions are all successful, image feature data is constructed based on these multiple image regions to achieve image feature extraction for animation content generation. It is evident that this invention improves the accuracy of contour feature extraction through bidirectional traversal and region anomaly correction, providing precise image feature data for animation content generation. Therefore, this invention can provide accurate image feature data for animation content generation. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating an image feature extraction method for generating animation content according to an embodiment of the present invention. Figure 2This is a functional block diagram of an image feature extraction system for animation content generation provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device that implements the image feature extraction method for generating animation content, according to an embodiment of the present invention.

[0019] Explanation of reference numerals in the attached figures: 10. Electronic device; 11. Processor; 12. Memory; 13. Bus.

[0020] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0021] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0022] This application provides an image feature extraction method for generating animation content. The execution entity of the image feature extraction method for generating animation content includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the image feature extraction method for generating animation content can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.

[0023] Reference Figure 1 The diagram shown is a flowchart illustrating an image feature extraction method for animation content generation according to an embodiment of the present invention. In this embodiment, the image feature extraction method for animation content generation includes: S1. Obtain the image to be processed and divide the image to be processed into multiple image regions, wherein each image region is identified by a region identifier.

[0024] It should be explained that the image to be processed is the image for which feature extraction is required. The image region is a local image patch obtained after dividing the image to be processed into regions. The region identifier is a unique number assigned to each image region to distinguish different image regions.

[0025] It should be understood that, in order to accurately divide the image region and identify the region boundary, pixel-level color clustering processing of the image to be processed is required. Therefore, dividing the image to be processed into multiple image regions includes: The pixels corresponding to the image to be processed are identified to obtain a set of pixels, wherein each pixel is identified by a row number, column number and color value; Perform the following operation on each pixel in the pixel set: Within a preset adjacent radius, the adjacent pixels of the pixel are identified to obtain a set of adjacent pixels, wherein the adjacent radius is 1; Calculate the absolute difference between the color value corresponding to each adjacent pixel in the adjacent pixel set and the color value corresponding to the pixel to obtain the absolute color difference set; If there is an absolute difference in the absolute color difference set that is not greater than a preset color difference threshold, then all adjacent pixels with absolute color differences not greater than the color difference threshold are aggregated with the pixel to obtain a pixel merging group; otherwise, the pixel is confirmed as a single pixel. The pixel merging groups and individual pixels are summarized separately to obtain m pixel merging groups and n individual pixels; Calculate the mean color value of all pixels in each pixel merging group in the m pixel merging group respectively, and obtain the m merged color mean values; The color values ​​corresponding to n individual pixels are used as n single color values; Based on m merged color mean values ​​and n individual color values, color clustering is performed on the image to be processed to obtain multiple image regions, where each image region includes one or more pixels.

[0026] Understandably, the pixel set is the collection of all pixels in the image to be processed. The row number and column number are the vertical and horizontal position indices of the pixel in the image to be processed, respectively. The color value is the color information of the pixel; for example, a pixel may be represented as RGB(255, 0, 0). The adjacent radius is a parameter set manually to define the neighborhood range of a pixel (e.g., pixel a). When the adjacent radius is 1, the neighborhood range is the 8-neighborhood of pixel a (i.e., up, down, left, right, and four diagonal directions, a total of 8 pixels). It should be clarified that in this invention, an adjacent radius of 1 means that the difference between the row number and the row number of pixel a does not exceed 1, and the difference between the column number and the column number of pixel a does not exceed 1. The adjacent pixel set is the collection of all pixels adjacent to pixel a within the adjacent radius (i.e., the 8-neighborhood). The absolute difference is the absolute value of the difference between two color values. For example, assuming pixel a is RGB (255, 0, 0) and pixel b is RGB (250, 5, 2), the absolute difference is (5, 5, 2). The color difference threshold is a pre-set threshold used to determine whether the colors of two pixels are similar. The color difference threshold can be set according to the color complexity of the image to be processed. For example, the color difference threshold is (5, 5, 5). The condition that the absolute color difference is not greater than the color difference threshold is that the absolute difference of all three channels is not greater than the corresponding color difference threshold.

[0027] For example, suppose the neighboring pixels of pixel a are b, c, d, e, f, g, h, i. If the absolute difference between neighboring pixels b and c and pixel a is less than the color difference threshold, then the pixel merging group is (pixel a, neighboring pixel b, neighboring pixel c). Suppose the color values ​​corresponding to pixel a, neighboring pixel b, and neighboring pixel c are represented as RGB(a1, a2, a3), RGB(b1, b2, b3), and RGB(c1, c2, c3), respectively. Then the average merged color of this pixel merging group is RGB[(a1+b1+c1) / 3, (a2+b2+c2) / 3, (a3+b3+c3) / 3]. If there are no neighboring pixels whose absolute difference is not greater than the color difference threshold, then pixel a is a single pixel with a single color value of RGB(a1, a2, a3).

[0028] It needs to be explained that the process of performing color clustering on the image to be processed based on m merged color averages and n single color values ​​to obtain multiple image regions is as follows: Assume there are 3 pixel merge groups and 2 single color values, and the corresponding merged color averages are as follows: The merged color average RGB value for pixel merge group 1 (pixel a, pixel b, pixel c) is (250, 50, 50); the merged color average value for pixel merge group 2 (pixel b, pixel x) is (249, 50, 49); and the merged color average value for pixel merge group 3 (pixel y, pixel z) is (250, 48, 49). The two single color values ​​are as follows: pixel p (25, 25, ..., ...). 25) Pixel q (50, 25, 25) yields four image regions: Image Region 1 (pixels a, b, c, x), Image Region 2 (pixels y, z), Image Region 3 (pixels p), and Image Region 4 (pixels q). It is evident that pixel merging group 1 and pixel merging group 2 have similar average merged colors and contain the same pixels, indicating they are adjacent in both color and spatial location, and can be merged into Image Region 1. While pixel merging group 1 and pixel merging group 3 have high similarity in average merged colors, they do not contain the same pixels, and their regions are not adjacent, therefore they cannot be merged into the same image region. The same logic applies to other image regions. It should be noted that in actual processing, the image to be processed usually contains a large number of pixels. For ease of explanation, only a portion of the pixels and their adjacent relationships are illustrated here. This embodiment of the invention achieves initial pixel-level aggregation by judging the color similarity of adjacent pixels, and then performs global clustering based on the aggregated color features and spatial location, improving the accuracy and efficiency of image region division.

[0029] S2. Select multiple target image regions from multiple image regions.

[0030] It should be explained that the target image region is an image region with complex contour features selected from multiple image regions. To identify target image regions with complex contour features, it is necessary to analyze the adjacency relationships and directional characteristics of the image regions. Therefore, selecting multiple target image regions from multiple image regions includes: Image regions are extracted sequentially from multiple image regions, and the following operations are performed on the extracted image regions: Identify the adjacent region group and adjacent identifier group corresponding to the image region, wherein the adjacent regions in the adjacent region group correspond one-to-one with the region identifiers in the adjacent identifier group; If the number of adjacent regions in the adjacent region group is greater than 3, then combine the region identifiers in the adjacent identifier group to obtain a clockwise combined region identifier sequence; Based on a clockwise combination region identifier sequence, obtain a counterclockwise combination region identifier sequence, wherein the clockwise combination region identifier sequence and the counterclockwise combination region identifier sequence correspond one-to-one; A one-to-one combination of a clockwise combined region identifier sequences and a counterclockwise combined region identifier sequences is performed to obtain a bidirectional sequence group; If each of the a bidirectional sequence groups satisfies the preset directional asymmetry condition, then the image region is identified as the target image region. By summing up the target image regions, multiple target image regions are obtained.

[0031] It should be understood that the adjacent region group is a set of all image regions that are spatially directly adjacent to the current image region (denoted as image region 1). The adjacent identifier group is a set of region identifiers corresponding to each adjacent region in the adjacent region group. The clockwise combined region identifier sequence is a sequence of adjacent region identifiers recorded in the traversal order when traversing the outline of the image region in a clockwise direction. For example: if the adjacent regions that image region 1 passes through in the clockwise direction are: image region a, image region b, image region c, and image region d, then the adjacent identifier group is (a, b, c, d), which can be combined to obtain 4 clockwise combined region identifier sequences, namely: (a, b, c, d), (b, c, d, a), (c, d, a, b), (d, a, b, c), and further, 4 counterclockwise combined region identifier sequences are obtained, namely (d, c, b, a), (a, d, c, b), (b, a, d, c), (c, b, a, d). This yields four bidirectional sequence groups: Bidirectional sequence group 1: (a, b, c, d) and (d, c, b, a), (b, c, d, a) and (a, d, c, b), (c, d, a, b) and (b, a, d, c), (d, a, b, c) and (c, b, a, d). It is evident that all four bidirectional sequence groups satisfy the directional asymmetry condition. This directional asymmetry condition is that when comparing the clockwise combined region identifier sequence with the corresponding counterclockwise combined region identifier sequence, they are not completely identical (i.e., there is inconsistency in region identifiers at at least one position). If a clockwise combined region identifier sequence is (a, c, b, c, a), and the corresponding counterclockwise combined region identifier sequence is (a, c, b, c, a), it indicates that the image region exhibits symmetry in the two directions starting from traversal point a, and therefore cannot be considered a target image region with complex contour features. The setting of the directional asymmetry condition is based on the following principle: For image regions with complex contours, the order in which adjacent regions appear differs when traversing the contour boundaries of the image region along different directions. This difference reflects the asymmetry and complexity of the contour. When errors occur in the feature extraction process of the image to be processed, these errors are more easily detected in asymmetric sequences. This embodiment of the invention, by setting directional asymmetry conditions, filters out image regions with complex contours. Simultaneously, by using the difference between forward and reverse traversal sequences as a verification benchmark, feature extraction errors can be detected in a timely manner, improving the accuracy of image feature extraction.

[0032] S3. Confirm the contour reference points and contour boundaries corresponding to the target image region.

[0033] It should be explained that the contour boundary is the dividing line between the target image region and its adjacent regions, and is composed of a series of continuous contour points. The contour reference point is a reference point selected on the contour boundary, which serves as the starting point for subsequent contour traversal.

[0034] It should be explained that confirming the contour reference points and contour boundaries corresponding to the target image region includes: Identify the contour boundary and b intersection points corresponding to the target image region, and use the b intersection points to divide the contour boundary into b contour segments; Measure the length of each of the b contour segments to obtain the b contour lengths; The longest contour length is selected from b contour lengths to obtain the longest contour length. The contour segment corresponding to the longest contour length is taken as the reference contour segment. The center contour point of the reference contour segment is identified and taken as the contour reference point.

[0035] It should be understood that the intersection point is the point where the contour boundary of the target image region intersects with the adjacent image region. The contour segment is a continuous contour boundary segment between every two adjacent intersection points when traversing along the contour boundary of the target image region in a uniform direction (clockwise or counterclockwise). For example, assuming the intersection points are C1, C2, C3, and C4 in a clockwise traversal order, the contour segments are C1C2, C2C3, C3C4, and C4C1, respectively. The contour length is the number of pixels contained in the contour segment. The maximum contour length is the maximum value among all contour segment lengths. The reference contour segment is the contour segment corresponding to the maximum contour length. The center contour point is the midpoint of the reference contour segment. For example, count the total number of pixels L contained in the reference contour segment (in a clockwise traversal order: P1, P2, ..., PL). If L is odd, the (L+1) / 2th pixel is the center contour point; if L is even, the L / 2th pixel is the center contour point.

[0036] S4. Based on the contour reference point, independently traverse the contour boundary along a preset clockwise direction and a preset counterclockwise direction to obtain a clockwise adjacent feature sequence and a counterclockwise adjacent feature sequence.

[0037] It should be explained that the clockwise direction is the direction of movement from the contour reference point to the lower right. The counterclockwise direction is the traversal direction opposite to the clockwise direction. Independent traversal means that clockwise and counterclockwise traversals are performed independently and do not affect each other. The clockwise adjacency feature sequence is a sequence of adjacent region features extracted when traversing the contour boundary in a clockwise direction, arranged in traversal order. The counterclockwise adjacency feature sequence is a sequence of adjacent region features extracted when traversing the contour boundary in a counterclockwise direction, arranged in traversal order.

[0038] Understandably, in order to accurately extract the adjacency features of the contour boundary, it is necessary to identify the adjacent regions corresponding to each contour point. Therefore, the step of independently traversing the contour boundary along a preset clockwise direction and a preset counterclockwise direction based on the contour reference point to obtain a clockwise adjacency feature sequence and a counterclockwise adjacency feature sequence includes: Using the contour reference point as the first contour point, the contour points in the contour boundary are obtained sequentially along the clockwise direction until the first contour point is reached again, thus obtaining a clockwise contour point sequence, wherein the clockwise contour point sequence contains multiple contour points. Contour points are extracted sequentially from the clockwise contour point sequence. Within the adjacent radius, the adjacent pixels of the contour points are identified to obtain the outer adjacent pixel set. The adjacent pixels in the outer adjacent pixel set are all located within the adjacent radius of the contour points and do not belong to the target image region. Determine the region identifier of the image region to which each adjacent pixel in the outer adjacent pixel set belongs, and determine the region identifier that appears most frequently as the adjacent region identifier of the contour point; According to the arrangement order of each contour point in the clockwise contour point sequence, the contour points that continuously correspond to the same adjacent area identifier are merged to obtain clockwise adjacent contour segments. Summarize the clockwise adjacent contour segments to obtain multiple clockwise adjacent contour segments; Each clockwise adjacent contour segment in a plurality of clockwise adjacent contour segments is identified as having an adjacent node, wherein the adjacent node includes: an adjacent region identifier, a starting contour point, an ending contour point, and a contour segment length. Summarize the adjacent nodes to obtain multiple adjacent nodes. Arrange the multiple adjacent nodes according to the traversal order of each clockwise adjacent contour segment to obtain a clockwise adjacent feature sequence. Using the contour reference point as the first contour point, a counterclockwise adjacent feature sequence is obtained along the counterclockwise direction.

[0039] Further, the clockwise contour point sequence is a sequence of multiple contour points obtained by traversing the contour boundary in a clockwise direction starting from the contour reference point. The outer adjacent pixel set is the set of adjacent pixels located outside the contour point and not belonging to the target image region. For example, assuming the adjacent pixels of contour point a are b, c, d, e, f, g, h, i, where b, c, and d are located within the contour boundary of the target image region a, and e, f, g, h, i are located within the image region b adjacent to the target image region a, then the outer adjacent pixel set is: adjacent pixels e, f, g, h, i. The adjacent region identifier is the identifier of the image region to which the outer adjacent pixels of the contour point belong. The clockwise adjacent contour segment is a contour segment composed of contour points that continuously correspond to the same adjacent region. The adjacent node is a structured representation of the features of the adjacent contour segment, including four attributes: adjacent region identifier, starting contour point, ending contour point, and contour segment length. For example, the adjacent node corresponding to a clockwise adjacent contour segment: [Adjacent Region Identifier: 1, Starting Contour Point: Pixel a, Ending Contour Point: Pixel A1, Contour Segment Length: 10] indicates that the clockwise adjacent contour segment is adjacent to image region 1, and the length of the adjacent contour segment is 10 pixels (the number of pixels between pixel a and pixel A1). The starting contour point is the first contour point of the clockwise adjacent contour segment. The ending contour point is the last contour point of the clockwise adjacent contour segment. The contour segment length is the number of contour points contained in the clockwise adjacent contour segment. It should be clarified that in this embodiment of the invention, contour points and pixels refer to the same thing, both referring to pixels in the image region.

[0040] S5. Normalize the counterclockwise adjacent feature sequence to obtain a normalized adjacent feature sequence. Perform feature extraction and verification on the clockwise adjacent feature sequence and the normalized adjacent feature sequence to obtain the feature verification result, wherein the feature verification result is either verification passed or verification failed.

[0041] It should be explained that the direction normalization is the process of converting the counterclockwise adjacent feature sequence into one that has the same traversal order as the clockwise adjacent feature sequence. The normalized adjacent feature sequence is the counterclockwise adjacent feature sequence after direction normalization. The feature extraction verification is a process of checking the consistency between the clockwise adjacent feature sequence and the normalized adjacent feature sequence to detect whether there are errors in contour extraction. The feature verification result is the output of the verification process, including two states: verification passed and verification failed.

[0042] Understandably, to accurately determine the correctness of contour feature extraction, it is necessary to compare whether the features obtained by traversing clockwise and counterclockwise directions are consistent. Therefore, the feature extraction verification of the clockwise adjacent feature sequence and the normalized adjacent feature sequence to obtain the feature verification result includes: In the order from front to back, the adjacent region identifiers, contour segment lengths, starting contour points and ending contour points are extracted from the clockwise adjacent feature sequence, and sorted in the order from front to back to obtain the clockwise region identifier sequence, the clockwise contour segment length sequence, the clockwise starting contour point sequence and the clockwise ending contour point sequence. The normalized region identifier sequence, normalized contour segment length sequence, normalized start contour point sequence, and normalized end contour point sequence are obtained based on the normalized adjacency feature sequence. If the clockwise region identifier sequence is the same as the normalized region identifier sequence, the clockwise contour segment length sequence is the same as the normalized contour segment length sequence, the clockwise starting contour point sequence is the same as the normalized starting contour point sequence, and the clockwise ending contour point sequence is the same as the normalized ending contour point sequence, then the feature verification result is confirmed as verification passed; otherwise, the feature verification result is confirmed as verification failed.

[0043] It should be understood that the clockwise region identifier sequence is a sequence composed of all adjacent region identifiers extracted from the clockwise adjacent feature sequence in sequence. The clockwise contour segment length sequence is a sequence composed of all contour segment lengths extracted from the clockwise adjacent feature sequence in sequence. The clockwise start contour point sequence is a sequence composed of all start contour points extracted from the clockwise adjacent feature sequence in sequence. The clockwise end contour point sequence is a sequence composed of all end contour points extracted from the clockwise adjacent feature sequence in sequence. The normalized region identifier sequence, normalized contour segment length sequence, normalized start contour point sequence, and normalized end contour point sequence are corresponding feature sequences extracted from the normalized adjacent feature sequence, and the extraction method is the same as that of the clockwise region identifier sequence, clockwise contour segment length sequence, clockwise start contour point sequence, and clockwise end contour point sequence.

[0044] For example, suppose the clockwise adjacent feature sequence corresponding to the target image region contains 4 adjacent nodes, namely: [Adjacent region identifier: 8, starting contour point: pixel A, ending contour point: pixel B, contour segment length: 64], [Adjacent region identifier: 12, starting contour point: pixel B, ending contour point: pixel C, contour segment length: 70], [Adjacent region identifier: 23, starting contour point: pixel C, ending contour point: pixel D, contour segment length: 55] and [Adjacent region identifier: 31, starting contour point: 8, starting contour point: 8, ending contour point: pixel B, ending contour point: pixel C, contour segment length: 70], [Adjacent region identifier: 23, starting contour point: pixel C, ending contour point: pixel D, contour segment length: 70], and ... pixel D, ending contour point: pixel C, ending contour point: pixel D, contour segment length: pixel D, ending contour point: pixel D, ending contour point: pixel D, ending contour point: pixel D, ending contour point: pixel D, ending contour point: pixel D, ending contour point: pixel D, ending contour point: pixel D, ending contour point: pixel D, ending contour point: pixel D, ending contour point: pixel D, ending contour point: pixel [Pixel point D, Ending contour point: Pixel point A, Contour segment length: 48], from the clockwise adjacent feature sequence, the adjacent region identifier, contour segment length, starting contour point and ending contour point are extracted, and the corresponding clockwise region identifier sequence is (8, 12, 23, 31), the clockwise contour segment length sequence is (64, 70, 55, 48), the clockwise starting contour point sequence is (Pixel point A, Pixel point B, Pixel point C, Pixel point D) and the clockwise ending contour point sequence is (Pixel point B, Pixel point C, Pixel point D, Pixel point A).

[0045] Further, following the example above, assume the counter-clockwise adjacency feature sequence contains 4 adjacent nodes, in the following order: [Adjacent region identifier: 31, starting contour point: pixel A, ending contour point: pixel D, contour segment length: 48], [Adjacent region identifier: 23, starting contour point: pixel D, ending contour point: pixel C, contour segment length: 55], [Adjacent region identifier: 12, starting contour point: pixel C, ending contour point: pixel B, contour segment length: 71] and [Adjacent...] [Region identifier: 8, Starting contour point: pixel B, Ending contour point: pixel A, Contour segment length: 64], after directional normalization of the counterclockwise adjacent feature sequence, the normalized adjacent feature sequence is as follows: [Adjacent region identifier: 8, Starting contour point: pixel A, Ending contour point: pixel B, Contour segment length: 64], [Adjacent region identifier: 12, Starting contour point: pixel B, Ending contour point: pixel C, Contour segment length: 71], [Adjacent region identifier: 2] 3. Starting contour point: pixel C, ending contour point: pixel D, contour segment length: 55] and [adjacent region identifier: 31, starting contour point: pixel D, ending contour point: pixel A, contour segment length: 48], extract features to obtain the normalized region identifier sequence (8, 12, 23, 31), the normalized contour segment length sequence (64, 71, 55, 48), the normalized starting contour point sequence (pixel A, pixel B, pixel C, pixel D) and the normalized... The termination contour point sequence is (pixel B, pixel C, pixel D, pixel A). Comparing the four sequences, the clockwise region identifier sequence is the same as the normalized region identifier sequence, and the starting contour point sequence is also the same as the termination contour point sequence. However, the clockwise contour segment length sequence is (64, 70, 55, 48), while the normalized contour segment length sequence is (64, 71, 55, 48). The two sequences do not match at the second position (70-71). Therefore, the feature verification result is confirmed as verification failure.

[0046] S6. If the feature verification result is that the verification fails, the abnormal contour segment is determined, and the abnormal contour segment is resampled and normalized in the image to be processed to obtain the corrected clockwise adjacent feature sequence and the corrected normalized adjacent feature sequence.

[0047] It should be explained that the resampling is the process of re-extracting the contour points and re-identifying the adjacent features of the abnormal contour segments. The corrected clockwise adjacent feature sequence is the clockwise adjacent feature sequence obtained after resampling the abnormal contour segments. The corrected normalized adjacent feature sequence is the normalized adjacent feature sequence obtained after resampling the abnormal contour segments.

[0048] Understandably, in order to accurately locate the contour segments that cause feature verification to fail, it is necessary to analyze the inconsistencies in the feature verification results. Therefore, determining the abnormal contour segments includes: Based on the feature verification results, the abnormal starting contour points are parsed out to obtain the abnormal starting contour point set. The number of abnormal starting contour points in the abnormal starting contour point set is counted to obtain the number of abnormalities. The number of starting contour points in the clockwise starting contour point sequence is counted to obtain the total number of contour points. Calculate the ratio of the number of anomalies to the number of contour points to obtain the anomaly ratio; If the anomaly ratio is greater than the preset anomaly threshold, then the contour boundary is taken as the anomaly contour segment. Otherwise, using the abnormal starting contour point set, multiple acquisition paths are identified in the contour boundary, where each acquisition path is marked with an acquisition length. The abnormal contour segment is the acquisition path with the shortest acquisition length among multiple acquisition paths.

[0049] Further, the abnormal contour segment is the contour boundary that causes feature verification to fail. The abnormal starting contour point is the starting contour point corresponding to the position where the clockwise starting contour point sequence is inconsistent with the normalized starting contour point sequence during feature verification. From the above example, it can be concluded that: the abnormal contour segment is the contour segment between the starting contour point (pixel B) and the ending contour point (pixel C), and pixel B is the abnormal starting contour point. The abnormal starting contour point set is a set composed of all abnormal starting contour points. The number of anomalies is the total number of abnormal starting contour points contained in the abnormal starting contour point set. The number of contour points is the total number of starting contour points contained in the clockwise starting contour point sequence. The anomaly ratio is the ratio of the number of anomalies to the number of contour points, used to measure the severity of feature extraction anomalies. The anomaly threshold is a preset threshold that can be adjusted according to contour complexity and fault tolerance requirements. The acquisition path is the path that starts from an abnormal starting contour point in the abnormal starting contour point set and traverses along the contour boundary to the next abnormal starting contour point. The acquisition length is the number of contour points contained in the acquisition path.

[0050] For example, suppose the set of abnormal starting contour points contains three abnormal starting contour points, corresponding to pixel point E, pixel point H, and pixel point K, respectively. Using these three abnormal starting contour points, the acquisition path is determined in the contour boundary: starting from pixel point E, passing through pixel point H and pixel point K in sequence and returning to pixel point E, we get acquisition path 1 (containing 200 contour points); starting from pixel point H, passing through pixel point K and pixel point E in sequence and returning to pixel point H, we get acquisition path 2 (containing 150 contour points); starting from pixel point K, passing through pixel point E and pixel point H in sequence and returning to pixel point K, we get acquisition path 3 (containing 90 contour points). All three acquisition paths cover all three abnormal starting contour points. Acquisition path 3 has the shortest acquisition length, and it is identified as an abnormal contour segment for resampling.

[0051] It is understood that the acquisition process of the corrected clockwise adjacent feature sequence and the corrected normalized adjacent feature sequence is the same as that of the clockwise adjacent feature sequence and the normalized adjacent feature sequence. The difference is that the feature acquisition object of the clockwise adjacent feature sequence and the normalized adjacent feature sequence is the target image region, while the feature acquisition object of the corrected clockwise adjacent feature sequence and the corrected normalized adjacent feature sequence is the target image region or part of the contour boundary of the target image region, determined according to the severity of the feature extraction anomaly. This embodiment of the invention, through the localization of the abnormal starting contour point and the analysis of the acquisition path, can quickly locate the concentrated area of ​​contour extraction errors, avoiding a complete resampling of the entire contour boundary. Simultaneously, by comparing the lengths of each acquisition path and selecting the shortest path as the abnormal contour segment, the verification efficiency of feature extraction is improved.

[0052] S7. Using the modified clockwise adjacent feature sequence and the modified normalized adjacent feature sequence as the clockwise adjacent feature sequence and the normalized adjacent feature sequence respectively, and returning to the step of performing feature extraction verification on the clockwise adjacent feature sequence and the normalized adjacent feature sequence to obtain the feature verification result, until the feature verification result is verified. When the feature verification result corresponding to each target image region in multiple target image regions is verified, image feature data is constructed based on multiple image regions to realize image feature extraction for animation content generation.

[0053] It should be explained that the image feature data is structured data used to characterize the feature information of all image regions and is used for animation content generation.

[0054] Specifically, the construction of image feature data based on multiple image regions includes: Based on multiple target image regions, multiple non-target image regions are identified from these regions. For each of the multiple target image regions, perform the following operation: Confirm the total length of the contour boundary corresponding to the target image region, and extract the adjacent nodes sequentially from the clockwise adjacent feature sequence corresponding to the target image region; Calculate the ratio of the length of the contour segment in adjacent nodes to the total length of the contour boundary to obtain the adjacent length ratio; By associating the adjacency length ratio with the adjacent nodes, the characteristic nodes of the target region are obtained. By summarizing the characteristic nodes of the target region, the characteristic data of the target region is obtained. Obtain feature data of non-target regions based on multiple non-target image regions; The image feature data is obtained by summarizing the feature data of the target area and the feature data of the non-target area.

[0055] It should be understood that the non-target image region is the image region remaining after removing multiple target image regions from multiple image regions, typically corresponding to the background or simple texture regions in the image to be processed. The total length of the contour boundary is the number of all contour points contained within the contour boundary of the target image region. The adjacency length ratio is the ratio of the contour segment length corresponding to an adjacent node to the total length of the contour boundary, used to characterize the relative length of contact between the adjacent region and the target region. The target region feature node is the feature node obtained by adding the adjacency length ratio to the adjacent nodes. The target region feature data is the set of target region feature nodes corresponding to all target image regions. The non-target region feature data is the set of feature nodes corresponding to all non-target image regions.

[0056] Furthermore, the step of obtaining non-target region feature data based on multiple non-target image regions includes: Non-target image regions are extracted sequentially from multiple non-target image regions. The non-target pixel set, contour boundary and adjacent label group corresponding to each non-target image region are obtained. The mean color value of each pixel in the non-target pixel set is calculated to obtain the mean color value of the region. By associating the mean color of the non-target image region with the region identifier, the set of non-target pixels, the contour boundary and the adjacent identifier group, the corresponding non-target region feature nodes are obtained. By summarizing the feature nodes of non-target regions, we obtain the feature data of non-target regions.

[0057] In detail, the non-target pixel set is the collection of all pixels contained in the non-target image region. The region color mean is the average color value of all pixels in the non-target pixel set; for a specific definition, refer to the merged color mean. The non-target region feature node is a structured representation of the features of the non-target image region. The adjacency identifier group is a set of region identifiers of all image regions that are directly adjacent to the non-target image region in space.

[0058] For example, assume the image to be processed is divided into 200 image regions (85 target image regions + 115 non-target image regions). Taking the target image region with region identifier 15 as an example: its total contour boundary length is 320 contour points, and the corresponding clockwise adjacent feature sequence contains 5 adjacent nodes. The contour segment length of the first adjacent node is 64, and the adjacent length ratio is 64 / 320 = 0.2. After association, the target region feature node containing adjacent region identifiers, contour segment lengths, and adjacent length ratios is obtained. The remaining adjacent nodes and all target image regions are processed sequentially, and the target region feature data is summarized. For the non-target image regions, taking the image region with region identifier 3 as an example: the non-target pixel set contains 1500 pixels, the average color of the region is RGB(220, 225, 230), and the adjacent identifier group is (1, 2, 5, 15). After association, the non-target region feature node is obtained. The non-target region feature data is summarized by summarizing all non-target region feature nodes. Finally, the feature data of the target region and the feature data of the non-target region are merged to obtain the complete image feature data.

[0059] Furthermore, when used for animation content generation, taking an animation scene composed of characters and backgrounds as an example, the adjacency marker group in the target region feature data can indicate which background regions the character outline connects to. The ratio of outline segment length to adjacency length determines the deformation weight of each outline segment. The total length of the outline boundary serves as a benchmark to ensure consistent ratio calculations, reducing the probability of imbalance in the proportions of different image regions. The average color value of the regions in the non-target region feature data is used to adjust the background color and ambient light brightness. The adjacency marker group is used to associate adjacent background regions, and the pixel set is used for texture detail processing. This embodiment of the invention improves the accuracy of outline feature extraction through bidirectional traversal and region anomaly correction, providing accurate image feature data for animation content generation.

[0060] To address the problems described in the background art, this invention acquires an image to be processed and divides it into multiple image regions, each labeled with a region identifier. This invention achieves initial pixel-level aggregation by judging the color similarity of adjacent pixels, and then performs global clustering based on the aggregated color features and spatial locations, improving the accuracy and efficiency of image region segmentation. Multiple target image regions are then selected from these regions. Furthermore, this invention filters out image regions with complex contours by setting directional asymmetry conditions, and utilizes the difference between forward and reverse traversal sequences as a verification benchmark. This method enables timely detection of feature extraction errors, improving the accuracy of image feature extraction. It identifies the contour reference points and contour boundaries corresponding to the target image region. Based on these reference points, the contour boundaries are independently traversed along preset clockwise and counterclockwise directions to obtain clockwise and counterclockwise adjacent feature sequences. The counterclockwise adjacent feature sequences are then normalized to obtain normalized adjacent feature sequences. Feature extraction verification is performed on both the clockwise and normalized adjacent feature sequences to obtain feature verification results. These results are either successful or unsuccessful. The verification result was a failure. An abnormal contour segment was identified, and this segment was resampled and normalized in the image to be processed, resulting in a corrected clockwise adjacent feature sequence and a corrected normalized adjacent feature sequence. It is evident that this invention, through abnormal starting contour point localization and acquisition path analysis, can quickly pinpoint the concentrated area of ​​contour extraction errors, avoiding a complete resampling of the entire contour boundary. Simultaneously, by comparing the lengths of each acquisition path and selecting the shortest path as the abnormal contour segment, the verification efficiency of feature extraction is improved. The corrected clockwise adjacent feature sequence and the corrected normalized adjacent feature sequence are used respectively. The process involves generating clockwise adjacent feature sequences and normalized adjacent feature sequences, and then returning to the step of performing feature extraction verification on these sequences to obtain feature verification results. This process continues until the feature verification results are successful. Once the feature verification results for each target image region in multiple target image regions are all successful, image feature data is constructed based on these multiple image regions to achieve image feature extraction for animation content generation. It is evident that this invention improves the accuracy of contour feature extraction through bidirectional traversal and region anomaly correction, providing precise image feature data for animation content generation. Therefore, this invention can provide accurate image feature data for animation content generation.

[0061] like Figure 2 The diagram shown is a functional block diagram of an image feature extraction system for animation content generation provided in an embodiment of the present invention.

[0062] The image feature extraction system 100 for animation content generation described in this invention can be installed in an electronic device. Depending on the functions implemented, the image feature extraction system 100 for animation content generation may include an image region segmentation module 101, a contour feature extraction module 102, a feature verification module 103, and an anomaly feature correction module 104. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and which are stored in the memory of the electronic device. The image region division module 101 is used to acquire the image to be processed and divide the image to be processed into multiple image regions, wherein each image region is identified by a region identifier. The contour feature extraction module 102 is used to filter out multiple target image regions from multiple image regions, and performs the following operation on each target image region: Confirm the contour reference points and contour boundaries corresponding to the target image region; Based on the contour reference point, the contour boundary is traversed independently along a preset clockwise direction and a preset counterclockwise direction to obtain a clockwise adjacent feature sequence and a counterclockwise adjacent feature sequence. The feature verification module 103 is used to normalize the counterclockwise adjacent feature sequence to obtain a normalized adjacent feature sequence, and to perform feature extraction verification on the clockwise adjacent feature sequence and the normalized adjacent feature sequence to obtain a feature verification result, wherein the feature verification result is either verification passed or verification failed. The abnormal feature correction module 104 is used to determine the abnormal contour segment if the feature verification result is that the verification fails, and to resample and normalize the abnormal contour segment in the image to be processed to obtain the corrected clockwise adjacent feature sequence and the corrected normalized adjacent feature sequence. The process involves taking the modified clockwise adjacency feature sequence and the modified normalized adjacency feature sequence as the clockwise adjacency feature sequence and the normalized adjacency feature sequence, respectively, and returning to the step of performing feature extraction verification on the clockwise adjacency feature sequence and the normalized adjacency feature sequence to obtain the feature verification result. This process continues until the feature verification result is verified. When the feature verification result corresponding to each target image region in multiple target image regions is verified, image feature data is constructed based on multiple image regions to realize image feature extraction for animation content generation.

[0063] In detail, the modules in the image feature extraction system 100 for animation content generation described in this embodiment of the invention employ the same methods as described above. Figure 1The image feature extraction method used for animation content generation described herein is the same as the one used in the previous section, and can produce the same technical effect, so it will not be repeated here.

[0064] like Figure 3 The diagram shown is a structural schematic of an electronic device that implements an image feature extraction method for generating animation content, according to an embodiment of the present invention.

[0065] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an image feature extraction method program for generating animation content.

[0066] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 1. Furthermore, the memory 11 includes both internal storage units and external storage devices of the electronic device 1. The memory 11 can be used not only to store application software and various types of data installed on the electronic device 1, such as code for image feature extraction methods used to generate animation content, but also to temporarily store data that has been output or will be output.

[0067] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., image feature extraction methods for animation content generation) and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.

[0068] The bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 can be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize the connection and communication between the memory 11 and at least one processor 10, etc.

[0069] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0070] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0071] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device 1 and other electronic devices.

[0072] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device 1 and to display a visual user interface.

[0073] The image feature extraction method program for animation content generation stored in the memory 11 of the electronic device 1 is a combination of multiple instructions, which, when run in the processor 10, can achieve the following: The image to be processed is acquired and divided into multiple image regions, each of which is identified by a region identifier. Multiple target image regions are selected from multiple image regions, and the following operation is performed on each target image region: Confirm the contour reference points and contour boundaries corresponding to the target image region; Based on the contour reference point, the contour boundary is traversed independently along a preset clockwise direction and a preset counterclockwise direction to obtain a clockwise adjacent feature sequence and a counterclockwise adjacent feature sequence. The counterclockwise adjacency feature sequence is normalized to obtain a normalized adjacency feature sequence. The clockwise adjacency feature sequence and the normalized adjacency feature sequence are subjected to feature extraction and verification to obtain feature verification results, wherein the feature verification results are either verification passed or verification failed. If the feature verification result is that the verification fails, the abnormal contour segment is identified, and the abnormal contour segment is resampled and normalized in the image to be processed to obtain the corrected clockwise adjacent feature sequence and the corrected normalized adjacent feature sequence. The process involves taking the modified clockwise adjacency feature sequence and the modified normalized adjacency feature sequence as the clockwise adjacency feature sequence and the normalized adjacency feature sequence, respectively, and returning to the step of performing feature extraction verification on the clockwise adjacency feature sequence and the normalized adjacency feature sequence to obtain the feature verification result. This process continues until the feature verification result is verified. When the feature verification result corresponding to each target image region in multiple target image regions is verified, image feature data is constructed based on multiple image regions to realize image feature extraction for animation content generation.

[0074] Specifically, the processor 10's implementation method for the above instructions can be found in [reference needed]. Figures 1 to 3 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0075] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0076] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following: The image to be processed is acquired and divided into multiple image regions, each of which is identified by a region identifier. Multiple target image regions are selected from multiple image regions, and the following operation is performed on each target image region: Confirm the contour reference points and contour boundaries corresponding to the target image region; Based on the contour reference point, the contour boundary is traversed independently along a preset clockwise direction and a preset counterclockwise direction to obtain a clockwise adjacent feature sequence and a counterclockwise adjacent feature sequence. The counterclockwise adjacency feature sequence is normalized to obtain a normalized adjacency feature sequence. The clockwise adjacency feature sequence and the normalized adjacency feature sequence are subjected to feature extraction and verification to obtain feature verification results, wherein the feature verification results are either verification passed or verification failed. If the feature verification result is that the verification fails, the abnormal contour segment is identified, and the abnormal contour segment is resampled and normalized in the image to be processed to obtain the corrected clockwise adjacent feature sequence and the corrected normalized adjacent feature sequence. The process involves taking the modified clockwise adjacency feature sequence and the modified normalized adjacency feature sequence as the clockwise adjacency feature sequence and the normalized adjacency feature sequence, respectively, and returning to the step of performing feature extraction verification on the clockwise adjacency feature sequence and the normalized adjacency feature sequence to obtain the feature verification result. This process continues until the feature verification result is verified. When the feature verification result corresponding to each target image region in multiple target image regions is verified, image feature data is constructed based on multiple image regions to realize image feature extraction for animation content generation.

[0077] In the embodiments provided by this invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and actual implementations may have other classification methods.

[0078] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0079] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0080] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. An image feature extraction method for generating animation content, characterized in that, The method includes: The image to be processed is acquired and divided into multiple image regions, each of which is identified by a region identifier. Multiple target image regions are selected from multiple image regions, and the following operation is performed on each target image region: Confirm the contour reference points and contour boundaries corresponding to the target image region; Based on the contour reference point, the contour boundary is traversed independently along a preset clockwise direction and a preset counterclockwise direction to obtain a clockwise adjacent feature sequence and a counterclockwise adjacent feature sequence. The counterclockwise adjacency feature sequence is normalized to obtain a normalized adjacency feature sequence. The clockwise adjacency feature sequence and the normalized adjacency feature sequence are subjected to feature extraction and verification to obtain feature verification results, wherein the feature verification results are either verification passed or verification failed. If the feature verification result is that the verification fails, the abnormal contour segment is identified, and the abnormal contour segment is resampled and normalized in the image to be processed to obtain the corrected clockwise adjacent feature sequence and the corrected normalized adjacent feature sequence. The process involves taking the modified clockwise adjacency feature sequence and the modified normalized adjacency feature sequence as the clockwise adjacency feature sequence and the normalized adjacency feature sequence, respectively, and returning to the step of performing feature extraction verification on the clockwise adjacency feature sequence and the normalized adjacency feature sequence to obtain the feature verification result. This process continues until the feature verification result is verified. When the feature verification result corresponding to each target image region in multiple target image regions is verified, image feature data is constructed based on multiple image regions to realize image feature extraction for animation content generation.

2. The image feature extraction method for animation content generation as described in claim 1, characterized in that, The step of dividing the image to be processed into multiple image regions includes: The pixels corresponding to the image to be processed are identified to obtain a set of pixels, wherein each pixel is identified by a row number, column number and color value; Perform the following operation on each pixel in the pixel set: Within a preset adjacent radius, the adjacent pixels of the pixel are identified to obtain a set of adjacent pixels, wherein the adjacent radius is 1; Calculate the absolute difference between the color value corresponding to each adjacent pixel in the adjacent pixel set and the color value corresponding to the pixel to obtain the absolute color difference set; If there is an absolute difference in the absolute color difference set that is not greater than a preset color difference threshold, then all adjacent pixels with absolute color differences not greater than the color difference threshold are aggregated with the pixel to obtain a pixel merging group; otherwise, the pixel is confirmed as a single pixel. The pixel merging groups and individual pixels are summarized separately to obtain m pixel merging groups and n individual pixels; Calculate the mean color value of all pixels in each pixel merging group in the m pixel merging group respectively, and obtain the m merged color mean values; The color values ​​corresponding to n individual pixels are used as n single color values; Based on m merged color mean values ​​and n individual color values, color clustering is performed on the image to be processed to obtain multiple image regions, where each image region includes one or more pixels.

3. The image feature extraction method for animation content generation as described in claim 2, characterized in that, The process of selecting multiple target image regions from multiple image regions includes: Image regions are extracted sequentially from multiple image regions, and the following operations are performed on the extracted image regions: Identify the adjacent region group and adjacent identifier group corresponding to the image region, wherein the adjacent regions in the adjacent region group correspond one-to-one with the region identifiers in the adjacent identifier group; If the number of adjacent regions in the adjacent region group is greater than 3, then combine the region identifiers in the adjacent identifier group to obtain a clockwise combined region identifier sequence; Based on a clockwise combination region identifier sequence, obtain a counterclockwise combination region identifier sequence, wherein the clockwise combination region identifier sequence and the counterclockwise combination region identifier sequence correspond one-to-one; A one-to-one combination of a clockwise combined region identifier sequences and a counterclockwise combined region identifier sequences is performed to obtain a bidirectional sequence group; If each of the a bidirectional sequence groups satisfies the preset directional asymmetry condition, then the image region is identified as the target image region. By summing up the target image regions, multiple target image regions are obtained.

4. The image feature extraction method for animation content generation as described in claim 3, characterized in that, The process of confirming the contour reference points and contour boundaries corresponding to the target image region includes: Identify the contour boundary and b intersection points corresponding to the target image region, and use the b intersection points to divide the contour boundary into b contour segments; Measure the length of each of the b contour segments to obtain the b contour lengths; The longest contour length is selected from b contour lengths to obtain the longest contour length. The contour segment corresponding to the longest contour length is taken as the reference contour segment. The center contour point of the reference contour segment is identified and taken as the contour reference point.

5. The image feature extraction method for animation content generation as described in claim 4, characterized in that, The step of independently traversing the contour boundary along a preset clockwise direction and a preset counterclockwise direction based on the contour reference point to obtain a clockwise adjacent feature sequence and a counterclockwise adjacent feature sequence includes: Using the contour reference point as the first contour point, the contour points in the contour boundary are obtained sequentially along the clockwise direction until the first contour point is reached again, thus obtaining a clockwise contour point sequence, wherein the clockwise contour point sequence contains multiple contour points. Contour points are extracted sequentially from the clockwise contour point sequence. Within the adjacent radius, the adjacent pixels of the contour points are identified to obtain the outer adjacent pixel set. The adjacent pixels in the outer adjacent pixel set are all located within the adjacent radius of the contour points and do not belong to the target image region. Determine the region identifier of the image region to which each adjacent pixel in the outer adjacent pixel set belongs, and determine the region identifier that appears most frequently as the adjacent region identifier of the contour point; According to the arrangement order of each contour point in the clockwise contour point sequence, the contour points that continuously correspond to the same adjacent area identifier are merged to obtain clockwise adjacent contour segments. Summarize the clockwise adjacent contour segments to obtain multiple clockwise adjacent contour segments; Each clockwise adjacent contour segment in a plurality of clockwise adjacent contour segments is identified as having an adjacent node, wherein the adjacent node includes: an adjacent region identifier, a starting contour point, an ending contour point, and a contour segment length. Summarize the adjacent nodes to obtain multiple adjacent nodes. Arrange the multiple adjacent nodes according to the traversal order of each clockwise adjacent contour segment to obtain a clockwise adjacent feature sequence. Using the contour reference point as the first contour point, a counterclockwise adjacent feature sequence is obtained along the counterclockwise direction.

6. The image feature extraction method for animation content generation as described in claim 5, characterized in that, The feature extraction and verification of the clockwise adjacent feature sequence and the normalized adjacent feature sequence yields the feature verification results, including: In the order from front to back, the adjacent region identifiers, contour segment lengths, starting contour points and ending contour points are extracted from the clockwise adjacent feature sequence, and sorted in the order from front to back to obtain the clockwise region identifier sequence, the clockwise contour segment length sequence, the clockwise starting contour point sequence and the clockwise ending contour point sequence. The normalized region identifier sequence, normalized contour segment length sequence, normalized start contour point sequence, and normalized end contour point sequence are obtained based on the normalized adjacency feature sequence. If the clockwise region identifier sequence is the same as the normalized region identifier sequence, the clockwise contour segment length sequence is the same as the normalized contour segment length sequence, the clockwise starting contour point sequence is the same as the normalized starting contour point sequence, and the clockwise ending contour point sequence is the same as the normalized ending contour point sequence, then the feature verification result is confirmed as verification passed; otherwise, the feature verification result is confirmed as verification failed.

7. The image feature extraction method for animation content generation as described in claim 6, characterized in that, The determination of abnormal contour segments includes: Based on the feature verification results, the abnormal starting contour points are parsed out to obtain the abnormal starting contour point set. The number of abnormal starting contour points in the abnormal starting contour point set is counted to obtain the number of abnormalities. The number of starting contour points in the clockwise starting contour point sequence is counted to obtain the total number of contour points. Calculate the ratio of the number of anomalies to the number of contour points to obtain the anomaly ratio; If the anomaly ratio is greater than the preset anomaly threshold, then the contour boundary is taken as the anomaly contour segment. Otherwise, using the abnormal starting contour point set, multiple acquisition paths are identified in the contour boundary, where each acquisition path is marked with an acquisition length. The abnormal contour segment is the acquisition path with the shortest acquisition length among multiple acquisition paths.

8. The image feature extraction method for animation content generation as described in claim 7, characterized in that, The construction of image feature data based on multiple image regions includes: Based on multiple target image regions, multiple non-target image regions are identified from these regions. For each of the multiple target image regions, perform the following operation: Confirm the total length of the contour boundary corresponding to the target image region, and extract the adjacent nodes sequentially from the clockwise adjacent feature sequence corresponding to the target image region; Calculate the ratio of the length of the contour segment in adjacent nodes to the total length of the contour boundary to obtain the adjacent length ratio; By associating the adjacency length ratio with the adjacent nodes, the characteristic nodes of the target region are obtained. By summarizing the characteristic nodes of the target region, the characteristic data of the target region is obtained. Obtain feature data of non-target regions based on multiple non-target image regions; The image feature data is obtained by summarizing the feature data of the target area and the feature data of the non-target area.

9. The image feature extraction method for animation content generation as described in claim 8, characterized in that, The step of obtaining non-target region feature data based on multiple non-target image regions includes: Non-target image regions are extracted sequentially from multiple non-target image regions. The non-target pixel set, contour boundary and adjacent label group corresponding to each non-target image region are obtained. The mean color value of each pixel in the non-target pixel set is calculated to obtain the mean color value of the region. By associating the mean color of the non-target image region with the region identifier, the set of non-target pixels, the contour boundary and the adjacent identifier group, the corresponding non-target region feature nodes are obtained. By summarizing the feature nodes of non-target regions, we obtain the feature data of non-target regions.

10. An image feature extraction system for generating animation content, characterized in that, The system includes: The image region segmentation module is used to acquire the image to be processed and divide the image to be processed into multiple image regions, wherein each image region is identified by a region identifier. The contour feature extraction module is used to filter out multiple target image regions from multiple image regions. For each target image region, the following operations are performed: Confirm the contour reference points and contour boundaries corresponding to the target image region; Based on the contour reference point, the contour boundary is traversed independently along a preset clockwise direction and a preset counterclockwise direction to obtain a clockwise adjacent feature sequence and a counterclockwise adjacent feature sequence. The feature verification module is used to normalize the counterclockwise adjacent feature sequence to obtain a normalized adjacent feature sequence, and to perform feature extraction verification on the clockwise adjacent feature sequence and the normalized adjacent feature sequence to obtain a feature verification result, wherein the feature verification result is either verification passed or verification failed. An abnormal feature correction module is used to determine abnormal contour segments if the feature verification result is that the verification fails, and to resample and normalize the abnormal contour segments in the image to be processed to obtain a corrected clockwise adjacent feature sequence and a corrected normalized adjacent feature sequence. The process involves taking the modified clockwise adjacency feature sequence and the modified normalized adjacency feature sequence as the clockwise adjacency feature sequence and the normalized adjacency feature sequence, respectively, and returning to the step of performing feature extraction verification on the clockwise adjacency feature sequence and the normalized adjacency feature sequence to obtain the feature verification result. This process continues until the feature verification result is verified. When the feature verification result corresponding to each target image region in multiple target image regions is verified, image feature data is constructed based on multiple image regions to realize image feature extraction for animation content generation.