Crankshaft quality inspection method and system based on image data

By establishing a correspondence between the structure number and the spatial coordinate, combining the image acquisition center point with the structure segment number, and using grayscale difference to identify the crack boundary, the problem of inaccurate mapping between the image and structure position is solved, high-precision defect identification and positioning is achieved, and the stability and accuracy of the detection system are improved.

CN120807488AActive Publication Date: 2025-10-17YONGSHENG HEAVY IND CO LTD

Patent Information

Application Number
CN202511201017.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-10-17
Estimated Expiration
2045-08-26

AI Technical Summary

Technical Problem

Existing crankshaft quality inspection methods based on image data have difficulty in achieving accurate mapping of images and structural positions, resulting in inaccurate defect recognition results. In addition, false boundaries or edge fractures are prone to occur in complex backgrounds, affecting the stability and accuracy of the inspection system.

Method used

By establishing the correspondence between the structure number and the spatial coordinate, combining the image acquisition center point with the structure segment number, and constructing the image number archiving path table, the symmetric center line in the image matrix is ​​used to extract the grayscale difference and generate a structural symmetric grayscale difference array to identify and map the crack boundary to the actual structure position.

Benefits of technology

It achieves efficient mapping of image content and structural areas, enhances data traceability, improves the accuracy of defect recognition and positioning precision, reduces false detections and missed detections, and improves the stability of the detection system and engineering adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807488A_ABST
    Figure CN120807488A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of defect detection, in particular to a crankshaft quality inspection method and system based on image data, and the method comprises the following steps: extracting crankshaft coordinates to generate a serial number list, binding an image center to generate a list, constructing a path table by an attribution image, extracting a gray difference to generate an array, recognizing the position of an abnormal mapping structure, and outputting crack positioning information. According to the method, the accurate positioning basis is obtained by establishing the corresponding relation between the structure number and the space coordinate and image acquisition, the mapping between the image content and the structure area is realized by combining the imaging center point extraction and the image attribution binding, the traceability of data archiving is enhanced, the gray value point pairs are extracted by using the symmetric center line, and the gray difference matrix is constructed. According to the overall scheme, image attribution and defect identification under structure dominance are achieved, the detection accuracy and the positioning precision are improved, the false detection rate is reduced, and the stability and the engineering adaptation capacity are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of defect detection, in particular to a crankshaft quality inspection method and system based on image data. BACKGROUND

[0002] The technical field of defect detection involves identifying and analyzing abnormalities in the appearance or structure of products through various sensing means and algorithmic means. The core tasks include defect feature extraction, defect type identification, and positioning analysis. The overall technical field uses image acquisition, image preprocessing, feature extraction, and discriminant classification methods to identify and evaluate surface or structural defects of target objects such as industrial parts. Among them, the traditional image data-based crankshaft quality inspection method refers to acquiring crankshaft surface image data by deploying industrial cameras on the production line, using methods such as grayscale analysis, edge extraction, template matching, and target contour fitting to identify and judge defects such as scratches, cracks, and pits in the image. The Canny edge detection method is often used to identify defect boundaries, combined with Hough transform to identify linear features of cracks, or by comparing target contours with a pre-set template library to determine defect regions.

[0003] The existing method mainly relies on industrial cameras to acquire crankshaft surface images, combines image grayscale analysis, edge detection, and template matching to determine defects, and the processing method highly depends on the pixel features of the image itself, while ignoring the direct correlation between the image and the structural space position, resulting in difficulty in accurately mapping the defect recognition results to the actual area of the crankshaft physical structure. For example, if multiple feature points interfere in the same image, it is easy to misjudge the real position of the defect at the image level. Since there is no clear structural index for the image, the structural position where the defect occurs does not have a continuous reference basis, making it difficult to support subsequent structural quality tracing. Traditional Canny edge detection and Hough transform methods are sensitive to complex background interference, and in scenes with complex textures or uneven lighting, false boundaries or edge breaks may occur, affecting the integrity of defect region extraction. At the same time, the existing method does not have the ability to systematically quantify the symmetry disturbance of image grayscale, and continuous small disturbances such as cracks are difficult to form a stable recognition pattern, thereby affecting the extraction accuracy of defect continuous distribution, and may result in cracks being segmented into multiple regions or completely lost, reducing the stability of the overall detection system and the engineering value of actual application. SUMMARY

[0004] To solve the technical problems existing in the prior art, the present application provides a crankshaft quality inspection method based on image data, comprising the following steps:

[0005] To achieve the above purpose, the present application adopts the following technical scheme: a crankshaft quality inspection method based on image data, comprising the following steps:

[0006] S1: read the spatial coordinate information of the crankshaft machining section, extract the structural boundary feature position points according to the difference in the axial distance of the nodes, number and mark the nodes in sequence, establish the correspondence between the structural number and the spatial position, and generate a structural number coordinate list;

[0007] S2: based on the structural spatial information provided in the structural number coordinate list, extract the corresponding starting position and imaging region boundary value in the image acquisition process, calculate the center point coordinate, establish the binding relationship between the image number and the acquisition center, and generate an image acquisition center list;

[0008] S3: based on the corresponding data of the image acquisition position in the image acquisition center list and the structural section position in the structural number coordinate list, judge the proximity of the image acquisition point to the structural section, determine the belonging section number and embed it in the image storage path, construct the binding archiving path between the image file and the structural section, and generate an image number archiving path table;

[0009] S4: based on the image content belonging to the image number archiving path table, locate the main shaft region symmetry center line in the image matrix, set the sampling interval to extract the symmetric gray value point pair, arrange the gray value difference between the point pairs and construct the corresponding position matrix, and generate a structural symmetric gray difference array.

[0010] As a further scheme of the present application, the structural number coordinate list includes node number, structural position, and spatial coordinate, the image acquisition center list includes image number, acquisition center point, and imaging boundary, the image number archiving path table includes image number, belonging section number, and image storage path, and the structural symmetric gray difference array includes symmetric point gray value, gray difference matrix, and center line position.

[0011] As a further scheme of the present application, the specific steps of S1 are:

[0012] S101: read the spatial coordinates of the nodes in the crankshaft machining section, extract the Z-axis direction coordinates as the axial position reference, arrange the nodes in sequence according to the node number, calculate the Z-axis distance between adjacent nodes, obtain all distance values in the node sequence, and obtain the axial distance change value;

[0013] S102: according to the axial distance change value, screen the node positions with a difference greater than the structural boundary threshold between adjacent distances, judge whether the structural boundary condition is met, take the nodes meeting the requirements as structural feature points, extract the original number and spatial coordinates, and obtain a structural feature node sequence;

[0014] S103: according to the number sequence and coordinate information in the structural feature node sequence, establish the correspondence between the structural number and the coordinate, and generate a structural number coordinate list.

[0015] As a further solution of the present invention, the specific steps of S2 are:

[0016] S201: Based on the numbers and corresponding coordinate information recorded in the structure number coordinate list, extract the three-dimensional coordinate values ​​associated with each group of structure numbers, obtain the coordinates of the image acquisition starting point and the imaging area boundary coordinate values ​​corresponding to the number, determine whether the coordinate boundary range is complete, and obtain a complete coordinate set of boundary information;

[0017] S202: Calculating the median values ​​of the three-dimensional coordinates in the axial direction based on the coordinates of the starting point and the boundary point corresponding to the structure number in the complete boundary information coordinate set, forming the axial medians into three-dimensional coordinates as the spatial reference points of the structure number image acquisition position, and generating an image acquisition center coordinate sequence;

[0018] S203: Calling the correspondence between the structure number and the acquisition center in the image acquisition center coordinate sequence, extracting the image acquisition number and the acquisition center coordinate value, arranging and combining the corresponding relationship data items in the order of the structure number, and establishing an image acquisition center list.

[0019] As a further solution of the present invention, the specific steps of S3 are:

[0020] S301: extracting the three-dimensional distance between the image acquisition point and the structure segment based on the position data in the image acquisition center list and the structure number coordinate list, filtering out the structure segments that exceed the attribution determination range, and obtaining the shortest spatial distance value between the image acquisition point and the structure segment;

