Vision-based inkjet coding positioning method and device

Through the visual-based ink coding positioning method, using neural network algorithms to process real-time images, the existing technology cannot handle the problem of many types of workpieces and large differences in appearance, and achieve more efficient and automated ink coding positioning.

CN114463752BActive Publication Date: 2025-04-08SPEEDBOT ROBOTICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210063581.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-20
Publication Date
2025-04-08
Estimated Expiration
2042-01-20

AI Technical Summary

Technical Problem

The existing automatic inkjet technology cannot effectively deal with complex situations such as the large variety of workpieces and large differences in appearance, resulting in poor universality and generalization.

Method used

The visual-based ink coding positioning method is adopted, and the real-time image of the ink coding site is collected, the target block diagram is intercepted by using the neural network algorithm, the target position is located, and the actual ink coding information is determined based on the target information.

Benefits of technology

The injection code positioning is achieved without limitations such as the placement position, type number, and appearance differences of workpieces, which improves the coding efficiency and automation, and enhances the universality and generalization of the technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114463752B_ABST
    Figure CN114463752B_ABST
Patent Text Reader

Abstract

The present invention relates to a coding positioning method and device based on vision. On the one hand, it can collect real-time images of the coding site, and reflect the current real-time information on the transmission device in real time. When the workpiece to be coded is transported on the conveying device, the target frame diagram in the real-time image is intercepted through a neural network algorithm to locate its specific position; on the other hand, the target information can be determined according to the target frame diagram; and then the actual coding information is determined according to the target position and target information to complete the coding process. In general, the coding positioning method is a vision-based follow-up coding method, which can locate the actual coding position according to the actual situation of the coding site, and is not limited by the placement position, placement posture, workpiece type, etc. of the workpiece to be coded. It solves the problems of low coding efficiency, single coding type, and fixed coding size of manual and traditional automatic methods, improves the coding efficiency and automation, and has higher universality and generalization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of automatic control, and in particular to a vision-based inkjet coding positioning technology. Background Art

[0002] Under the current trend of industrial automation and intelligence, coding of industrial parts is an indispensable part of workpiece identification, classification and tracking. Common coding methods can be divided into manual coding and automatic coding. Manual coding can cope with workpieces of different types and shapes, but the work efficiency is low, the workers have high work intensity, and long-term exposure to this environment poses a great safety risk to workers. Compared with manual spraying, automatic spraying can greatly improve production efficiency and reduce the production cycle of products, which is beneficial to the development of enterprises and industries. Secondly, automatic coding can greatly reduce the number of people involved in coding operations and the chances of contact between operators and the spraying environment, and can avoid the harm of coding operations to personnel health. However, the current mainstream automatic coding methods are mainly used in cases of single type, specific shape, fixed coding area, and single coding type. They cannot handle situations in industrial production where there are many types of workpieces and large differences in appearance. Their universality and generalization are not strong.

[0003] Therefore, how to provide a coding technology that is not limited by the placement of the workpiece, the number of types, the shape differences, etc., is a technical problem that needs to be solved urgently in the current coding. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a vision-based inkjet coding positioning method, comprising:

[0005] S1: Collect real-time images of the coding site;

[0006] S2: Based on the real-time image, a neural network algorithm is used to intercept the target frame diagram in the real-time image to locate the target position;

[0007] S3: Determine target information according to the target block diagram;

[0008] S4: Determine the actual coding information according to the target position and target information.

[0009] Further, step S2 includes:

[0010] S21: Obtain a training sample set;

[0011] S22: construct a neural network model, and input the training sample set into the neural network model to obtain a trained neural network model;

[0012] S23: Input the real-time image into the trained neural network model, and capture the target frame diagram in the real-time image to locate the target position.

[0013] Furthermore, step S21 includes:

[0014] S211: Acquire the background image of the coding site;

[0015] S212: Acquire a template image of the workpiece to be coded;

[0016] S213: superimposing the template image onto the background image according to different placement information to obtain a training sample set.

[0017] Furthermore, in step S22, the neural network model includes: an input module, a feature extraction module, a feature fusion module and a prediction module.

[0018] Furthermore, in step S3, the target information includes the target type; step S3 includes:

[0019] S31: extracting edge features of the workpiece to be coded according to the target block diagram;

