Crankshaft balance block size automatic detection method based on visual measurement

Through the automatic detection method of a crankshaft balance block based on visual measurement, the use of industrial cameras and robotic arms is used to detect the problem of time and effort and errors of crankshaft balance blocks in existing technologies, and achieve efficient and accurate detection effects.

CN119374491APending Publication Date: 2025-01-28SHANGHAI INST OF PROCESS AUTOMATION & INSTR
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411669062.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

In the prior art, the crankshaft balance block size detection method is time-consuming and labor-intensive, has a large error range, and is inefficient in large batch detection. Some existing factories use three-coordinate devices to detect, which is expensive and takes too long.

Method used

Adopting the automatic detection method of a crankshaft balance block based on visual measurement, through the input model and historical detection data of the crankshaft workpiece to detect the detection of crankshaft workpieces, determine the detection strength, and use industrial cameras to take real -time pictures to detect and analyze, generate abnormal signals or normal signals.

Benefits of technology

The efficient and accurate detection of crankshaft balance block size has been achieved, which greatly improves the detection efficiency of crankshaft workpieces, and avoids the disadvantages of artificial detection and the disadvantages of the factory using expensive equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119374491A_ABST
    Figure CN119374491A_ABST
Patent Text Reader

Abstract

The invention discloses a method for automatically detecting the size of a crankshaft balance block based on vision measurement, relates to the field of crankshaft detection, and solves the problem that most of current methods for detecting the size of an automobile crankshaft balance block are manual detection. The method comprises the following steps: inputting corresponding historical detection data, and obtaining the detection force of a crankshaft workpiece to be detected based on the historical detection data; a test workpiece is placed at the detection station, the industrial camera shoots the test workpiece to obtain a real-time image, and the shooting performance of the industrial camera is analyzed according to the real-time image; the crankshaft workpiece to be detected is grabbed to a detection station of a detection device; when the to-be-detected crankshaft workpiece is placed, the industrial camera photographs the to-be-detected crankshaft workpiece according to the detection force, and a real-time picture of the to-be-detected crankshaft workpiece is obtained through photographing; the crankshaft workpiece to be detected is detected and analyzed on the basis of the real-time pictures, workpiece abnormal signals or workpiece normal signals are generated through analysis, efficient detection and accurate detection of the size of the automobile crankshaft balance block are achieved, and the detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of crankshaft detection, and in particular is an automatic detection method for crankshaft balancing block size based on visual measurement. Background Art

[0002] The crankshaft is the core component of the engine. Its function is to convert the linear reciprocating motion of the piston into rotational motion and output the power in a unified manner. In order to balance the rotational centrifugal force and its torque, a counterweight (also called a counterweight) is installed on the crankshaft. The number, size and placement of the counterweight should be considered according to factors such as the number of cylinders in the engine, the arrangement of cylinders and the shape of the crankshaft. If the size of the counterweight is incorrect during the manufacturing process, it may cause the crankshaft to be unbalanced, causing the engine vibration to intensify, increasing the wear of parts and components, shortening the engine life, and then causing the stability of the vehicle, reducing driving safety and increasing driving risks. Therefore, in order to ensure the normal operation of the engine and the performance of the vehicle, the size of the crankshaft counterweight must meet the design requirements and remain correct.

[0003] At present, the method for detecting the size of crankshaft balance blocks in automobile crankshaft parts processing workshops is mostly done manually using a cardboard, which is not only time-consuming and labor-intensive, but also has a large error range and cannot guarantee the consistency of the product. When testing a large number of crankshafts, workers are extremely tired. Some existing factories use three-coordinate devices for testing, which is not only expensive, but also takes too long and is very inefficient.

[0004] To this end, the present invention proposes an automatic detection method for crankshaft balancing block size based on visual measurement. Summary of the invention

[0005] The purpose of the present invention is to propose a method for automatically detecting the size of a crankshaft balancing block based on visual measurement to solve the problems raised in the above-mentioned background technology.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] The automatic detection method of crankshaft balancing block size based on visual measurement is as follows:

[0008] Step S1, inputting corresponding historical detection data according to the model of the crankshaft workpiece to be detected, and obtaining the detection force of the crankshaft workpiece to be detected based on the historical detection data;

[0009] Step S2, placing a test workpiece at the inspection station, photographing the test workpiece with an industrial camera to obtain a real-time image, and analyzing the photographing performance of the industrial camera based on the real-time image;

[0010] Step S3, when the crankshaft workpiece to be inspected is inspected, the crankshaft workpiece to be inspected is grabbed by a mechanical arm to a detection station of a detection device;