[0021] S302: Determine the structural segment number to which the image acquisition point belongs based on the shortest spatial distance between the image acquisition point and the structural segment, combine the image number and the belonging number, and generate a structural segment identifier list to which the image number belongs;

[0022] S303: Call the combined data in the structure segment identification list to which the image number belongs, extract the structure segment number as the archiving directory name, embed the image file path, and establish an image number archiving path table.

[0023] As a further solution of the present invention, the specific steps of S4 are:

[0024] S401: Based on the successfully assigned image content in the image number filing path table, extract the grayscale distribution characteristics of the main axis area in the image matrix, detect the symmetry degree difference of the pixel columns, and obtain the position value of the symmetry center line of the image main axis;

[0025] S402: Calling the position value of the center line of the main axis of the image, setting the spacing to extract grayscale value point pairs on both sides, calculating the grayscale difference between the point pairs, and generating a grayscale value difference point pair matrix;

[0026] S403: Construct a gray difference mapping array under the size of the image matrix according to the point pair position and gray difference value recorded in the matrix according to the gray value difference point pair.

[0027] As a further scheme of the present application, the method further comprises:

[0028] S5: Based on the gray difference value distribution constructed in the structure symmetric gray difference array, identify a continuous abnormal area in the sequence, make a consistency judgment on the gray change direction, extract the boundary coordinates corresponding to the area, and map to the actual position interval of the structure section combined with the image attribution information to generate a crack positioning offset information set;

[0029] The crack positioning offset information set comprises an abnormal area boundary, a gray change direction, and a structure section mapping position.

[0030] As a further scheme of the present application, the specific steps of S5 are:

[0031] S501: Based on the gray difference value distribution constructed in the structure symmetric gray difference array, detect a gray difference continuous change section, identify a sequence section exceeding a gray stability threshold range, and obtain a gray abnormal distribution interval coordinate value set;

[0032] S502: Call the gray abnormal distribution interval coordinate value set, judge the adjacent consistency of the gray difference value direction in the interval, filter the boundary coordinates with continuous direction, and obtain the boundary coordinates of the gray difference value direction stable section;

[0033] S503: According to the gray difference value direction stable section boundary coordinates and the image number attribution information, map the boundary coordinates to the structure section position interval to generate a crack positioning offset information set;

[0034] The continuous abnormal area is a section in which the gray difference of multiple adjacent sampling points exceeds a set threshold in the gray difference value matrix, and the distribution is continuous and has a consistent directionality;

[0035] The consistency judgment is a continuity filtering operation on the gray change direction, judges the adjacent consistency of the gray difference value direction, and when the signs of the gray difference values of the continuous 5 sampling points are consistent, or not more than 1 point has a sign reversal, and the adjacent point gray difference value direction changes less than ±10%, it is determined that the direction is consistent, which is the boundary coordinate with continuous direction;

[0036] The boundary coordinates are the start and end positions of the identified crack trend area in the image, which can be positioned in the offset position in the structure section through coordinate mapping.

[0037] The actual position interval of the structure section is the spatial distribution limit of the structure section in the axial range, which can be defined by the start and end coordinates of each section in the structure number coordinate list.

[0038] As a further scheme of the present application, the spatial coordinate information refers to the position information of the structure node of the crankshaft machining section in X, Y, Z three directions in three-dimensional coordinates, and the Z axis value along the machining axis direction is preferentially used as the structure section division reference;

[0039] The interval difference is quantified by the difference value of the position change of the continuous node in the Z axis direction, and the judgment standard needs to be combined with the typical section interval range in the crankshaft machining process;

[0040] The structure number is a system-generated identification code, which is assigned in sequence according to the structure section and does not have repeatability;

[0041] The imaging area boundary value is the end point coordinate value of the image acquisition device in the Z axis direction, which is determined by the limit position of the imaging sensor field of view and constitutes a measurable imaging coverage area with the starting position;

[0042] The center point coordinate is the intermediate coordinate value between the starting position and the boundary position of the imaging area, which is used to indicate the collection center position of the image in the crankshaft structure;

[0043] The proximity is calculated by the absolute distance or Euclidean distance between the image center coordinate and the structure section center coordinate, and a predetermined distance threshold is set to judge the attribution relationship;

[0044] The image content of the attribution success is that when the distance between the image collection center coordinate and the structure section center coordinate is lower than the set threshold condition, the image is attributed to the structure section number and bound into the warehouse;

[0045] The symmetry center line of the main shaft area is the geometric center line in the horizontal direction of the image matrix, which corresponds to the visual symmetry reference of the crankshaft in the image;

[0046] The sampling interval is the interval distance of adjacent gray scale point pairs in the image coordinate system, which can be set as a fixed pixel value;

[0047] The gray scale difference is the absolute difference between the gray scale values of the symmetric pixel points.

[0048] A crankshaft quality inspection system based on image data, comprising:

[0049] The structure number identification module obtains the spatial coordinate value of the crankshaft node, continuously compares the interval between adjacent nodes in the axial direction with the set jump threshold, marks the position point with a difference greater than the threshold as a structure boundary point, binds the spatial coordinates in sequence according to the axial direction, and generates a structure number coordinate list;

[0050] The image center extraction module extracts the start and boundary coordinates of each structure according to the structure space information in the structure number coordinate list, calculates the boundary median to determine the image imaging center position, binds the image number and the center position, and generates an image acquisition center list;

[0051] The image archiving construction module calculates the spatial distance to judge the structure segment number to which the image belongs according to the image coordinate points in the image acquisition center list and the structure segment position coordinates in the structure number coordinate list, embeds the number information into the image path field, and generates an image number archiving path table;

[0052] The symmetric difference array construction module extracts the image matrix and identifies the main shaft area gray scale distribution based on the image file in the image number archiving path table, positions the transverse symmetry center line, sets the step length sampling to obtain the gray scale value point pairs on both sides, calculates each group of gray scale difference values and arranges them into a point position difference value relationship matrix, and generates a structure symmetric gray scale difference array;

[0053] The crack offset positioning module extracts the boundary point coordinates according to the gray scale change sequence in the structure symmetric gray scale difference array after judging the consistency of the gray scale change direction, and maps them to the structure coordinate interval through the image number archiving path table, and generates a crack positioning offset information set.

[0054] Compared with the prior art, the advantages and positive effects of the present application are that:

[0055] In the present application, by establishing the corresponding relationship between the structure number and the spatial coordinates, a precise positioning basis is obtained in the image acquisition stage, combined with the imaging center point extraction and the image belonging segment number binding, the efficient mapping of the image content and the structure area is realized, the traceability of the data archiving is enhanced, the gray scale value point pairs are extracted using the symmetric center line in the image, the gray scale difference matrix is constructed, the symmetry disturbance is effectively identified and the gray scale difference array is formed, the crack boundary is identified through the abnormal distribution and the direction consistency, and the precise crack offset positioning result is further mapped to the actual structure position interval, the overall scheme realizes the structure-guided image belonging, the defect identification logic driven by the gray scale difference sequence, improves the detection accuracy and positioning precision, significantly reduces the false detection and missed detection, and enhances the stability and engineering adaptation ability in practical application. BRIEF DESCRIPTION OF DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0057] Figure 1The flow chart of the steps of the present application;

[0058] Figure 2 The S1 refinement schematic diagram of the present application;

[0059] Figure 3 The S2 refinement schematic diagram of the present application;

[0060] Figure 4 The S3 refinement schematic diagram of the present application;

[0061] Figure 5 The S4 refinement schematic diagram of the present application;

[0062] Figure 6 The S5 refinement schematic diagram of the present application;

[0063] Figure 7 The system module diagram of the present application. DETAILED DESCRIPTION

[0064] The technical solutions in the present application will be described below with reference to the drawings.

[0065] In the embodiments of the present application, the words such as "example", "for example" are used to represent as an example, illustration or description. Any embodiment or design scheme described as "example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. In fact, the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present application, the meaning expressed by "and / or" can be both, or can be one of the two options.

