A visual image recognition method for a cylinder head blank anti-misprocessing device

By combining a vision system and a barcode reader, the serial number of cylinder head workpieces can be automatically identified, solving the problem of difficulty in manual verification caused by differences in the shape of cylinder head blanks, reducing labor intensity and improving production efficiency.

CN116740025BActive Publication Date: 2026-04-10TIANJIN FAW TOYOTA ENGINE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TIANJIN FAW TOYOTA ENGINE CO LTD
Filing Date
2023-06-15
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In the existing technology, during the mixed-flow production of TNGA3# casting cylinder head line, due to the small differences in the shape of the cylinder head blanks, it is not easy to detect the mismatch between the serial number of the produced cylinder head and the actual product, which requires manual verification, increasing the labor intensity and fatigue of operators during long-term inspections.

Method used

A vision system is used to photograph and identify cylinder head workpieces, and a barcode reader scans the QR code to read the product serial number. By combining visual image recognition and mathematical model comparison, the correctness of cylinder head workpieces is automatically confirmed, preventing defective products from entering subsequent processes.

Benefits of technology

It has enabled automated identification of cylinder head models, reduced the labor intensity of manual verification, prevented defective products from being introduced due to the misuse of sand cores, and improved production efficiency and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116740025B_ABST
    Figure CN116740025B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of engine cylinder head blank casting preparation technology, and discloses a visual image recognition method of a cylinder head blank anti-misprocessing device, which comprises the following steps: identifying the cylinder head workpiece through visual system photographing and displaying the image through a touch screen; scanning the two-dimensional code on the cylinder head workpiece through a code reader to read the product serial number and identify the current cylinder head workpiece; comparing the product serial number of the cylinder head workpiece identified by the visual system with the product serial number of the cylinder head workpiece read by the reader; if the result is consistent, it is determined that the current cylinder head workpiece is qualified, otherwise, an NG alarm is given. The present application prevents the nonconforming products from flowing into the next process by using visual image combined with two-dimensional code reading and comparison to prevent the mismatch between the engraved code and the actual vehicle type. The present application reduces the labor intensity of the operator and the fatigue degree of long-time inspection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of engine casting cylinder head blank preparation, and particularly relates to a visual image recognition method of a cylinder head blank anti-misprocessing device. BACKGROUND

[0002] TNGA3# casting cylinder head line produces TNGA2.0L fuel version and 2.0L hybrid version, and there is a slight difference in the shape of the sand core during the production of the two cylinder heads. Therefore, the sequence number of the two products and the blank must be checked to ensure that they are correct before the engineering flow.

[0003] Through the above analysis, the problems and defects of the prior art are that due to the small difference in the shape of the blank, the sequence number of the produced cylinder head does not match the actual object and is not easy to be found. The prior art needs manual checking, which increases the labor intensity of the operator and the fatigue degree of long-time checking. SUMMARY

[0004] In order to overcome the problems in the related art, the present application provides a cylinder head blank anti-misprocessing device and a visual image recognition method, and particularly relates to a TNGA2.0 or 2.0HV cylinder head blank anti-misprocessing device.

[0005] The technical solution is as follows: a visual image recognition method of a cylinder head blank anti-misprocessing device, comprising the following steps:

[0006] S1, recognizing the cylinder head vehicle type workpiece through a visual system and displaying the image through a touch screen;

[0007] S2, scanning the product sequence number on the cylinder head vehicle type workpiece through a code reader to recognize the current cylinder head vehicle type workpiece;

[0008] S3, comparing the product sequence number of the current cylinder head vehicle type workpiece recognized by the visual system with the product sequence number of the cylinder head vehicle type workpiece read by the reader, and determining that the current cylinder head vehicle type workpiece is qualified if the results are consistent, otherwise, an NG alarm is given.

[0009] In step S3, comparing the product sequence number of the current cylinder head vehicle type workpiece recognized by the visual system with the product sequence number of the cylinder head vehicle type workpiece read by the reader comprises:

[0010] Step one, using a visual image unit, obtaining a set of cylinder head vehicle type workpiece around the image set through a visual system, extracting the contour of the cylinder head vehicle type workpiece for each frame of around the image, setting the pixel value in the contour area to 128 and setting the pixel value outside the contour to 0 to obtain a binary image, and obtaining the visual image detection contour data of the detected cylinder head vehicle type workpiece;