[0011] Step S4, when the crankshaft workpiece to be inspected is placed, the industrial camera takes a picture of the crankshaft workpiece to be inspected according to the inspection strength, and a real-time picture of the crankshaft workpiece to be inspected is obtained by taking the picture;

[0012] Step S5, performing detection and analysis on the crankshaft workpiece to be detected based on the real-time image, and generating a workpiece abnormality signal or a workpiece normal signal through analysis.

[0013] Furthermore, the historical detection data includes the number of detections of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected, the number of detection anomalies, and the error value at each detection anomaly.

[0014] Furthermore, the step S1 includes the following sub-steps:

[0015] Step S10, obtaining the number of inspections and the number of abnormal inspections of the crankshaft workpiece of the same model as the crankshaft workpiece to be inspected, and obtaining the abnormal inspection rate YL of the crankshaft workpiece of the same model as the crankshaft workpiece to be inspected by dividing the number of abnormal inspections by the number of inspections;

[0016] Step S11, obtaining the error value of a crankshaft workpiece of the same model as the crankshaft workpiece to be detected each time when an abnormality is detected, and adding and averaging the error values ​​each time an abnormality is detected to obtain a detection error value JW of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected;

[0017] Step S12, substituting the detection abnormality rate and the detection error value into the calculation formula to calculate the detection force value JL of the same type of crankshaft workpiece as the crankshaft workpiece to be detected. The calculation formula is as follows:

[0018] JL=YL×a1+JW×a2; where a1 and a2 are weight coefficients with fixed values, and a1>a2;

[0019] Step S13, comparing the detection force value with the detection force threshold, and determining whether the detection level of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected is the third detection level, the second detection level, or the first detection level;

[0020] Step S14, obtaining the detection force of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected according to the detection level, and the detection force of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected is the detection force of the crankshaft workpiece to be detected.

[0021] Further, the detection strength of the first detection level is greater than the detection strength of the second detection level, and the detection strength of the second detection level is greater than the detection strength of the third detection level.

[0022] Furthermore, the step S2 includes the following sub-steps:

[0023] Step S21, inputting a standard image of the test workpiece taken at the same viewing angle;

[0024] Step S22, placing both the real-time image and the standard image in a white background, and extracting the real-time workpiece contour of the test workpiece in the real-time image and the standard workpiece contour of the test workpiece in the standard image according to the pixel difference;

[0025] Step S23, establish a rectangular coordinate system with the upper left corner of the standard workpiece outline diagram, and select any coordinate point in the standard workpiece outline diagram, and the coordinate point is located on the test workpiece, and the coordinate point is calibrated as a feature point Di, i is the number of the feature point, i=1, 2, ..., n, n is a positive integer;

[0026] Step S24, selecting a feature point as the starting point, calculating the interval distances between the starting point and all other feature points, and using the interval distances as the feature values ​​of the feature points corresponding to the starting point;

[0027] Step S25: Similarly, select the next feature point as the starting point, and obtain the feature values ​​of all feature points according to the above operation.

[0028] Furthermore, the step S2 further includes the following sub-steps:

[0029] Step S26, constructing a first characteristic matrix of the standard workpiece contour map according to the characteristic values ​​of all characteristic points;

[0030] Step S27, similarly, according to steps S23 to S26, a second characteristic matrix of a real-time workpiece contour map is constructed;

[0031] Step S28, comparing the first feature matrix with the second feature matrix;

[0032] Step S29, if any eigenvalue in the first characteristic matrix is ​​different from the eigenvalue at the corresponding position in the second characteristic matrix, then a device abnormality signal is generated;

[0033] If all eigenvalues ​​in the first characteristic matrix are the same as the eigenvalues ​​at corresponding positions in the second characteristic matrix, a normal device signal is generated.

[0034] Furthermore, the working process of the detection device is:

[0035] The robot arm grabs the crankshaft workpiece to be inspected and places it on the fixture at the loading position, and then the robot arm returns to grab the second crankshaft workpiece to be inspected;

[0036] After the in-position sensor detects that the crankshaft workpiece to be inspected is in place, the positioning pin is positioned and fixed, and starts to slide into the designated inspection position through the cylinder;

[0037] After turning on the industrial camera and backlight source, take photos of the contour of the crankshaft workpiece to be inspected according to the inspection intensity.

[0038] Furthermore, the step S5 includes the following sub-steps:

[0039] Step S51, obtaining a contour image of the crankshaft workpiece to be inspected through a real-time image, using the axial line of the contour image as the X-axis of the rectangular coordinate system, and using the center line of the contour image as the Y-axis of the rectangular coordinate system, thereby establishing a rectangular coordinate system;