[0020] S32: According to the edge features of the workpiece to be coded, similarity measurement is performed on the cosine values ​​of the gradient direction of the edge points of the workpiece to be coded and the gradient direction of the edge points of the template workpiece;

[0021] S33: Match the workpiece to be coded with the template workpiece corresponding to the edge point with the largest similarity measurement, and determine the target type.

[0022] Furthermore, in step S3, the target information also includes target features; step S3 also includes:

[0023] S34: Acquire matching information of the template artifact;

[0024] S35: Determine the target feature according to the matching information and the target frame diagram.

[0025] Further, step S4 includes:

[0026] S41: According to the target information, the largest coding area on the workpiece to be coded is selected as the coding information of the workpiece to be coded;

[0027] S42: According to the target position, the coding information of the workpiece to be coded is transformed to obtain the actual coding information.

[0028] Further, step S41 includes:

[0029] S411: Obtaining a binary image of the workpiece to be coded according to the target information;

[0030] S412: define a binary image in which the solid area is the target pixel and the hollow area is the background pixel;

[0031] S413: Calculate the distance between each target pixel and the nearest background pixel;

[0032] S414: Select the area between the target pixel and its background pixel corresponding to the maximum distance as the maximum coding area.

[0033] Furthermore, the method further comprises:

[0034] S5: Verify whether the actual coding information meets the preset requirements. If so, complete the coding process according to the actual coding information; if not, adjust the actual coding information to complete the coding process.

[0035] On the other hand, the present invention also provides a vision-based inkjet coding positioning device for executing any of the above methods, including:

[0036] Image acquisition module, used to collect real-time images of the coding site;

[0037] The target position positioning module is connected to the image acquisition device and is used to intercept the target frame diagram in the real-time image by using a neural network algorithm according to the real-time image to locate the target position;

[0038] A target information determination module is connected to the target position positioning device and is used to determine the target information according to the target block diagram;

[0039] The actual inkjet coding information determination module is connected to the target position positioning module and the target information determination module, and is used to determine the actual inkjet coding information according to the target position and the target information.

[0040] The vision-based inkjet coding positioning method and device provided by the present invention, on the one hand, can collect real-time images of the inkjet coding site, and reflect the current real-time information on the transmission device in real time. When the workpiece to be coded is transported on the conveying device, the target frame diagram in the real-time image is intercepted through the neural network algorithm to locate its specific position; on the other hand, the target information can be determined according to the target frame diagram; and then the actual inkjet coding information is determined according to the target position and target information to complete the inkjet coding process. In general, the inkjet coding positioning method is a vision-based follow-up inkjet coding method, which can locate the actual inkjet coding position according to the actual situation of the inkjet coding site, and is not limited by the placement position, placement posture, workpiece type, etc. of the workpiece to be coded. It solves the problems of low efficiency of coding, single coding type, and fixed coding size of manual and traditional automatic methods, improves the efficiency and automation of coding, and has higher universality and generalization. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a flow chart of an embodiment of the vision-based inkjet coding positioning method of the present invention;

[0042] Figure 2It is a schematic diagram of the coding system of the present invention;

[0043] Figure 3 It is a flow chart of an embodiment of step S1 of the vision-based inkjet coding positioning method of the present invention;

[0044] Figure 4 Flow chart of an embodiment of step S2 of the vision-based inkjet coding positioning method of the present invention;

[0045] Figure 5 It is a flow chart of an embodiment of step S21 of the vision-based inkjet coding positioning method of the present invention;

[0046] Figure 6 A block diagram of an embodiment of a neural network model of a vision-based inkjet coding positioning method of the present invention;

[0047] Figure 7 It is a flow chart of an embodiment of step S3 of the vision-based inkjet coding positioning method of the present invention;

[0048] Figure 8 Flow chart of another embodiment of step S3 of the vision-based inkjet coding positioning method of the present invention;

[0049] Fig. 9 It is a flow chart of an embodiment of step S4 of the vision-based inkjet coding positioning method of the present invention;

[0050] Fig.10 It is a flow chart of an embodiment of step S41 of the vision-based inkjet coding positioning method of the present invention;

[0051] Fig.11 It is a flow chart of an embodiment of step S5 of the vision-based inkjet coding positioning method of the present invention;

[0052] Fig.12 It is a flow chart of another embodiment of step S5 of the vision-based inkjet coding positioning method of the present invention;