[0066] In the embodiments of the present application, "image" and "picture" can be used interchangeably at times. It should be pointed out that when the distinction is not emphasized, the meanings expressed are consistent. "Of", "corresponding" and "corresponding" can be used interchangeably at times. It should be pointed out that when the distinction is not emphasized, the meanings expressed are consistent.

[0067] In the embodiments of the present application, sometimes the subscript such as W1 can be written in the form of non-subscript such as W1. When the distinction is not emphasized, the meanings expressed are consistent.

[0068] In order to make the technical problems, technical solutions and advantages to be solved by the present application more clear, the following will be described in detail with reference to the drawings and specific embodiments.

[0069] Please refer to Figure 1 The embodiments of the present application provide a crankshaft quality inspection method based on image data, which comprises the following steps:

[0070] S1: Read the spatial coordinate information of the crankshaft machining section, extract the position points with structural boundary characteristics according to the difference in the axial spacing of the nodes, number and mark them in order, establish the correspondence between the structure number and the spatial position, and generate the structure number coordinate list;

[0071] The spatial coordinate information refers to the position information of the crankshaft machining section structure node in the X, Y, Z three directions in the three-dimensional coordinate system (Cartesian coordinate system), and the Z axis value along the machining axis direction is preferred as the structure section division reference;

[0072] The difference in spacing is quantified by the difference in the position change of the continuous nodes in the Z axis direction, and the judgment standard needs to be combined with the typical section distance range in the crankshaft machining process;

[0073] The structure number is a system-generated identification code, which is assigned in order of increasing structure section, and has no repeatability;

[0074] The unified multi-source coordinate data ensures the consistency of the coordinate data collected by different measuring equipment (laser scanning, machine tool probe or three-dimensional coordinate instrument), and realizes the unification of multi-source data through coordinate normalization and reference coordinate system registration. First, the coordinate data is converted to the same Cartesian coordinate system, then the data is aligned to the crankshaft machining reference axis by rigid body transformation (including translation, rotation and scaling), and the system error can be reduced by the least squares fitting method, so as to ensure that the correspondence between the structure number and the spatial coordinate remains consistent between different data sources;

[0075] S2: Based on the structure space information provided in the structure number coordinate list, extract the starting position and imaging area boundary value in the image acquisition process, calculate the center point coordinate, establish the binding relationship between the image number and the acquisition center, and generate the image acquisition center list;

[0076] The imaging area boundary value is the end point coordinate value of the image acquisition device in the Z axis direction, which is determined by the limit position of the imaging sensor field of view, and constitutes a measurable imaging coverage area with the starting position;

[0077] The center point coordinate is the intermediate coordinate value between the starting position and the boundary position of the imaging area, which is used to indicate the collection center position of the image in the crankshaft structure;

[0078] Mapping image pixels to coordinates In order to accurately correspond the image gray scale information to the crankshaft structure position, a mapping relationship between image pixels and spatial coordinates can be established. First, the starting point coordinate and the boundary point coordinate of the imaging area are respectively corresponding to the row and column boundaries of the image matrix, forming a one-to-one correspondence between the spatial range and the pixel range. Then, by linear interpolation, the two-dimensional position of each pixel point in the image matrix is converted to a three-dimensional point in the spatial coordinate system ​ The conversion formula can be expressed as:

[0079] ;

[0080] wherein, is the coordinate of the imaging area starting point, is the corresponding pixel interval in the spatial direction, is the axial coordinate of the imaging center. Through the above mapping method, the gray value of each pixel in the image matrix can be corresponded to the actual spatial position of the crankshaft surface;

[0081] S3: Based on the corresponding data of the image acquisition position in the image acquisition center list and the structure segment position in the structure number coordinate list, the proximity of the image acquisition point to the structure segment is judged, the belonging segment number is determined and embedded into the image storage path, the binding archiving path between the image file and the structure segment is constructed, and the image number archiving path table is generated;

[0082] The proximity is calculated by the absolute distance or Euclidean distance between the image center coordinate and the structure segment center coordinate, and a predetermined distance threshold is set to determine the belonging relationship;

[0083] S4: Based on the image content with successful attribution in the image number archiving path table, the symmetry center line of the main shaft area in the image matrix is located, the sampling interval is set to extract the symmetric gray value point pair, the gray difference value between the point pair is arranged, and the corresponding position matrix is constructed, and the structure symmetric gray difference array is generated;

[0084] The image content with successful attribution is that the distance between the image acquisition center coordinate and the structure segment center coordinate is lower than the set threshold condition, and the image is attributed to the structure segment number and bound into the warehouse;

[0085] The symmetry center line of the main shaft area is the geometric center line in the horizontal direction of the image matrix, which corresponds to the visual symmetry reference of the crankshaft in the image;

[0086] The sampling interval is the interval distance of adjacent gray point pairs in the image coordinate system, which can be set as a fixed pixel value;

[0087] The gray difference value is the absolute difference of the gray level value between the symmetric pixel points;

[0088] S5: Based on the gray difference value distribution constructed in the structure symmetric gray difference array, the continuous abnormal area in the sequence is identified, the consistency of the gray change direction is judged, the boundary coordinates corresponding to the area are extracted, and the image attribution information is mapped to the actual position interval of the structure segment, and the crack positioning offset information set is generated;

[0089] The continuous abnormal area is a segment in which the gray scale difference of multiple adjacent sampling points exceeds a set threshold in the gray scale difference matrix, and is continuously distributed and has consistent directionality;

[0090] The consistency judgment is a continuity screening operation on the gray scale change direction, that is, whether the positive and negative signs of the gray scale difference value change remain consistent within a certain range;

[0091] The boundary coordinates are the start and end positions of the identified crack trend area in the image, and the offset positions in the structure section can be located through coordinate mapping;

[0092] The actual position interval of the structure section is the spatial distribution limit of the structure section in the axial range, which can be defined by the start and end coordinates of each section in the structure number coordinate list.

[0093] The structure number coordinate list includes node number, structure position, and spatial coordinates, the image acquisition center list includes image number, acquisition center point, and imaging boundary, the image number archiving path table includes image number, belonging section number, and image storage path, the structure symmetric gray scale difference array includes symmetric point gray scale value, gray scale difference matrix, and center line position, and the crack positioning offset information set includes abnormal area boundary, gray scale change direction, and structure section mapping position.

[0094] Please refer to Figure 2 , the specific steps of S1 are:

[0095] S101: Read the spatial coordinates of the nodes in the crankshaft machining section, extract the Z-axis direction coordinates as the axial position reference, arrange them in the order of node number, calculate the Z-axis distance between adjacent nodes, obtain all distance values in the node sequence, and obtain the axial distance change value;

[0096] When reading the node space coordinates in the crankshaft machining section, the three-dimensional coordinate acquisition is completed by the coordinate measuring system attached to the machine tool, and the coordinate information of each position is obtained by the trigger probe contacting the node surface in turn. The value of the Z-axis direction is extracted as the axial position reference. The node number is numbered according to the design sequence of the crankshaft, and the nodes are arranged in order from the first node to form a sequence of Z-axis coordinates arranged in order. In this sequence, the distance between the two adjacent nodes is obtained by subtracting the latter coordinate from the former coordinate, and all distance values are obtained by processing in turn. For example, when the Z-axis coordinates of the first to fifth nodes are 10.00, 18.25, 26.35, 35.80 and 45.10 respectively, the distance between the first and second nodes is 8.25, the distance between the second and third nodes is 8.10, the distance between the third and fourth nodes is 9.45, and the distance between the fourth and fifth nodes is 9.30. Further comparison of these distance difference values is made to calculate the change value between each two adjacent distances, for example, the difference between 8.10 and 8.25 is -0.15, the difference between 9.45 and 8.10 is 1.35, and the difference between 9.30 and 9.45 is -0.15. These change values are recorded as a distance change sequence, which can be used in subsequent analysis to identify the trend and significance of the structure change between nodes.

[0097] S102: According to the axial distance change value, the node position with a difference greater than the structure boundary threshold is screened, whether the structure boundary condition is met is judged, the node meeting the requirement is taken as a structure feature point, the original number and space coordinates are extracted, and a structure feature node sequence is obtained;