[0040] The outline diagram includes a crankshaft workpiece and a balancing block on the crankshaft workpiece. The balancing block is located in the middle of the crankshaft workpiece, and two groups of balancing blocks are symmetrically distributed.

[0041] Step S52, constructing a reference measurement line of the contour map;

[0042] Step S53, calculating the vertical distance from the reference measurement line to each balancing block, and determining whether the verticality is within the error range, thereby determining whether a normal workpiece signal or an abnormal workpiece signal is generated.

[0043] Furthermore, the construction process of the reference measurement line is as follows:

[0044] Step S521, obtaining the position coordinates of two groups of balancing blocks in a rectangular coordinate system;

[0045] Step S522, selecting two points on the two groups of balancing blocks respectively, and the points on one group of balancing blocks are all on the same horizontal line as the points on the other group of balancing blocks;

[0046] Step S523, then connect the two groups of balance blocks in the horizontal direction to obtain two groups of lines connecting the balance block and another balance block, and calculate the center point (X 01 , Y 01 ) and (X 02 , Y 02 );

[0047] Step S524, obtaining the position coordinates (X 01 , Y 01 ) and (X 02 , Y 02 ), and construct the reference measurement line through the formula, the formula is as follows:

[0048]

[0049] That is the equation:

[0050] (y 02 -y 01 )x+(x 01 -x 02 )y+x 02 y 01 -y 02 x01 =0.

[0051] Furthermore, the step S53 includes the following sub-steps:

[0052] Step S531, agreement: A=Y 02 -Y 01 ; B = X 01 -X 02 ; C = X 02 Y 01 -Y 02 X 01 ;

[0053] Therefore, the equation:

[0054] (y 02 -y 01 )x+(x 01 -x 02 )y+x 02 y 01 -y 02 x 01 =0;

[0055] Evolved into:

[0056] Ax+By+C=0;

[0057] Step S532, select any measuring point (Xi, Yi) on the balance block, and calculate the vertical distance di from each measuring point on the balance block to the reference measuring line by the formula, where i is the number of the measuring point. The formula is as follows:

[0058]

[0059] Step S533, if the vertical distance does not fall within the error range, the crankshaft workpiece to be inspected is determined to be a defective part, and a workpiece abnormality signal is generated;

[0060] If the vertical distance is within the error range, repeat the above steps to detect the remaining real-time images. When the vertical distance corresponding to any real-time image is not within the error range, the crankshaft workpiece to be inspected is determined to be an unqualified part, and a workpiece abnormality signal is generated. When the vertical distances corresponding to all real-time images are within the error range, the crankshaft workpiece to be inspected is determined to be a qualified part, and a workpiece normal signal is generated.

[0061] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0062] 1. The present invention inputs historical detection data corresponding to the crankshaft workpiece to be detected according to the model, obtains the detection strength of the crankshaft workpiece to be detected based on the historical detection data, and provides an adaptive detection standard for the crankshaft workpiece. At the same time, before the detection, the present invention also analyzes the shooting performance of the industrial camera used for detecting the crankshaft workpiece to be detected, so as to ensure the accurate detection of the crankshaft workpiece and avoid the influence of other factors;

[0063] 2. When inspecting the crankshaft workpiece to be inspected, the industrial camera takes a picture of the crankshaft workpiece to be inspected according to the inspection force, and obtains a real-time picture of the crankshaft workpiece to be inspected. Then, the crankshaft workpiece to be inspected is inspected and analyzed based on the real-time picture, and the workpiece abnormality signal or the workpiece normal signal is generated by the analysis. The present invention realizes efficient and accurate detection of the size of the automobile crankshaft balance block, and greatly improves the detection efficiency of the crankshaft workpiece. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.

[0065] Figure 1 is a flow chart of the method of the present invention;

[0066] Figure 2 A schematic diagram of a standard workpiece profile diagram in the present invention;

[0067] Figure 3 It is a schematic diagram of the overall structure of the detection device in the present invention;

[0068] Figure 4 is a schematic diagram of a workpiece to be detected in the present invention;

[0069] Figure 5 It is a schematic diagram of the structure of the electronic device in the present invention. DETAILED DESCRIPTION

[0070] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0071] Example 1: Please refer to Figure 1-Figure 4 As shown, the technical solution provided by the present invention is: an automatic detection method for the crankshaft balancing block size based on visual measurement, and the automatic detection method for the crankshaft balancing block size is specifically as follows:

[0072] Step S1, inputting corresponding historical detection data according to the model of the crankshaft workpiece to be detected, and obtaining the detection force of the crankshaft workpiece to be detected based on the historical detection data;

[0073] It should be specifically stated that the historical inspection data is the number of inspections of the crankshaft workpiece of the same model as the crankshaft workpiece to be inspected, the number of inspection anomalies, and the error value at each inspection anomaly;

[0074] In an embodiment of the present invention, the process of obtaining the detection force in step S1 includes the following sub-steps:

[0075] Step S10, obtaining the number of inspections and the number of abnormal inspections of the crankshaft workpiece of the same model as the crankshaft workpiece to be inspected, and obtaining the abnormal inspection rate YL of the crankshaft workpiece of the same model as the crankshaft workpiece to be inspected by dividing the number of abnormal inspections by the number of inspections;

[0076] Step S11, obtaining the error value of a crankshaft workpiece of the same model as the crankshaft workpiece to be detected each time when an abnormality is detected, and adding and averaging the error values ​​each time an abnormality is detected to obtain a detection error value JW of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected;

[0077] Step S12, substituting the detection abnormality rate and the detection error value into the calculation formula to calculate the detection force value JL of the same type of crankshaft workpiece as the crankshaft workpiece to be detected. The calculation formula is as follows:

[0078] JL=YL×a1+JW×a2; where a1 and a2 are weight coefficients with fixed values, and a1>a2;

[0079] Step S13, comparing the detection force value with the detection force threshold value to determine the detection level of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected;

[0080] If the detection force value is less than the first detection force threshold, the detection level of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected is the third detection level;

[0081] If the detection force value is greater than or equal to the first detection force threshold and less than the second detection force threshold, the detection level of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected is the second detection level;

[0082] If the detection strength value is greater than or equal to the second detection strength threshold, the detection level of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected is the first detection level; wherein the first detection strength threshold is less than the second detection strength threshold, the detection strength of the first detection level is greater than the detection strength of the second detection level, and the detection strength of the second detection level is greater than the detection strength of the third detection level;

[0083] Step S14, obtaining the detection force of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected according to the detection level, and the detection force of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected is the detection force of the crankshaft workpiece to be detected;

[0084] In specific implementation, the detection intensity can be distinguished by the number of shots of the industrial camera. For example, the number of shots of the crankshaft workpiece to be inspected corresponding to the first detection level is 5 times, the number of shots of the crankshaft workpiece to be inspected corresponding to the second detection level is 3 times, and the number of shots of the crankshaft workpiece to be inspected corresponding to the second detection level is 1 time.

[0085] Step S2, placing a test workpiece at the inspection station, photographing the test workpiece with an industrial camera to obtain a real-time image, and analyzing the photographing performance of the industrial camera based on the real-time image;

[0086] The test workpiece is a qualified workpiece without any error. The test workpiece is placed on the calibration plate. The industrial camera captures a real-time image, which includes the calibration plate and the test workpiece.

[0087] In this embodiment, step S2 includes the following sub-steps:

[0088] Step S21, inputting a standard image of the test workpiece taken at the same viewing angle;

[0089] Step S22, placing both the real-time image and the standard image in a white background, and extracting the real-time workpiece contour of the test workpiece in the real-time image and the standard workpiece contour of the test workpiece in the standard image according to the pixel difference;

[0090] Step S23, establish a rectangular coordinate system with the upper left corner of the standard workpiece outline diagram, and select any coordinate point in the standard workpiece outline diagram, and the coordinate point is located on the test workpiece, and the coordinate point is calibrated as a feature point Di, i is the number of the feature point, i=1, 2, ..., n, n is a positive integer;

[0091] Step S24, selecting a feature point as the starting point, calculating the interval distances between the starting point and all other feature points, and using the interval distances as the feature values ​​of the feature points corresponding to the starting point; wherein the interval distance refers to the coordinate distance of the coordinate points, which can be calculated using the distance formula;

[0092] Step S25: Similarly, select the next feature point as the starting point, and obtain the feature values ​​of all feature points according to the above operation;

[0093] Step S26, constructing a first characteristic matrix of the standard workpiece contour map according to the characteristic values ​​of all characteristic points;

[0094] Step S27, similarly, according to steps S23 to S26, a second characteristic matrix of a real-time workpiece contour map is constructed;

[0095] Step S28, comparing the first feature matrix with the second feature matrix;

[0096] Step S29, if any eigenvalue in the first characteristic matrix is ​​different from the eigenvalue at the corresponding position in the second characteristic matrix, an equipment abnormality signal is generated; if all eigenvalues ​​in the first characteristic matrix are the same as the eigenvalues ​​at the corresponding position in the second characteristic matrix, a equipment normal signal is generated;