[0053] Fig.13 It is a structural block diagram of an embodiment of a vision-based inkjet coding positioning device of the present invention; DETAILED DESCRIPTION

[0054] like Figure 1 As shown, the present invention provides a vision-based inkjet coding positioning method, comprising:

[0055] S1: Collect real-time images of the coding site; Figure 2As shown, an example of a coding system is shown, including: a conveying device, a truss, a coding device, an image acquisition device and a control device. Specifically, the conveying device may optionally include, but is not limited to, a drive component, a transmission component and a conveyor belt. The drive components such as a motor drive the pulley and other transmission components to move, thereby driving the conveyor belt to move, so that the workpiece to be coded placed on the conveyor belt is transferred to the coding point to complete the coding process; the truss may optionally be, but is not limited to, arranged above the conveying device, including a front and rear moving component, a left and right moving component, an up and down moving component and a drive component to achieve three-dimensional movement; the coding device is arranged at the end of the truss, and is driven by the front and rear, left and right, up and down moving components of the truss to achieve three-dimensional movement, and reach any position of the conveying device to complete the coding process. The image acquisition device may optionally be, but is not limited to, a camera (optionally a 2D camera), a camera and other devices with image acquisition functions to collect real-time images of the coding site (around the conveying device). The control device may optionally be, but is not limited to, a single-chip microcomputer, a control terminal, etc., and locates the position and coding information of the workpiece to be coded by analyzing the real-time image collected by the image acquisition device, and controls the truss to drive the coding device to move to the coding point to complete the coding process.

[0056] S2: Based on the real-time image, a neural network algorithm is used to intercept the target frame diagram in the real-time image to locate the target position. Specifically, it is optional but not limited to inputting the real-time image into a trained neural network model, intercepting the target frame diagram of the area where the workpiece to be coded is located in the real-time image, so as to locate the target position (the position of the workpiece to be coded). Specifically, according to the situation at the coding site, one or more workpieces to be coded may appear on the conveyor belt at the same time, then the target frame diagram may be optional but not limited to one or more. The multiple target frame diagrams may be optional but not limited to the same target frame diagram or different target frame diagrams according to the types of workpieces to be coded on the conveyor belt (may be the same type of workpieces or different types of workpieces).

[0057] S3: Determine the target information according to the target block diagram. Specifically, it is optional but not limited to determining the target information corresponding to each target block diagram according to the target block diagram (one or more) intercepted by the above neural network model, that is, what type of workpiece to be coded corresponds to the target block diagram, the coding information of the coded workpiece itself (such as where the coding position is, how to set the coding angle), etc.

[0058] S4: Determine the actual coding information according to the target position and target information. Specifically, it is optional but not limited to determine the actual coding information (the coding point, coding angle, coding size, etc. that the truss needs to drive the coding device to reach) according to the target position (the position of the workpiece to be coded on the conveyor belt) and the target information (the type of the workpiece to be coded, its own coding information).

[0059] In this embodiment, the vision-based coding positioning method of the present invention is provided. On the one hand, it can collect real-time images of the coding site, and reflect the current real-time information on the transmission device (conveyor belt) in real time. When the workpiece to be coded is transported on the conveyor, the target frame diagram (the position of the workpiece to be coded) in the real-time image is intercepted through the neural network algorithm to locate its specific position; on the other hand, it can determine the target information (type of workpiece to be coded, coding position, angle, etc.) according to the target frame diagram; and then determine the actual coding information (the coding point that the truss needs to drive the coding device to actually reach) according to the target position and target information, and complete the coding process. In general, the coding positioning method is a vision-based follow-up coding method, which can locate the actual coding position according to the actual situation of the coding site, and is not limited by the placement position, placement posture, workpiece type, etc. of the workpiece to be coded. It solves the problems of low coding efficiency, single coding type, and fixed coding size of manual and traditional automatic methods, improves the coding efficiency and automation, and has higher universality and generalization.

[0060] Specifically, Figure 3 As shown, the step S1 of acquiring the real-time image of the coding site may optionally include but is not limited to S11: acquiring the real-time image of the coding site; S12: performing image correction on the real-time image; and S13: performing image enhancement on the real-time image.