[0098] When analyzing the axial distance change sequence, a reference value of the structure boundary is set as the judgment basis. The reference value can be set according to the crankshaft design data and machining standard, for example, set to 1.00, which means that when the adjacent distance change exceeds the value, it is considered as a possible structure boundary point. All change values are compared one by one. If a change value is 1.35, it exceeds the reference value, indicating that there is a structure change at this point. The node number corresponding to the change value is extracted, such as the third node. At the same time, the space coordinate information is extracted and the number and coordinates are recorded. This screening process is automatically completed in a data loop. Starting from the first change value, it is judged whether the absolute value exceeds the reference value. If it meets the condition, the next node is recorded as a feature node. Assuming that there are the third, sixth and ninth nodes that meet the condition among all changes, their numbers and three-dimensional coordinate information are read, and the node order is kept unchanged. Finally, a structure feature node sequence is formed, which contains node numbers and corresponding space position data, which is used for subsequent modeling or structure classification.

[0099] S103: According to the number order and coordinate information in the structure feature node sequence, the correspondence between the structure number and the coordinate is established, and a structure number coordinate list is generated;

[0100] The identified structural feature nodes are numbered in sequence and associated with their coordinate information to establish a structural numbering list, with each structural number corresponding to an original node number and its three-dimensional coordinate information. For example, structural number S1 corresponds to node 3 with coordinates 35.2, 18.1, and 26.35, S2 corresponds to node 6 with coordinates 47.0, 20.0, and 38.0, and S3 corresponds to node 9 with coordinates 59.5, 19.2, and 51.0. All data records are arranged in sequence with numbering as the index for subsequent calling and identification. In the generation process, all structural nodes are traversed by the program to extract the corresponding coordinates and organize them into a data set. For each number, its position in the overall structure and data source are marked to form a complete list of structural numbers and corresponding coordinates.

[0101] Please refer to Figure 3 , the specific steps for S2 are:

[0102] S201: Based on the numbering and corresponding coordinate information recorded in the structural numbering coordinate list, extract the three-dimensional coordinate values associated with each group of structural numbering, obtain the starting point coordinate and boundary coordinate value of the imaging area corresponding to the numbering, and determine whether the coordinate boundary range is complete to obtain the complete boundary information coordinate set.

[0103] The structural numbering coordinate list records the numbering and three-dimensional coordinate information. First, analyze the list content and match the numbering with the corresponding x, y, and z three-dimensional coordinate values one by one. For example, the coordinate point corresponding to the numbering S001 is 120.5, 210.3, and 15.2. Extract all structural numbering and traverse all coordinate values associated with each numbering to determine the image acquisition starting point coordinate of each group of numbering. Generally, the first time point or the first point in the numbering sequence is taken as the starting coordinate. At the same time, the minimum and maximum values of the x, y, and z axes in all coordinate points of the numbering are calculated, i.e., the imaging boundary coordinate range is obtained. For example, the x-axis coordinate point range of the numbering S001 is 120.5 to 122.8, the y-axis is 210.3 to 213.6, and the z-axis is 15.2 to 18.9. The boundary range is x-axis 120.5 to 122.8, y-axis 210.3 to 213.6, and z-axis 15.2 to 18.9. Determine whether the boundary range is complete by checking whether each axis has an effective span. If the span is less than the set threshold, for example, the boundary length is less than 0.2m, it is considered that the data in that direction is missing. When processing, check whether the z-axis value difference is too small. If it is found that the difference between the minimum and maximum values of the z-axis is only 0.05m, the boundary information of this structural numbering can be considered incomplete and will be excluded. Finally, only the structural numbering set with effective coordinate differences in x, y, and z axes is retained, and the complete boundary information coordinate set is output.

[0104] S202: Calculate the median value of three-dimensional coordinates in the axial direction according to the starting point coordinates and boundary point coordinates corresponding to the structure number in the complete coordinate set structure information, and form the spatial reference point of the image acquisition position as the structure number image acquisition location. Generate image acquisition center coordinate sequence;

[0105] From the acquired complete boundary information, the starting point and boundary point coordinates are extracted for each structure number. The median value of the coordinate values in x, y, and z axis directions is calculated. The value mode is determined according to the parity of the number of coordinates. When the number of coordinates is odd, the middle point is taken. When the number of coordinates is even, the average value between the two middle values is taken. For example, the x-axis coordinate points of number S001 are 120.5, 121.1, and 122.8. The median value is 121.1. The y-axis coordinates are 210.3, 211.8, 213.6, and 214.0. The median value is 211.8. The average value between 211.8 and 213.6 is 212.7. The z-axis value is 15.2, 16.3, 17.0, and 18.9. The median value is 16.3. The average value between 16.3 and 17.0 is 16.65. These three median values are taken as the image acquisition center point of the structure number, i.e. the spatial reference point of the structure number acquisition position. If the coordinate points of a certain number are abnormally drifted and the distance between them is more than 5m, the point will be excluded from the median calculation to avoid affecting the accuracy of the center value. Repeat the above process to process all structure numbers. Finally, form a combination list of structure numbers and center coordinates. Each group contains a number and corresponding three-axis median value to form an image acquisition center coordinate sequence.

[0106] S203: Call the corresponding relationship between structure number and acquisition center in the image acquisition center coordinate sequence, extract the image acquisition number and acquisition center coordinate value, arrange and combine the corresponding relationship data items in the order of structure number, and establish the image acquisition center list.

[0107] Call the image acquisition center coordinate sequence mentioned above to establish the corresponding relationship between structure number and center coordinate. After reading the sequence data item, match the image acquisition number for each group of structure number. The number rule can use structure number direct mapping or generate numbers such as A001, A002, etc. in order to ensure uniqueness. After ensuring uniqueness, the acquisition number and center coordinate form a record item, such as A001 corresponding to center coordinates 121.1, 212.7, and 16.65. Sort the record items in the order of structure number, such as S001 before S002. After sorting, combine all record items to form an acquisition center list. Each item contains an image acquisition number and corresponding three-dimensional space coordinates. The list content can be uniformly represented as the form of number plus three-axis coordinate values in parentheses, such as S001(121.1, 212.7, 16.65), S002(...), etc. Form an ordered image acquisition center coordinate list for subsequent mapping and scheduling.

[0108] Please refer to Figure 4, the specific steps of S3 are:

[0109] S301: Based on the position data in the image acquisition center list and the structure number coordinate list, the three-dimensional distance between the image acquisition point and the structure section is extracted, the structure section exceeding the attribution determination range is screened out, and the shortest spatial distance value of the image acquisition point and the structure section is obtained;

[0110] The specific calculation formula for screening out structure sections exceeding the attribution determination range is:

[0111] ;

[0112] Calculate the three-dimensional difference weight index , extract the three-dimensional distance between the image acquisition point and the structure section, and obtain the shortest spatial distance value of the image acquisition point and the structure section;

[0113] Wherein, represents the three-dimensional difference weight index between the image acquisition point and the structure section , , , respectively represent the position data of the image acquisition point on the X, Y, Z three-dimensional coordinate axes, , , respectively represent the position data of the structure section on the X, Y, Z three-dimensional coordinate axes, , , respectively represent the position data of the structure section ( to ) on the X, Y, Z three-dimensional coordinate axes, represents the total number of all structure sections associated with the image acquisition point , represents the average value of the axis coordinate value of all structure sections ;

[0114] The three-dimensional coordinate data of the image acquisition point is collected by the mechanical arm carrying the industrial camera system, and the three-dimensional coordinates of the structure section are obtained by the laser point cloud scanning measuring instrument. During the measurement process, each data point is subjected to millimeter-level RTK positioning and differential calibration, and the spatial coordinate precision is controlled within ±1cm;

[0115] The spatial coordinates of the image acquisition point are:

[0116] ;

[0117] structure section The spatial coordinates of the structure segment are as follows:

[0118] ;

[0119] The structure segment set contains four structure segments, which are registered through a three-dimensional modeling platform, and the coordinate data is as follows (all units are meters):

