Image analysis-based intelligent analysis assistance system for painting process data
By constructing a painting light and shadow matrix and a theoretical light and shadow matrix, calculating the Moran index and adjustment factor, and dynamically adjusting the analysis parameters, the problem of insufficient localization of light and shadow problems in existing technologies is solved. This enables accurate identification and adaptive analysis of light and shadow problems, and improves the analysis depth and accuracy of the painting assistance system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGXI NORMAL UNIV
- Filing Date
- 2026-02-14
- Publication Date
- 2026-05-29
AI Technical Summary
Existing drawing-aided analysis methods cannot effectively quantify, locate, and dynamically identify areas of light and shadow problems in electronic sketching, resulting in insufficient analysis depth and poor robustness, and an inability to dynamically adjust and optimize based on specific problem characteristics.
By constructing a painting light and shadow matrix and a theoretical light and shadow matrix, calculating the Moran index and adjustment factor, and combining mesh partitioning and adjacency matrix, the analysis parameters are dynamically adjusted to achieve quantitative evaluation and adaptive optimization of light and shadow deviation.
It achieves precise localization and adaptive analysis of areas with lighting and shadow problems, improves the adaptability and robustness of lighting and shadow analysis in the painting process, and provides more targeted feedback and improvement suggestions.
Smart Images