[0061] More specifically, S12: image correction of real-time images is performed because due to the inherent structure of the image acquisition device (such as a camera, lens), the image directly acquired from the image acquisition device has different degrees of optical distortion from the ideal imaging, which directly affects subsequent target detection, matching (locating the target position, determining target information) and other tasks. A high-precision calibration method is used to calculate the distortion parameters of the image acquisition device in advance, and the real-time image (original image) acquired by the camera is corrected before subsequent tasks, and the corrected real-time image is used as the real-time image.

[0062] More specifically, S13: image enhancement of the real-time image is performed because the background of the coding work scene is complex and the environment is too bright or too dark, so the effect of directly obtaining the real-time image is poor. Therefore, image enhancement (optional but not limited to contrast enhancement method used to enhance the contrast of the image) is used to enhance the image display details, so that the workpiece to be coded has a greater degree of distinction in the image, which is more conducive to the detection and matching tasks of the workpiece to be coded.

[0063] In this embodiment, a preferred method of step S1 is given, which further processes the collected real-time image through steps such as image correction / enhancement to further improve the accuracy of subsequent model detection, matching recognition, positioning, etc.

[0064] Specifically, Figure 4As shown, step S2 may optionally include but is not limited to:

[0065] S21: Obtain a training sample set;

[0066] S22: construct a neural network model, and input the training sample set into the neural network model to obtain a trained neural network model;

[0067] S23: Input the real-time image into the trained neural network model, and capture the target frame diagram in the real-time image to locate the target position.

[0068] In this embodiment, a specific implementation of step S2 is given, which trains the neural network model through a training sample set to optimize parameters at all levels to obtain a trained neural network model, then inputs the real-time image into the neural network model, intercepts the target frame diagram, and then locates the target position according to the target frame diagram.

[0069] Specifically, Figure 5 As shown, step S21 may include, but is not limited to: S211: obtaining a background image of the coding site; S212: obtaining a template image of the workpiece to be coded; S213: superimposing the template image on the background image according to different placement information to obtain a training sample set. More specifically, the background image of the coding site in S211 is specifically an image of the conveyor belt itself when there is no workpiece to be coded on the conveyor (conveyor belt), which may be obtained by photographing the conveyor in real time with an image acquisition device before coding; the template image of the workpiece to be coded in step S212 may be obtained by photographing the workpiece to be coded (which may be hundreds of workpieces to be coded) in real time with an image acquisition device before coding; the different placement information in step S213 may be, but is not limited to, different placement positions, placement angles and other status information of the workpiece to be coded on the conveyor to generate infinite possible images of the workpiece to be coded on the conveyor.

[0070] In this embodiment, a specific embodiment (S211-S213) of how to obtain a training sample set in step S21 is given. First, by acquiring the background image of the coding site, the actual image of the coding site is collected, and the scratches, stains, and marks of the actual conveying device (conveyor belt) itself are fully considered to avoid the complex environmental background, the unclear contrast between the workpiece to be coded and the background, and the use of traditional visual processing technology to identify the workpiece. It is easy to miss the recognition and misidentify the workpiece, so as to improve the accuracy of the subsequent real-time image detection and positioning method; again, by acquiring the template image of the workpiece to be coded, the shape, size, etc. of all the workpieces to be coded are fully understood, and the corresponding Expand the template database and adaptively adjust the type of workpiece to be coded that currently needs to be coded, especially to truly reflect the texture of the workpiece to be coded, so that the template image is more realistic; finally, superimpose the template image on the background image according to different placement information, which can fully consider the infinite possibilities of the workpiece to be coded on the conveying device and place it in any position with any posture. Compared with the actual scene shooting to obtain the training sample set, this method can provide more and more realistic training samples to generate the training sample set. On the one hand, it avoids the dilemma of not being able to collect a large number of training samples in a short time and not having enough training samples to train the neural network model; on the other hand, due to having enough training samples, the accuracy of the neural network model prediction can be further improved.

[0071] Specifically, Figure 6 As shown, in step S22, the neural network model, which may be selected but not limited to a target detection network model, includes: an input module, a feature extraction module, a feature fusion module and a prediction module, so as to input the training samples into the neural network model from the input module in sequence, optimize the parameters at each level, and obtain the trained neural network model.