[0120] The structure segment : ;

[0121] The structure segment : ;

[0122] The structure segment : ;

[0123] The structure segment : ;

[0124] The z-axis coordinate of the structure segment is 9.12m, and the average value of the z-axis of the four structure segments is calculated by averaging:

[0125] ;

[0126] Calculate the three-dimensional Euclidean distance :

[0127] ;

[0128] Calculate the average distance :

[0129] ;

[0130] ;

[0131] ;

[0132] ;

[0133] The average value is:

[0134] ;

[0135] Calculate the difference and take the absolute value:

[0136] ;

[0137] Plus the vertical height difference: ​

[0138] ;

[0139] Bringing in the formula:

[0140] ;

[0141] The results show that the relative difference between the image acquisition point and the structure segment in three-dimensional space is 1.3958 meters, and the difference value is greater, indicating that the structure segment has a lower degree of association with the acquisition point in space, and can be excluded in the subsequent attribution screening outside the statistical tolerance. The result is used as the calculation output parameter of step 3, which is the pre-discriminant basis for the shortest space distance calculation of image-structure;

[0142] The formula operation logic is based on the weighted fusion calculation idea of spatial geometric relationship and height offset. First, the actual spatial distance value between the image acquisition point and the target structure segment is calculated by three-dimensional Euclidean distance, which is used to quantify the absolute position difference between the two in the three-dimensional coordinate system. Secondly, the average spatial distance from the image acquisition point to all other structure segments is introduced as the reference spatial adjacency scale. The absolute value of the difference between the two reflects the local offset degree of the target structure segment compared to the overall structure environment. This difference is the first sub-item, which reflects the relative position mutation of the target structure segment in space proximity. Further, the difference between the z-axis height coordinate of the structure segment and the average z-axis height of all structure segments is introduced to reflect the vertical deviation of the structure segment in the vertical direction. This item does not use the square root but the original offset absolute value to be added to the space difference item to form a space-height fusion weight index. Finally, a unified evaluation framework is constructed by addition operation to realize the expression of the comprehensive spatial adaptation degree between the image acquisition point and the structure segment. The entire formula integrates two types of feature information, spatial distribution dispersion and height mutation, through addition. The square root operation is derived from the standard geometric model of three-dimensional distance calculation, and the absolute value operation ensures that the evaluation quantity is non-negative, stable and comparable.

[0143] The three-dimensional difference weight index is used to measure the inconsistency degree between the image acquisition point and the structure section in the spatial position relationship, and comprehensively reflects the distance offset and height mutation in the three-dimensional coordinate system. The index not only considers the direct three-dimensional spatial distance between the image acquisition point and the target structure section, but also compares the distance with the overall average distance from the image acquisition point to the remaining structure sections to identify whether the target structure section exists abnormal deviation in position. At the same time, the height difference of the structure section in the vertical coordinate direction is introduced to further capture the height stratification effect that may affect the structure attribution judgment. The greater the index value, the more significant the difference between the target structure section in position distribution and height structure and the image acquisition point, so as to be used for screening out low correlation structure sections and improving the precision and robustness of the image and structure mapping relationship.

[0144] S302: According to the shortest spatial distance value of the image acquisition point and the structure section, determine the structure section number to which the image acquisition point belongs, combine the image number and the attribution number, and generate an image number attribution structure section identification list;

[0145] First, group the distance records of each image point, and select the structure section number corresponding to the minimum distance in each group of image data as the attribution section number, for example, the distance of image number IMG_021 and multiple structure sections is 1.5m, 0.7m and 2.3m respectively, and the attribution structure section is the section number corresponding to 0.7m, such as SD_03. Then, the image number and the section number are combined to form the image attribution identification, which can be composed by connecting the image number with an underscore and the structure section number, for example, IMG_021_SD_03. All image acquisition points are processed in turn to obtain a set of attribution identification list, such as IMG_022_SD_05, IMG_023_SD_02, etc. The attribution identification list can be generated by field combination, and the merging field function or string concatenation function in the data processing tool such as pandas can be used to realize it. Finally, a complete image number attribution structure section identification data set is formed as the basic data for archiving management or path generation.

[0146] S303: Call the combined data in the image number attribution structure section identification list, extract the structure section number as the archiving directory name, embed the image file path, and establish an image number archiving path table;

[0147] Call the image number attribution structure segment identifier list, first parse the structure segment number in each identifier combination, for example, extract SD_06 from IMG_034_SD_06 as an archive directory name, then according to the original image storage path, such as " / project / images / IMG_034.jpg", insert the structure segment directory field to build a new archive path, form " / project / archive / SD_06 / IMG_034.jpg" format, the path combines the path splicing method in the file management tool, such as Python os module or path object processing function, process all image numbers in this way to build an image archive path table, which records the corresponding relationship between image numbers and corresponding archive paths, for example, the archive path of IMG_035 is " / project / archive / SD_02 / IMG_035.jpg", and a complete set of image number archive path data is obtained by combining each other, which is used for directory organization and file archive index management of image materials.

[0148] Please refer to Figure 5 The specific steps of S4 are:

[0149] S401: Based on the image number archive path table, the gray scale distribution characteristics of the main shaft region in the image matrix are extracted, the pixel column symmetry degree difference value is detected, and the image main shaft symmetry center line position value is obtained;

[0150] In the image number archive path table, the successfully attributed image entries are filtered, which can be done by establishing an index structure, taking the image number as the primary key, traversing its attribution state field, selecting the image path marked as successful, and then loading the corresponding image matrix one by one to extract the main shaft region gray scale features. The image main shaft is the center line position of the gray scale distribution symmetry, the preliminary processing step is to cut the image by column, average the gray scale value of each column of pixels to generate a column gray scale vector, and then compare the gray scale values of each column symmetrically from the matrix center outward, compare and calculate the difference value size pair by pair, and find the global minimum point as the candidate main shaft column position. In the case of actual image size such as 640x480, if the center column 320 has the smallest gray scale difference after comparing with the symmetric column, it is preliminarily determined as the main shaft. Further, by sliding window, the upper and lower columns are taken for local statistics, and the gray scale difference stability between these columns and their symmetric columns is compared, if a certain column maintains a small difference value in multiple adjacent rows, it can be marked as the final main shaft symmetry center line. Assuming that the gray scale value range is between 0 and 255, the symmetric difference less than 10 is selected as the judgment basis, when a column meets this condition in most rows, it is determined as the main shaft symmetry center line position.

[0151] S402: Calling the position value of the center line of the main axis of the image, setting the spacing to extract the gray value point pairs on both sides, calculating the gray value difference between the point pairs, and generating a gray value difference point pair matrix;

[0152] The specific calculation formula for extracting the grayscale value point pairs on both sides by setting the spacing is:

[0153] ;

[0154] Calculate the gray value difference point pair matrix;

[0155] in, Representative image Rank The grayscale difference eigenvalues ​​of grayscale point pairs with symmetrical spacing are set in the column. Representative image Rank Grayscale value of the column pixel, Representative image The rows are symmetrical about the main axis of the image Column pixel grayscale value, Representative image The number of all symmetrical grayscale point pairs extracted under the set row spacing, Represents the index number of the symmetrical grayscale point pair, Representative image The average gray value of all symmetrical gray points under the set spacing, Represents a very small positive real constant set to prevent the denominator from being zero;

[0156] The image source is a Canon EOS90D real-life image with a capture resolution of 6000×4000 pixels. The grayscale image preprocessing uses the ITU-R BT.601 standard conversion:

[0157] ;

[0158] Image sampling point behavior row, set the spacing range to Column, extract the total number of symmetrical grayscale point pairs The main axis symmetry guide is set in the center column of the image. .

[0159] Select the point pair number as , then the column number of its symmetric point is The original grayscale values ​​collected in the image are as follows (collected by the CMOS sensor and converted):

[0160] ;

[0161] ;

[0162] The remaining symmetry point pair collects gray value:

[0163] , ;

[0164] , ;

[0165] , (axis of symmetry);

[0166] , ;

[0167] , ;

[0168] Calculate each parameter:

[0169] Symmetry point pair mean ;

