The invention relates to the technical field of image recognition, in particular to a mechanical
casting detection method and
system based on image
data analysis processing, and the method comprises the following steps: obtaining a
casting image gray value, classifying according to a gray scale standard, generating a multi-layer
image structure and a layering graph, setting a grid, counting pixels to form a density sequence, extracting a trend region, and building an index table; and extracting multi-angle
image boundary point matching intersection points to form a coordinate matrix, screening a stable intersection
point set, searching an original image comparison trend coordinate to extract an overlapping region, and generating a defect
annotation image result. According to the method, an image is subjected to gray scale division to form a multi-layer structure, texture
differential expression is enhanced, a pattern layer grid statistics density sequence is used for extracting a trend region,
abnormal distribution positioning is achieved, boundary
mutation points in a multi-view image are uniformly mapped, boundary recognition consistency and robustness are improved, and a stable boundary and the trend region are compared and marked; defect expression intuition and credibility are enhanced, and detection precision and stability are improved.