[0072] Specifically, step S23 may optionally, but not limited to, input the real-time image into the neural network model through the input module, and then perform multi-level feature extraction and fusion through the feature extraction module and the feature fusion module, intercept the target frame diagram in the real-time image, and locate the position of the target frame diagram in the real-time image accordingly. More specifically, it may be optional but not limited to, using the center point or a corner point coordinate of the target frame diagram as output data, and returning the target position (the position of the workpiece to be coded in the real-time image).

[0073] In this embodiment, a specific embodiment of step S2 is given, and a one-stage target detection network model is adopted, which has the advantages of fast calculation speed and high detection accuracy, and provides end-to-end target frame prediction. The target detection network based on deep learning and the detection method for the workpiece (target) to be coded can meet the high real-time requirements for the detection of the workpiece to be coded in the real-time image in the actual coding application scenario. Even in the case of low discrimination, the neural network model can accurately and completely frame the target frame diagram of the workpiece to be coded and output its target position.

[0074] More specifically, Figure 7 As shown, in step S3, the target information includes the target type; step S3 may optionally include but is not limited to:

[0075] S31: extracting edge features of the workpiece to be coded according to the target block diagram;

[0076] S32: According to the edge features of the workpiece to be coded, similarity measurement is performed on the cosine values ​​of the gradient direction of the edge points of the workpiece to be coded and the gradient direction of the edge points of the template workpiece;

[0077] S33: Match the workpiece to be coded with the template workpiece corresponding to the edge point with the largest similarity measurement, and determine the target type.

[0078] More specifically, in order to fully consider the actual situation that the workpiece to be coded (target frame diagram) in the real-time image is not placed squarely on the conveyor belt, the pixel scaling size of the image acquisition device, etc., in step S3, the target information may also include, but is not limited to, target features, such as target angle, target size, etc. Figure 8 As shown, step S3 may also optionally include but is not limited to:

[0079] S34: Acquire matching information of the template workpiece, such as the matching center, matching angle, matching size, etc. of the matched template workpiece.

[0080] S35: Determine the target features according to the matching information and the target frame diagram. Specifically, perform affine transformation on the matched template workpiece according to the matching center, matching angle, matching size, etc., and transform the matched template workpiece to the placement position of the workpiece to be coded in the real-time image (placement center, placement angle, and workpiece size scaled under camera pixels, etc.).

[0081] In this embodiment, a specific embodiment of how to identify target information (target type, target features) according to the target block diagram in S3 is given, and the identification is performed through template matching. Specifically, it is optional but not limited to using an edge matching algorithm based on geometric features, taking the gradient direction of the image feature point as the matching feature, and calculating the cosine value between the gradient direction of the template workpiece feature point and the gradient direction of the target (workpiece to be coded) edge point for similarity measurement, which has the advantages of being insensitive to illumination changes and strong anti-interference ability. Then, according to the matching information of the template workpiece, an affine transformation is performed to transform the matched template workpiece to the placement posture of the workpiece to be coded in the real real-time image, which can further accurately locate the type of the workpiece to be coded and its position on the conveyor belt.

[0082] More specifically, after detecting and identifying the workpieces to be coded on the conveyor belt, the most critical step is how to find the appropriate coding point on the workpiece to be coded. Fig. 9 As shown, step S4 may be optional but not limited to: S41: According to the target information, the maximum coding area on the workpiece to be coded is selected as the self-coding information of the workpiece to be coded; specifically, it may be optional but not limited to determine the maximum coding area on the workpiece to be coded according to the target type, target size, etc., and determine the maximum coding area as the self-optimal coding position of the workpiece to be coded. It may be optional but not limited to use the center coordinates of the maximum coding area as the self-coding center.

[0083] S42: According to the target position, the self-printing information of the workpiece to be coded is transformed to obtain the actual printing information. Specifically, it is optional but not limited to converting the self-printing information of the workpiece to be coded in the coordinate system of the workpiece to be coded into the actual printing information (optionally but not limited to including printing coordinates, printing angles, etc.) in the coordinate system of the conveyor belt (truss or printing device) according to the target position (the position of the workpiece to be coded on the conveyor belt) so that the control device controls the truss to drive the printing device to move to the optimal printing point to complete the printing process.