[0170] Calculate (image 1200th row extraction point pair mean):

[0171] ;

[0172] Calculate the square root of the variance term:

[0173] ;

[0174] Normalized difference value term:

[0175] Gray difference , normalized denominator , normalized value:

[0176] ;

[0177] Put into the overall formula:

[0178] ;

[0179] The results show that: The image 1200th row, 3003rd column pixel and its symmetry point 2997th column in the set gray calculation structure under the comprehensive gray difference characteristic value; this value aggregates the average gray offset, variance distribution and normalized difference ratio three structures, as a gray value difference point pair matrix input value for subsequent structure judgment steps; the higher the characteristic value, the greater the gray structure distribution deviation of the image on the symmetry pair;

[0180] The operation logic of the formula is based on the gray scale contrast features in the image main axis symmetry structure, and the combination measurement of the gray scale difference value is completed by three items: the first item calculates the average gray scale value of the point pair, reflecting the overall brightness level as the basic symmetry reference; the second item takes the square of the gray scale mean deviation of all extracted symmetric point pairs, takes the mean value, and then takes the square root, forming a variance square root form to measure the dispersion degree of the local symmetry gray scale structure, reflecting the deviation degree in the overall gray scale mode; the last item is the absolute value of the gray scale difference of the symmetric points divided by the normalized result of the sum of the gray scales and a small constant, describing the local intensity difference of the point pair and dynamically normalizing to eliminate the influence of brightness dominance; the three parts respectively represent the overall gray scale center, local variance fluctuation and single pair difference intensity, and the final gray scale difference feature value is formed by adding combination, and the whole is wrapped in absolute value to ensure the direction independence of the output, and the consistency and stability of the feature are enhanced;

[0181] The gray scale value difference point pair matrix is a two-dimensional data set composed of the gray scale difference feature values of the corresponding gray scale point pairs extracted on both sides by setting the interval under the image main axis symmetry structure. Each element of the matrix corresponds to the comprehensive gray scale difference expression of a group of symmetric pixel point pairs in a row of the image, reflecting the brightness balance degree, gray scale distribution stability and symmetry maintenance status of the symmetric structure in the local area. The matrix traverses the image by row and records the gray scale feature difference value with the change of each group of point pair positions, and the overall structure of the image symmetry analysis is constructed, which is used for further identifying the image morphology, detecting the structure distortion or extracting the symmetric region.

[0182] S403: According to the point pair position and gray scale difference recorded in the gray scale value difference point pair matrix, a gray scale difference mapping array under the image matrix size is constructed, and a structure symmetry gray scale difference array is established;

[0183] Based on the column position and gray scale difference information recorded in the gray scale value difference point pair matrix obtained in the previous step, a gray scale difference mapping structure is constructed in the overall dimension of the image. By traversing each row of the image, the gray scale difference value of the corresponding point pair is mapped into a difference matrix with the same size as the original image, and the difference value is marked in the left and right positions. In the case of an image size of 480 rows and 640 columns, if the point pair column is 310 and 330, and the difference value is 5, the value is marked in the i-th row and the 310th column and the 330th column of the matrix respectively. After traversing the whole image, a gray scale difference mapping array is generated, each column records the gray scale difference value in each row, which can be used to analyze the distribution rule of the structural symmetry difference. To judge the structural symmetry, a difference threshold in a certain range can be set for judgment, for example, set the threshold to 10, when the gray scale difference of a pair of symmetric positions in a row is within the range, it is considered that the point pair is symmetric in structure. Such difference statistics can help identify symmetric regions with similar gray scale characteristics and support subsequent analysis tasks.

[0184] Please refer toFigure 6 The specific steps of S5 are:

[0185] S501: Based on the gray difference value distribution constructed in the structural symmetry gray difference array, the gray difference continuous change section is detected, the sequence section exceeding the gray stability threshold range is identified, and the gray abnormal distribution interval coordinate value set is obtained;

[0186] In the processing of the structural symmetry image region, the whole image is divided into symmetric blocks with equal width or height, the pixel gray values of each block are extracted in turn to form a gray matrix, and then the gray value difference between adjacent pixels is calculated according to the row or column to obtain the gray difference sequence. For example, the continuous 5 pixel gray values extracted in a certain structural region are 120, 125, 130, 129 and 127, and the gray differences are 5, 5, 1 and 2, forming a continuous gray difference value change section. In order to identify the gray unstable region, a fixed window length is used for sliding analysis. If the window length is set to 5, each time the window is moved by 1 pixel, the difference between the maximum gray difference and the minimum gray difference in the window is calculated. When the difference exceeds the preset stable threshold, it indicates that there is a sharp change in the region, which belongs to the gray abnormal distribution range. For example, the threshold is 3, the gray difference values in a certain window are 6, 5, 8, 7 and 5, the maximum is 8, the minimum is 5, and the difference is 3, which is just critical to the threshold standard, and can be regarded as an abnormal section. The continuous interval coordinate positions exceeding the stable threshold are recorded in the whole image, which can form a gray abnormal region coordinate set. For example, there are multiple micro-cracks in a certain structural image, which are manifested as local gray rapid transition. The region coordinate point set obtained by analysis includes (20, 100)-(20, 105), (35, 210)-(35, 215) and the like, which provides a basis for subsequent processing.

[0187] S502: The gray abnormal distribution interval coordinate value set is called to judge the adjacent consistency of the direction of the gray difference value in the interval, the boundary coordinates with continuous direction are screened, and the boundary coordinates of the gray difference value direction stable section are obtained;

[0188] On the basis of the obtained gray abnormal area coordinate set, the gray difference direction sequence in each area is extracted, and according to the change trend of the gray values of adjacent pixels, it is marked as positive change, negative change or no change, and the change direction between each pixel is analyzed point by point. When the continuous gray difference direction remains unchanged, it is considered that the paragraph is a direction stable paragraph. For example, the gray values of a certain continuous pixel sequence change to 112, 118, 124, 129 and 133, and the gray difference is positive. The direction is stable in the positive direction. The minimum length of continuous consistency can be set to 3. If the gray difference direction of a certain section changes to +1, +1, +1, 0, -1 and -1, the positive and negative parts form a direction continuous interval respectively. The sections that do not meet the minimum length requirement are removed, and only the sections that meet the requirement are retained, and their boundary positions are recorded. For example, in a concrete slab surface crack area, the gray change direction of a certain coordinate section (50, 200)-(50, 205) is positive, and the continuous length exceeds 3 pixel points, which is confirmed to form a stable direction section. This operation traverses all the gray abnormal area coordinates, identifies the boundary regions with strong direction consistency one by one, and forms a stable direction section boundary coordinate set, which provides positioning basis for structural feature positioning.

[0189] S503: According to the gray difference value direction stable section boundary coordinate and the image number attribution information, the boundary coordinate is mapped to the structure section position interval, and the crack positioning offset information set is generated;

[0190] By mapping the obtained gray direction stable boundary section to the structure section position interval corresponding to the image number, the actual position of the crack can be positioned. The image number is matched with the structure section number. For example, the image number is A001, the starting coordinate of the structure section position is 100, the pixel interval is 0.5 units, and if the boundary coordinate is the 200th column in the image, its mapping position is 100 plus 200 multiplied by 0.5, which is 200, as the actual offset position of the crack. If another section boundary point is the 250th column, the corresponding offset position is 225. In this way, all the identified gray abnormal areas can be mapped to specific structure sections, and all the mapping positions are recorded to form a crack offset position information set, such as three crack boundary points corresponding to image pixel columns 180, 210 and 300, which are mapped to structure sections 190, 205 and 250 respectively. After summarizing, a structure crack distribution map can be formed to provide data basis for structure state evaluation.

[0191] Please refer to Figure 7 A crankshaft quality inspection system based on image data, comprising:

[0192] The structure number identification module obtains the spatial coordinate values ​​of the crankshaft nodes, continuously compares the spacing between adjacent nodes in the axial direction with the set jump threshold, marks the position points where the difference is greater than the threshold as the structural demarcation points, and numbers and binds the spatial coordinates in axial order to generate a structure number coordinate list;

