Method and system for automatically determining parameters of assembly line products
Through edge detection and convolution kernel weight setting methods, the problem of insufficient digitalization and intelligence in assembly line product parameters is solved, and the quality inspection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510692403.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-05-27
AI Technical Summary
In the prior art, the degree of digitalization and intelligence determination of assembly line product parameters is low, resulting in insufficient quality inspection efficiency and accuracy.
By acquiring the image to be calibrated on the pipeline, using an edge detection algorithm to identify the edge profile, determine the error mapping area and edge reference mapping area, perform noise filtering and convolution kernel weight setting, and realize edge recognition and dimension calibration.
The efficiency and accuracy of assembly line product parameter determination have been improved, and a higher degree of digitalization and intelligence have been achieved.
Smart Images

Figure CN120219768A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of data processing, and in particular, to a method and system for automatically determining parameters of pipeline products. Background Art
[0002] The digital economy refers to a new economic form with digital technology as the core driving force, and its foundation is the production, distribution, and use of digital information. With the development of the digital economy and artificial intelligence technology, it is the current mainstream technology development direction to rationally utilize and develop them to improve enterprise production efficiency.
[0003] In the field of intelligent manufacturing, in order to improve product production efficiency, a production method based on an assembly line is mostly adopted. For the products produced on the assembly line, quality inspection needs to be carried out to ensure that they meet the factory requirements. In related technologies, quality inspection is mostly carried out by equipping manual quality inspectors, and its degree of digitization and intelligence is significantly insufficient, and the quality inspection efficiency is low. Summary of the Invention
[0004] Embodiments of the present application provide a method and system for automatically determining parameters of pipeline products, which solve the problem of low digitization and intelligence in determining pipeline product parameters in the prior art, and improve the efficiency and accuracy of product parameter determination.
[0005] In a first aspect, embodiments of the present application provide a method for automatically determining parameters of pipeline products, the method including: Obtain a first calibration image containing a to-be-calibrated object in the current batch collected on the assembly line, perform edge recognition on the first calibration image based on a first edge detection algorithm to obtain a first edge contour of the to-be-calibrated object, and perform size calibration on the to-be-calibrated object based on the first edge contour; Determine an error mapping region and an edge reference mapping region of the first calibration image based on the first edge contour, and the edge reference mapping region covers the first edge contour; Obtain a second calibration image in the current batch, and perform noise filtering on the second calibration image based on the error mapping region to obtain a noise-filtered image; Set the convolution kernel weight of the noise-filtered image based on the edge reference mapping region; Perform edge recognition on the noise-filtered image based on a second edge detection algorithm based on the set convolution kernel weight to obtain a second edge contour of the to-be-calibrated object in the second calibration image, and perform corresponding size calibration based on the second edge contour.
[0006] Optionally, determining the error mapping region and the edge reference mapping region of the first image to be calibrated based on the first edge contour includes: Determining the error mapping region of the first image to be calibrated based on the first edge contour and a preset calibration object standard contour template; Determining the edge reference mapping region of the first image to be calibrated based on the first edge contour and a set regional dilation coefficient.
[0007] Optionally, determining the error mapping region of the first image to be calibrated based on the first edge contour and a preset calibration object standard contour template includes: Performing a matching process on the first edge contour and the contours in the preset calibration object standard contour template; Determining the contour regions with mismatching situations as the error mapping region of the first image to be calibrated.
[0008] Optionally, before determining the edge reference mapping region of the first image to be calibrated based on the first edge contour and the set regional dilation coefficient, further includes: Determining the corresponding regional dilation coefficient according to the accuracy of the first edge contour.
[0009] Optionally, setting the convolution kernel weights of the noise-filtered image based on the edge reference mapping region includes: Determining the horizontal sub-region and the vertical sub-region of the edge reference mapping region; Respectively adjusting the horizontal convolution kernel weight and the vertical convolution kernel weight for identifying the edge contours in the horizontal sub-region and the vertical sub-region.
[0010] Optionally, determining the horizontal sub-region and the vertical sub-region of the edge reference mapping region includes: Performing region division according to the regional trend of the edge reference mapping region to obtain the horizontal sub-region and the vertical sub-region.
[0011] Optionally, respectively adjusting the horizontal convolution kernel weight and the vertical convolution kernel weight for identifying the edge contours in the horizontal sub-region and the vertical sub-region includes: Adjusting the weight value of the central row of the horizontal convolution kernel for identifying the edge contours in the horizontal sub-region from the initial value to the corresponding preset value; Adjusting the weight value of the central column of the vertical convolution kernel for identifying the edge contours in the vertical sub-region from the initial value to the corresponding preset value.
[0012] In a second aspect, an embodiment of the present application further provides a parameter automatic determination system for pipeline products, and the system includes: An acquisition module, configured to acquire a first calibration image including a to-be-calibrated object in the current batch collected on the production line; A first contour determination module, configured to perform edge recognition on the first calibration image based on a first edge detection algorithm to obtain a first edge contour of the to-be-calibrated object; A calibration module, configured to perform size calibration on the to-be-calibrated object based on the first edge contour; A region mapping module, configured to determine an error mapping region and an edge reference mapping region of the first calibration image based on the first edge contour, where the edge reference mapping region covers the first edge contour; The acquisition module is further configured to acquire a second calibration image in the current batch; A filtering module, configured to perform noise filtering on the second calibration image based on the error mapping region to obtain a noise-filtered image; A second contour determination module, configured to set convolution kernel weights of the noise-filtered image based on the edge reference mapping region, and perform edge recognition on the noise-filtered image based on the set convolution kernel weights using a second edge detection algorithm to obtain a second edge contour of the to-be-calibrated object in the second calibration image; The calibration module is further configured to perform corresponding size calibration based on the second edge contour.
[0013] In a third aspect, an embodiment of the present application further provides a parameter automatic determination device for products on a production line, and the device includes: One or more processors; A storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the parameter automatic determination method for products on a production line according to the embodiment of the present application.
[0014] In a fourth aspect, an embodiment of the present application further provides a non-volatile storage medium storing computer-executable instructions, and the computer-executable instructions are configured to execute the parameter automatic determination method for products on a production line according to the embodiment of the present application when executed by a computer processor.
[0015] In a fifth aspect, an embodiment of the present application further provides a computer program product, and the computer program product includes a computer program, the computer program is stored in a computer-readable storage medium, and at least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device executes the parameter automatic determination method for products on a production line according to the embodiment of the present application.
[0016] In the embodiments of the present application, by acquiring a first calibration image containing a to-be-calibrated object in the current batch collected on the production line, performing edge recognition on the first calibration image based on a first edge detection algorithm to obtain a first edge contour of the to-be-calibrated object, and performing size calibration of the to-be-calibrated object based on the first edge contour; determining an error mapping region and an edge reference mapping region of the first calibration image based on the first edge contour, the edge reference mapping region covering the first edge contour; acquiring a second calibration image in the current batch, and performing noise filtering on the second calibration image based on the error mapping region to obtain a noise-filtered image; setting convolution kernel weights of the noise-filtered image based on the edge reference mapping region; performing edge recognition on the noise-filtered image based on the set convolution kernel weights using a second edge detection algorithm to obtain a second edge contour of the to-be-calibrated object in the second calibration image, and performing corresponding size calibration based on the second edge contour, the problem that the determination of product parameters in the prior art is low in digitization and intelligence is solved, and the efficiency and accuracy of product parameter determination are improved. Description of the Drawings
[0017] Figure 1 It is a flowchart of a method for automatically determining parameters of products on a production line provided by an embodiment of the present application; Figure 2 It is a schematic diagram of the interface of a size calibration software provided by an embodiment of the present application; Figure 3 It is a flowchart of a method for determining an error mapping region and an edge reference mapping region provided by an embodiment of the present application; Figure 4 It is a schematic diagram showing the edge of the to-be-calibrated object, the error mapping region, and the edge reference mapping region provided by an embodiment of the present application; Figure 5 It is a flowchart of a method for setting convolution kernel weights of a noise-filtered image provided by an embodiment of the present application; Figure 6 It is a block diagram of the structure of a system for automatically determining parameters of products on a production line provided by an embodiment of the present application; Figure 7 It is a schematic diagram of the structure of a device for automatically determining parameters of products on a production line provided by an embodiment of the present application. Detailed Embodiments
[0018] The following further elaborates on the embodiments of the present application in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the embodiments of the present application, rather than limiting the embodiments of the present application. Additionally, it should be noted that for the sake of description, only parts related to the embodiments of the present application are shown in the drawings, rather than all the structures.
[0019] The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are usually of the same category, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the description and claims means at least one of the connected objects, and the character " / ", generally represents an "or" relationship between the associated objects before and after.
[0020] The method for automatically determining parameters for pipeline products provided by the embodiments of this application can be used to determine the parameters of products in an intelligent manufacturing production pipeline. For the method for automatically determining parameters for pipeline products provided by the embodiments of this application, the execution subject of each step can be a computer device, which refers to any electronic device with data calculation, processing, and storage capabilities, such as terminal devices such as mobile phones, PCs (Personal Computers), and tablet computers. The embodiments of this application do not make limitations in this regard.
[0021] Figure 1 It is a flowchart of a method for automatically determining parameters for pipeline products provided by the embodiments of this application. As Figure 1 shown, it includes the following steps: Step S101, obtain a first calibration image containing a to-be-calibrated object in the current batch collected on the production line, perform edge recognition on the first calibration image based on a first edge detection algorithm to obtain a first edge contour of the to-be-calibrated object, and perform size calibration on the to-be-calibrated object based on the first edge contour.
[0022] Among them, the production line can be a production line for product production and transportation in intelligent manufacturing. Products that require automatic parameter determination will be placed on this production line. Among them, the to-be-calibrated object can be understood as the product that requires parameter calibration. Optionally, the automatically determined parameter can be the size of the to-be-calibrated object. Correspondingly, the corresponding quality inspection can be performed according to the determined size later to determine whether there are defects or whether it meets the factory requirements, etc.
[0023] In one embodiment, when calibrating the size of the products on the assembly line, i.e., the objects to be calibrated, it is realized based on image processing. The camera installed on the assembly line takes images of each passing object to be calibrated. For example, the photographing time interval of the camera is calculated according to the moving speed of the assembly line, and the camera is controlled to take pictures at every such time interval to capture images containing the objects to be calibrated, and then the images are transmitted and stored for subsequent batch processing. Each image contains one object to be calibrated, and the specific object referred to by the calibrated object is not limited, such as an outer packaging box, a metal or plastic bottle body, or specific components, etc. As the assembly line moves, the camera takes pictures at a fixed position. Each time a picture is taken, the picture flows into one object to be calibrated. Optionally, by matching the shooting interval and the moving speed of the assembly line, each time a picture is taken, the object to be calibrated is controlled to be located at the center of the current acquired image frame for subsequent batch processing. The image taken is the front view of the object to be calibrated. Of course, for three-dimensional calibrated objects, the top view can also be taken by another camera for calibrating the size of the corresponding volume surface.
[0024] Optionally, the acquired images can be divided into batches based on a specific quantity. For example, the images collected and stored reach a preset quantity (such as 10, 20, or 50, etc.) as one batch for batch processing. The current batch being processed is the current batch recorded in step S101.
[0025] The first object-to-be-calibrated image can be the first image in the current batch. The images for each batch can be the images stored in sequence based on the shooting order. Each image in each batch contains one object to be calibrated.
[0026] In one embodiment, for the first image to be calibrated, edge recognition based on the first edge detection algorithm is performed to obtain the first edge contour of the object to be calibrated, and the size calibration of the object to be calibrated is performed based on the first edge contour. Among them, the first edge detection algorithm, by way of example, can be the Canny edge detection algorithm, which has a relatively high algorithm complexity, high edge detection accuracy, but a relatively large amount of computation. By using the first edge detection algorithm to identify the edge contour of the first object to be calibrated, after obtaining the edge contour, the size calibration of the calibrated object is performed accordingly based on the edge contour. Optionally, when performing size calibration, it can be implemented using an integrated automatic size calibration software. Taking an object to be calibrated as a cuboid as an example, for the collected front view, its width and height need to be calibrated. After obtaining the edge contour in the front view of the cuboid, the image distance between the upper and lower two sides, and the image distance between the left and right two sides can be determined. The image distance can be, for example, the specific number of pixel points, or the size distance in the actual image; then based on the pre-calibrated scale, the actual length and width dimensions of the calibrated object can be obtained. For example, if it is pre-calibrated that the actual distance size corresponding to each pixel point is L, and the number of image pixels between the two sides at this time is m, then the actual size of this side is L*m. By way of example, as Figure 2 shown, Figure 2 is a schematic diagram of the interface of a size calibration software provided by an embodiment of the present application. It records the pre-calibrated and set scale, as well as other software functions, which will not be elaborated here.
[0027] Step S102: Determine the error mapping region and the edge reference mapping region of the first image to be calibrated based on the first edge contour, and the edge reference mapping region covers the first edge contour.
[0028] In one embodiment, after determining the first edge contour of the calibrated object in the first image to be calibrated, the error mapping region and the edge reference mapping region are determined accordingly for the subsequent recognition of the edge contours of the calibrated objects in other images of the same batch.
[0029] Among them, the error mapping region refers to the region where errors exist during edge recognition. The generation of this error can be caused by the image background, the shooting camera, and the errors generated during the specific recognition process. For example, if a non-edge contour part is recognized as an edge, the misrecognized part is the error part, and the corresponding region where it is located is the error mapping region. The edge reference mapping region is a region determined based on the current first edge contour and can be used as a reference for edge recognition of other images in the same batch. Due to the fixed shooting position of the camera and the fixed moving speed of the assembly line, the frame range of each captured image is fixed. Only the objects to be calibrated in different images are different, and there is a certain spatial correlation between the images in the same batch. That is, there is a certain image correlation at the same image position between different images.
[0030] Optionally, Figure 3 is a flowchart of a method for determining an error mapping region and an edge reference mapping region provided by an embodiment of the present application. As Figure 3 shown, a way to determine the error mapping region and the edge reference mapping region of the first image to be calibrated based on the first edge contour can be: Step S1011: Determine the error mapping region of the first image to be calibrated based on the first edge contour and a preset standard contour template of the calibration object.
[0031] Among them, when determining the error mapping region, a preset standard contour template of the calibration object can be obtained. The standard contour template of the calibration object records the basic contour shape of the calibration object. For example, for a calibration object in the shape of a cuboid, the contour recorded in its standard contour template of the calibration object is also a cuboid. At this time, when determining the error mapping region of the first image to be calibrated based on the first edge contour and the preset standard contour template of the calibration object, it can be to match the first edge contour with the contour recorded in the standard contour template of the calibration object, and determine the recognized edge part outside the matching region as the unmatched contour region, that is, the error edge. The unmatched contour region where the error edge is located is determined as the error mapping region. Optionally, the region surrounded by extending a preset number of pixel counts at the position of the error edge can be determined as the error mapping region. The specific size value of the preset number can be adjusted according to the actual situation. For example, it is initially set to 3.
[0032] Step S1012: Determine the edge reference mapping region of the first image to be calibrated based on the first edge contour and the set region dilation coefficient.
[0033] In one embodiment, after obtaining the first edge contour, the edge reference mapping area of the first image to be calibrated can be determined by using the set regional expansion coefficient. The regional expansion coefficient characterizes the expansion range of the pixel points of the edge contour. For example, when the value of the regional expansion coefficient is 5, it means that for the pixel points on the first edge contour, the area surrounded by each pixel point extending 5 pixels outward along the surrounding area is the edge reference mapping area. That is, the area surrounded by extending the pixel points where the first edge contour is located by the number of pixels of the regional expansion coefficient for each pixel point is determined as the edge reference mapping area.
[0034] Optionally, before determining the edge reference mapping area of the first image to be calibrated based on the first edge contour and the set regional expansion coefficient, it further includes: determining the corresponding regional expansion coefficient according to the accuracy of the first edge contour. Exemplarily, the accuracy of the first edge contour can be determined to be three accuracy levels: high, medium, and low according to the actual edge recognition situation. Specifically, different edge recognition algorithms used can be pre-set to correspond to the accuracy of the recognized edge contours. For the three accuracy levels of high, medium, and low, the corresponding regional expansion coefficients are different. For example, the regional expansion coefficient corresponding to the high-precision edge contour is large, the regional expansion coefficient corresponding to the medium-precision edge contour is the second, and the regional expansion coefficient corresponding to the low-precision edge contour is the smallest.
[0035] Figure 4 Schematic diagram of an object to be calibrated edge, error mapping area, and edge reference mapping area provided by an embodiment of the present application, as Figure 4 shown, in the first image 001 to be calibrated, the first edge contour 002 and the error contour 003 of the object to be calibrated are recognized. The corresponding dotted areas 004 and 005 are the determined error mapping area and edge reference mapping area respectively.
[0036] Step S103: Obtain the second image to be calibrated in the current batch, and perform noise filtering on the second image to be calibrated based on the error mapping area to obtain a noise-filtered image.
[0037] In one embodiment, after determining the size of the object to be calibrated, the error mapping region, and the edge reference mapping region for the first image to be calibrated in the current batch, when performing the automatic parameter determination process for the second image to be calibrated in this batch, first, noise filtering of the second image to be calibrated is performed based on the error mapping region to obtain a noise-filtered image. Here, the second image to be calibrated is an image other than the first image to be calibrated in the current batch. For a batch containing 20 images, 19 images other than the first image to be calibrated can all be defined as the second image to be calibrated. When performing noise filtering of the second image to be calibrated based on the error mapping region to obtain a noise-filtered image, first, the error mapping region is mapped from the position where the first image to be calibrated is located to the same position in the second image to be calibrated. At this time, the process of performing noise filtering on it can be to perform smoothing processing on this position region to prevent it from being repeatedly recognized as an incorrect edge.
[0038] Step S104: Set the convolution kernel weights of the noise-filtered image based on the edge reference mapping region.
[0039] In one embodiment, after performing noise filtering on the second image to be calibrated to obtain a noise-filtered image, the convolution kernel weights of the noise-filtered image are set based on the determined edge reference mapping region. Here, the convolution kernel weights are the specific weight values used in the convolution kernel corresponding to the operator used in the edge recognition algorithm.
[0040] Taking the Sobel operator used in the edge detection algorithm as an example, it is based on the gradient calculation of the first derivative and detects edges by measuring the gray-scale changes of the image in the horizontal and vertical directions. Edges usually appear at positions with a large gradient magnitude. It includes convolution kernels in two directions, represented in the form of an n*n matrix. For example, the convolution kernels of the conventional Sobel operator in the horizontal and vertical directions are respectively represented as: And .
[0041] By convolving the converted grayscale image with this convolution kernel, the horizontal direction gradient and the vertical direction gradient are obtained, and then the gradients in the two directions are combined to obtain the gradient magnitude of each pixel point. Then, pixel points with a gradient magnitude lower than the set threshold are determined as non-edge pixel points, and pixel points higher than this threshold are retained, that is, the edge contour part is retained.
[0042] Optionally, as Figure 5 shown, Figure 5 is a flowchart of a method for setting the convolution kernel weights of a noise-filtered image provided by an embodiment of the present application, including: Step S1041: Determine the horizontal sub-region and the vertical sub-region of the edge reference mapping region.
[0043] Among them, for the edge reference mapping area, a relatively rough division into horizontal sub-areas and vertical sub-areas will be performed to adjust the convolution kernel weights used for edge recognition in the area accordingly. Optionally, a division method may be: perform regional division according to the regional trend of the edge reference mapping area to obtain horizontal sub-areas and vertical sub-areas. Among them, the regional trend, for example, includes horizontal regional trends and vertical regional trends. Taking the outline of a rectangle as an example, the outline trend of its upper and lower sides is the direction of the horizontal coordinate axis, which is determined as a horizontal trend. Similarly, the outline trend of the left and right sides is the direction of the vertical coordinate axis, which is determined as a vertical trend. The corresponding regional ranges are respectively delineated as horizontal sub-areas and vertical sub-areas. Of course, in the case where there is no obvious trend or it cannot be easily judged, it can be determined as a fuzzy area, and the initial convolution kernel weights are used for edge recognition.
[0044] Step S1042: respectively adjust the horizontal convolution kernel weight and the vertical convolution kernel weight for identifying edge contours in the horizontal sub-region and the vertical sub-region.
[0045] In one embodiment, after determining the horizontal sub-region and the vertical sub-region, the horizontal convolution kernel weight and the vertical convolution kernel weight for identifying the edge contour of the horizontal sub-region and the vertical sub-region are adjusted respectively. Optionally, the initially set convolution kernel weights can be used for other regions in the image, such as the aforementioned: as well as .
[0046] The convolution kernel weight adjustment method for the horizontal sub-region and the vertical sub-region may optionally be: the weight value of the center row of the horizontal convolution kernel that identifies the edge contour in the horizontal sub-region is adjusted from the initial value to the corresponding preset value; the weight value of the center column of the vertical convolution kernel that identifies the edge contour in the vertical sub-region is adjusted from the initial value to the corresponding preset value, wherein the absolute value of the preset value is greater than the absolute value of the initial value, except for the value of 0, that is, the preset value corresponding to the value of 0 is 0, that is, it remains unchanged. The specific numerical value of the preset value corresponding to the initial value can be adjusted and set. Taking the 3*3 convolution kernel as an example, the preset values corresponding to the specific numerical values in the center row and center column can be -2 corresponding to -3; 0 corresponding to 0; +2 corresponding to +3. That is, the adjusted horizontal convolution kernel and vertical convolution kernel are exemplified as follows: as well as .
[0047] In the above, by increasing the numerical weight values of the convolution kernels in the center row and center column (the positive and negative values remain unchanged, and the 0 value remains unchanged), more accurate and efficient corresponding edge recognition can be achieved.
[0048] Of course, in another embodiment, the convolution kernel weight adjustment method may also directly set the convolution kernel weights for different regions, namely horizontal sub-regions and vertical sub-regions, without using the method of adjusting the original convolution kernel weights. For example, it can be directly set as: and .
[0049] Step S105: Based on the set convolution kernel weights, perform edge recognition on the noise-filtered image based on the second edge detection algorithm to obtain the second edge contour of the object to be calibrated in the second image to be calibrated, and perform corresponding dimension calibration based on the second edge contour.
[0050] As can be seen from the above, by obtaining the first image to be calibrated in the current batch collected on the production line, which contains the object to be calibrated, performing edge recognition on the first image to be calibrated based on the first edge detection algorithm to obtain the first edge contour of the object to be calibrated, and performing dimension calibration of the object to be calibrated based on the first edge contour; determining the error mapping region and the edge reference mapping region of the first image to be calibrated based on the first edge contour, where the edge reference mapping region covers the first edge contour; obtaining the second image to be calibrated in the current batch, performing noise filtering on the second image to be calibrated based on the error mapping region to obtain a noise-filtered image; setting the convolution kernel weights of the noise-filtered image based on the edge reference mapping region; performing edge recognition on the noise-filtered image based on the set convolution kernel weights using the second edge detection algorithm to obtain the second edge contour of the object to be calibrated in the second image to be calibrated, and performing corresponding dimension calibration based on the second edge contour, the problem in the prior art that the determination of product parameters on the production line is of low digitization and intelligence is solved, and the efficiency and accuracy of product parameter determination are improved.
[0051] Figure 6 FIG. is a structural block diagram of a system for automatically determining parameters of products on a production line provided by an embodiment of the present application. The system is configured to execute the method for automatically determining parameters of products on a production line provided by the above embodiment, and has corresponding functional modules and beneficial effects for executing the method. As Figure 6 shown, the system includes: An acquisition module 101, configured to acquire a first image to be calibrated in the current batch collected on the production line, which contains the object to be calibrated; A first contour determination module 102, configured to perform edge recognition on the first image to be calibrated based on the first edge detection algorithm to obtain the first edge contour of the object to be calibrated; A calibration module 103, configured to perform dimension calibration of the object to be calibrated based on the first edge contour; The region mapping module 104 is configured to determine an error mapping region and an edge reference mapping region of the first image to be calibrated based on the first edge contour, and the edge reference mapping region covers the first edge contour; The obtaining module 101 is further configured to obtain a second image to be calibrated in the current batch; The filtering module 105 is configured to filter the noise of the second image to be calibrated based on the error mapping region to obtain a noise-filtered image; The second contour determination module 106 is configured to set the convolution kernel weights of the noise-filtered image based on the edge reference mapping region, and perform edge recognition on the noise-filtered image based on the second edge detection algorithm using the set convolution kernel weights to obtain a second edge contour of the object to be calibrated in the second image to be calibrated; The calibration module 103 is further configured to perform corresponding dimension calibration based on the second edge contour.
[0052] As described above, by obtaining the first image to be calibrated containing the object to be calibrated in the current batch collected on the production line, performing edge recognition on the first image to be calibrated based on the first edge detection algorithm to obtain the first edge contour of the object to be calibrated, and performing dimension calibration of the object to be calibrated based on the first edge contour; determining the error mapping region and the edge reference mapping region of the first image to be calibrated based on the first edge contour, where the edge reference mapping region covers the first edge contour; obtaining the second image to be calibrated in the current batch, filtering the noise of the second image to be calibrated based on the error mapping region to obtain a noise-filtered image; setting the convolution kernel weights of the noise-filtered image based on the edge reference mapping region; performing edge recognition on the noise-filtered image based on the second edge detection algorithm using the set convolution kernel weights to obtain the second edge contour of the object to be calibrated in the second image to be calibrated, and performing corresponding dimension calibration based on the second edge contour, the problem that the determination of product parameters in the prior art is low in digitization and intelligence is solved, and the efficiency and accuracy of product parameter determination are improved.
[0053] In a possible embodiment, the calibration module is configured to: Determine the error mapping region of the first image to be calibrated based on the first edge contour and a pre-set standard contour template of the calibration object; Determine the edge reference mapping region of the first image to be calibrated based on the first edge contour and a set region dilation coefficient.
[0054] In a possible embodiment, the calibration module is configured to: Perform matching processing on the first edge contour and the contour in the pre-set standard contour template of the calibration object; Determine the contour area with mismatching as the error mapping area of the first image to be calibrated.
[0055] In a possible embodiment, the calibration module is further configured to: Before determining the edge reference mapping area of the first image to be calibrated based on the first edge contour and the set area dilation coefficient, determine the corresponding area dilation coefficient according to the accuracy of the first edge contour.
[0056] In a possible embodiment, the second contour determination module is configured to: Determine the horizontal sub-region and the vertical sub-region of the edge reference mapping area; Adjust the horizontal convolution kernel weight and the vertical convolution kernel weight for identifying the edge contours in the horizontal sub-region and the vertical sub-region respectively.
[0057] In a possible embodiment, the second contour determination module is configured to: Perform region division according to the region trend of the edge reference mapping area to obtain a horizontal sub-region and a vertical sub-region.
[0058] In a possible embodiment, the second contour determination module is configured to: Adjust the weight value of the central row of the horizontal convolution kernel for identifying the edge contour in the horizontal sub-region from the initial value to the corresponding preset value; Adjust the weight value of the central column of the vertical convolution kernel for identifying the edge contour in the vertical sub-region from the initial value to the corresponding preset value.
[0059] Figure 7 The following is a schematic structural diagram of a parameter automatic determination device for pipeline products provided by an embodiment of the present application. As Figure 7 shown, the device includes a processor 201, a memory 202, an input device 203, and an output device 204; the number of processors 201 in the device can be one or more. Figure 7 Taking one processor 201 as an example; the processor 201, the memory 202, the input device 203, and the output device 204 in the device can be connected through a bus or other means. Figure 7Take the bus connection as an example. The memory 202, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the parameter automatic determination method for pipeline products in the embodiments of the present application. The processor 201 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 202, that is, implements the above-mentioned parameter automatic determination method for pipeline products. The input device 203 can be configured to receive input digital or character information and generate key signal inputs related to the user settings and function controls of the device. The output device 204 can include display devices such as a display screen.
[0060] The embodiments of the present application also provide a non-volatile storage medium containing computer-executable instructions, and the computer-executable instructions are configured to execute a parameter automatic determination method for pipeline products described in one of the above embodiments when executed by a computer processor, where, including: Obtain a first calibration image containing a calibration object in the current batch collected on the production line, perform edge recognition on the first calibration image based on a first edge detection algorithm to obtain the first edge contour of the calibration object, and perform size calibration on the calibration object based on the first edge contour; Determine the error mapping area and the edge reference mapping area of the first calibration image based on the first edge contour, and the edge reference mapping area covers the first edge contour; Obtain a second calibration image in the current batch, and perform noise filtering on the second calibration image based on the error mapping area to obtain a noise-filtered image; Set the convolution kernel weights of the noise-filtered image based on the edge reference mapping area; Perform edge recognition on the noise-filtered image based on a second edge detection algorithm based on the set convolution kernel weights to obtain the second edge contour of the calibration object in the second calibration image, and perform corresponding size calibration based on the second edge contour.
[0061] It should be noted that in the embodiments of the above-mentioned parameter automatic determination system for pipeline products, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of mutual distinction and are not configured to limit the protection scope of the embodiments of the present application.
[0062] In some possible embodiments, various aspects of the method provided in this application can also be implemented in the form of a program product, which includes program code. When the program product runs on a computer device, the program code is configured to cause the computer device to execute the steps in the methods according to various exemplary embodiments of this application described above in this specification. For example, the computer device can execute the method for automatically determining parameters for pipeline products recorded in the embodiments of this application. The program product can be implemented using any combination of one or more readable media.
Claims
1. An automatic parameter determination method for pipeline products, characterized in that, Including: Obtain a first calibration image containing a calibration object in the current batch collected on the assembly line, perform edge recognition on the first calibration image based on a first edge detection algorithm to obtain a first edge contour of the calibration object, and perform size calibration of the calibration object based on the first edge contour; Determine an error mapping region and an edge reference mapping region of the first calibration image based on the first edge contour, where the edge reference mapping region covers the first edge contour; Obtain a second calibration image in the current batch, and perform noise filtering on the second calibration image based on the error mapping region to obtain a noise-filtered image; Set the convolution kernel weights of the noise-filtered image based on the edge reference mapping region; Perform edge recognition on the noise-filtered image based on a second edge detection algorithm based on the set convolution kernel weights to obtain a second edge contour of the calibration object in the second calibration image, and perform corresponding size calibration based on the second edge contour.
2. The method for automatically determining parameters for pipeline products according to claim 1, wherein The determining the error mapping region and the edge reference mapping region of the first calibration image based on the first edge contour includes: Determine the error mapping region of the first calibration image based on the first edge contour and a preset calibration object standard contour template; Determine the edge reference mapping region of the first calibration image based on the first edge contour and a set region dilation coefficient.
3. The method for automatically determining parameters for pipeline products according to claim 2, characterized in that The determining the error mapping region of the first calibration image based on the first edge contour and a preset calibration object standard contour template includes: Perform matching processing on the first edge contour and the contours in the preset calibration object standard contour template; Determine the contour region with a mismatch as the error mapping region of the first calibration image.
4. The method for automatically determining parameters for pipeline products according to claim 2, wherein Before the determining the edge reference mapping region of the first calibration image based on the first edge contour and a set region dilation coefficient, it further includes: Determine a corresponding region dilation coefficient according to the accuracy of the first edge contour.
5. The method for automatically determining parameters for pipeline products according to any one of claims 1-4, characterized in that The setting the convolution kernel weights of the noise-filtered image based on the edge reference mapping region includes: Determine a horizontal sub-region and a vertical sub-region of the edge reference mapping region; Respectively adjust the horizontal convolution kernel weight and the vertical convolution kernel weight for recognizing the edge contours in the horizontal sub-region and the vertical sub-region.
6. The method for automatically determining parameters for pipeline products according to claim 5, characterized in that, The determining the horizontal sub-region and the vertical sub-region of the edge reference mapping region includes: Perform region division according to the region trend of the edge reference mapping region to obtain a horizontal sub-region and a vertical sub-region.
7. The method for automatically determining parameters for pipeline products according to claim 5, characterized in that, The respectively adjusting the horizontal convolution kernel weight and the vertical convolution kernel weight for recognizing the edge contours in the horizontal sub-region and the vertical sub-region includes: Adjust the weight value of the central row of the horizontal convolution kernel for recognizing the edge contour in the horizontal sub-region from an initial value to a corresponding preset value; Adjust the weight value of the central column of the vertical convolution kernel for recognizing the edge contour in the vertical sub-region from an initial value to a corresponding preset value, where the absolute value of the preset value is greater than the absolute value of the initial value.
8. An automated parameter determination system for pipeline products, characterized in that, Including: An acquisition module, configured to acquire a first calibration image including a to-be-calibrated object in the current batch collected on the production line; A first contour determination module, configured to perform edge recognition on the first calibration image based on a first edge detection algorithm to obtain a first edge contour of the to-be-calibrated object; A calibration module, configured to perform dimension calibration on the to-be-calibrated object based on the first edge contour; A region mapping module, configured to determine an error mapping region and an edge reference mapping region of the first calibration image based on the first edge contour, and the edge reference mapping region covers the first edge contour; The acquisition module is further configured to acquire a second calibration image in the current batch; A filtering module, configured to perform noise filtering on the second calibration image based on the error mapping region to obtain a noise-filtered image; A second contour determination module, configured to set convolution kernel weights of the noise-filtered image based on the edge reference mapping region, and perform edge recognition on the noise-filtered image based on the set convolution kernel weights using a second edge detection algorithm to obtain a second edge contour of the to-be-calibrated object in the second calibration image; The calibration module is further configured to perform corresponding dimension calibration based on the second edge contour.
9. An automated parameter determination device for pipeline products, characterized in that, The device includes: one or more processors; a storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the parameter automatic determination method for in-line products according to any one of claims 1-7.
10. A storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to execute the parameter automatic determination method for in-line products according to any one of claims 1-7.
Citation Information
Patent Citations
Automatic assembly line control system and control method based on computer vision
CN117234165A
Weighted median filtering method and device for noise removal
WO2016190698A1
Methods and systems for generating models for image analysis pipeline prediction
WO2023001940A1