[0084] In this embodiment, a specific embodiment of how to locate the actual coding information in step S4 is given. Based on the principle that the coding area must be completely located on the workpiece to be coded, the area with the largest coding area on the workpiece to be coded is selected as the self-coding information of the workpiece to be coded (the best coding position), and then according to the target position (the position of the workpiece to be coded on the conveyor belt), the self-coding information of the workpiece to be coded in the coordinate system is converted into the actual coding information in the coordinate system of the conveyor belt (truss or coding device). The calculation is convenient and simple, and the actual coding point that the coding device should reach can be quickly and accurately located.

[0085] More specifically, Fig.10 As shown, step S41 may optionally include but is not limited to:

[0086] S411: Obtain a binary image of the workpiece to be coded according to the target information; specifically, it is optional but not limited to determining the target type (type of the workpiece to be coded) according to the target information, and extracting the binary image of the workpiece by calling a database;

[0087] S412: define a binary image in which the solid area is the target pixel and the hollow area is the background pixel;

[0088] S413: Calculate the distance between each target pixel and the nearest background pixel;

[0089] S414: Select the area between the target pixel and its background pixel corresponding to the maximum distance as the maximum coding area.

[0090] In this embodiment, a specific embodiment of how to select the maximum coding area on the workpiece to be coded in step S41 is given. The maximum distance between the target pixel representing the solid area of ​​the workpiece to be coded and the background pixel in the hollow area is calculated through a binary image to determine the maximum coding area. The calculation is simple and convenient.

[0091] Specifically, it is optional but not limited to assume that the workpiece template image is a binary image of size m×n, then any pixel on the image I(x,y)∈(0,1), where x(1≤x≤m) represents the image horizontal coordinate, y(1≤y≤n) represents the vertical coordinate, and I(x,y) represents the pixel value of the point. The target pixel is a non-zero point, corresponding to the set Ob={(x,y)|I(x,y)=1}, and the background pixel is a zero point, corresponding to the set Bg={(x,y)|I(x,y)=0}. Formula (1) is used to perform distance transformation on the pixel (x,y) in the binary image I:

[0092]

[0093] Calculate the distance between each target pixel in the binary image of the workpiece to be coded and its nearest background pixel (i.e., the distance between the point and the edge of the workpiece, that is, the distance between the solid point and the nearest hollow point), and then select the area where the target pixel and the background pixel with the largest distance are located as the maximum coded area (the maximum continuous area point), that is, the optimal coding area. More specifically, it is optional but not limited to obtaining a grayscale image similar to the real-time image through the above-mentioned distance transformation, but the grayscale value only appears in the foreground area, and the farther the pixel is from the background edge, the larger the grayscale value is, an example of distance transformation. Finally, select the point with the largest grayscale value from the image after distance transformation, that is, the point with the largest continuous area on the workpiece, and use it as the optimal coding point.

[0094] More specifically, Fig.11As shown, the visual-based coding positioning method of the present invention also includes: S5: verifying whether the actual coding information meets the preset requirements. If it meets the requirements, the coding process is completed according to the actual coding information; if it does not meet the requirements, the actual coding information is adjusted to complete the coding process. Specifically, due to the different types and placement postures of the workpieces to be coded, it is necessary to further verify the actual coding information (coding position (coding point and coding area), coding angle, coding size, etc.).

[0095] Specifically, Fig.12 As shown, step S5 is optional but not limited to including: S51: according to the preset coding size (pre-set coding size range), the center of the actual coding information is the center of the coding area, and the coding area is calculated to see whether it is completely located on the workpiece to be coded; S52: if it is, the coding process is completed according to the actual coding information; S53: if it is not, the coding size is adjusted according to the step length, and then the coding process is completed according to the actual coding information and the adjusted coding size. This method can adaptively adjust the size and type of the coding area according to the type of workpiece and the placement posture, so as to further avoid problems such as wrong coding, missed coding, and incomplete coding, and ensure accurate coding.

[0096] On the other hand, Fig.13 As shown, based on the above-mentioned inkjet coding positioning method, the present invention also provides a visual-based inkjet coding positioning device, comprising:

[0097] Image acquisition module 100, used to acquire real-time images of the coding site;

[0098] The target position positioning module 200 is connected to the image acquisition device and is used to intercept the target frame diagram in the real-time image using a neural network algorithm to locate the target position;

[0099] The target information determination module 300 is connected to the target position positioning device and is used to determine the target information according to the target block diagram;