[0011] Step two, the profile data is pre-eliminated by the image elimination unit to eliminate the false image part in the profile, a mathematical model of the profile is established, a sand core feature matrix corresponding to the profile is established by a complete vector group describing the profile, and the included angle between the adjacent two sides of the sand core feature is calculated; the nearest distance between the profile and the sand core is calculated; and the calculation result is enhanced and pretreated and then sent to the profile processing module for analysis of the profile data of the detected cylinder head vehicle workpiece visual image detection profile;

[0012] Step three, the analyzed data is input to the touch screen to program the detection program; the program instruction after programming is sent to the central processing unit, the instruction roller drives the workpiece detection platform to slide back and forth, and the detection of the entire cylinder head vehicle workpiece profile is completed;

[0013] Step four, the reading code is used to traverse each path in the two-dimensional code on the cylinder head vehicle workpiece, obtain the maximum and minimum values of all paths in the two-dimensional code on the cylinder head vehicle workpiece in X, Y, and center position directions, and calculate the distance difference between the maximum and minimum values in each direction, respectively denoted as x_dis, y_dis, and z_dis. Divide the three distance differences by 10 respectively to obtain three quantities, which are called derived scales of the two-dimensional code on the cylinder head vehicle workpiece, denoted as x_scalar, y_scalar, and z_scalar.

[0014] Step five, a path in the two-dimensional code on the cylinder head vehicle workpiece is taken as a source path, and the derived scale calculated in step four is expanded in the positive and negative directions of the X, Y, and center position directions respectively, to obtain a rectangle centered on the source path. The length, width, and distance from the center of the rectangle are 2x_scalar, 2y_scalar, and 2z_scalar respectively. The source path center expands in multiple directions around the rectangle, and a new path is derived in each direction. The normal vector of the new path is the same as that of the source path, and each derived path records its source path.

[0015] Step six, according to the obtained normal vector of the new path, the result is consistent with the detected cylinder head vehicle workpiece visual image detection profile data, and the current cylinder head vehicle workpiece is determined to be qualified, otherwise, an NG alarm is given.

[0016] In step one, a set of cylinder head vehicle workpiece images around the image set is obtained by a visual system, the profile of the cylinder head vehicle workpiece is extracted for each frame of the image around the image, and the pixel value in the profile area is set to 128 and the pixel value outside the profile is set to 0, to obtain a binary image, called an effective area image.

[0017] In step one, a low-density path cloud, referred to as a two-dimensional code on the cylinder head workpiece, is obtained in the visual image reconstruction step of the image set of the cylinder head workpiece, and a rotation matrix R and a translation vector t of each frame of the visual system relative to the world coordinate system are also obtained, and the rotation matrix and the translation vector are combined to form a transformation matrix M.

[0018] Further, for the i-th frame of image in the image set of the cylinder head workpiece, the calculated transformation matrix M i is obtained. i The obtained derived path cloud is transformed to the corresponding camera coordinate system according to the transformation matrix M E , and each path in the derived path cloud is back-projected to the effective area graph of the obtained i-th frame according to the projection principle.

[0019] The paths in the invalid area of the effective area graph of the i-th frame are deleted from the derived path cloud, and the paths in the valid area of the effective area graph of the i-th frame are retained.

[0020] Through the surrounding projection and deletion of the derived path cloud, the visual image reconstruction obtains a derived path cloud containing internal paths.

[0021] In step two, appropriate domain values are set according to the length-width ratio of the minimum containing rectangle of the contour, and filtering is performed.

[0022] The domain values are set according to the minimum value of the length-width ratio of each side of the source contour, and the pseudo-image part of the target contour is removed.

[0023] The target contour is simplified to have the same number of sides as the source contour.

[0024] The Euclidean distance and the maximum sum coefficient of the most similar vectors in the sand core feature matrices of the source contour and the target contour are obtained.

[0025] Further, the Euclidean distance and the maximum sum coefficient of the most similar vectors in the sand core feature matrices of the source contour and the target contour are obtained, which specifically includes:

[0026] The sand core feature matrices P E and Q E of the source contour P and the target contour Q are respectively established in the counterclockwise direction.

[0027]

[0028]

[0029] The Euclidean distance formula d(x, y) and the included angle cosine formula sim(x, y) are as follows:

[0030]

[0031]

[0032] Based on d(x,y) and S, redefine two matrix D and S, make:

[0033]

[0034] Find the minimum value in D and S.

[0035] In step five, the derivative operation is performed on each path in the two-dimensional code on the cylinder head workpiece, and a derived path cloud is obtained, the number of paths in the path cloud is multiple times the number of two-dimensional codes on the cylinder head workpiece;

[0036] In step five, one path in the two-dimensional code on the cylinder head workpiece is taken as a source path to derive new paths in multiple directions of the rectangle, and the calculation formula of the new path is:

[0037]

[0038] Wherein, x_org, y_org, z_org are respectively the coordinates of a path in the two-dimensional code on the cylinder head workpiece in X, Y and center position directions, and x_scalar, y_scalar, z_scalar are respectively the derived scales of x, y and z calculated,

[0039] The 3*3*3 new path coordinates calculated by the above formula will derive multiple new path clouds except for the case that the source path coordinate increment is (0, 0, 0).

[0040] In step six, the path cloud in the visual system coordinate system is back projected, and each path is projected into the i-th frame effective area image, and the calculation formula of the projection position is:

[0041]

[0042] Wherein, f is the focal length of the camera, C x ,C y are respectively 2 times of the image resolution, and u and v calculated are the positions of the path projected onto the image, that is, the pixel positions corresponding to the u-th row and the v-th column in the image.

[0043] Another object of the present application is to provide a cylinder head blank anti-misprocessing device, and a visual image recognition method for implementing the cylinder head blank anti-misprocessing device.

[0044] The workpiece detection platform is used for carrying the cylinder head workpiece.

[0045] The workpiece detection platform is placed on the roller way.

[0046] The upper part of the roller way is provided with a visual system for taking pictures to identify the cylinder cover workpiece and displaying the image on the touch screen connected with the visual system;

[0047] A code reader is also installed on one side of the roller way for scanning the two-dimensional code on the cylinder cover workpiece to read the product serial number and identify the current cylinder cover workpiece;

[0048] The current cylinder cover workpiece identified by the visual system is compared with the product serial number of the cylinder cover workpiece read by the reader, and if the results are consistent, it is determined that the current cylinder cover workpiece is qualified, otherwise, an NG alarm is given and an alarm prompt is given on the operation box.

[0049] In combination with all the technical solutions described above, the present application has the advantages and positive effects as follows: the present application uses visual image combined with two-dimensional code reading comparison to prevent the mismatch between the engraved code and the actual vehicle type from flowing into the subsequent process. The present application prevents the mismatch between the engraved code and the actual vehicle type from flowing into the subsequent process. The labor intensity of the operator and the fatigue of long-time inspection are reduced. BRIEF DESCRIPTION OF DRAWINGS

