Machine vision positioning method for palletizing semi-finished induction cookers
By adjusting and storing the camera and light source parameters, combining the positioning shooting mode and the mobile shooting mode, the accurate visual positioning and palletization of the semi-finished induction cooker is achieved, solving the problem of non-overlapping marking points and product centers and inaccurate positioning of large products, and improving the accuracy and stability of palletization.
Patent Information
- Application Number
- CN202411623567.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-11-14
AI Technical Summary
In the palletization process of semi-finished induction cooker stoves, the marking point does not overlap with the product center, resulting in inaccurate deviation values, and it is difficult for large products to achieve accurate visual positioning.
By adjusting the camera parameters and light source parameters, recording and storing the parameters of the induction cooker of different specifications, and drawing corresponding parameters according to the induction cooker specification type for shooting and positioning. The visual positioning method combining positioning shooting mode and mobile shooting mode is adopted to obtain the coordinates of the induction cooker center point and correct the position and angle.
Accurate visual positioning of induction cookers of different specifications is achieved, the risk of palletizing errors caused by image quality problems is reduced, and the accuracy and stability of palletizing are improved.
Smart Images

Figure CN119152036B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of machine vision and automatic control, and in particular relates to a machine vision positioning method for palletizing semi-finished induction cookers. Background Art
[0002] During the stacking process of products, visual assistance is often needed to determine the placement position, especially when displacement is likely to occur during the placement process, or when there is a high requirement for placement consistency. By accurately determining the deviation value through vision and then correcting it, better placement results can be achieved.
[0003] Generally speaking, there are two main ways of visual positioning: first, locate the product's mark point through template matching to determine its deviation value; second, locate the product's center point by locating the product's edge, and then compare it with the taught position to determine the deviation value;
[0004] However, for the first type, when the marking point does not overlap with the center of the product, if there is no angle deviation, then the deviation values in the X and Y directions are accurate, but if there is an angle deviation, it will cause new deviations in the X and Y directions of the marking point, so the final calculated deviation value will be inaccurate; for the second type, to determine the edge position of the product, the field of view must be larger than the product. When the product is relatively large, the vision is not satisfied, or if the field of view is satisfied, the accuracy is insufficient. For this reason, we propose a machine vision positioning method for palletizing semi-finished induction cookers. Summary of the invention
[0005] The object of the present invention is to provide a method for machine vision positioning of semi-finished induction cooker palletizing, so as to solve the problem of inaccurate deviation value caused by non-overlap between marking points and product centers or inability to visually position larger products proposed in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solution: a method for machine vision positioning of semi-finished induction cooker palletizing, comprising the following steps:
[0007] S1: Adjust the camera parameters and light source parameters. After the adjustment is completed, record the camera and light source parameters and the corresponding induction cooker specifications and types, and store them in the parameter storage library;
[0008] S2: When palletizing the induction cooker, the parameters of the camera and light source for shooting this type of induction cooker are retrieved from the parameter storage library according to the specifications of the induction cooker, and the camera and light source are adjusted accordingly according to the parameters. After the adjustment is completed, the image of the induction cooker taken is sampled and tested. If it meets the standards, the induction cooker is visually positioned for palletizing;
[0009] S3: When visual positioning is performed on the induction cooker for palletizing, the camera shooting model to be used is first determined according to the specifications of the induction cooker, and the shooting visual positioning work is performed according to the determined camera shooting model; the camera shooting model includes: positioning shooting mode and moving shooting mode;
[0010] S4: Visually locate the induction cooker according to the determined shooting mode to obtain the coordinates of the center point of the induction cooker, compare the coordinates of the center point of the induction cooker with the coordinates of the preset mark point, obtain the deviation values on the X-axis and Y-axis, and perform position correction, then obtain the stacking angle correction value of the induction cooker, and correct the stacking angle of the induction cooker.
[0011] Preferably, the specific process of recording the parameters of the camera and the light source and the corresponding specifications and types of the induction cooker and storing them in the parameter storage library is:
[0012] Step 101: The camera is installed on the motion module, and then the staff adjusts the parameters of the camera and the light source parameters in the working environment. After the adjustment is completed, the induction cooker product is photographed for a preset number of times to obtain a detection image of the induction cooker product; for each detection image, the evaluation parameter value of the detection image is obtained, and the evaluation parameter value includes: clarity value, contrast value and color reproduction value; for the detection images of induction cooker products of different specifications and types, the evaluation parameter standard value is preset; by subtracting the evaluation parameter value of the detection image from the corresponding preset evaluation parameter standard value, the average clarity deviation value QZ, the average contrast deviation value DZ and the average color reproduction deviation value SZ between the evaluation parameter value of the detection image and the corresponding preset evaluation parameter standard value are obtained;
[0013] Step 102: Substitute the average definition deviation value QZ, the average contrast deviation value DZ, and the average color reproduction deviation value SZ into a preset formula: DPZ=QZ×a1+DZ×a2+SZ×a3, to obtain a detection evaluation value DPZ of the detection image, wherein a1, a2, and a3 are preset weight coefficients;
[0014] Step 103: For induction cooker products of different specifications and types, a detection and evaluation threshold is preset, and the detection and evaluation value DPZ of the detection image is compared with the preset detection and evaluation threshold;
[0015] Step 104: If the detection evaluation value DPZ of the detection image is greater than or equal to the preset detection evaluation threshold, a camera parameter and light source parameter adjustment instruction is generated and sent to the personnel terminal;
[0016] Step 105: If the detection evaluation value DPZ of the detection image is less than the preset detection evaluation threshold, the parameters of the camera and the light source at this time and the corresponding induction cooker specification type are recorded and stored in the parameter storage library to establish a mapping relationship between the induction cooker specification type and the parameters of the camera and the light source at this time.
[0017] Preferably, the working process of the personnel terminal after receiving the camera parameter and light source parameter adjustment instruction is:
[0018] For induction cooker products of different specifications and types, the personnel terminal module uses the correspondence between historical image problems of different induction cooker products with marked clarity, contrast and color reproduction and the corresponding parameter adjustment data, and uses the random forest algorithm to establish a parameter adjustment diagnosis model. When the personnel terminal module receives a camera parameter and a light source parameter adjustment instruction, it obtains the induction cooker specification type corresponding to the instruction, the clarity value, the contrast value and the color reproduction value of the adjusted image, and substitutes them into the parameter adjustment diagnosis model, outputs the adjustment data of the camera parameters and the light source parameters, and adjusts the camera parameters and the light source parameters according to the adjustment data; after the adjustment is completed, execute steps 101 to 104 again; if after the adjustment is completed, the DPZ of the captured image is still greater than or equal to the preset detection evaluation threshold, the data in the parameter adjustment diagnosis model is updated until the DPZ of the captured image is less than the preset detection evaluation threshold. When the DPZ of the captured image is less than the preset detection evaluation threshold, execute step 105.
[0019] Preferably, the specific process of performing sampling detection on the captured induction cooker image is as follows:
[0020] After the adjustment is completed, a random sampling inspection is performed on the captured induction cooker image, that is, whether the inspection evaluation value of the captured induction cooker image is less than the preset inspection evaluation threshold, and the sampling image corresponding to the inspection evaluation value less than or equal to the preset inspection evaluation threshold is marked as a qualified image, otherwise, the sampling image corresponding to the inspection evaluation value greater than the preset adjustment evaluation threshold is marked as an unqualified image, and the unqualified rate of unqualified images in the sampled inspection images is calculated, and the unqualified rate threshold is preset. If the unqualified rate of the sampled inspection images is greater than or equal to the unqualified rate threshold, the staff will correct and adjust the parameters of the camera and the light source. Otherwise, if the unqualified rate is less than the unqualified rate threshold, the induction cookers will start to be stacked, and the stacked induction cookers will be visually positioned.
[0021] Preferably, the process of determining the positioning method to be adopted according to the specifications of the induction cooker is:
[0022] The length of the diagonal edge of the induction cooker detected in the image taken by the camera is obtained, and the length of the diagonal edge of the induction cooker detected in the induction cooker image is compared with the actual length of the induction cooker, and an error threshold interval is preset. If the comparison result is within the preset error threshold interval, the camera positioning shooting mode is executed; otherwise, if it is not within the error threshold interval, the camera moving shooting mode is executed.
[0023] Preferably, the process of visually positioning the induction cooker according to the determined shooting mode to obtain the coordinates of the center point of the induction cooker is:
[0024] A rectangular coordinate system is established with the initial position of the motion module as the origin of the coordinates, and the diagonal points A and B as well as the diagonal points C and D of the induction cooker are identified using the image edge algorithm;
[0025] If the execution unit adopts the mobile shooting mode, the motion module drives the camera to move to the diagonal point A and point B of the induction cooker respectively. After taking a photo at the diagonal point A, the position of the motion module is recorded (Xa, Ya), and the position of the camera relative to the motion module is recorded as (X1, Y1); the coordinates of the diagonal point A of the induction cooker product in the camera's built-in coordinate system are obtained, recorded as (X2, Y2), and this coordinate is converted into a coordinate in a rectangular coordinate system established with the initial position of the motion module as the coordinate origin, and the position of the diagonal point A of the induction cooker is obtained (Xa+X1+X2, Ya+Y1+Y2). After taking a photo at the diagonal point B, the position of the motion module is recorded (Xb, Yb), and the position of the camera relative to the motion module is (X3, Y3). The coordinates of the diagonal point B of the induction cooker product in the camera's built-in coordinate system are obtained, recorded as =(X4, Y4), and convert this coordinate into the coordinate in the rectangular coordinate system established with the initial position of the motion module as the coordinate origin, and obtain the position of the diagonal B of the product (Xb+X3+X4, Yb+Y3+Y4), then the position of the center point of the product is {(Xb+X3+X4-Xa-X1-X2) / 2, (Yb+Y3+Y4-Ya-Y1-Y2) / 2}, since the position of the camera relative to the motion module is constant, that is, (X1, Y1) and (X3, Y3) are equal, then the center point of the product is finally {(Xb+X4-Xa-X2) / 2, (Yb+Y4-Ya-Y2) / 2}; due to the coordinates of the movement of the motion module, the coordinates of point A and point B in the camera can be directly obtained, so the coordinates of the center point of the induction cooker product can be calculated;
[0026] If the execution unit adopts the positioning shooting mode, the motion module will not need to move, that is, (Xa, Ya) and (Xb, Yb) are the same, so the center point of the product will be {(X4-X2) / 2, (Y4-Y2) / 2}.
[0027] Preferably, the process of position correction of the palletized induction cooker is as follows:
[0028] The coordinates of the marking points for placing the induction cooker products are preset, and the deviation values on the X-axis and Y-axis between the coordinates of the center point of the induction cooker and the coordinates of the marking points are detected, and are marked as △X and △Y respectively. The deviation error threshold intervals are preset for both the X-axis and the Y-axis, and △X and △Y are compared with the corresponding preset deviation error threshold intervals respectively. If △X and △Y are greater than the corresponding preset deviation error threshold intervals, the position movement correction of the stacked induction cooker is performed according to the positive and negative values of △X and △Y, so that the coordinates of the center point of the induction cooker are aligned with the coordinates of the marking points, wherein the alignment standard is if △X and △Y are within the corresponding preset deviation error threshold interval.
[0029] Preferably, the process of correcting the stacking angle of the induction cooker is:
[0030] When the center point coordinates of the induction cooker are aligned with the mark point coordinates, a standard stacking and placement template for the induction cooker is preset, and the point corresponding to point A in the preset standard stacking and placement template for the induction cooker is A', and the point corresponding to point B is B'. The diagonals of point A and point B and the diagonals of point A' and point B' are connected through the center point coordinates of the induction cooker respectively, and the angle a° between point A and point A' is obtained, and it is marked as the rotation correction angle. A standard interval of the rotation correction angle is preset, and the rotation correction angle a° is matched with the preset standard interval of the rotation correction angle. If it is within the preset standard interval, it indicates that the position of the induction cooker is correctly placed. If it is not within the preset standard interval, an angle correction instruction is generated and sent to the execution module. The execution module will correct the stacking angle of the induction cooker according to the rotation correction angle a°. The correction process is: if a° is less than 180°, it is corrected by counterclockwise rotation; if a° is greater than 180°, it is corrected by clockwise rotation, even if the coordinate deviation angle between point A and A' is within the preset standard interval.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] (1) The machine vision positioning method for palletizing semi-finished induction cookers ensures that the camera can obtain clear and accurate images when shooting induction cookers of different specifications by carefully adjusting and evaluating the camera parameters and light source parameters. Specifically, the evaluation parameters such as clarity value, contrast value and color reproduction value are controlled, and the proportion value of the adjusted image and the average deviation value from the standard range are used to conduct a comprehensive evaluation of multi-dimensional data, thereby ensuring the reliability and stability of image quality.
[0033] When the detection evaluation value of the captured image does not meet the requirements, the parameter adjustment diagnosis model output adjustment strategy of the personnel terminal module can be used to realize intelligent adjustment of the camera parameters and light source parameters, and continuously update the model data until the preset standards are met. It effectively adapts to different working environments and changes in the characteristics of induction cooker products, and improves the adaptability and accuracy of image capture.
[0034] (2) The machine vision positioning method for palletizing semi-finished induction cookers accurately retrieves the shooting parameters of the camera and the light source from the parameter storage library according to their specifications when palletizing the induction cookers, thereby speeding up the efficiency of adjusting the camera and the light source. After the adjustment, sampling inspection and verification are performed; the validity of the shooting parameters is ensured by setting a failure rate threshold, and the palletizing work is only started when the failure rate is lower than the threshold, thereby reducing the risk of palletizing errors caused by image quality problems.
[0035] (3) The machine vision positioning method for palletizing semi-finished induction cookers adopts an appropriate positioning method based on the specifications of the induction cooker. Whether it is a mobile shooting mode where the product is larger than the camera's field of view or a positioning shooting mode where the product is smaller than the camera's field of view, the center point coordinate information of the induction cooker can be accurately identified, thereby improving the flexibility and adaptability of positioning. The position is corrected based on the deviation value between the detected center point coordinate of the induction cooker and the mark point coordinate. At the same time, the stacking angle is corrected so that the placement position and angle of the induction cooker meet the standard requirements, thereby ensuring the accuracy and stability of palletizing, reducing problems such as uneven palletizing or product damage caused by position and angle deviations, and improving the palletizing quality and production safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flowchart of the present invention;
[0037] Figure 2 This is a schematic diagram of the position of the template for standard palletizing of an induction cooker according to the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Example
[0039] See also Figure 1-Figure 2, the present invention provides a method for machine vision positioning of semi-finished electromagnetic stove palletizing, including an initialization setting connection module, a parameter storage library, a vision positioning module, an execution module, and a personnel terminal module;
[0040] S1: Initialization setting connection module: used to adjust camera parameters to ensure that the camera obtains clear and accurate images when shooting induction cooker products; Initialization setting connection module communicates with parameter storage library for data transmission;
[0041] Adjust the camera parameters and light source parameters to ensure that the camera obtains clear and accurate images of the induction cooker product during shooting. After the adjustment is completed, record the camera and light source parameters and the corresponding induction cooker specifications and types, and store them in the parameter storage library. The specific process is as follows:
[0042] Step 101: The camera is installed on the motion module, and then the staff adjusts the parameters of the camera and the light source parameters in the working environment. After the adjustment is completed, the induction cooker product is photographed for a preset number of times to obtain a detection image of the induction cooker product; for each detection image, the evaluation parameter value of the detection image is obtained, and the evaluation parameter value includes: clarity value, contrast value and color reproduction value; for the detection images of induction cooker products of different specifications and types, the evaluation parameter standard value is preset; by subtracting the evaluation parameter value of the detection image from the corresponding preset evaluation parameter standard value, the average clarity deviation value QZ, the average contrast deviation value DZ and the average color reproduction deviation value SZ between the evaluation parameter value of the detection image and the corresponding preset evaluation parameter standard value are obtained;
[0043] Step 102: Substitute the average definition deviation value QZ, the average contrast deviation value DZ, and the average color reproduction deviation value SZ into a preset formula: DPZ=QZ×a1+DZ×a2+SZ×a3, to obtain a detection evaluation value DPZ of the detection image, wherein a1, a2, and a3 are preset weight coefficients;
[0044] Step 103: For induction cooker products of different specifications and types, a detection and evaluation threshold is preset, and the DPZ is compared with the preset detection and evaluation threshold;
[0045] Step 104: If DPZ is greater than or equal to the preset detection evaluation threshold, a camera parameter and light source parameter adjustment instruction is generated and sent to the personnel terminal module;
[0046] Step 105: If DPZ is less than the preset detection and evaluation threshold, the parameters of the camera and the light source at this time and the corresponding induction cooker specification type are recorded and stored in the parameter storage library, and a mapping relationship between the induction cooker specification type and the parameters of the camera and the light source at this time is established; wherein if DPZ is less than the preset detection and evaluation threshold, it means that the deviation value between the evaluation parameter value of the detection image and the preset evaluation parameter standard value is within the acceptable range;
[0047] Step 106: For induction cooker products of different specifications and types, the personnel terminal module uses the correspondence between historical image problems of different induction cooker products with marked clarity, contrast and color reproduction and the corresponding parameter adjustment data, and uses the random forest algorithm to establish a parameter adjustment diagnosis model. When the personnel terminal module receives the camera parameter and light source parameter adjustment instruction, it obtains the induction cooker specification type, the clarity value, contrast value and color reproduction value of the adjusted image corresponding to the instruction, and substitutes them into the parameter adjustment diagnosis model, outputs the adjustment data of the camera parameters and light source parameters, and adjusts the camera parameters and light source parameters according to the adjustment data; after the adjustment is completed, execute steps 101 to 104 again; if after the adjustment is completed, the DPZ of the captured image is still greater than or equal to the preset detection evaluation threshold, the data in the parameter adjustment diagnosis model is updated until the DPZ of the captured image is less than the preset detection evaluation threshold. When the DPZ of the captured image is less than the preset detection evaluation threshold, execute step 105.
[0048] S2: When palletizing the induction cookers, the parameters of the camera and the light source for shooting such induction cookers are retrieved from the parameter storage library according to the specifications of the induction cookers, and the camera and the light source are adjusted accordingly according to the parameters. After the adjustment is completed, the captured induction cooker images are randomly sampled for detection, that is, it is detected whether the detection evaluation value of the captured induction cooker image is less than the preset detection evaluation threshold, and the sampled images corresponding to the detection evaluation value less than or equal to the preset detection evaluation threshold are marked as qualified images, otherwise they are marked as unqualified images, and the unqualified rate of unqualified images in the sampled detection images is obtained, and the unqualified rate threshold is preset. If the unqualified rate of the sampled detection images is greater than or equal to the unqualified rate threshold, the parameters of the camera and the light source are readjusted. If the unqualified rate is less than the unqualified rate threshold, the induction cooker is started to be palletized, and the palletized induction cooker is visually positioned through the visual positioning module.
[0049] S3: The visual positioning module includes a positioning judgment unit and a positioning execution unit. When visually positioning the induction cooker for palletizing, the positioning judgment unit determines the positioning method to be adopted according to the specifications of the induction cooker, and the positioning execution unit performs the shooting positioning task according to the camera shooting model determined by the positioning judgment unit. The specific process is as follows:
[0050] Step 301: The positioning mode judgment unit obtains the diagonal edge length of the induction cooker detected in the image of the induction cooker taken by the camera, and compares the diagonal edge length of the induction cooker detected in the image of the induction cooker with the actual length of the induction cooker, and presets an error threshold interval. If the comparison result is within the preset error threshold interval, a camera positioning shooting mode instruction is generated and sent to the positioning execution unit; otherwise, if it is not within the error threshold interval, a camera moving shooting mode instruction is generated and sent to the positioning execution unit;
[0051] Step 302: Establish a rectangular coordinate system with the initial position of the motion module slider as the coordinate origin, and use the image edge algorithm to identify the diagonal points A and B and the diagonal points C and D of the induction cooker;
[0052] If the execution unit adopts the mobile shooting mode, the motion module drives the camera to move to the diagonal point A and point B of the induction cooker respectively. After taking a photo at the diagonal point A, the position of the motion module is recorded (Xa, Ya), and the position of the camera relative to the motion module is recorded as (X1, Y1); the coordinates of the diagonal point A of the induction cooker product in the camera's built-in coordinate system are obtained, recorded as (X2, Y2), and this coordinate is converted into a coordinate in a rectangular coordinate system established with the initial position of the motion module as the coordinate origin, and the position of the diagonal point A of the induction cooker is obtained (Xa+X1+X2, Ya+Y1+Y2). After taking a photo at the diagonal point B, the position of the motion module is recorded (Xb, Yb), and the position of the camera relative to the motion module is (X3, Y3). The coordinates of the diagonal point B of the induction cooker product in the camera's built-in coordinate system are obtained, recorded as =(X4, Y4), and convert this coordinate into the coordinate in the rectangular coordinate system established with the initial position of the motion module as the coordinate origin, and obtain the position of the diagonal B of the product (Xb+X3+X4, Yb+Y3+Y4), then the position of the center point of the product is {(Xb+X3+X4-Xa-X1-X2) / 2, (Yb+Y3+Y4-Ya-Y1-Y2) / 2}, since the position of the camera relative to the motion module is constant, that is, (X1, Y1) and (X3, Y3) are equal, then the center point of the product is finally {(Xb+X4-Xa-X2) / 2, (Yb+Y4-Ya-Y2) / 2}; due to the coordinates of the movement of the motion module, the coordinates of point A and point B in the camera can be directly obtained, so the coordinates of the center point of the induction cooker product can be calculated;
[0053] If the execution unit adopts the positioning shooting mode, the motion module will not need to move, that is, (Xa, Ya) and (Xb, Yb) are the same, so the center point of the product will be {(X4-X2) / 2, (Y4-Y2) / 2};
[0054] Step 303: Preset the coordinates of the marking point where the induction cooker product is placed, detect the deviation values on the X-axis and Y-axis between the coordinates of the center point of the induction cooker and the coordinates of the marking point, and mark them as △X and △Y respectively. Preset the deviation error threshold intervals for both the X-axis and the Y-axis, and compare △X and △Y with the corresponding preset deviation error threshold intervals respectively. If △X and △Y are greater than the corresponding preset deviation error threshold intervals, then send the deviation values △X and △Y between the coordinates of the center point of the induction cooker and the coordinates of the marking point on the X-axis and the Y-axis to the execution module. The execution module first corrects the movement position of the induction cooker to be palletized according to the positive and negative values of △X and △Y, so that the coordinates of the center point of the induction cooker are aligned with the coordinates of the marking point. The alignment standard is if △X and △Y are within the corresponding preset deviation error threshold interval;
[0055] Step 304: After the center point coordinates of the induction cooker are aligned with the marking point coordinates, a standard stacking placement template for the induction cooker is preset, such as Figure 2 , the point corresponding to point A in the preset standard stacking placement template of the induction cooker is A', and the point corresponding to point B is B'. The diagonal lines of point A and point B and the diagonal lines of point A' and point B' are connected through the coordinates of the center point of the induction cooker respectively, and the angle a° between point A and point A' is obtained, and it is marked as the rotation correction angle. The standard interval of the rotation correction angle is preset, and the rotation correction angle a° is matched with the preset standard interval of the rotation correction angle. If it is within the preset standard interval, it indicates that the position of the induction cooker is correctly placed. If it is not within the preset standard interval, an angle correction instruction is generated and sent to the execution module. The execution module corrects the stacking angle of the induction cooker according to the rotation correction angle a°, so that the coordinate deviation angle between point A and A' is within the preset standard interval; wherein the correction process is that if a° is less than 180°, the correction angle is rotated counterclockwise, and if a° is greater than 180°, the correction angle is rotated clockwise;
[0056] In this way, the position correction is solved on the one hand, and the angle of the induction cooker for palletizing is corrected at the same time, so that it can be easily and accurately and stably palletized.
[0057] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for machine vision positioning of semi-finished induction cooker palletizing, characterized in that: The following steps are involved: S1: Adjust the camera parameters and light source parameters. After the adjustment is completed, record the camera and light source parameters and the corresponding induction cooker specifications and types, and store them in the parameter storage library; S2: When palletizing the induction cooker, the parameters of the camera and light source for shooting this type of induction cooker are retrieved from the parameter storage library according to the specifications of the induction cooker, and the camera and light source are adjusted accordingly according to the parameters. After the adjustment is completed, the image of the induction cooker taken is sampled and tested. If it meets the standards, the induction cooker is visually positioned for palletizing; S3: When visual positioning is performed on the induction cooker for palletizing, the camera shooting model to be used is first determined according to the specifications of the induction cooker, and the shooting visual positioning work is performed according to the determined camera shooting model; the camera shooting model includes: positioning shooting mode and moving shooting mode; S4: Visually locate the induction cooker according to the determined shooting mode to obtain the coordinates of the center point of the induction cooker, compare the coordinates of the center point of the induction cooker with the coordinates of the preset mark point, obtain the deviation values on the X-axis and Y-axis, and perform position correction, then obtain the stacking angle correction value of the induction cooker, and correct the stacking angle of the induction cooker.
2. The method for machine vision positioning of semi-finished induction cooker palletizing according to claim 1, characterized in that: The specific process of recording the parameters of the camera and light source and the corresponding specifications and types of the induction cooker and storing them in the parameter storage library is as follows: Step 101: The camera is installed on the motion module, and then the staff adjusts the parameters of the camera and the light source parameters in the working environment. After the adjustment is completed, a preset number of detection images of the induction cooker product are taken to obtain the detection image of the induction cooker product; For each detection image, obtain the evaluation parameter value of the detection image, the evaluation parameter value includes: clarity value, contrast value and color reproduction value; for the detection images of induction cooker products of different specifications and types, the evaluation parameter standard values are preset; by subtracting the evaluation parameter value of the detection image from the corresponding preset evaluation parameter standard value, obtain the average clarity deviation value QZ, average contrast deviation value DZ and average color reproduction deviation value SZ between the evaluation parameter value of the detection image and the corresponding preset evaluation parameter standard value; Step 102: Substitute the average definition deviation value QZ, the average contrast deviation value DZ, and the average color reproduction deviation value SZ into a preset formula: DPZ=QZ×a1+DZ×a2+SZ×a3, to obtain a detection evaluation value DPZ of the detection image, wherein a1, a2, and a3 are preset weight coefficients; Step 103: For induction cooker products of different specifications and types, a detection and evaluation threshold is preset, and the detection and evaluation value DPZ of the detection image is compared with the preset detection and evaluation threshold; Step 104: If the detection evaluation value DPZ of the detection image is greater than or equal to the preset detection evaluation threshold, a camera parameter and light source parameter adjustment instruction is generated and sent to the personnel terminal; Step 105: If the detection evaluation value DPZ of the detection image is less than the preset detection evaluation threshold, the parameters of the camera and the light source at this time and the corresponding induction cooker specification type are recorded and stored in the parameter storage library to establish a mapping relationship between the induction cooker specification type and the parameters of the camera and the light source at this time.
3. The method for machine vision positioning of semi-finished induction cooker palletizing according to claim 2, characterized in that: The working process of the personnel terminal after receiving the camera parameter and light source parameter adjustment instructions is as follows: For induction cooker products of different specifications and types, the personnel terminal module uses the correspondence between historical image problems of different induction cooker products with marked clarity, contrast and color reproduction and the corresponding parameter adjustment data, and uses the random forest algorithm to establish a parameter adjustment diagnosis model. When the personnel terminal module receives a camera parameter and a light source parameter adjustment instruction, it obtains the induction cooker specification type corresponding to the instruction, the clarity value, the contrast value and the color reproduction value of the adjusted image, and substitutes them into the parameter adjustment diagnosis model, outputs the adjustment data of the camera parameters and the light source parameters, and adjusts the camera parameters and the light source parameters according to the adjustment data; after the adjustment is completed, execute steps 101 to 104 again; if after the adjustment is completed, the DPZ of the captured image is still greater than or equal to the preset detection evaluation threshold, the data in the parameter adjustment diagnosis model is updated until the DPZ of the captured image is less than the preset detection evaluation threshold. When the DPZ of the captured image is less than the preset detection evaluation threshold, execute step 105.
4. The method for machine vision positioning of semi-finished induction cooker palletizing according to claim 3, characterized in that: The specific process of sampling and testing the captured induction cooker images is as follows: After the adjustment is completed, a random sampling inspection is performed on the captured induction cooker image, that is, whether the inspection evaluation value of the captured induction cooker image is less than the preset inspection evaluation threshold, and the sampling image corresponding to the inspection evaluation value less than or equal to the preset inspection evaluation threshold is marked as a qualified image, otherwise, the sampling image corresponding to the inspection evaluation value greater than the preset adjustment evaluation threshold is marked as an unqualified image, and the unqualified rate of unqualified images in the sampled inspection images is calculated, and the unqualified rate threshold is preset. If the unqualified rate of the sampled inspection images is greater than or equal to the unqualified rate threshold, the staff will correct and adjust the parameters of the camera and the light source. Otherwise, if the unqualified rate is less than the unqualified rate threshold, the induction cookers will start to be stacked, and the stacked induction cookers will be visually positioned.
5. The method for machine vision positioning of semi-finished induction cooker palletizing according to claim 4, characterized in that: The process of determining the positioning method to be used according to the specifications of the induction cooker is as follows: The length of the diagonal edge of the induction cooker detected in the image taken by the camera is obtained, and the length of the diagonal edge of the induction cooker detected in the induction cooker image is compared with the actual length of the induction cooker, and an error threshold interval is preset. If the comparison result is within the preset error threshold interval, the camera positioning shooting mode is executed; otherwise, if it is not within the error threshold interval, the camera moving shooting mode is executed.
6. The method for machine vision positioning of semi-finished induction cooker palletizing according to claim 5, characterized in that: The process of visually positioning the induction cooker according to the determined shooting mode to obtain the coordinates of the center point of the induction cooker is as follows: A rectangular coordinate system is established with the initial position of the motion module as the origin of the coordinates, and the diagonal points A and B as well as the diagonal points C and D of the induction cooker are identified using the image edge algorithm; If the execution unit adopts the mobile shooting mode, the motion module drives the camera to move to the diagonal points A and B of the induction cooker respectively. After taking pictures at the diagonal point A, the position of the motion module (Xa, Ya) is recorded, and the position of the camera relative to the motion module is recorded as (X1, Y1); Get the coordinates of the diagonal point A of the induction cooker product in the camera's built-in coordinate system, recorded as (X2, Y2), and convert this coordinate into the coordinates in the rectangular coordinate system established with the initial position of the motion module as the coordinate origin, and get the position of the diagonal point A of the induction cooker (Xa+X1+X2, Ya+Y1+Y2). After taking a photo at the diagonal point B, record the position of the motion module (Xb, Yb) and the position of the camera relative to the motion module (X3, Y3). Get the coordinates of the diagonal point B of the induction cooker product in the camera's built-in coordinate system, recorded as (X4, Y4), and convert this coordinate into the coordinates in the rectangular coordinate system established with the initial position of the motion module as the coordinate origin. , we get the position of the diagonal B of the product (Xb+X3+X4, Yb+Y3+Y4), then the position of the center point of the product is {(Xb+X3+X4-Xa-X1-X2) / 2, (Yb+Y3+Y4-Ya-Y1-Y2) / 2}. Since the position of the camera relative to the motion module is constant, that is, (X1, Y1) and (X3, Y3) are equal, then the center point of the product is finally {(Xb+X4-Xa-X2) / 2, (Yb+Y4-Ya-Y2) / 2}. Since the coordinates of the motion module move, the coordinates of point A and point B in the camera can be directly obtained, so the coordinates of the center point of the induction cooker product can be calculated. If the execution unit adopts the positioning shooting mode, the motion module will not need to move, that is, (Xa, Ya) and (Xb, Yb) are the same, so the center point of the product will be {(X4-X2) / 2, (Y4-Y2) / 2}.
7. The method for machine vision positioning of semi-finished induction cooker palletizing according to claim 6, characterized in that: The process of position correction for palletized induction cookers is as follows: The coordinates of the marking points for placing the induction cooker products are preset, and the deviation values on the X-axis and Y-axis between the coordinates of the center point of the induction cooker and the coordinates of the marking points are detected, and are marked as △X and △Y respectively. The deviation error threshold intervals are preset for both the X-axis and the Y-axis, and △X and △Y are compared with the corresponding preset deviation error threshold intervals respectively. If △X and △Y are greater than the corresponding preset deviation error threshold intervals, the position movement correction of the stacked induction cooker is performed according to the positive and negative values of △X and △Y, so that the coordinates of the center point of the induction cooker are aligned with the coordinates of the marking points, wherein the alignment standard is if △X and △Y are within the corresponding preset deviation error threshold interval.
8. The method for machine vision positioning of semi-finished induction cooker palletizing according to claim 7, characterized in that: The process of correcting the palletizing angle of the induction cooker is as follows: When the center point coordinates of the induction cooker are aligned with the mark point coordinates, a standard stacking and placement template for the induction cooker is preset, and the point corresponding to point A in the preset standard stacking and placement template for the induction cooker is A', and the point corresponding to point B is B'. The diagonals of point A and point B and the diagonals of point A' and point B' are connected through the center point coordinates of the induction cooker respectively, and the angle a° between point A and point A' is obtained, and it is marked as the rotation correction angle. A standard interval of the rotation correction angle is preset, and the rotation correction angle a° is matched with the preset standard interval of the rotation correction angle. If it is within the preset standard interval, it indicates that the position of the induction cooker is correctly placed. If it is not within the preset standard interval, an angle correction instruction is generated and sent to the execution module. The execution module will correct the stacking angle of the induction cooker according to the rotation correction angle a°. The correction process is: if a° is less than 180°, it is corrected by counterclockwise rotation; if a° is greater than 180°, it is corrected by clockwise rotation, even if the coordinate deviation angle between point A and A' is within the preset standard interval.
Citation Information
Patent Citations
Visual system of automatic stacking truss robot
CN109785317A
Visual SLAM automatic navigation algorithm for robot palletizer
CN117232525A