[0193] The image center extraction module extracts the starting and boundary coordinates of each structure segment based on the structural space information in the structure number coordinate list, calculates the boundary median to determine the image imaging center position, binds the image number and center position, and generates an image acquisition center list;

[0194] The image archiving construction module calculates the spatial distance based on the image coordinate points in the image acquisition center list and the structure segment position coordinates in the structure number coordinate list to determine the image's structural segment number, embeds the number information into the image path field, and generates an image number archiving path table;

[0195] The symmetric difference array construction module extracts the image matrix and identifies the grayscale distribution of the main axis area based on the image files in the image number archive path table. After locating the transverse symmetry center line, it sets a step size for sampling on both sides to obtain grayscale value point pairs. The grayscale difference of each group is calculated and organized into a point difference relationship matrix to generate a structurally symmetric grayscale difference array.

[0196] The crack offset positioning module selects point pairs with grayscale difference greater than the threshold in the continuous area according to the grayscale change sequence in the structural symmetric grayscale difference array, extracts the boundary point coordinates after judging the consistency of the grayscale change direction, and maps them to the structural coordinate interval through the image number archiving path table to generate a crack positioning offset information set.

[0197] Supplementary Draft of Specific Embodiments

[0198] 1. Optimized Example of S4 Symmetric Grayscale Difference Array Construction

[0199] In this embodiment, to improve the robustness of image processing and the processing efficiency of large-size images, image illumination compensation preprocessing is added before extracting the grayscale distribution characteristics of the main axis area, and an adaptive sampling strategy is introduced in the process of constructing the grayscale difference array, as follows:

[0200] (1) Light compensation preprocessing

[0201] In step S401, before extracting the grayscale distribution characteristics of the main axis region in the image matrix, the original image is preferably subjected to illumination compensation processing to reduce the grayscale imbalance caused by the high reflectivity areas on the crankshaft surface. In this embodiment, illumination compensation uses adaptive histogram equalization (CLAHE) to achieve local brightness balance.

[0202] When hardware conditions permit, a polarized light illumination structure or a ring-shaped diffuse light source can be used to reduce the grayscale saturation of highly reflective areas.

[0203] (2) Highlight pixel point processing

[0204] In step S402, before calculating the difference of the symmetric gray scale point pair, the pixel points that are still abnormally saturated after illumination compensation are preferably marked and removed before grayscale calculation to avoid interference with the stability of the grayscale difference matrix.

[0205] (3) Adaptive sampling strategy

[0206] In step S403, an adaptive sampling strategy is introduced when constructing the grayscale difference matrix:

[0207] High-density sampling is used near the main axis symmetry center line;

[0208] The sampling density is reduced for the background part away from the center area.

[0209] This strategy reduces the overall computational load without affecting the accuracy of crack detection, and is suitable for high-resolution image processing scenarios, such as 6000x4000 pixel image data, which can significantly reduce data operation and improve processing efficiency.

[0210] II. Optimization embodiment of S5 crack positioning and offset calculation

[0211] In this embodiment, to reduce the interference of crankshaft surface processing textures (such as spiral grooves, oil grooves, etc.) on crack detection, texture filtering processing is introduced before grayscale anomaly area identification, as follows:

[0212] (1) Texture filtering preprocessing

[0213] In step S501, before identifying the continuous abnormal area based on the grayscale difference array, the image is preferably subjected to texture filtering processing to suppress the periodic processing texture interference on the crankshaft surface, which can specifically include the following two methods:

[0214] Gabor multi-directional filtering:

[0215] By constructing Gabor filters of different directions and frequencies, the multi-directional response characteristics of the image are calculated, and the crack direction high-response area is extracted to suppress non-crack texture features.

[0216] Frequency domain filtering (FFT):

[0217] The image is subjected to fast Fourier transform to identify the periodic high-frequency components with significant energy in the frequency spectrum, and these interferences are suppressed by band-stop filtering, and then inverse transformed to obtain the image after texture suppression.

[0218] (2) Consistency judgment optimization

[0219] In step S502, the consistency of the gray scale change direction is analyzed using the image data filtered by the texture.

[0220] By removing high-frequency texture interference in advance, abnormal area misjudgment caused by periodic background structure can be reduced, and the extracted continuous abnormal section is more consistent with the gray scale distribution characteristics of the crack.

[0221] (3) Accurate mapping of crack boundary

[0222] In step S503, based on the continuous abnormal area filtered by the texture, the crack boundary coordinates are extracted, and the crack boundary is mapped to the actual position interval of the crankshaft structure section combined with the attribution information of the image number and the spatial coordinates, so as to obtain accurate crack offset positioning information.

[0223] III. Supplementary description of system modules

[0224] Corresponding to the system structure described in the specification, the following two modules are supplemented with relevant implementation details:

[0225] 1. Symmetric difference array construction module

[0226] Before extracting the image matrix and identifying the gray scale distribution of the main shaft area, the embodiment preferably uses illumination compensation processing to reduce the gray scale imbalance caused by high reflection;

[0227] At the same time, an adaptive sampling strategy is introduced in the calculation process of the gray scale difference matrix to reduce the calculation pressure of high-resolution images.

[0228] 2. Crack offset positioning module

[0229] Before detecting the crack abnormal area based on the gray scale difference array, the embodiment preferably performs texture filtering processing to suppress the periodic texture interference on the surface of the crankshaft;

[0230] Based on the data filtered by the texture, the consistency of the gray scale change direction is judged, and the optimized abnormal area boundary is mapped to the crankshaft structure section to realize higher precision crack positioning.

[0231] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A crankshaft quality inspection method based on image data, characterized in that: The following steps are involved: S1: Read the spatial coordinate information of the crankshaft processing section, extract the structural boundary feature position points based on the axial spacing difference of the nodes, number and mark them in the order of the nodes, establish the correspondence between the structure number and the spatial position, and generate a structure number coordinate list; S2: Based on the structural space information provided in the structure number coordinate list, extract the corresponding starting position and imaging area boundary value during the image acquisition process, calculate the center point coordinates, establish a binding relationship between the image number and the acquisition center, and generate an image acquisition center list; S3: Based on the corresponding data between the image acquisition position in the image acquisition center list and the structure segment position in the structure number coordinate list, the proximity between the image acquisition point and the structure segment is determined, the belonging segment number is determined and embedded in the image storage path, and a binding archiving path between the image file and the structure segment is constructed to generate an image number archiving path table; S4: Based on the successfully assigned image content in the image number archiving path table, locate the symmetric center line of the main axis area in the image matrix, set the sampling interval to extract the symmetrical grayscale value point pairs, organize the grayscale differences between the point pairs and construct the corresponding position matrix to generate a structurally symmetrical grayscale difference array.

2. The crankshaft quality inspection method based on image data according to claim 1, characterized in that: The structure number coordinate list includes node number, structure position, and spatial coordinates; the image acquisition center list includes image number, acquisition center point, and imaging boundary; the image number archiving path table includes image number, belonging segment number, and image storage path; the structure symmetric grayscale difference array includes symmetric point grayscale value, grayscale difference matrix, and center line position.

3. The crankshaft quality inspection method based on image data according to claim 1, characterized in that: The specific steps of S1 are: S101: Read the spatial coordinates of the nodes in the crankshaft processing section, extract the Z-axis coordinates as the axial position reference, arrange them in order of node numbers, calculate the Z-axis spacing between adjacent nodes, obtain all spacing values ​​in the node sequence, and obtain the axial spacing change value; S102: Based on the axial spacing change value, select node positions whose adjacent spacing difference is greater than the structural demarcation threshold, determine whether the structural demarcation condition is met, and use the nodes that meet the requirements as structural feature points, extract the original numbers and spatial coordinates, and obtain a structural feature node sequence; S103: establishing a correspondence between structure numbers and coordinates based on the numbering sequence and coordinate information in the structure feature node sequence, and generating a structure number coordinate list.