[0097] like Figure 2 As shown, there are six feature points in the standard workpiece contour map, so its first feature matrix is:

[0098] The values ​​in the first characteristic matrix are only for illustration and are not to be used as actual reference.

[0099] Step S3, when the crankshaft workpiece to be inspected is inspected, the crankshaft workpiece to be inspected is grabbed by a mechanical arm to a detection station of a detection device;

[0100] In specific implementation, Figure 3 As shown, the detection device includes a box 1, a main platform 2, a guide groove 3, a slide 4, a fixture 5, a backlight source 6, a calibration plate 7, an in-place sensor 8, a reinforcement bracket 9, an industrial camera 10, a telecentric lens 11, an electrical control cabinet 12, an integrated human-machine interaction terminal 13, a mechanical arm 14 and a crankshaft workpiece to be detected, etc., and a detection station 2 for detection is arranged in the box 1, and the detection station 2 table is embedded with a guide groove 3, a slide 4, a fixture 5, a backlight source 6, a calibration plate 7, an in-place sensor 8 and a reinforcement bracket 9 for supporting the installation of the industrial camera for detection, and an electrical control cabinet 12 is arranged under the table of the detection station 2. The integrated human-machine interaction terminal 13 is arranged on the side of the box 1, and the mechanical arm 14 is arranged in front of the box 1 and a slide rail is arranged under the box 1, and the mechanical arm 14 adopts a double clamp design;

[0101] In the specific implementation, the working process of the detection device is: the robot arm 14 grabs the crankshaft workpiece to be detected, and puts it on the jig 5 at the loading position according to the agreed direction, and the robot arm 14 returns to grab the second crankshaft workpiece to be detected; after the crankshaft workpiece to be detected is placed on the jig 5 designed with a V-groove, the in-place sensor 8 detects that the crankshaft workpiece to be detected is in place, and the positioning pin is positioned and fixed, and the control module of the PLC controller controls the cylinder to start sliding into the specified detection position. At the same time, the PLC controller turns on the industrial camera and backlight source, and shoots the outline of the crankshaft workpiece to be detected according to the detection intensity, and the captured photos are transmitted to the back end for detection and analysis.

[0102] Step S4, when the crankshaft workpiece to be inspected is placed, the industrial camera takes a picture of the crankshaft workpiece to be inspected according to the inspection strength, and a real-time picture of the crankshaft workpiece to be inspected is obtained by taking the picture;

[0103] In practice, by adjusting the exposure of the industrial camera, the straight line formed by the reflection or refraction of the transparent calibration plate 7 under the backlight source 6 is clearly visible, and the industrial camera 10 is used to shoot. At the same time, the image processing algorithm can be called to calibrate the industrial camera 10 to improve the accuracy and efficiency of the industrial camera calibration.

[0104] Step S5, performing detection and analysis on the crankshaft workpiece to be detected based on the real-time image, and generating a workpiece abnormality signal or a workpiece normal signal by analysis;

[0105] In an embodiment of the present invention, step S5 includes the following sub-steps:

[0106] Step S51, as Figure 4 As shown, the contour of the crankshaft workpiece to be inspected is obtained through a real-time image, the axial line of the contour is used as the X-axis of the rectangular coordinate system, and the center line of the contour is used as the Y-axis of the rectangular coordinate system, thereby establishing a rectangular coordinate system;

[0107] The outline diagram includes a crankshaft workpiece and a balancing block on the crankshaft workpiece. The balancing block is located in the middle of the crankshaft workpiece, and two groups of balancing blocks are symmetrically distributed.

[0108] Step S52, constructing the reference measurement line of the contour map, the construction process is as follows:

[0109] Step S521, obtaining the position coordinates of two groups of balancing blocks in a rectangular coordinate system;

[0110] Step S522, selecting two points on the two groups of balancing blocks respectively, and the points on one group of balancing blocks are all on the same horizontal line as the points on the other group of balancing blocks;

[0111] Step S523, then connect the two groups of balance blocks in the horizontal direction to obtain two groups of lines connecting the balance block and another balance block, and calculate the center point (X 01 , Y 01 ) and (X 02 , Y 02 );

[0112] Step S524, obtaining the position coordinates (X 01 , Y 01 ) and (X 02 , Y 02 ), and construct the reference measurement line through the formula, the formula is as follows:

[0113]

[0114] That is the equation:

[0115] (y 02 -y 01)x+(x 01 -x 02 )y+x 02 y 01 -y 02 x 01 =0;