Figure CN122115694A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of painting data processing technology, and more specifically, this application relates to an intelligent analysis and assistance system for painting process data based on image analysis. Background Technology
[0002] In the current field of digital painting, especially electronic sketching, the accurate representation of light and shadow relationships in a painting is a core element in evaluating its quality when using devices such as graphics tablets for realistic depiction. Creators rely on their understanding of the physical laws of lighting to translate the light and shadow variations of three-dimensional objects into the tonal relationships on a two-dimensional canvas.
[0003] However, in the complex process of painting, even experienced painters inevitably encounter problems such as disharmony in local light and shadow, imbalance in contrast, or inaccurate shadow shapes. These problems are often scattered in different areas of the painting, and their causes may be due to errors in individual brushstrokes or systematic deviations in the understanding of the overall direction or intensity of the light source.
[0004] Existing auxiliary analysis methods, while providing simple histograms or local sampling comparisons, are often static and isolated in their analysis. They typically only reflect numerical differences in a single pixel or a small area, failing to reveal the correlation and distribution patterns between multiple problem points from the perspective of the overall spatial structure of the image.
[0005] For example, it cannot effectively distinguish between overly dark overall areas of atypical continuous shadows and multiple randomly scattered light and shadow errors. At the same time, its analysis parameters and rules remain fixed during the painting process, and cannot be dynamically adjusted and iteratively optimized according to the specific problem characteristics of the current picture, resulting in insufficient analysis depth and poor robustness in locating complex and atypical lighting problems.
[0006] To address the aforementioned issues, there is an urgent need in this field for a digital painting assistance method that can deeply integrate the physical laws of light and shadow in an image with spatial statistical analysis, in order to overcome the limitations of relying solely on visual observation and static analysis. Specifically, in electronic sketching scenarios, there is a technical problem of insufficient auxiliary effectiveness in quantitatively locating and dynamically recognizing areas with light and shadow issues. Summary of the Invention
[0007] To address the aforementioned technical problems, this technical solution provides an intelligent data analysis and assistance system for the painting process based on image analysis, thus resolving the issues raised in the background section.
[0008] In a first aspect, embodiments of this application provide an intelligent data analysis assistance system for the painting process based on image analysis, comprising: a data acquisition module for acquiring RGB color values and environmental data of the target area of an electronic canvas; a matrix processing module for acquiring grid points that divide the target area according to a preset grid interval, constructing a painting light and shadow matrix based on the RGB color values of the grid points, processing the environmental data according to a preset light and shadow constraint model to obtain a theoretical light and shadow matrix, and subtracting the theoretical light and shadow matrix from the painting light and shadow matrix to obtain a painting light and shadow deviation matrix; an index calculation module for calculating the global Moran index of the target area and calculating the deviation Moran index of the painting light and shadow deviation matrix based on this and a preset adjacency matrix; and a pass / fail judgment module for scaling the size of the target area and recalculating if the deviation Moran index is greater than a preset Moran threshold. A new deviation Moran index is obtained. If the new deviation Moran index is still greater than the preset Moran threshold, the target area is determined to be a qualified area. Problem identification module: If the deviation Moran index is less than or equal to the preset Moran threshold, the local Moran index of each grid point is calculated. Candidate areas are identified based on the local Moran index, and the geometric and statistical characteristics of the candidate areas are analyzed accordingly. An adjustment factor is calculated based on the geometric and statistical characteristics. If the adjustment factor is greater than the preset factor threshold, the corresponding candidate area is output as the problem area. At the same time, for all grid points located in the candidate area, the element value corresponding to it in the preset adjacency matrix is multiplied by the adjustment factor to obtain a new preset adjacency matrix, which is used to calculate the deviation Moran index for the next cycle. Output module: Used to generate and output a light and shadow analysis report of the target area based on the qualified area and the problem area.
[0009] Secondly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned image analysis-based intelligent analysis auxiliary system for painting process data.
[0010] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0011] 1. By calculating the Moran index of the painting's light and shadow deviation matrix, the spatial distribution pattern of light and shadow deviation can be quantitatively evaluated. Based on the relationship between this index and a preset Moran threshold, different analysis paths are adopted: When the index is high, secondary verification is performed by scaling the target area, effectively identifying the "pseudo-clustering" phenomenon caused by overall light and shadow coordination, avoiding misjudging large areas of harmonious light and shadow as problem areas, and solving the problem of traditional methods easily misjudging large-area uniform deviations. When the index is low, a fine-tuning detection process targeting localized, random problems is adopted, ensuring the specificity of the analysis.
[0012] 2. By analyzing its geometric and statistical characteristics, an adjustment factor is calculated, and this factor is used to dynamically adjust the weights of corresponding elements in the preset adjacency matrix. This allows the judgment of spatial correlation to self-adjust based on the characteristics of the identified problems. For example, for regions with elongated shapes or consistent internal trends, the system enhances their spatial influence, changing the sensitivity of subsequent analyses to these special morphological problems. This allows for more accurate identification of complex and atypical lighting and shadow problem regions, improving the adaptability and robustness of the analysis.
[0013] 3. Through the grid partitioning adjustment module, the preset grid interval is dynamically adjusted after multiple analysis cycles based on the average magnitude of the indicator vector and the average deviation of the Moran index over historical cycles. This allows the analysis granularity to adaptively optimize according to the complexity of the problem: for complex and detailed areas, a finer grid is automatically used for analysis; for simpler areas, a coarser grid is maintained or used to improve computational efficiency. This achieves self-matching of computational resources with problem requirements, optimizing overall processing efficiency while ensuring the depth of analysis in key areas. Attached Figure Description
[0014] Figure 1 A schematic diagram of the structure of the intelligent analysis and assistance system for painting process data based on image analysis provided in this application embodiment;
[0015] Figure 2 A schematic diagram of the logic flow of the intelligent analysis and assistance system for painting process data based on image analysis provided in the embodiments of this application;
[0016] Figure 3 This is a schematic diagram of the logical flow of the adaptive analysis subprocess provided in the embodiments of this application. Detailed Implementation
[0017] This application provides an image analysis-based intelligent analysis and assistance system for the painting process, which solves the technical problem in the prior art where there is insufficient auxiliary efficiency for quantitative positioning and dynamic recognition of light and shadow problem areas in electronic sketching and painting scenarios.
[0018] To address the challenge of insufficient auxiliary capabilities in locating light and shadow issues in electronic sketching, the key lies in constructing a quantitative analysis logic capable of understanding the "reasonableness" of light and shadow in an image and performing intelligent diagnosis. Building this logic first requires transforming intuitive visual judgments into a computable data model. This involves simultaneously capturing two types of core data from the drawing scene: first, the image itself drawn on the canvas, specifically the color value of each pixel; and second, the physical environment in which the drawing takes place, particularly the direction and intensity of the light source.
[0019] By dividing the designated target area on the canvas into a uniform grid, the system calculates two key values for each grid point: a normalized lightness value derived from the actual painted colors, and a theoretical light intensity value calculated based on ambient light data and a physical lighting model. These two sets of values are then arranged into two identical matrices, and the difference is calculated to obtain a matrix that quantifies the deviation between the "painting result" and the "physical expectation" at each location. This step transforms the abstract problem of light and shadow harmony into a concrete, spatialized numerical deviation field.
[0020] However, simply obtaining the numerical values of the deviations is insufficient; the key lies in understanding the spatial organization patterns of these deviations to determine their root causes. For example, in a generally dark shadow area, the deviation values at various points within it will be high and adjacent to each other, exhibiting spatial clustering; while a few scattered erroneous strokes may have their high deviation points randomly distributed. To quantify this spatial pattern, the system introduces the global Moran index, a spatial statistical tool capable of calculating the degree of clustering of values throughout the deviation matrix.
[0021] A significantly high Moran's index often indicates a systematic and continuous bias, potentially stemming from a general misjudgment of ambient light. However, a large, well-defined area can also generate highly clustered bias signals. To rule out this possibility, a verification step was designed: the target area was scaled down proportionally, and the Moran's index was recalculated. If the clustering remained significant after scaling down, it indicated that the area itself remained well-defined at a smaller scale and was likely not a problem area; conversely, if the clustering disappeared, it suggested that there were transitional or localized issues within the original area that required closer examination.
[0022] When the global Moran index indicates that the deviation is random or weakly clustered, the focus shifts to fine-tuning local outliers. At this point, a local Moran index is calculated for each grid point to identify "hotspots" that have high deviations and are surrounded by other points with similar high deviations. These hotspots are further merged into candidate problem regions based on spatial proximity and deviation similarity. To improve the robustness of identifying complex and atypical problem regions, instead of using fixed criteria, the geometric and structural characteristics of these candidate regions are analyzed.
[0023] For example, by calculating the aspect ratio of the bounding rectangle of a candidate region and comparing it with the shape of the entire target region, an adjustment factor reflecting the morphological characteristics of that region can be obtained. If this factor is large, it indicates that the shape of the region differs significantly from the overall trend, and its likelihood of being a problem region increases accordingly, leading to its direct output. Simultaneously, this factor is used to amplify the influence of the region's grid points in the spatial weight matrix. This means that in the next round of analysis, more attention will be paid to the spatial relationships within and around such special-shaped regions, achieving adaptive adjustment of the analysis logic based on the identified problem characteristics.
[0024] For candidate regions with insignificant shape features, the consistency of their internal structure is further investigated. By analyzing the direction of the maximum change in the local Moran's index between each point within the region and its neighboring points, an "indicator vector" describing the gradient change trend within the region can be constructed, and the main trend vector of the region is obtained by combining these vectors. This main trend is compared with the main trend of the entire image, and the cosine value of their directions is calculated. If the directions are highly consistent, it means that the deviation change pattern of the region is consistent with the overall lighting and shadow logic of the image, and may not be an error; if they are inconsistent, it is more likely to be an independent problem point. Based on this judgment, the adjustment factor is also updated and the weight matrix is adjusted, thus incorporating directional consistency into the negative feedback loop of dynamic adjustment.
[0025] The above analysis process can be run periodically. It accumulates the indicator vector strength and deviation index of the problem areas found over multiple periods, and uses this as a basis to dynamically adjust the initial grid spacing. When historical data shows that the internal structure of the problem area is complex and the gradient changes drastically, a denser grid will be automatically used for a more refined scan; conversely, a sparser grid may be used to improve efficiency.
[0026] This allows the system's analytical accuracy to be self-optimized based on the complexity of the actual problem, forming a complete intelligent closed loop from macroscopic judgment to microscopic positioning, and then to dynamic adjustment of analytical parameters. Ultimately, it enables reliable exclusion of qualified areas and accurate, adaptive positioning of various complex problem areas.
[0027] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0028] like Figure 1The diagram shown is a structural schematic of the intelligent analysis auxiliary system for painting process data based on image analysis provided in this application embodiment. The system includes: a data acquisition module for acquiring RGB color values and environmental data of the target area of an electronic canvas; a matrix processing module for acquiring grid points that divide the target area according to a preset grid interval, constructing a painting light and shadow matrix based on the RGB color values of the grid points, processing environmental data according to a preset light and shadow constraint model to obtain a theoretical light and shadow matrix, and subtracting the theoretical light and shadow matrix from the painting light and shadow matrix to obtain a painting light and shadow deviation matrix; an index calculation module for calculating the global Moran index of the target area and calculating the deviation Moran index of the painting light and shadow deviation matrix based on this and a preset adjacency matrix; and a pass / fail judgment module for determining whether the deviation Moran index is greater than a preset Moran threshold. The target area is scaled and a new deviation Moran index is recalculated. If the new deviation Moran index is still greater than the preset Moran threshold, the target area is determined to be a qualified area. The problem identification module calculates the local Moran index of each grid point if the deviation Moran index is less than or equal to the preset Moran threshold. Candidate areas are identified based on the local Moran index, and their geometric and statistical characteristics are analyzed. An adjustment factor is calculated based on these geometric and statistical characteristics. If the adjustment factor is greater than the preset factor threshold, the corresponding candidate area is output as the problem area. Simultaneously, for all grid points located in the candidate area, their corresponding element values in the preset adjacency matrix are multiplied by the adjustment factor to obtain a new preset adjacency matrix, which is used to calculate the deviation Moran index for the next cycle. The output module generates and outputs a light and shadow analysis report for the target area based on the qualified and problem areas.
[0029] Figure 2 A schematic diagram of the logical flow of an image analysis-based intelligent analysis auxiliary system for painting process data provided in an embodiment of this application.
[0030] By introducing spatial statistical analysis methods, this system enables the quantitative location and dynamic identification of lighting and shadow problems in digital paintings. It constructs a painting lighting and shadow matrix and a theoretical lighting and shadow matrix, calculates their deviations, and uses the Moran index to evaluate the spatial clustering of these deviations. As a result, the system can distinguish between areas with overall harmonious lighting and shadow and areas with localized lighting and shadow problems. It can also dynamically adjust analysis parameters based on the geometric characteristics of the problem areas, effectively solving the technical problems of insufficient robustness and auxiliary effectiveness in locating complex and atypical lighting and shadow problems in electronic sketching scenarios using traditional methods. This provides creators with more in-depth and targeted lighting and shadow analysis assistance.
[0031] Furthermore, the specific construction process of the painting light and shadow matrix is as follows: obtain the RGB color values of the grid points; convert the color values of the grid points into normalized lightness values using the international standard luminance conversion formula; use the normalized lightness values of all grid points as element values of the painting light and shadow matrix, and combine the matrix according to the spatial arrangement order of the grid points to obtain the painting light and shadow matrix; the spatial arrangement order is used to limit the number of rows of the painting light and shadow matrix to be equal to the number of rows of the grid points in the target area, and the number of columns of the painting light and shadow matrix to be equal to the number of columns of the grid points in the target area.
[0032] In this embodiment, the spatial arrangement order is used to define the number of rows in the painting lighting matrix as equal to the number of rows of grid points in the target area, and the number of columns in the painting lighting matrix as equal to the number of columns of grid points in the target area. In the matrix processing module, when the target area is divided according to a preset grid interval, the number of rows and columns of grid points is determined. For example, if the target area is divided into N grids horizontally and M grids vertically, then the painting lighting matrix will be defined as an M-row, N-column matrix. This one-to-one spatial arrangement order clarifies the dimensions and structure of the painting lighting matrix, ensuring that each element of the matrix accurately represents the brightness information of a specific location in the target area, thereby enabling the matrix to intuitively map the light and shadow distribution of the painting.
[0033] By converting the RGB color values of grid points into normalized brightness values and constructing a painting lighting matrix using these values, the system can more accurately reflect the human eye's perception of light and shadow, avoiding visual biases that may arise from directly using RGB color values. This brightness-based matrix construction method allows the subsequent painting lighting deviation matrix to more realistically reflect the difference between the painting and the theoretical lighting, thereby improving the accuracy and reliability of lighting analysis. This provides artists with more valuable feedback, helping them to better adjust the lighting effects of their works.
[0034] Furthermore, the specific process for obtaining the theoretical lighting matrix is as follows: environmental data includes the light source direction vector and the basic illumination intensity; spatial pose data of the electronic canvas is obtained to obtain the global surface normal vector of the plane where the electronic canvas is located; for the grid points of the target area, the light source direction vector and the global surface normal vector are calculated according to Lambert's cosine law to obtain the theoretical illumination intensity value; the theoretical illumination intensity values of all grid points are used as the element values of the theoretical lighting matrix, and the matrix is combined according to the spatial arrangement order of the grid points to obtain the theoretical lighting matrix.
[0035] In this embodiment, based on actual environmental data and the spatial pose data of the electronic canvas, the theoretical illumination intensity value of each grid point within the target area can be accurately calculated using the Lambert cosine law physical illumination model. These theoretical illumination intensity values are organized into a theoretical light and shadow matrix, which realistically reflects the light and shadow distribution that the target area should have under the current environment and canvas pose.
[0036] This significantly improves the accuracy and physical realism of the theoretical light and shadow matrix, enabling the subsequent difference between the painting light and shadow matrix and the theoretical light and shadow matrix to more accurately reflect the actual deviation of light and shadow processing during the painting process. This provides a more reliable benchmark for the system to identify areas with light and shadow problems in the painting, thereby improving the analysis accuracy and auxiliary effect of the intelligent data analysis system for the entire painting process.
[0037] Furthermore, the specific calculation process of the deviation Moran index is as follows: the element values in the painting light and shadow deviation matrix are denoted as deviation values; a corresponding preset adjacency matrix is defined for the painting light and shadow deviation matrix, and the element values of the preset adjacency matrix are determined according to the adjacency relationship of the grid points corresponding to the deviation values of the painting light and shadow deviation matrix; the specific adjacency relationship is as follows: when the deviation value of the painting light and shadow deviation matrix is... The grid point and the first When a grid point is an adjacent grid point, the corresponding element of the preset adjacency matrix is denoted as: , When the first part of the painting light and shadow deviation matrix The grid point and the first When a grid point is not an adjacent grid point, the corresponding element of the preset adjacency matrix is denoted as... , The deviation Moran index is calculated from the painting light and shadow deviation matrix using the global Moran index calculation formula. The global Moran index calculation formula is as follows: ,in, The Moran index indicates deviation. This represents the total number of grid points in the target area. The first part of the painting light and shadow deviation matrix represents the first part. Deviation value of each grid point The first part of the painting light and shadow deviation matrix represents the first part. Deviation value of each grid point This represents the arithmetic mean of all deviation values in the painting light and shadow deviation matrix. This represents the sum of all element values in the predefined adjacency matrix. This indicates that the preset adjacency matrix corresponds to the first element of the painting light and shadow deviation matrix. The grid point and the first The element value is obtained by considering the adjacency relationships of grid points.
[0038] In this embodiment, adjacency relationships can be based on various spatial definitions. For example, "Rook" adjacency means that grid points sharing only edges are adjacent, "Bishop" adjacency means that grid points sharing only corners are adjacent, or "Queen" adjacency means that grid points sharing either edges or corners are adjacent, i.e., an eight-neighborhood. Here, an eight-neighborhood can be used. In this way, the pre-defined adjacency matrix transforms the spatial topology between grid points into a computable mathematical form, providing spatial weight information for the subsequent Moran's index calculation.
[0039] By defining a pre-defined adjacency matrix for the painting's lighting deviation matrix and calculating the deviation Moran index based on the global Moran index calculation formula, this application can quantitatively evaluate the spatial autocorrelation of painting lighting deviation. This enables the system not only to identify the deviation of individual grid points but also to discover spatial clustering patterns of deviation values, such as high deviation value regions being adjacent to high deviation value regions, or low deviation value regions being adjacent to low deviation value regions. This quantification of spatial autocorrelation effectively solves the problem of difficulty in judging the spatial distribution characteristics of lighting problem areas based solely on deviation values, providing a more insightful basis for subsequent judgment modules. This allows for more accurate and objective identification of areas with lighting problems in paintings, improving the intelligence and accuracy of the analysis. When the deviation Moran index is positive, it indicates that similar deviation values tend to cluster spatially; for example, the light and shadow in a region may be too bright or too dark, which usually indicates a localized problem in the handling of light and shadow in the painting. When the deviation Moran index is close to zero, it indicates that the deviation values are randomly distributed spatially without a clear clustering pattern. When the deviation Moran index is negative, it indicates that dissimilar deviation values tend to disperse spatially. This recognition of spatial patterns allows the system to go beyond simple point-to-point comparisons and gain a deeper understanding of the overall structure of light and shadow deviations in paintings, thus providing more targeted feedback and improvement suggestions for sketching.
[0040] Furthermore, the specific process of scaling the target area is as follows: according to the preset scaling ratio, the boundary of the target area is reduced proportionally based on the geometric center of the target area.
[0041] In this embodiment, when the system needs to scale the target area to reassess its lighting characteristics, a preset scaling ratio is used, and the area is scaled down proportionally based on the geometric center of the target area, which ensures the accuracy and rationality of the scaling operation.
[0042] Using the geometric center as a reference avoids accidental translation of the region during scaling, maintaining its centrality and ensuring that the scaled area still focuses on the core content of the original area. Proportional scaling guarantees the integrity of the region's shape, avoiding distortion of light and shadow distribution characteristics caused by changes in aspect ratio. This ensures that the recalculated deviation Moran index more accurately reflects the uniformity of light and shadow in the scaled area. This standardized scaling method effectively avoids analytical biases introduced by improper scaling, improving the system's reliability and accuracy in determining the suitability of target areas, and enabling the system to more effectively assist users in light and shadow analysis during the painting process.
[0043] Furthermore, the specific calculation process of the adjustment factor is as follows: For each grid point, calculate its local Moran index; calculate the statistical significance P-value of the local Moran index of the grid point. If the local Moran index of the grid point is greater than zero and its statistical significance P-value is less than a preset significance threshold, it is marked as a high-value potential point; starting from the high-value potential point, delineate the region with a preset radius to obtain the initial candidate region. If the difference between the deviation values of the high-value potential point and any other high-value potential point in its initial candidate region is less than a preset difference threshold, merge the initial candidate regions of the two to obtain the candidate region; for each candidate region, calculate the aspect ratio of its minimum bounding rectangle, denoted as the candidate aspect ratio; obtain the aspect ratio of the minimum bounding rectangle of the target region, denoted as the target aspect ratio; use the ratio of the candidate aspect ratio to the target aspect ratio as the adjustment factor.
[0044] Figure 3 This is a schematic diagram of the logical flow of the adaptive analysis subprocess provided in the embodiments of this application.
[0045] In this embodiment, for each merged candidate region, the system calculates the aspect ratio of its minimum bounding rectangle, denoted as the candidate aspect ratio. The minimum bounding rectangle is the smallest rectangle that can completely enclose the candidate region, and its aspect ratio can quantify the geometric characteristics of the candidate region, reflecting its elongation or compactness. At the same time, the system also obtains the aspect ratio of the minimum bounding rectangle of the entire target region, denoted as the target aspect ratio, as the geometric reference of the overall canvas region.
[0046] Finally, the ratio of the candidate aspect ratio to the target aspect ratio is used as an adjustment factor. This adjustment factor quantifies the degree of anomalousness of the candidate region's geometry relative to the overall canvas shape. For example, if the shape of the candidate region differs significantly from the overall canvas shape, this ratio will deviate significantly from 1, indicating that the lighting anomalies in that region may have unique geometric features and require greater attention.
[0047] Using the above technical solution, the system can identify statistically significant outliers from local lighting and shadow deviations and aggregate them into candidate regions with practical significance. By calculating the aspect ratio of the candidate region to the target region as an adjustment factor, the system can accurately quantify the degree of anomalousness of the geometric features of the candidate region relative to the overall canvas. This shape-feature-based adjustment factor avoids misjudgments that may be caused by relying solely on local Moran's index or simple geometric features, making the identification of problem areas more accurate and objective. The adjustment factor can more accurately reflect the severity and type of lighting and shadow anomalies, thus providing a more reliable basis for subsequent problem area output and lighting and shadow analysis reports, improving the accuracy and effectiveness of the system in identifying painting lighting and shadow problems.
[0048] Furthermore, the problem-solving module also includes: if the adjustment factor is less than or equal to a preset factor threshold, then perform the following operations: for each grid point in the candidate region, calculate the direction with the largest absolute difference between its local Moran index and the local Moran indices of other grid points in its eight neighboring directions, use this direction as the vector direction, and use the absolute difference as the vector magnitude, using the corresponding grid point as the vector starting point, construct a vector based on the vector direction, vector magnitude, and vector starting point to obtain the grid point's indicator vector; sum the indicator vectors of all grid points in the candidate region to obtain the main trend vector of the candidate region; for each grid point in the target region, calculate... The indicator vectors of the grid points are calculated, and the indicator vectors of all grid points in the target area are summed to obtain the main trend vector of the target area. The main trend vector of the candidate area is compared with the main trend vector of the target area, and the cosine value of the angle between the two is calculated. If the cosine value is greater than the preset cosine value threshold, the corresponding candidate area is output as the problem area of the current period. At the same time, the sum of 1 and the cosine value is multiplied by the adjustment factor to obtain a new adjustment factor. All grid points located in each candidate area are multiplied by the element value corresponding to them in the preset adjacency matrix by the new adjustment factor to obtain a new preset adjacency matrix, which is used to calculate the deviation Moran index of the next period.
[0049] In this embodiment, an indicator vector is calculated for each grid point in the target area, and the indicator vectors of all grid points in the target area are summed to obtain the main trend vector of the target area. The main trend vector of the target area serves as the overall reference benchmark for the lighting deviation across the entire analysis area, reflecting the general direction and intensity of the lighting deviation across the entire electronic canvas. By calculating and aggregating the local lighting deviation trends of all grid points within the target area, a vector representing the global lighting deviation pattern can be obtained, which is used for comparison with the trends of local candidate areas.
[0050] Next, the system compares the main trend vector of the candidate region with the main trend vector of the target region, calculating the cosine of the angle between them. The cosine value is an indicator of the similarity between the directions of two vectors; the closer the value is to 1, the more consistent the directions of the two vectors; the closer it is to -1, the more opposite the directions; and the closer it is to 0, the more perpendicular the directions. By calculating the cosine value, the system can quantify the directional consistency between the lighting deviation trend of the candidate region and the lighting deviation trend of the entire target region. For example, if the lighting deviation trend of the candidate region is highly consistent with the deviation trend of the overall target region, the cosine value will be larger.
[0051] If the calculated cosine value is greater than a preset cosine threshold, it indicates that the lighting deviation trend of the candidate region has a high degree of consistency or specific correlation with the overall lighting deviation trend of the target region. In this case, even if the geometric features of the region do not meet the criteria for a problem region, the trend characteristics of its lighting deviation are sufficient to identify it as a problem region in the current cycle and output it. This helps to discover potential problem regions that locally exhibit patterns consistent with the overall deviation pattern but may be missed by geometric feature judgment.
[0052] For each candidate region, the element values of all grid points corresponding to their corresponding elements in the pre-defined adjacency matrix are multiplied by a new adjustment factor to obtain a new pre-defined adjacency matrix, which is then used to calculate the Moran's index of deviation for the next cycle. In this way, the system can dynamically adjust the spatial weight matrix. For candidate regions identified as problem areas, the influence of their internal grid points in the spatial correlation calculation is enhanced. This means that in the next analysis cycle, the light and shadow deviations in these regions will contribute more to the overall Moran's index of deviation, making them easier for the system to detect and focus on, thus forming an iterative optimization and focused analysis mechanism.
[0053] By more sensitively capturing and continuously focusing on areas with specific lighting and shadow trends, the accuracy and efficiency of identifying problem areas can be improved, ensuring that even subtle but trend-based lighting and shadow inconsistencies can be effectively detected, providing more precise auxiliary information.
[0054] Furthermore, it also includes a grid division adjustment module: used to adjust the preset grid interval based on the change characteristics of the indicator vector within the preset number of cycles. This involves obtaining the average magnitude of the indicator vector of all problem candidate regions and the average deviation Moran index of all problem candidate regions within the preset number of cycles, denoted as the average magnitude and the average deviation Moran index, respectively; and calculating the new preset grid interval according to the grid interval adjustment formula, the specific grid interval adjustment formula being as follows: ,in, Indicates the new preset grid interval. Indicates the preset grid interval. This represents the average modulus. This indicates the preset module length reference value. This represents the Moran mean deviation. This indicates the preset Moran threshold; the new preset grid interval will be used for dividing the grid points of the target area in the next cycle.
[0055] In this embodiment, a new preset grid interval is calculated according to a grid interval adjustment formula. This formula provides a quantitative method to adjust the grid interval based on historical analysis results. It combines the intensity of light and shadow changes and the degree of light and shadow anomalies with preset reference values and thresholds to determine a more suitable grid granularity. This formula can be embedded into the algorithm of the grid division adjustment module. The system substitutes the calculated average finger length, the average deviation Moran's value, and the preset finger length reference value and Moran's threshold into the formula for calculation.
[0056] For example, a high average modulus or average deviation Moran's value may indicate that the current grid spacing is too large, making it impossible to capture subtle changes in light and shadow. In this case, the formula may calculate a smaller new preset grid spacing. Conversely, if these values are low, it may indicate that the current grid spacing is too fine, introducing too much noise or computational redundancy. In this case, the formula may calculate a larger new preset grid spacing.
[0057] The new preset grid interval is used for grid point division of the target area in the next cycle, ensuring that the system adopts the optimized grid granularity in subsequent analysis cycles, thereby improving the accuracy and efficiency of the analysis. The calculated new preset grid interval will be updated in the system's configuration parameters.
[0058] At the start of the next analysis cycle, the data acquisition module will use this new grid interval to regenerate grid points when dividing the target area into grid points, which will affect all subsequent steps that depend on grid division, such as the construction of the painting light and shadow matrix and the calculation of the deviation Moran index.
[0059] Through the above technical solution, the system can dynamically adjust the grid interval to better adapt to changes in light and shadow details at different scales during the painting process. When the light and shadow changes drastically or significantly, the grid interval can be automatically reduced to capture local details more precisely; when the light and shadow changes are gradual, the grid interval can be appropriately increased to reduce computational load and avoid oversensitivity. This solves the problem that a fixed grid interval cannot adapt to multi-scale light and shadow analysis, improving the accuracy and robustness of problem area identification. This adaptive grid partitioning mechanism enables the system not only to identify problem areas but also to adjust the granularity of its analysis according to the characteristics of the problem.
[0060] This ensures the system maintains high effectiveness across different painting styles and stages. For example, in the detailed painting stage, the system can automatically use a finer grid to capture subtle differences in light and shadow; while in the large-area coloring stage, a coarser grid can be used to focus on the overall light and shadow layout. This significantly improves the system's intelligence and adaptability to complex painting scenes, resulting in more accurate light and shadow analysis reports.
[0061] Furthermore, the specific process for generating the light and shadow analysis report is as follows: obtain the boundary coordinates of the qualified area and the boundary coordinates of the problem area in the current period; generate an analysis report containing the qualified area, the boundary coordinates of the qualified area, the problem area, and the boundary coordinates of the problem area; display the analysis report directly on the electronic canvas, where the problem area is covered with a semi-transparent highlight block, and the qualified area is unmarked.
[0062] In this embodiment, the analysis report is displayed directly on an electronic canvas, with problem areas covered by semi-transparent highlighted blocks and acceptable areas left unmarked. This step aims to visualize the analysis results, allowing users to see them intuitively on the electronic canvas.
[0063] By overlaying visual markers directly onto the digital canvas, users can immediately identify problem areas requiring attention without referring to separate reports or forms. The system uses graphics rendering technology to draw these markers on the digital canvas's display layer.
[0064] For the problem area, a semi-transparent filled polygon or rectangle can be drawn based on its boundary coordinates and highlighted with a striking color to attract the user's attention. The semi-transparency effect ensures that the underlying painted content remains visible.
[0065] Qualified areas are left unmarked to avoid visual interference and are assumed to be in good condition. This direct display method is typically achieved by calling the graphics API or rendering engine of the electronic canvas, presenting the analysis results as an overlay on the original image.
[0066] This application also provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements an image analysis-based intelligent data analysis assistance system for the painting process.
[0067] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0068] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0069] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0070] These computer program instructions can also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0071] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0072] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A data intelligent analysis and assistance system for the painting process based on image analysis, characterized in that, include: Data acquisition module: used to acquire the RGB color values and environmental data of the target area of the electronic canvas; Matrix processing module: used to obtain grid points that divide the target area according to a preset grid interval, construct a painting light and shadow matrix based on the RGB color values of the grid points, process environmental data according to a preset light and shadow constraint model to obtain a theoretical light and shadow matrix, and subtract the theoretical light and shadow matrix from the painting light and shadow matrix to obtain the painting light and shadow deviation matrix; Index Calculation Module: Used to calculate the global Moran index of the target area and, based on this and the preset adjacency matrix, calculate the deviation Moran index of the painting light and shadow deviation matrix; The qualified determination module is used to scale the size of the target area and recalculate the new deviation Moran index if the deviation Moran index is greater than the preset Moran threshold. If the new deviation Moran index is still greater than the preset Moran threshold, the target area is determined to be a qualified area. Problem Detection Module: If the deviation Moran index is less than or equal to the preset Moran threshold, calculate the local Moran index of each grid point, identify candidate regions based on the local Moran index, analyze the geometric and statistical characteristics of the candidate regions, calculate the adjustment factor based on the geometric and statistical characteristics, and output the corresponding candidate region as the problem region if the adjustment factor is greater than the preset factor threshold. At the same time, for all grid points located in the candidate region, multiply the corresponding element value in the preset adjacency matrix by the adjustment factor to obtain a new preset adjacency matrix, which is used to calculate the deviation Moran index of the next period. Output module: Used to generate and output a light and shadow analysis report of the target area based on the qualified area and the problem area.
2. The intelligent analysis and assistance system for painting process data based on image analysis according to claim 1, characterized in that, The specific construction process of the painting light and shadow matrix is as follows: Get the RGB color values of the grid points; The color values of the grid points are converted into normalized lightness values using the international standard lightness conversion formula; The normalized brightness values of all grid points are used as the element values of the painting light and shadow matrix. The matrix is combined according to the spatial arrangement order of the grid points to obtain the painting light and shadow matrix. The spatial arrangement order is used to limit the number of rows of the painting light and shadow matrix to be equal to the number of rows of grid points in the target area, and the number of columns of the painting light and shadow matrix to be equal to the number of columns of grid points in the target area.
3. The intelligent analysis and assistance system for painting process data based on image analysis according to claim 1, characterized in that, The specific process for obtaining the theoretical light and shadow matrix is as follows: Environmental data includes the light source direction vector and the base illumination intensity; Obtain the spatial pose data of the electronic canvas to get the global surface normal vector of the plane where the electronic canvas is located; For the grid points in the target area, the light source direction vector and the global surface normal vector are calculated according to Lambert's cosine law to obtain the theoretical light intensity value; The theoretical illumination intensity values of all calculated grid points are used as the element values of the theoretical light and shadow matrix. The matrix is then combined according to the spatial arrangement order of the grid points to obtain the theoretical light and shadow matrix.
4. The intelligent analysis and assistance system for painting process data based on image analysis according to claim 3, characterized in that, The specific calculation process for the deviation Moran index is as follows: The element values in the painting light and shadow deviation matrix are denoted as deviation values; Define a corresponding preset adjacency matrix for the painting light and shadow deviation matrix. The element values of the preset adjacency matrix are determined based on the adjacency relationship of the grid points corresponding to the deviation values of the painting light and shadow deviation matrix. The specific adjacency relationships are as follows: When the first of the painting light and shadow deviation matrix The grid point and the first When a grid point is an adjacent grid point, the corresponding element of the preset adjacency matrix is denoted as: , ; When the first of the painting light and shadow deviation matrix The grid point and the first When a grid point is not an adjacent grid point, the corresponding element of the preset adjacency matrix is denoted as... , ; The deviation Moran index is calculated from the painting light and shadow deviation matrix according to the global Moran index calculation formula; The formula for calculating the global Moran index is as follows: ,in, The Moran index indicates deviation. This represents the total number of grid points in the target area. The first part of the painting light and shadow deviation matrix represents the first part. Deviation value of each grid point The first part of the painting light and shadow deviation matrix represents the first part. Deviation value of each grid point This represents the arithmetic mean of all deviation values in the painting light and shadow deviation matrix. This represents the sum of all element values in the predefined adjacency matrix. This indicates that the preset adjacency matrix corresponds to the first element of the painting light and shadow deviation matrix. The grid point and the first The element value is obtained by considering the adjacency relationships of grid points.
5. The intelligent analysis and assistance system for painting process data based on image analysis according to claim 1, characterized in that, The specific process of scaling the target area is as follows: according to the preset scaling ratio, the boundary of the target area is reduced proportionally based on the geometric center of the target area.
6. The intelligent analysis and assistance system for painting process data based on image analysis according to claim 1, characterized in that, The specific calculation process for the adjustment factor is as follows: For each grid point, calculate its local Moran index; Calculate the statistical significance P-value of the local Moran index of the grid point. If the local Moran index of the grid point is greater than zero and its statistical significance P-value is less than the preset significance threshold, it is marked as a high-value potential point. Starting from a high-value potential point, an area is delineated with a preset radius to obtain an initial candidate area. If the difference between the deviation of a high-value potential point and any other high-value potential point in its initial candidate area is less than a preset difference threshold, the two initial candidate areas are merged to obtain a candidate area. For each candidate region, calculate the aspect ratio of its smallest bounding rectangle, and denot it as the candidate aspect ratio; Obtain the aspect ratio of the smallest bounding rectangle of the target region, and denote it as the target aspect ratio; The ratio of the candidate aspect ratio to the target aspect ratio is used as an adjustment factor.
7. The intelligent analysis and assistance system for painting process data based on image analysis according to claim 6, characterized in that, The problem-solving module also includes: If the adjustment factor is less than or equal to the preset factor threshold, then perform the following operations: For each grid point in the candidate region, calculate the direction with the largest absolute difference between its local Moran index and the local Moran indices of other grid points in its eight neighboring directions. Use this direction as the vector direction, the absolute difference as the vector magnitude, and the corresponding grid point as the vector starting point. Construct a vector based on the vector direction, vector magnitude, and vector starting point to obtain the indicator vector of the grid point. The main trend vector of the candidate region is obtained by summing the indicator vectors of all grid points in the candidate region. For each grid point in the target area, the indicator vector of the grid point is calculated. The indicator vectors of all grid points in the target area are summed to obtain the main trend vector of the target area. Compare the main trend vector of the candidate region with the main trend vector of the target region, and calculate the cosine of the angle between them; If the cosine value is greater than the preset cosine value threshold, the corresponding candidate region is output as the problem region for the current cycle. At the same time, the sum of 1 and the cosine value is multiplied by the adjustment factor to obtain a new adjustment factor. All grid points located in each candidate region are multiplied by the new adjustment factor for their corresponding element values in the preset adjacency matrix to obtain a new preset adjacency matrix, which is used to calculate the deviation Moran index for the next cycle.
8. The intelligent analysis and assistance system for painting process data based on image analysis according to claim 7, characterized in that, It also includes a grid division adjustment module: used to adjust the preset grid interval based on the change characteristics of the indicator vector within the preset number of cycles. The average value of the magnitude of the indicator vector of all problem candidate regions and the average value of the deviation Moran index of all problem candidate regions are obtained within a preset number of periods, and are denoted as the average magnitude of the indicator vector and the average deviation Moran index, respectively. The new preset grid interval is calculated based on the grid interval adjustment formula, which is as follows: ,in, Indicates the new preset grid interval. Indicates the preset grid interval. This represents the average modulus. This indicates the preset module length reference value. This represents the Moran mean deviation. This indicates the preset Moran threshold; The new preset grid interval will be used to divide the grid points of the target area in the next cycle.
9. The intelligent analysis and assistance system for painting process data based on image analysis according to claim 1, characterized in that, The specific process for generating the light and shadow analysis report is as follows: Obtain the boundary coordinates of the qualified region and the problem region in the current cycle; Generate an analysis report containing the qualified area, the boundary coordinates of the qualified area, the problem area, and the boundary coordinates of the problem area; The analysis report is displayed directly on the electronic canvas, with problem areas covered by semi-transparent, highlighted blocks, and acceptable areas left unmarked.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the system as described in any one of claims 1-9.