[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure, together with the description;

[0051] Figure 1 is a visual image identification method of the cylinder cover blank anti-misprocessing device provided by the embodiment of the present application;

[0052] Figure 2 is a flow chart of comparing the current cylinder cover workpiece identified by the visual system with the product serial number of the cylinder cover workpiece read by the reader;

[0053] Figure 3 is a schematic diagram of the cylinder cover blank anti-misprocessing device provided by the embodiment of the present application;

[0054] In the figure: 1, workpiece detection platform; 2, roller way; 3, visual system; 4, touch screen; 5, reader; 6, cylinder cover workpiece; 7, operation box. DETAILED DESCRIPTION

[0055] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below in combination with the drawings. In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the scope of the present application, so the present application is not limited to the specific embodiments disclosed below.

[0056] As shown in Embodiment 1, Figure 1 The visual image recognition method of the cylinder head blank anti-misprocessing device provided by the embodiment of the application comprises the following steps:

[0057] S1, the cylinder head workpiece 6 is recognized by the visual system 3, and the image is displayed on the touch screen 4;

[0058] S2, the product serial number of the cylinder head workpiece 6 is read by scanning the two-dimensional code on the cylinder head workpiece 6 through the code reader 5, and the current cylinder head workpiece 6 is recognized;

[0059] S3, the current cylinder head workpiece 6 recognized by the visual system 3 is compared with the product serial number of the cylinder head workpiece 6 read by the reader 5, and if the results are consistent, it is determined that the current cylinder head workpiece 6 is qualified, otherwise, an NG alarm is given.

[0060] In the embodiment of the application, as shown in Figure 2 In step S3, the comparison of the current cylinder head workpiece 6 recognized by the visual system 3 with the product serial number of the cylinder head workpiece 6 read by the reader 5 comprises:

[0061] S201, a set of cylinder head workpiece 6 images around the visual system 3 is obtained by using the visual image unit, the contour of the cylinder head workpiece 6 is extracted for each frame of the image around the visual system 3, the pixel value in the contour area is set to 128, and the pixel value outside the contour is set to 0, so as to obtain a binary image, and the visual image detection contour data of the cylinder head workpiece 6 to be detected is obtained;

[0062] S202, the contour data is pre-eliminated from the false image part in the contour by using the image elimination unit, a mathematical model of the contour is established, a core feature matrix corresponding to the contour is established by using a complete vector group describing the contour, the included angle between adjacent two sides of the core feature is calculated, the nearest distance between the contour and the core is calculated, and after the calculation result is enhanced and pretreated, it is sent to the contour processing module for analysis of the visual image detection contour data of the cylinder head workpiece 6 to be detected;

[0063] S203, the analyzed data is input to the touch screen to compile a detection program, and the instructions of the compiled program are sent to the central processing unit, so that the workpiece detection platform 1 is driven to slide back and forth by the roller way 2, and the detection of the entire contour of the cylinder head workpiece 6 is completed;

[0064] S204, traversing each path in the two-dimensional code on the cylinder head workpiece 6 using the code reader 5, obtaining the maximum and minimum values of each path in the two-dimensional code on the cylinder head workpiece 6 in the X, Y, and center position directions, and calculating the distance difference between the maximum and minimum values in each direction, denoted as x_dis, y_dis, and z_dis, respectively, and dividing each of the three distance differences by 10 to obtain three quantities, referred to as derived scales of the two-dimensional code on the cylinder head workpiece 6, denoted as x_scalar, y_scalar, and z_scalar;

[0065] S205, taking one path in the two-dimensional code on the cylinder head workpiece 6 as a source path, and extending in the positive and negative directions of the X, Y, and center position directions by the derived scale calculated in step four to obtain a rectangle centered on the source path, the length, width, and distance from the center of the rectangle being 2x_scalar, 2y_scalar, and 2z_scalar, respectively, and the source path center being expanded in multiple directions to the periphery of the rectangle, a new path being derived in each direction, the normal vector of the new path being the same as that of the source path, and each derived path recording its source path;

[0066] S206, comparing the normal vector of the new path obtained with the visual image detection contour data of the cylinder head workpiece 6 to be detected, and if the results are consistent, determining that the current cylinder head workpiece 6 is qualified, otherwise, issuing an NG alarm.

[0067] In step S201, a set of cylinder head workpiece 6 around the image set is obtained by the vision system 3, the contour of the cylinder head workpiece 6 is extracted for each frame of the around image, and the pixel value in the contour area is set to 128, and the pixel value outside the contour is set to 0, to obtain a binary image, referred to as an effective area image.

[0068] In step S201, during the visual image reconstruction step of the cylinder head workpiece 6 around the image set, a path cloud with very low density is obtained, referred to as the two-dimensional code on the cylinder head workpiece 6, and the rotation matrix R and translation vector t of each frame of the vision system 3 relative to the world coordinate system are also obtained, and the rotation matrix and translation vector are combined to form a transformation matrix M.

[0069] For the i-th frame of the cylinder head workpiece 6 around the image set, the calculated transformation matrix M i is obtained. i The derived path cloud is transformed to the corresponding camera coordinate system according to the transformation matrix M

[0070] The path projected into the invalid region of the i-th frame valid region map is deleted from the derived path cloud, and the path projected into the valid region of the i-th frame valid region map is reserved;

[0071] The visual image reconstruction obtains the derived path cloud containing the inner path by surrounding projection and deletion of the derived path cloud.

[0072] In the embodiment of the present application, in step S202, the appropriate domain value is set according to the length-width ratio of the minimum containing rectangle of the contour, and filtering is performed;

[0073] The domain value is set according to the minimum value of the length-perimeter ratio of each side of the source contour, and the false image part in the target contour is removed;

[0074] The number of sides of the target contour is simplified to make the number of sides the same as that of the source contour;

[0075] The Euclidean distance and the maximum sum coefficient of the most similar vectors in the sand core feature matrices of the source contour and the target contour are obtained.

[0076] The Euclidean distance and the maximum sum coefficient of the most similar vectors in the sand core feature matrices of the source contour and the target contour are obtained, and specifically include:

[0077] The sand core feature matrices P and Q of the source contour P and the target contour Q are respectively established in the counterclockwise direction E and E :

[0078]

[0079]

[0080] The Euclidean distance formula d(x, y) and the included angle cosine formula sim(x, y) are as follows:

[0081]

[0082]

[0083] Based on d(x, y) and sim(x, y), the two matrices D and S are redefined, so that:

[0084]

[0085] The minimum value in D and S is obtained.

[0086] In the embodiment of the present application, in step S205, the derived operation is performed on each path in the two-dimensional code on the cylinder head workpiece 6, and a derived path cloud is obtained, and the number of paths in the path cloud is multiple times of the number of two-dimensional codes on the cylinder head workpiece 6;

[0087] In step five, one of the paths in the two-dimensional code on the cylinder head workpiece 6 is taken as a source path to derive new paths in multiple directions of the rectangle, and the calculation formula of the new path is:

[0088]

[0089] Wherein, x_org, y_org, z_org are the coordinates of a certain path in the two-dimensional code on the cylinder head workpiece (6) in the X, Y, and center position directions, and x_scalar, y_scalar, z_scalar are the derived scales of x, y, and z directions,

[0090] The 3x3x3 new path coordinates calculated by the above formula will derive multiple new path clouds except for the case where the source path coordinate increment is (0, 0, 0).

[0091] In step six, the path cloud in the coordinate system of the vision system (3) is back-projected, and each path is projected into the i-th frame of the effective area image. The calculation formula of the projection position is:

[0092]

[0093] Wherein, f is the focal length of the camera, C x ,C y are 2 times the image resolution, and the calculated u and v are the positions of the path projected onto the image, that is, the pixel positions corresponding to the u-th row and v-th column on the image.

[0094] In example 2, as Figure 3 The cylinder head blank anti-misprocessing device provided by the embodiment of the application comprises:

[0095] A workpiece detection platform 1 is used to carry the cylinder head workpiece 6.

[0096] The workpiece detection platform 1 is placed on a roller 2.

[0097] A vision system 3 is installed on the upper part of the roller 2, which can be a camera, and is used to take pictures to identify the cylinder head workpiece 6 and display the image through a touch screen 4 connected with the vision system 3.

[0098] A code reader 5 is also installed on one side of the roller 2, which is used to scan the two-dimensional code on the cylinder head workpiece 6 to read the product serial number and identify the current cylinder head workpiece 6.

[0099] The product serial number of the current cylinder head workpiece 6 identified by the vision system 3 is compared with the product serial number of the cylinder head workpiece 6 read by the reader 5. If the results are consistent, it is determined that the current cylinder head workpiece 6 is qualified, otherwise, an NG alarm is given, and an alarm prompt is given on an operation box 7.

[0100] Embodiment 3, the cylinder cover blank anti-misprocessing device and visual image recognition method provided by the embodiment of the application can be applied to TNGA 2.0 or 2.0HV cylinder cover blank anti-misprocessing recognition.

[0101] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in a certain embodiment can be referred to the related description of other embodiments.

[0102] The information interaction, execution process and the like between the above devices / units are based on the same concept as the method embodiments of the application, and the specific functions and brought technical effects can be referred to the method embodiments part, which will not be repeated here.

[0103] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be realized in the form of hardware or software function unit. In addition, the specific name of each functional unit and module is only for easy distinction, and does not limit the protection scope of the application. The specific working process of the unit and module in the above system can be referred to the corresponding process in the foregoing method embodiments.

[0104] Based on the technical solutions of the above embodiments of the application, the following application examples can be further proposed.

[0105] According to the embodiments of the present application, the application further provides a computer device, which comprises at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above method embodiments when executing the computer program.

[0106] The embodiment of the application further provides a computer readable storage medium, which stores a computer program, wherein the computer program is executable by a processor to implement the steps in each of the above method embodiments.

[0107] The embodiment of the application further provides an information data processing terminal, which is used to provide a user input interface to implement the steps in each of the above method embodiments when executed on an electronic device, and the information data processing terminal is not limited to a mobile phone, a computer, or a switch.

[0108] The embodiments of the present application also provide a server, which is configured to provide a user input interface to implement the steps in the above method embodiments when executed on an electronic device.

[0109] The embodiments of the present application also provide a computer program product, which is configured to enable an electronic device to perform the steps in the above method embodiments when the computer program product is executed on the electronic device.

[0110] The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the present application can implement all or part of the processes in the above method embodiments by means of a computer program to instruct relevant hardware, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable file or some intermediate form. The computer readable medium at least includes any entity or device capable of carrying the computer program code to a photographing device / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc.

[0111] The above merely provides the preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any modification, equivalent replacement and improvement within the technical range disclosed by the present application and within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A visual image recognition method for a cylinder head blank anti-misprocessing device, characterized in that, The method includes the following steps: S1, the cylinder head machine part (6) is photographed and identified by the vision system (3), and the image is displayed on the touch screen (4); S2, scan the QR code on the cylinder head workpiece (6) with the barcode reader (5) to read the product serial number and identify the current cylinder head workpiece (6). S3, compare the current cylinder head workpiece (6) identified by the vision system (3) with the product serial number of the cylinder head workpiece (6) read by the reader (5). If the results are consistent, the current cylinder head workpiece (6) is deemed qualified; otherwise, an NG alarm is triggered. In step S3, the comparison between the current cylinder head part (6) identified by the vision system (3) and the product serial number of the cylinder head part (6) read by the reader (5) includes: Step 1: Using the visual image unit, a set of cylinder head vehicle workpiece (6) surround images is obtained through the visual system (3). The outline of the cylinder head vehicle workpiece (6) is extracted from each frame of surround image. The pixel value in the outline area is set to 128, and the pixel value outside the outline is set to 0. A frame of binary image is obtained, and the visual image detection outline data of the cylinder head vehicle workpiece (6) to be detected is obtained. Step 2: The above contour data is pre-eliminated by the image elimination unit to eliminate the pseudo-image part in the contour, and a mathematical model of the contour is established. The sand core feature matrix corresponding to the contour is established by the complete vector group describing the contour, and the included angle between the two adjacent sides of the sand core feature is calculated. The shortest distance between the contour and the sand core is calculated. After the enhanced preprocessing of the calculation results, the data is sent to the contour processing module for analysis of the contour data of the cylinder head vehicle workpiece to be inspected (6). Step 3: Input the analyzed data into the touch screen to compile the detection program; send the instructions of the compiled program to the central processor, and instruct the roller conveyor (2) to drive the workpiece detection platform (1) to slide back and forth to complete the detection of the contour of the entire cylinder head workpiece (6); Step four, using the code reader (5) to traverse each path in the two-dimensional code on the cylinder head workpiece (6), obtain the maximum and minimum values of all paths in the two-dimensional code on the cylinder head workpiece (6) in X, Y and center position directions, and calculate the distance difference between the maximum and minimum values in each direction, respectively denoted as , respectively divide the three distance differences by 10, obtain three quantities, called the derived dimensions of the two-dimensional code on the cylinder head workpiece (6), denoted as ; Step five, take one path in the two-dimensional code on the cylinder head workpiece (6) as a source path, respectively expand the derived scale size calculated in step four in the positive and negative directions of X, Y, and center position three directions, to get a rectangle with the source path as the center, the length and width of the rectangle and the distance from the center are The source path center expands to the periphery of the rectangle in multiple directions, and a new path is derived in each direction. The normal vector of the new path is the same as that of the source path, and each derived path records its source path. Step 6: Compare the obtained normal vector of the new path with the visual image detection contour data of the cylinder head workpiece (6) to be inspected. If the results are consistent, the current cylinder head workpiece (6) is deemed qualified; otherwise, an NG alarm is triggered.

2. The visual image recognition method for the cylinder head blank anti-mismachining device according to claim 1, characterized in that, In step one, a set of cylinder head vehicle workpiece (6) surround images are obtained through the vision system (3). The outline of the cylinder head vehicle workpiece (6) is extracted from each frame of surround image. The pixel value in the outline area is set to 128, and the pixel value outside the outline is set to 0, resulting in a frame of binary image, which is called the effective area image.

3. The visual image recognition method for the cylinder head blank anti-mismachining device according to claim 1, characterized in that, In step one, during the visual image reconstruction step of the surrounding image set of cylinder head vehicle workpiece (6), a path cloud with very low density is obtained, called the QR code on cylinder head vehicle workpiece (6), and the rotation matrix of each frame of the visual system (3) relative to the world coordinate system is also obtained. With translation vector The rotation matrix and translation vector are combined to form the transformation matrix. .

4. The visual image recognition method for the cylinder head blank anti-mismachining device according to claim 3, characterized in that, The first image in the image set of cylinder head workpiece (6) Frame image, extract the calculated transformation matrix The derived path cloud obtained is then transformed according to the transformation matrix. Transform to the corresponding camera coordinate system, and according to the projection principle, backproject each path in the derived path cloud onto the obtained first camera coordinate system. On the effective region map of the frame; For projection to the first Paths within invalid regions in the frame's valid region map are removed from the derived path cloud and projected onto the first... Paths within the valid region of the frame valid region map are preserved. By projecting the derived path cloud around and deleting it, the visual image is reconstructed to obtain a derived path cloud containing the inner path.

5. The visual image recognition method for the cylinder head blank anti-mismachining device according to claim 1, characterized in that, In step two, an appropriate threshold value is set based on the aspect ratio of the minimum enclosing rectangle of the outline for filtering; Set the threshold value based on the minimum ratio of each side length to the perimeter in the source contour to remove the pseudo-image part in the target contour; The number of sides of the target contour is simplified so that it has the same number of sides as the source contour; Obtain the Euclidean distance and maximum summation coefficient of the most similar vectors in the feature matrices of the source and target contours.

6. The visual image recognition method for the cylinder head blank anti-mismachining device according to claim 5, characterized in that, Obtaining the Euclidean distance and maximum summation coefficient of the most similar vectors in the feature matrices of the source and target contours specifically includes: Establish the source contours in a counter-clockwise direction. and target outline Sand core feature matrix and : ; ; Euclidean distance formula Formula for the cosine of the included angle as follows: ; ; by Harmony Foundation, redefining two matrices and ,make: ; Find and The minimum value in.

7. The visual image recognition method for the cylinder head blank anti-mismachining device according to claim 1, characterized in that, In step five, the derivation operation described above is performed once for each path in the QR code on the cylinder head workpiece (6) to obtain a derived path cloud. The number of paths in the path cloud is many times the number of QR codes on the cylinder head workpiece (6). In step five, one of the paths in the QR code on the cylinder head workpiece (6) is used as the source path to derive new paths in multiple directions of the rectangle. The calculation formula for the new path is as follows: ; in, These are the coordinates of a certain path in the QR code on the cylinder head workpiece (6) in the X, Y, and center directions, respectively. The results were calculated respectively. Three-way derived scales The above formula is calculated as follows For each new path coordinate, except for the case where the source path coordinate increment is (0, 0, 0), multiple new path clouds will be derived.

8. The visual image recognition method for the cylinder head blank anti-mismachining device according to claim 1, characterized in that, In step six, the path cloud in the visual system (3) coordinate system is back-projected, and each path is projected onto the first coordinate system. The formula for calculating the projection position in the effective area map of the frame is as follows: ; in, For camera focal length, Calculated at twice the image resolution. The position on the image where this path is projected, i.e., the position on the image where the path is projected. line, number The pixel position corresponding to the column.

9. A device for preventing mismachining of cylinder head blanks, characterized in that, The visual image recognition method for implementing the cylinder head blank anti-mismachining device according to any one of claims 1-8, the device comprising: Workpiece inspection platform (1) is used to carry cylinder head workpieces (6). The workpiece inspection platform (1) is placed on the roller conveyor (2); A vision system (3) is installed on the upper part of the roller conveyor (2) for taking pictures to identify cylinder head machine parts (6) and displaying the images through a touch screen (4) connected to the vision system (3); A barcode reader (5) is also installed on one side of the roller conveyor (2) to scan the QR code on the cylinder head workpiece (6) to read the product serial number and identify the current cylinder head workpiece (6). The current cylinder head workpiece (6) identified by the vision system (3) is compared with the product serial number of the cylinder head workpiece (6) read by the reader (5). If the results are consistent, the current cylinder head workpiece (6) is deemed qualified. Otherwise, an NG alarm is triggered, and an alarm prompt is displayed on the operation box (7).

Citation Information

Patent Citations

  • Method and equipment for generating motion feature codes on the basis of motion feature information

    CN104143074A

  • Identification code marking quality detection method and terminal equipment

    CN114565550A