[0116] Step S53, calculating the vertical distance from the reference measurement line to each balancing block, and determining whether the verticality is within the error range, thereby determining whether a workpiece normal signal or a workpiece abnormal signal is generated;

[0117] Step S531, in order to more clearly show the calculation process, it is agreed that:

[0118] A = Y02-Y01;

[0119] B = X01-X02;

[0120] C = X02Y01-Y02X01;

[0121] equation:

[0122] (y 02 -y 01 )x+(x 01 -x 02 )y+x 02 y 01 -y 02 x 01 =0 evolves into:

[0123] Ax+By+C=0;

[0124] Step S532, select any measuring point (Xi, Yi) on the balance block, and calculate the vertical distance di from each measuring point on the balance block to the reference measuring line by the formula, where i is the number of the measuring point. The formula is as follows:

[0125]

[0126] In the specific implementation, in order to be more accurate, at least three points are selected on each balance block, and the average value after measurement is taken as the vertical distance to be measured;

[0127] Step S533, if the vertical distance does not fall within the error range, the crankshaft workpiece to be inspected is determined to be a defective part, and a workpiece abnormality signal is generated;

[0128] If the vertical distance is within the error range, repeat the above steps to detect the remaining real-time images. When the vertical distance corresponding to any real-time image is not within the error range, the crankshaft workpiece to be detected is determined to be an unqualified part, and a workpiece abnormality signal is generated. When the vertical distances corresponding to all real-time images are within the error range, the crankshaft workpiece to be detected is determined to be a qualified part, and a workpiece normal signal is generated.

[0129] In the specific implementation, when the inspection of the crankshaft workpiece to be inspected is completed, the control module of the PLC controller controls the cylinder to start sliding out of the specified unloading position. The robot arm 14 grabs the workpiece 15 and rotates 180° to place the second crankshaft workpiece to be inspected on the fixture 5 in the agreed direction, and then rotates 180° to the appropriate position to place the crankshaft workpiece to be inspected that has been inspected.

[0130] In this application, if corresponding calculation formulas appear, the above calculation formulas are all dimensionless and take their numerical calculations. The weight coefficients, proportional coefficients and other coefficients in the formulas are set to a result value obtained by quantifying each parameter. The size of the weight coefficient and the proportional coefficient can be determined as long as it does not affect the proportional relationship between the parameter and the result value.

[0131] Example 2: Figure 5 As shown, this embodiment provides an electronic device, which may include: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus. The processor may call the logic instructions in the memory to execute the automatic detection method of the crankshaft balance block size based on visual measurement, the method comprising: inputting the corresponding historical detection data according to the model of the crankshaft workpiece to be detected, and obtaining the detection force of the crankshaft workpiece to be detected based on the historical detection data; placing a test workpiece at the detection station, the industrial camera shoots the test workpiece to obtain a real-time image, and analyzes the shooting performance of the industrial camera based on the real-time image; when the crankshaft workpiece to be detected is detected, the mechanical arm grabs the crankshaft workpiece to be detected to the detection station of the detection device; when the crankshaft workpiece to be detected is placed, the industrial camera takes a picture of the crankshaft workpiece to be detected according to the detection force, and takes a picture to obtain a real-time picture of the crankshaft workpiece to be detected; based on the real-time picture, the crankshaft workpiece to be detected is detected and analyzed, and an abnormal signal of the workpiece or a normal signal of the workpiece is generated by analysis.

[0132] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0133] Embodiment 3: The present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the automatic detection method of crankshaft balance block size based on visual measurement provided by the above methods, and the method includes: inputting corresponding historical detection data according to the model of the crankshaft workpiece to be detected, and obtaining the detection force of the crankshaft workpiece to be detected based on the historical detection data; placing a test workpiece at a detection station, photographing the test workpiece with an industrial camera to obtain a real-time image, and analyzing the shooting performance of the industrial camera based on the real-time image; when the crankshaft workpiece to be detected is to be inspected, the crankshaft workpiece to be detected is grabbed by a robotic arm to the inspection station of the detection device; when the crankshaft workpiece to be detected is placed, the industrial camera takes a picture of the crankshaft workpiece to be detected according to the detection force, and obtains a real-time picture of the crankshaft workpiece to be detected; based on the real-time picture, the crankshaft workpiece to be detected is detected and analyzed, and the workpiece abnormality signal or the workpiece normal signal is generated by analysis.