4. The crankshaft quality inspection method based on image data according to claim 3, characterized in that: The specific steps of S2 are: S201: Based on the numbers and corresponding coordinate information recorded in the structure number coordinate list, extract the three-dimensional coordinate values ​​associated with each group of structure numbers, obtain the coordinates of the image acquisition starting point and the imaging area boundary coordinate values ​​corresponding to the number, determine whether the coordinate boundary range is complete, and obtain a complete coordinate set of boundary information; S202: Calculating the median values ​​of the three-dimensional coordinates in the axial direction based on the coordinates of the starting point and the boundary point corresponding to the structure number in the complete boundary information coordinate set, forming the axial medians into three-dimensional coordinates as the spatial reference points of the structure number image acquisition position, and generating an image acquisition center coordinate sequence; S203: Calling the correspondence between the structure number and the acquisition center in the image acquisition center coordinate sequence, extracting the image acquisition number and the acquisition center coordinate value, arranging and combining the corresponding relationship data items in the order of the structure number, and establishing an image acquisition center list.

5. The crankshaft quality inspection method based on image data according to claim 4, characterized in that: The specific steps of S3 are: S301: extracting the three-dimensional distance between the image acquisition point and the structure segment based on the position data in the image acquisition center list and the structure number coordinate list, filtering out the structure segments that exceed the attribution determination range, and obtaining the shortest spatial distance value between the image acquisition point and the structure segment; S302: Determine the structural segment number to which the image acquisition point belongs based on the shortest spatial distance between the image acquisition point and the structural segment, combine the image number and the belonging number, and generate a structural segment identifier list to which the image number belongs; S303: Call the combined data in the structure segment identification list to which the image number belongs, extract the structure segment number as the archiving directory name, embed the image file path, and establish an image number archiving path table.

6. The crankshaft quality inspection method based on image data according to claim 5, characterized in that: The specific steps of S4 are: S401: Based on the successfully assigned image content in the image number filing path table, extract the grayscale distribution characteristics of the main axis area in the image matrix, detect the symmetry degree difference of the pixel columns, and obtain the position value of the symmetry center line of the image main axis; S402: Calling the position value of the center line of the main axis of the image, setting the spacing to extract grayscale value point pairs on both sides, calculating the grayscale difference between the point pairs, and generating a grayscale value difference point pair matrix; S403: constructing a grayscale difference mapping array in the size of an image matrix according to the point pair positions and grayscale differences recorded in the grayscale value difference point pair matrix, and establishing a structurally symmetrical grayscale difference array.

7. The crankshaft quality inspection method based on image data according to claim 1, characterized in that: The method further comprises: S5: Based on the grayscale difference distribution constructed in the structural symmetric grayscale difference array, continuous abnormal regions are identified in the sequence, the consistency of the grayscale change direction is judged, the boundary coordinates corresponding to the region are extracted, and the image attribution information is combined to map them to the actual position interval of the structural segment to generate a crack location offset information set; The crack location offset information set includes the abnormal area boundary, grayscale change direction, and structure segment mapping position.

8. The crankshaft quality inspection method based on image data according to claim 7, characterized in that: The specific steps of S5 are: S501: Based on the grayscale difference distribution constructed in the structurally symmetrical grayscale difference array, detecting the grayscale difference continuously changing segments, identifying the sequence segments exceeding the grayscale stability threshold range, and obtaining the grayscale abnormal distribution interval coordinate value set; S502: calling the grayscale abnormal distribution interval coordinate value set, determining the adjacent consistency of the grayscale difference direction within the interval, screening the boundary coordinates with continuous directions, and obtaining the boundary coordinates of the grayscale difference direction stable section; S503: Mapping the boundary coordinates of the grayscale difference direction stable section to the structure segment position interval according to the grayscale difference direction stable section boundary coordinates and the image number attribution information to generate a crack location offset information set; The continuous abnormal region is a segment in which the grayscale difference of multiple adjacent sampling points exceeds a set threshold in the grayscale difference matrix, and the distribution is continuous and has consistent directionality; The consistency judgment is to perform a continuity screening operation on the grayscale change direction to determine the adjacent consistency of the grayscale difference direction. When the grayscale difference signs of 5 consecutive sampling points are consistent, or no more than 1 point has a sign reversal, and the grayscale difference direction of adjacent points varies by less than ±10%, the direction is determined to be consistent and used as the boundary coordinate of the direction continuity; The boundary coordinates are the start and end positions of the identified crack trend area in the image, and can be located at the offset position in the structural segment through coordinate mapping; The actual position interval of the structural segment is the spatial distribution limit of the structural segment in the axial range, which can be defined by the start and end coordinates of each segment in the structure number coordinate list.

9. The crankshaft quality inspection method based on image data according to claim 1, characterized in that: The spatial coordinate information refers to the position information of the structural nodes of the crankshaft processing section in the three-dimensional coordinates in the X, Y, and Z directions, and the Z-axis value along the processing axis is preferably used as the reference for dividing the structural sections; The spacing difference is quantified by the difference in the position change of consecutive nodes in the Z-axis direction. The judgment standard needs to be combined with the typical segment spacing range in the crankshaft processing technology; The structure number is an identification code automatically generated by the system, which is assigned in ascending order according to the structure segment sequence and is non-repetitive; The imaging area boundary value is the coordinate value of the end point of the image acquisition device's acquisition range in the Z-axis direction, which is determined by the imaging sensor's field of view limit position and constitutes a measurable imaging coverage area together with the starting position; The center point coordinates are the intermediate coordinate values ​​between the starting position and the boundary position of the imaging area, and are used to mark the acquisition center position of the image in the crankshaft structure; The degree of proximity is determined by calculating the absolute distance or Euclidean distance between the center coordinates of the image and the center coordinates of the structure segment, and setting a predetermined distance threshold to determine the attribution relationship; The successfully assigned image content is that when the distance between the acquisition center coordinates of the image and the center coordinates of the structure segment is lower than the set threshold condition, the image is assigned to the structure segment number and bound into the database; The symmetry center line of the main axis area is the geometric center axis in the horizontal direction of the image matrix, corresponding to the visual symmetry reference of the crankshaft in the image; The sampling interval is the distance between adjacent grayscale point pairs in the image coordinate system and can be set to a fixed pixel value; The grayscale difference is the absolute difference in grayscale values ​​between symmetrical pixels.

10. A crankshaft quality inspection system based on image data, characterized in that: The system is used to implement the crankshaft quality inspection method based on image data according to any one of claims 1 to 9, and the system includes: The structure number identification module obtains the spatial coordinate values ​​of the crankshaft nodes, continuously compares the spacing between adjacent nodes in the axial direction with the set jump threshold, marks the position points where the difference is greater than the threshold as the structural demarcation points, and numbers and binds the spatial coordinates in axial order to generate a structure number coordinate list; The image center extraction module extracts the starting and boundary coordinates of each structure segment based on the structural space information in the structure number coordinate list, calculates the boundary median to determine the image imaging center position, binds the image number and the center position, and generates an image acquisition center list; The image archiving construction module calculates the spatial distance between the image coordinate points in the image acquisition center list and the structure segment position coordinates in the structure number coordinate list to determine the structure segment number to which the image belongs, embeds the number information into the image path field, and generates an image number archiving path table; The symmetric difference array construction module extracts the image matrix and identifies the grayscale distribution of the main axis area based on the image file in the image number archiving path table. After locating the transverse symmetry center line, it sets a step size for sampling on both sides to obtain grayscale value point pairs, calculates each set of grayscale differences and organizes them into a point difference relationship matrix to generate a structurally symmetric grayscale difference array. The crack offset positioning module screens the point pairs whose grayscale difference is greater than the threshold in the continuous area according to the grayscale change sequence in the structural symmetrical grayscale difference array, extracts the boundary point coordinates after judging the consistency of the grayscale change direction, and maps them to the structural coordinate interval through the image number archiving path table to generate a crack positioning offset information set.

Citation Information

Patent Citations

  • Gearbox input shaft bearing life prediction method, device and equipment

    CN119169367A

  • Method and device for automated portrayal and accurate measurement of width of structural crack

    WO2019134252A1

Cited By

  • Mould defect identification method and system based on artificial intelligence

    CN121120639A