Auxiliary positioning method, device and computer readable storage medium
By establishing the mapping relationship between the camera and the machine coordinate system and adjusting the processing vector, the problem of low cutting accuracy caused by the deviation of the placement position of the product to be processed is solved, and the processing accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202111042790.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-07
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2041-09-07
AI Technical Summary
In material processing, there is a tendency to be deviation in the actual placement of the product to be processed on the machine, resulting in a low cutting accuracy of the product.
By establishing a mapping relationship between the camera coordinate system and the machine coordinate system, the camera controls the camera to obtain the position coordinates of multiple marking points in the target image, calculates the actual coordinates of the machine at the center of the marking point, and adjusts the processing vector based on these coordinates. Ensure processing accuracy.
The product processing accuracy and efficiency are improved, the processing vector is related to the coordinates of marking points on the machine, and the correct processing is achieved according to the actual placement of the product.
Smart Images

Figure CN113744336B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of material processing technology, and in particular to an auxiliary positioning method, device and computer-readable storage medium. Background Art
[0002] In the field of material processing, after the processing vector of the cutting head (laser head or tool head) is set, the orientation of the processing vector is usually required to match the orientation of the product to be processed on the machine. In actual applications, the product to be processed generally relies on manual alignment, so the actual placement position of the product to be processed usually has deviations, resulting in lower product cutting accuracy. Summary of the invention
[0003] The embodiments of the present application provide an auxiliary positioning method, device and computer-readable storage medium, which can at least solve the problem of low product cutting accuracy caused by deviation in the actual placement position of the product to be processed on the machine in the related art.
[0004] A first aspect of an embodiment of the present application provides an auxiliary positioning method, which is applied to an automatic cutting device provided with a stage and a camera, comprising:
[0005] Establish the mapping relationship between the camera coordinate system and the machine coordinate system;
[0006] Controlling the camera to shoot the product to be processed, and obtaining the center position coordinates of the marking points corresponding to the plurality of marking points in the target shot image;
[0007] Calculate the actual position coordinates of the machine corresponding to the center position coordinates of the marking point based on the mapping relationship;
[0008] According to the actual position coordinates of the machine platform, the processing vector diagram of the product to be processed is adjusted in position.
[0009] A second aspect of the embodiment of the present application provides an auxiliary positioning device, which is applied to an automatic cutting device provided with a stage and a camera, comprising:
[0010] Establishing a module for establishing a mapping relationship between the camera coordinate system and the machine coordinate system;
[0011] An acquisition module, used for controlling the camera to shoot the product to be processed, and obtaining the coordinates of the center positions of the marking points corresponding to the multiple marking points in the target shot image;
[0012] A calculation module, used for calculating the actual position coordinates of the machine platform corresponding to the center position coordinates of the marking point based on the mapping relationship;
[0013] The adjustment module is used to adjust the position of the processing vector diagram of the product to be processed according to the actual position coordinates of the machine platform.
[0014] A third aspect of an embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, each step of the auxiliary positioning method provided in the first aspect of the embodiment of the present application is implemented.
[0015] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each step of the auxiliary positioning method provided in the first aspect of the embodiments of the present application is implemented.
[0016] As can be seen from the above, according to the auxiliary positioning method, device and computer-readable storage medium provided by the present application, a mapping relationship between the camera coordinate system and the machine coordinate system is established; the camera is controlled to shoot the product to be processed, and the coordinates of the center position of the marking points corresponding to the multiple marking points in the target shooting image are obtained; the actual position coordinates of the machine corresponding to the center position coordinates of the marking points are calculated based on the mapping relationship; and the processing vector map of the product to be processed is adjusted in orientation according to the actual position coordinates of the machine. Through the implementation of the present application, the processing vector is associated with the coordinates of the marking points on the machine, and the processing vector is adjusted in orientation according to the actual position of the marking points, so that the product can be processed correctly according to its actual placement position, effectively improving the processing accuracy and efficiency of the product. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of a flow chart of an auxiliary positioning method provided in the first embodiment of the present application;
[0018] Figure 2 A schematic diagram of a grid marking point provided in the first embodiment of the present application;
[0019] Figure 3 A binary image provided in the first embodiment of the present application;
[0020] Figure 4 A schematic diagram of a connected area provided for the first embodiment of the present application;
[0021] Figure 5 A schematic diagram of marking the center position coordinates of the marking points provided in the first embodiment of the present application;
[0022] Figure 6 A schematic diagram of setting a virtual marking point provided in the first embodiment of the present application;
[0023] Figure 7 A schematic diagram of a program module of an auxiliary positioning device provided in a second embodiment of the present application;
[0024] Figure 8A schematic diagram of the structure of an electronic device provided in the third embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0026] In order to solve the problem of low product cutting accuracy caused by deviation in the actual placement position of the product to be processed on the machine in the related art, the first embodiment of the present application provides an auxiliary positioning method, which is applied to an automatic cutting device with a machine table and a camera, and the machine table has a carrying area, and the carrying area is used to place the product to be processed, such as Figure 1 This is a basic flow chart of the auxiliary positioning method provided in this embodiment. The auxiliary positioning method includes the following steps:
[0027] Step 101: Establish a mapping relationship between the camera coordinate system and the machine coordinate system.
[0028] In the process of establishing the above-mentioned mapping relationship, this embodiment refers to the cutting head position coordinates when the automatic cutting device cuts the first mark point of the calibration object on the machine table, moves the camera, and aligns the camera center point with the first mark point; obtains the first coordinate offset when the camera moves; sums the first coordinate offset with the cutting head position coordinates to obtain the camera center point coordinates; and establishes a mapping relationship between the camera coordinate system and the machine coordinate system based on the camera center point position coordinates.
[0029] Specifically, in this embodiment, a camera is installed at a fixed position away from the cutting head of the automatic cutting device, and the camera is moved to the position of the cutting mark point P1 of the cutting head by finding the center point. The camera center point is aligned with the mark point P1, so as to calculate the coordinate offset before and after the alignment. The coordinate offset includes the X-direction offset PD(X) and the Y-direction offset PD(Y). Then, the coordinate offset is added to the position of the cutting mark point P1 of the cutting head to obtain the position coordinates of the camera center point, and then the mapping relationship between the camera coordinate system and the machine coordinate system is established based on this coordinate.
[0030] In an optional implementation of the present embodiment, the above-mentioned step of establishing a mapping relationship between the camera coordinate system and the machine coordinate system based on the position coordinates of the camera center point specifically includes: obtaining the position coordinates of the second mark point cut by the automatic cutting device on the machine in the camera coordinate system; calculating the second coordinate offset of the position coordinates of the second mark point in the camera coordinate system from the position coordinates of the camera center point; calculating the relative offset based on the actual distance represented by the calibrated camera pixels (also called pixel ratio, pixel accuracy) and the second coordinate offset; calculating the position coordinates of the second calibration point in the machine coordinate system based on the relative offset and the position coordinates of the camera center point; establishing a mapping relationship between the camera coordinate system and the machine coordinate system based on the position coordinates of the second mark point in the camera coordinate system and the position coordinates in the machine coordinate system.
[0031] Specifically, in this embodiment, a one-time positioning method can be used to establish a mapping relationship between the camera coordinate system and the machine coordinate system. Specifically, in this embodiment, after calculating the position coordinates of the camera center point through the previous marking point P1, another marking point P2 is further cut by the cutting head, and the camera is moved to the vicinity of P2. After taking a picture through the camera, the coordinates of the next marking point P2 are obtained, and the offset of the P2 point from the camera center point in the X direction and the Y direction are calculated respectively, that is, the coordinate offset of the P2 point from the camera center point in the camera coordinate system is calculated, and then the relative offset is calculated according to the actual pixel ratio and the coordinate offset with the camera center point, that is, the actual distance to be moved, and the relative offset is further summed with the position coordinates of the camera center point to calculate the actual position of the P2 point in the machine coordinate system. Finally, the position coordinates of the P2 point in the camera coordinate system are associated with the position coordinates of the machine coordinate system to establish a mapping relationship between the camera coordinate system and the machine coordinate system.
[0032] In another optional implementation manner of the present embodiment, the step of establishing a mapping relationship between the camera coordinate system and the machine coordinate system based on the position coordinates of the camera center point specifically includes: obtaining the position coordinates of the second mark point cut by the automatic cutting device on the machine when the camera shoots for the first time in the camera coordinate system; calculating the second coordinate offset of the position coordinates of the second mark point in the camera coordinate system from the position coordinates of the camera center point; calculating the camera movement offset based on the actual distance represented by the calibrated camera pixels and the second coordinate offset; moving the camera according to the camera movement offset to obtain the position coordinates of the second mark point in the camera coordinate system when the camera shoots again; calculating the third coordinate offset of the position coordinates of the re-acquired second mark point in the camera coordinate system from the position coordinates of the camera center point; calculating the relative offset based on the actual distance represented by the calibrated camera pixels and the third coordinate offset; calculating the position coordinates of the second calibrated point in the machine coordinate system based on the relative offset and the position coordinates of the camera center point; establishing a mapping relationship between the camera coordinate system and the machine coordinate system based on the position coordinates of the second mark point in the camera coordinate system and the position coordinates in the machine coordinate system.
[0033] Specifically, in the present embodiment, considering that in the case of a wide-angle lens, the actual ratio represented by the pixels calculated by the above-mentioned one-time positioning method may not be linear, resulting in actual deviations in the above-mentioned extrapolation process. Based on this, the present embodiment can also adopt a secondary positioning method to establish a mapping relationship between the camera coordinate system and the machine coordinate system. Specifically, after the present embodiment calculates the position coordinates of the camera center point through the previous marking point P1, it further cuts another marking point P2 through the cutting head, moves the camera to the vicinity of P2, and after taking a picture through the camera, obtains the coordinates of the next marking point P2, and calculates the offset of the point P2 from the camera center point in the X direction and the Y direction respectively, that is, calculates the coordinate offset of the point P2 from the camera center point in the camera coordinate system, and then calculates the camera movement offset according to the actual pixel ratio and the coordinate offset from the camera center point, that is, the actual distance the camera needs to move; further , move the camera according to the camera movement offset, then take a photo with the camera again, and re-acquire the position coordinates of point P2 in the camera coordinate system, then calculate the offset of point P2 from the camera center point at this time, and infer the relative offset based on the offset and the actual distance represented by the calibrated camera pixels; finally, based on the position coordinates of the camera center point and the inferred relative offset, the actual position of point P2 in the machine coordinate system can be calculated, and then the position coordinates of point P2 in the camera coordinate system are associated with the position coordinates of the machine coordinate system, and the mapping relationship between the camera coordinate system and the machine coordinate system can be established. Therefore, in this embodiment, by moving the camera twice to the offset position, when the camera center point is relatively close, the distortion is small, and the offset obtained at this time is more accurate.
[0034] Furthermore, in an optional implementation of this embodiment, before the step of obtaining the position coordinates of the second mark point cut by the automatic cutting device on the machine platform in the camera coordinate system when the camera shoots for the first time, it also includes: obtaining the edge distortion parameter of the camera, and comparing the edge distortion parameter with a preset parameter threshold. Correspondingly, when the edge distortion parameter exceeds the parameter threshold, the step of obtaining the position coordinates of the second mark point cut by the automatic cutting device on the machine platform in the camera coordinate system when the camera shoots for the first time is triggered.
[0035] Specifically, in practical applications, the edge distortion of different cameras is different. For cameras with large edge distortion, there is no distortion only near the center of the camera. Therefore, when the camera edge distortion is large, this embodiment uses a secondary positioning method to perform coordinate system mapping, thereby ensuring the accuracy of the coordinate system mapping result. For cameras with small edge distortion, a single positioning method can be used to simplify the coordinate system mapping process.
[0036] Step 102: Control the camera to shoot the product to be processed, and obtain the center position coordinates of the marking points corresponding to the plurality of marking points in the target shot image.
[0037] Specifically, in this embodiment, after the product to be processed is placed on the loading area of the machine table, an image is captured by a camera, and then the marking points in the image are identified, and the center position coordinates of all the marking points are obtained.
[0038] In an optional implementation of this embodiment, the product to be processed itself is provided with grid marking points. Accordingly, the above-mentioned step of obtaining the coordinates of the center positions of the marking points corresponding to the multiple marking points in the target shot image includes: after converting the target shot image into a grayscale image, the grayscale image is subjected to threshold segmentation to generate a binary image; the binary image is expanded to form a grid marking point connected area; feature filtering is performed with reference to the feature range of the grid marking point connected area to obtain a mask containing only the grid marking points; wherein the feature range includes: width and height range, area range, perimeter range, and tilt angle range; the mask is calibrated with the minimum enclosing rectangle, and the center point coordinates of the minimum enclosing rectangle are determined as the coordinates of the center position of the marking point.
[0039] Specifically, Figure 2 The figure shows a schematic diagram of a grid marking point provided by this embodiment. The grid marking point is a grid structure composed of black and white square grids. In practical applications, the actual size of the small squares in the grid marking point can be 1mm*1mm, black and white, and the grid structure can be arranged in 11*3. Figure 3 The figure shows a binary image provided by this embodiment. In this embodiment, the original image is converted into a grayscale image, and then a threshold segmentation is performed to generate a binary image. Figure 4The figure shows a schematic diagram of a connected area provided by the present embodiment. Since the binary graph chessboard does not generate a unified connected area, a connected area is formed after expansion. After that, the width and height range, width and height ratio, area range, perimeter length range, and inclination angle of the entire connected area are calculated by inputting the pixel ratio and the actual length and width. Feature filtering is performed through these feature ranges, and then a mask containing only the chessboard is filtered out from many connected areas. Finally, the above mask is subjected to the operation of searching for the minimum circumscribed rectangle, and the coordinates of its center point are obtained. The obtained center point coordinates are the coordinates of the center point of the grid marker in the image coordinate system. For details, please see the figure below. Figure 5 Schematic diagram of the markings of the center position coordinates of the marking points shown.
[0040] In an optional implementation of the present embodiment, before the above-mentioned step of obtaining the coordinates of the center positions of the marking points corresponding to the multiple marking points in the target captured image, it also includes: identifying the edge contour of the product to be processed; intercepting multiple characteristic contour parts from the edge contour; and setting virtualized marking points accordingly for each characteristic contour edge part.
[0041] Specifically, in actual applications, there may be no marking points on the surface of the product to be processed, or the marking points themselves may be inaccurate due to printing errors. Based on this, this embodiment can set virtual marking points for the product to be processed. This embodiment intercepts the feature contour on the edge contour of the product to be processed. For example, if the edge contour of the product to be processed is a rectangle, the intercepted feature contour can be the four corners of the rectangle, and then virtual marking points are set for each feature contour, such as Figure 6 The figure shows a schematic diagram of setting a virtual marking point provided by this embodiment, and the cross mark in the figure is the virtual marking point.
[0042] Step 103: Calculate the actual position coordinates of the machine corresponding to the center position coordinates of the marking point based on the mapping relationship.
[0043] Specifically, after establishing the mapping relationship between the camera coordinate system and the machine coordinate system, this embodiment accurately finds the coordinates of the center position of the marking point, and then through coordinate mapping, the actual position coordinates of the center position of the marking point in the image coordinate system on the cutting device machine can be calculated.
[0044] Step 104: Adjust the orientation of the processing vector diagram of the product to be processed according to the actual position coordinates of the machine.
[0045] Specifically, this embodiment obtains the machine coordinates of the marking points and adjusts the processing vector in a certain orientation (translation, rotation or affine transformation) according to the actual placement position, thereby completing auxiliary positioning. The cutting device can then perform correct processing according to the actual placement position of the product to be processed to achieve precise cutting.
[0046] Based on the technical solution of the embodiment of the present application, a mapping relationship between the camera coordinate system and the machine coordinate system is established; the camera is controlled to shoot the product to be processed, and the coordinates of the center position of the marking points corresponding to the multiple marking points in the target shooting image are obtained; the actual position coordinates of the machine corresponding to the center position coordinates of the marking points are calculated based on the mapping relationship; and the processing vector diagram of the product to be processed is adjusted in orientation according to the actual position coordinates of the machine. Through the implementation of the solution of the present application, the processing vector is associated with the coordinates of the marking points on the machine, and the processing vector is adjusted in orientation according to the actual position of the marking points, so that the product can be processed correctly according to its actual placement position, effectively improving the processing accuracy and efficiency of the product.
[0047] Figure 7 The second embodiment of the present application provides an auxiliary positioning device. The auxiliary positioning device can be used to implement the auxiliary positioning method in the above embodiment. Figure 7 As shown, the auxiliary positioning device mainly includes:
[0048] Establishing module 701, used to establish a mapping relationship between the camera coordinate system and the machine coordinate system;
[0049] An acquisition module 702 is used to control the camera to shoot the product to be processed and obtain the coordinates of the center positions of the marking points corresponding to the multiple marking points in the target shot image;
[0050] A calculation module 703, used for calculating the actual position coordinates of the machine corresponding to the center position coordinates of the marking point based on the mapping relationship;
[0051] The adjustment module 704 is used to adjust the position of the processing vector diagram of the product to be processed according to the actual position coordinates of the machine platform.
[0052] In some implementations of this embodiment, the auxiliary positioning device of this embodiment also includes: a setting module, used to: identify the edge contour of the product to be processed; intercept multiple characteristic contour parts from the edge contour; and set virtualized marking points corresponding to each characteristic contour edge part.
[0053] In some other implementations of this embodiment, grid marking points are set on the product to be processed. Accordingly, the acquisition module is specifically used to: after converting the target captured image into a grayscale image, perform threshold segmentation on the grayscale image to generate a binary image; perform expansion processing on the binary image to form a grid marking point connected area; perform feature filtering with reference to the feature range of the grid marking point connected area to obtain a mask containing only grid marking points, wherein the feature range includes: width and height range, area range, perimeter range, and tilt angle range; perform minimum bounding rectangle calibration on the mask, and determine the center point coordinates of the minimum bounding rectangle as the center position coordinates of the marking point.
[0054] In some implementations of this embodiment, the establishment module is specifically used to: refer to the cutting head position coordinates when the automatic cutting device cuts the first mark point on the machine, move the camera, and align the camera center point with the first mark point; obtain the first coordinate offset when the camera moves; sum the first coordinate offset with the cutting head position coordinates to obtain the camera center point coordinates; based on the camera center point position coordinates, establish a mapping relationship between the camera coordinate system and the machine coordinate system.
[0055] Furthermore, in some implementations of the present embodiment, when the establishment module executes the above-mentioned function of establishing a mapping relationship between the camera coordinate system and the machine coordinate system based on the position coordinates of the camera center point, it is specifically used to: obtain the position coordinates of the second mark point cut by the automatic cutting device on the machine in the camera coordinate system; calculate the second coordinate offset of the position coordinates of the second mark point in the camera coordinate system from the position coordinates of the camera center point; calculate the relative offset based on the actual distance represented by the calibrated camera pixels and the second coordinate offset; calculate the position coordinates of the second calibration point in the machine coordinate system based on the relative offset and the position coordinates of the camera center point; establish a mapping relationship between the camera coordinate system and the machine coordinate system based on the position coordinates of the second mark point in the camera coordinate system and the position coordinates in the machine coordinate system.
[0056] Further, in some other implementations of the present embodiment, when the establishment module executes the above-mentioned function of establishing a mapping relationship between the camera coordinate system and the machine coordinate system based on the position coordinates of the camera center point, it is specifically used to: obtain the position coordinates of the second mark point cut by the automatic cutting device on the machine when the camera shoots for the first time in the camera coordinate system; calculate the second coordinate offset of the position coordinates of the second mark point in the camera coordinate system from the position coordinates of the camera center point; calculate the camera movement offset based on the actual distance represented by the calibrated camera pixels and the second coordinate offset; move the camera according to the camera movement offset to obtain the position coordinates of the second mark point in the camera coordinate system when the camera shoots again; calculate the third coordinate offset of the position coordinates of the re-acquired second mark point in the camera coordinate system from the position coordinates of the camera center point; calculate the relative offset based on the actual distance represented by the calibrated camera pixels and the third coordinate offset; calculate the position coordinates of the second calibrated point in the machine coordinate system based on the relative offset and the position coordinates of the camera center point; establish a mapping relationship between the camera coordinate system and the machine coordinate system based on the position coordinates of the second mark point in the camera coordinate system and the position coordinates in the machine coordinate system.
[0057] Furthermore, the auxiliary positioning device of this embodiment further includes: a comparison module, which is used to: obtain edge distortion parameters of the camera, and compare the edge distortion parameters with a preset parameter threshold. Correspondingly, the establishment module is specifically used to execute the function of obtaining the position coordinates of the second mark point cut by the automatic cutting device on the machine table in the camera coordinate system when the camera first shoots when the edge distortion parameter exceeds the parameter threshold.
[0058] It should be noted that the auxiliary positioning methods in the first and second embodiments can be implemented based on the auxiliary positioning device provided in this embodiment. Ordinary technical personnel in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the auxiliary positioning device described in this embodiment can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0059] According to the auxiliary positioning device provided in this embodiment, a mapping relationship between the camera coordinate system and the machine coordinate system is established; the camera is controlled to shoot the product to be processed, and the coordinates of the center position of the marking points corresponding to the multiple marking points in the target shooting image are obtained; the actual position coordinates of the machine corresponding to the center position coordinates of the marking points are calculated based on the mapping relationship; according to the actual position coordinates of the machine, the processing vector diagram of the product to be processed is adjusted in orientation. Through the implementation of the present application scheme, the processing vector is associated with the coordinates of the marking points on the machine, and the processing vector is adjusted in orientation according to the actual position of the marking points, so that the product can be processed correctly according to its actual placement position, effectively improving the product processing accuracy and processing efficiency.
[0060] See also Figure 8 , Figure 8 The third embodiment of the present application provides an electronic device. The electronic device can be used to implement the auxiliary positioning method in the above embodiments. Figure 8 As shown, the electronic device mainly includes:
[0061] Memory 801, processor 802, bus 803, and a computer program stored in memory 801 and executable on processor 802, memory 801 and processor 802 are connected via bus 803. When processor 802 executes the computer program, the auxiliary positioning method in the aforementioned embodiment is implemented. The number of processors may be one or more.
[0062] The memory 801 may be a high-speed random access memory (RAM) memory, or a non-volatile memory, such as a disk memory. The memory 801 is used to store executable program codes, and the processor 802 is coupled to the memory 801 .
[0063] Furthermore, the present application also provides a computer-readable storage medium, which may be disposed in the electronic device in the above embodiments. Figure 8 Memory in the illustrated embodiment.
[0064] The computer readable storage medium stores a computer program, and when the program is executed by the processor, the auxiliary positioning method in the aforementioned embodiment is implemented. Furthermore, the computer storable medium can also be a U disk, a mobile hard disk, a read-only memory (ROM), a RAM, a magnetic disk or an optical disk, and other media that can store program codes.
[0065] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0066] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0067] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0068] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a readable storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned readable storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0069] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0070] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0071] The above is a description of the auxiliary positioning method, device and computer-readable storage medium provided in the present application. For technicians in this field, according to the ideas of the embodiments of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An auxiliary positioning method, applied to an automatic cutting device provided with a stage and a camera, characterized in that: include: Establish the mapping relationship between the camera coordinate system and the machine coordinate system; The camera is controlled to shoot the product to be processed, and after converting the target shot image into a grayscale image, the grayscale image is subjected to threshold segmentation to generate a binary image; the binary image is expanded to form a grid marker point connected area; feature filtering is performed with reference to the feature range of the grid marker point connected area to obtain a mask containing only grid marker points; the minimum circumscribed rectangle is calibrated for the mask, and the center point coordinates of the minimum circumscribed rectangle are determined as the center position coordinates of the marker point; wherein the product to be processed is provided with a grid marker point, and the feature range includes: width and height range, area range, perimeter range, and inclination angle range; Calculate the actual position coordinates of the machine corresponding to the center position coordinates of the marking point based on the mapping relationship; According to the actual position coordinates of the machine platform, the processing vector diagram of the product to be processed is adjusted in position.
2. The auxiliary positioning method according to claim 1, characterized in that: Before the step of determining the center point coordinates of the minimum circumscribed rectangle as the center position coordinates of the marking point, the method further includes: Identifying the edge contour of the product to be processed; extracting a plurality of characteristic contour portions from the edge contour; The virtualized marking points are respectively set for each of the characteristic contour parts.
3. The auxiliary positioning method according to claim 1, characterized in that: The step of establishing a mapping relationship between the camera coordinate system and the machine coordinate system comprises: Referring to the position coordinates of the cutting head when the automatic cutting device cuts the first marking point on the machine table, moving the camera to align the center point of the camera with the first marking point; Obtaining the first coordinate offset of the camera when it moves; The first coordinate offset is summed with the cutting head position coordinate to obtain the camera center point coordinate; Based on the position coordinates of the camera center point, a mapping relationship between the camera coordinate system and the machine coordinate system is established.
4. The auxiliary positioning method according to claim 3, characterized in that: The step of establishing a mapping relationship between the camera coordinate system and the machine coordinate system based on the camera center point position coordinates comprises: Obtaining the position coordinates of the second marking point cut by the automatic cutting device on the machine platform in the camera coordinate system; Calculate a second coordinate offset of the position coordinates of the second marking point in the camera coordinate system from the position coordinates of the camera center point; Calculating a relative offset based on the actual distance represented by the calibrated camera pixels and the second coordinate offset; Based on the relative offset and the position coordinates of the camera center point, calculating the position coordinates of the second marking point in the machine coordinate system; Based on the position coordinates of the second marking point in the camera coordinate system and the position coordinates of the second marking point in the platform coordinate system, a mapping relationship between the camera coordinate system and the platform coordinate system is established.
5. The auxiliary positioning method according to claim 3, characterized in that: The step of establishing a mapping relationship between the camera coordinate system and the machine coordinate system based on the camera center point position coordinates comprises: Obtaining the position coordinates of the second marking point cut by the automatic cutting device on the machine platform in the camera coordinate system when the camera takes the first shot; Calculate a second coordinate offset of the position coordinates of the second marking point in the camera coordinate system from the position coordinates of the camera center point; Calculating a camera movement offset based on the actual distance represented by the calibrated camera pixels and the second coordinate offset; Move the camera according to the camera movement offset, and obtain the position coordinates of the second marking point in the camera coordinate system when the camera takes pictures again; Calculate a third coordinate offset between the position coordinates of the reacquired second marking point in the camera coordinate system and the position coordinates of the camera center point; Calculate the relative offset based on the actual distance represented by the calibrated camera pixels and the third coordinate offset; Based on the relative offset and the position coordinates of the camera center point, calculating the position coordinates of the second marking point in the machine coordinate system; Based on the position coordinates of the second marking point in the camera coordinate system and the position coordinates of the second marking point in the platform coordinate system, a mapping relationship between the camera coordinate system and the platform coordinate system is established.
6. The auxiliary positioning method according to claim 5, characterized in that: Before the step of obtaining the position coordinates of the second marking point cut by the automatic cutting device on the machine platform in the camera coordinate system when the camera takes the first shot, it also includes: Obtaining edge distortion parameters of the camera, and comparing the edge distortion parameters with a preset parameter threshold; When the edge distortion parameter exceeds the parameter threshold, the step of obtaining the position coordinates of the second marking point cut by the automatic cutting device on the machine platform in the camera coordinate system when the camera takes the first shot is performed.
7. An auxiliary positioning device, applied to an automatic cutting device provided with a stage and a camera, characterized in that: include: Establishing a module for establishing a mapping relationship between the camera coordinate system and the machine coordinate system; The acquisition module is used to control the camera to shoot the product to be processed, convert the target shot image into a grayscale image, and then perform threshold segmentation on the grayscale image to generate a binary image; perform expansion processing on the binary image to form a grid marker point connected area; perform feature filtering with reference to the feature range of the grid marker point connected area to obtain a mask containing only grid marker points; perform minimum circumscribed rectangle calibration on the mask, and determine the center point coordinates of the minimum circumscribed rectangle as the center position coordinates of the marker point; wherein, the product to be processed is provided with grid marker points, and the feature range includes: width and height range, area range, perimeter range, and inclination angle range; A calculation module, used for calculating the actual position coordinates of the machine platform corresponding to the center position coordinates of the marking point based on the mapping relationship; The adjustment module is used to adjust the position of the processing vector diagram of the product to be processed according to the actual position coordinates of the machine platform.
8. An electronic device, characterized in that: include: Memory, processor and bus; The bus is used to realize the connection and communication between the memory and the processor; The processor is used to execute the computer program stored in the memory; When the processor executes the computer program, the steps in the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 6 are implemented.