[0134] Embodiment 4: The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned automatic detection method for crankshaft balance block size based on visual measurement, the method comprising: inputting corresponding historical detection data according to the model of the crankshaft workpiece to be detected, and obtaining the detection force of the crankshaft workpiece to be detected based on the historical detection data; placing a test workpiece at a detection station, photographing the test workpiece with an industrial camera to obtain a real-time image, and analyzing the shooting performance of the industrial camera based on the real-time image; when the crankshaft workpiece to be detected is to be inspected, the crankshaft workpiece to be detected is grabbed by a robotic arm to the detection station of the detection device; when the crankshaft workpiece to be detected is placed, the industrial camera photographs the crankshaft workpiece to be detected based on the detection force, and obtains a real-time picture of the crankshaft workpiece to be detected; based on the real-time picture, the crankshaft workpiece to be detected is detected and analyzed, and the workpiece abnormality signal or the workpiece normal signal is generated by the analysis.

[0135] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. The automatic detection method of crankshaft balance block size based on visual measurement is characterized by: The specific method for automatic detection of crankshaft balance block size is as follows: Step S1, inputting corresponding historical detection data according to the model of the crankshaft workpiece to be detected, and obtaining the detection force of the crankshaft workpiece to be detected based on the historical detection data; Step S2, placing a test workpiece at the inspection station, photographing the test workpiece with an industrial camera to obtain a real-time image, and analyzing the photographing performance of the industrial camera based on the real-time image; Step S3, when the crankshaft workpiece to be inspected is inspected, the crankshaft workpiece to be inspected is grabbed by a mechanical arm to a detection station of a detection device; Step S4, when the crankshaft workpiece to be inspected is placed, the industrial camera takes a picture of the crankshaft workpiece to be inspected according to the inspection strength, and obtains a real-time picture of the crankshaft workpiece to be inspected; Step S5, performing detection and analysis on the crankshaft workpiece to be detected based on the real-time image, and generating a workpiece abnormality signal or a workpiece normal signal through analysis.

2. The method for automatically detecting crankshaft balancing block size based on visual measurement according to claim 1, characterized in that: The historical inspection data includes the number of inspections of the crankshaft workpiece of the same model as the crankshaft workpiece to be inspected, the number of inspection anomalies, and the error value at each inspection anomaly.

3. The method for automatically detecting crankshaft balancing block size based on visual measurement according to claim 2, characterized in that: The step S1 includes the following sub-steps: Step S10, obtaining the number of inspections and the number of abnormal inspections of the crankshaft workpiece of the same model as the crankshaft workpiece to be inspected, and obtaining the abnormal inspection rate YL of the crankshaft workpiece of the same model as the crankshaft workpiece to be inspected by dividing the number of abnormal inspections by the number of inspections; Step S11, obtaining the error value of a crankshaft workpiece of the same model as the crankshaft workpiece to be detected each time when an abnormality is detected, and adding and averaging the error values ​​each time an abnormality is detected to obtain a detection error value JW of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected; Step S12, substituting the detection abnormality rate and the detection error value into the calculation formula to calculate the detection force value JL of the same type of crankshaft workpiece as the crankshaft workpiece to be detected. The calculation formula is as follows: JL=YL×a1+JW×a2; where a1 and a2 are weight coefficients with fixed values, and a1>a2; Step S13, comparing the detection force value with the detection force threshold, and determining whether the detection level of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected is the third detection level, the second detection level, or the first detection level; Step S14, obtaining the detection force of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected according to the detection level, and the detection force of the crankshaft workpiece of the same model as the crankshaft workpiece to be detected is the detection force of the crankshaft workpiece to be detected.

4. The method for automatically detecting crankshaft balancing block size based on visual measurement according to claim 3 is characterized in that: The detection strength of the first detection level is greater than the detection strength of the second detection level, and the detection strength of the second detection level is greater than the detection strength of the third detection level.

5. The method for automatically detecting crankshaft balancing block size based on visual measurement according to claim 1, characterized in that: The step S2 includes the following sub-steps: Step S21, inputting a standard image of the test workpiece taken at the same viewing angle; Step S22, placing both the real-time image and the standard image in a white background, and extracting the real-time workpiece contour of the test workpiece in the real-time image and the standard workpiece contour of the test workpiece in the standard image according to the pixel difference; Step S23, establish a rectangular coordinate system with the upper left corner of the standard workpiece outline diagram, and select any coordinate point in the standard workpiece outline diagram, and the coordinate point is located on the test workpiece, and the coordinate point is calibrated as a feature point Di, i is the number of the feature point, i=1, 2, ..., n, n is a positive integer; Step S24, selecting a feature point as the starting point, calculating the interval distances between the starting point and all other feature points, and using the interval distances as the feature values ​​of the feature points corresponding to the starting point; Step S25: Similarly, select the next feature point as the starting point, and obtain the feature values ​​of all feature points according to the above operation.