[0100] The actual inkjet coding information determination module 400 is connected to the target position positioning module and the target information determination module, and is used to determine the actual inkjet coding information according to the target position and the target information.

[0101] The above-mentioned device is created based on the above-mentioned method, and its technical functions and beneficial effects are no longer repeated here. The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the various technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0102] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A vision-based coding positioning method, characterized in that: include: S1: Collect real-time images of the coding site; S2: Based on the real-time image, a neural network algorithm is used to intercept the target frame diagram in the real-time image to locate the position of the workpiece to be coded on the transmission device; S3: According to the target block diagram, determine the type of the workpiece to be coded and its own coding information; S4: According to the position of the workpiece to be coded on the transmission device, the type of the workpiece to be coded, and its own coding information, determine the actual coding information, including the coding point position, coding angle, and coding size; Step S4 comprises: S41: According to the type of the workpiece to be coded and its own coding information, the largest coding area on the workpiece to be coded is selected as the self-coding information of the workpiece to be coded; S42: According to the target position, the coding information of the workpiece to be coded is changed to obtain the actual coding information; Step S41 includes: S411: Obtaining a binary image of the workpiece to be coded according to the type of the workpiece to be coded and its own coding information; S412: define a binary image in which the solid area is the target pixel and the hollow area is the background pixel; S413: Calculate the distance between each target pixel and the nearest background pixel; S414: Select the area between the target pixel and its background pixel corresponding to the maximum distance as the maximum coding area.

2. The coding positioning method according to claim 1, characterized in that: Step S2 comprises: S21: Obtain a training sample set; S22: construct a neural network model, and input the training sample set into the neural network model to obtain a trained neural network model; S23: Input the real-time image into the trained neural network model, and capture the target frame diagram in the real-time image to locate the target position.

3. The coding positioning method according to claim 2, characterized in that: Step S21 includes: S211: Acquire the background image of the coding site; S212: Acquire a template image of the workpiece to be coded; S213: superimposing the template image onto the background image according to different placement information to obtain a training sample set.

4. The coding positioning method according to claim 2, characterized in that: In step S22, the neural network model includes: an input module, a feature extraction module, a feature fusion module and a prediction module.

5. The coding positioning method according to claim 1, characterized in that: Step S3 includes: S31: extracting edge features of the workpiece to be coded according to the target block diagram; S32: According to the edge features of the workpiece to be coded, similarity measurement is performed on the cosine values ​​of the gradient direction of the edge points of the workpiece to be coded and the gradient direction of the edge points of the template workpiece; S33: Match the workpiece to be coded with the template workpiece corresponding to the edge point with the largest similarity measurement, and determine the target type.

6. The coding positioning method according to claim 5, characterized in that: Step S3 also includes: S34: Acquire matching information of the template artifact; S35: Determine the target features according to the matching information and the target frame diagram, specifically: transform the matched template workpiece to the placement posture of the workpiece to be coded in the real-time image, including: placement center, placement angle and workpiece size scaled under camera pixels.

7. The coding positioning method according to any one of claims 1 to 6, characterized in that: Also includes: S5: Verify whether the actual coding information meets the preset requirements. If yes, complete the coding process according to the actual coding information; If it does not meet the requirements, adjust the actual coding information to complete the coding process.

8. A vision-based inkjet coding positioning device, characterized in that: The method for executing any one of claims 1 to 7 comprises: Image acquisition module, used to collect real-time images of the coding site; The target position positioning module is connected to the image acquisition device and is used to intercept the target frame diagram in the real-time image by using a neural network algorithm according to the real-time image to locate the position of the workpiece to be coded on the transmission device; The module for determining the type of the workpiece to be coded and its own coding information is connected to the target position positioning device and is used to determine the type of the workpiece to be coded and its own coding information according to the target block diagram; The actual coding information determination module is connected to the target position positioning module and the type of the workpiece to be coded and the self-coding information determination module, and is used to determine the actual coding information, including the coding point position, coding angle and coding size, according to the position of the workpiece to be coded on the transmission device, the type of the workpiece to be coded and the self-coding information.

Citation Information

Patent Citations

  • Texture-free plane structure industrial part identification and 6D pose estimation method based on template matching

    CN113034600A

  • Part dynamic following code spraying system and code spraying method thereof

    CN113657564A

  • Method for positioning object on UV printer based on machine vision and deep learning

    CN113838144A