6. The method for automatically detecting crankshaft balancing block size based on visual measurement according to claim 5, characterized in that: The step S2 further comprises the following sub-steps: Step S26, constructing a first characteristic matrix of the standard workpiece contour map according to the characteristic values ​​of all characteristic points; Step S27, similarly, according to steps S23 to S26, a second characteristic matrix of a real-time workpiece contour map is constructed; Step S28, comparing the first feature matrix with the second feature matrix; Step S29, if any eigenvalue in the first characteristic matrix is ​​different from the eigenvalue at the corresponding position in the second characteristic matrix, then a device abnormality signal is generated; If all eigenvalues ​​in the first characteristic matrix are the same as the eigenvalues ​​at corresponding positions in the second characteristic matrix, a normal device signal is generated.

7. The method for automatically detecting crankshaft balancing block size based on visual measurement according to claim 6, characterized in that: The working process of the detection device is: The robot arm grabs the crankshaft workpiece to be inspected and places it on the fixture at the loading position, and then the robot arm returns to grab the second crankshaft workpiece to be inspected; After the in-position sensor detects that the crankshaft workpiece to be inspected is in place, the positioning pin is positioned and fixed, and starts to slide into the designated inspection position through the cylinder; After turning on the industrial camera and backlight source, take photos of the contour of the crankshaft workpiece to be inspected according to the inspection intensity.

8. The method for automatically detecting crankshaft balancing block size based on visual measurement according to claim 3, characterized in that: The step S5 includes the following sub-steps: Step S51, obtaining a contour image of the crankshaft workpiece to be inspected through a real-time image, using the axial line of the contour image as the X-axis of the rectangular coordinate system, and using the center line of the contour image as the Y-axis of the rectangular coordinate system, thereby establishing a rectangular coordinate system; The outline diagram includes a crankshaft workpiece and a balancing block on the crankshaft workpiece. The balancing block is located in the middle of the crankshaft workpiece, and two groups of balancing blocks are symmetrically distributed. Step S52, constructing a reference measurement line of the contour map; Step S53, calculating the vertical distance from the reference measurement line to each balancing block, and determining whether the verticality is within the error range, thereby determining whether a normal workpiece signal or an abnormal workpiece signal is generated.

9. The method for automatically detecting crankshaft balancing block size based on visual measurement according to claim 8, characterized in that: The construction process of the reference measurement line is as follows: Step S521, obtaining the position coordinates of two groups of balancing blocks in a rectangular coordinate system; Step S522, selecting two points on the two groups of balancing blocks respectively, and the points on one group of balancing blocks are all on the same horizontal line as the points on the other group of balancing blocks; Step S523, then connect the two groups of balance blocks in the horizontal direction to obtain two groups of lines connecting the balance block and another balance block, and calculate the center point (X 01 , Y 01 ) and (X 02 , Y 02 ); Step S524, obtaining the position coordinates (X 01 , Y 01 ) and (X 02 , Y 02 ), and construct the reference measurement line through the formula, the formula is as follows: That is the equation: (and 02 -and 01 )x+(x 01 -x 02 )y+x 02 and 01 -and 02 x 01 =0。 10. The method for automatically detecting crankshaft balancing block size based on visual measurement according to claim 8, characterized in that: The step S53 includes the following sub-steps: Step S531, agreement: A=Y 02 -Y 01 ; B = X 01 -X 02 ; C = X 02 Y 01 -Y 02 X 01 ; Therefore, the equation: (and 02 -and 01 )x+(x 01 -x 02 )y+x 02 and 01 -and 02 x 01 =0; Evolved into: Ax+By+C=0; Step S532, select any measuring point (Xi, Yi) on the balance block, and calculate the vertical distance di from each measuring point on the balance block to the reference measuring line by using the formula, where i is the number of the measuring point. The formula is as follows: Step S533, if the vertical distance does not fall within the error range, the crankshaft workpiece to be inspected is determined to be a defective part, and a workpiece abnormality signal is generated; If the vertical distance is within the error range, repeat the above steps to detect the remaining real-time images. When the vertical distance corresponding to any real-time image is not within the error range, the crankshaft workpiece to be inspected is determined to be an unqualified part, and a workpiece abnormality signal is generated. When the vertical distances corresponding to all real-time images are within the error range, the crankshaft workpiece to be inspected is determined to be a qualified part, and a workpiece normal signal is generated.