CN111932517B - Contour mapping method and device for residual plate, electronic equipment and storage medium - Google Patents

Contour mapping method and device for residual plate, electronic equipment and storage medium Download PDF

Info

Publication number
CN111932517B
CN111932517B CN202010800646.3A CN202010800646A CN111932517B CN 111932517 B CN111932517 B CN 111932517B CN 202010800646 A CN202010800646 A CN 202010800646A CN 111932517 B CN111932517 B CN 111932517B
Authority
CN
China
Prior art keywords
points
position information
contour
sampling
coordinate system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010800646.3A
Other languages
Chinese (zh)
Other versions
CN111932517A (en
Inventor
万章
殷鄂湘
徐超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Friendess Electronic Technology Co ltd
Original Assignee
Shanghai Friendess Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Friendess Electronic Technology Co ltd filed Critical Shanghai Friendess Electronic Technology Co ltd
Priority to CN202010800646.3A priority Critical patent/CN111932517B/en
Publication of CN111932517A publication Critical patent/CN111932517A/en
Application granted granted Critical
Publication of CN111932517B publication Critical patent/CN111932517B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a contour mapping method and device for a residual material plate, electronic equipment and a storage medium, wherein the contour mapping method comprises the following steps: determining sampling point position information; the sampling point position information characterizes the positions of N contour sampling points of the target plate under a mechanical coordinate system; according to the position information of the sampling points, controlling the local acquisition equipment to translate to the positions of the N contour sampling points; after reaching the position of one contour sampling point each time, controlling the local acquisition equipment to acquire a corresponding local image; searching edge points in each partial image, and determining target position information of the edge points under a mechanical coordinate system according to the positions of the edge points in the corresponding partial images, the position information of the sampling points and the pre-calibrated unit pixel size information; and generating a drawing of the target plate according to the target position information of each edge point.

Description

Contour mapping method and device for residual plate, electronic equipment and storage medium
Technical Field
The invention relates to the field of plate cutting, in particular to a contour mapping method and device for residual plate, electronic equipment and storage medium.
Background
In the cutting process of the plate, if the plate surplus material after the processing task is finished is treated as waste material, the waste of the plate can be caused. Therefore, the surplus board material can be reused. Before the surplus material of the plate is reused, the outline of the surplus material of the plate is required to be drawn, a corresponding drawing is obtained, and then the plate can be cut based on the drawing when the surplus material of the plate is reused.
In the prior art, the shape, the size and the like of the excess material plate are usually determined by adopting a manual measurement mode, and then, corresponding drawings are drawn based on the manual measurement result. However, manual mapping is less accurate and efficient.
Disclosure of Invention
The invention provides a contour mapping method and device for a residual material plate, electronic equipment and a storage medium, and aims to solve the problem that the precision and efficiency of manual mapping are low.
According to a first aspect of the present invention, there is provided a method of mapping a contour of a blank sheet, comprising:
determining sampling point position information; the sampling point position information characterizes the positions of N contour sampling points of the target plate under a mechanical coordinate system; wherein N is an integer greater than or equal to 1;
according to the position information of the sampling points, controlling the local acquisition equipment to translate to the positions of the N contour sampling points; after reaching the position of one contour sampling point each time, controlling the local acquisition equipment to acquire a corresponding local image;
searching edge points in each partial image, and determining target position information of the edge points under a mechanical coordinate system according to the positions of the edge points in the corresponding partial images, the position information of the sampling points and the pre-calibrated unit pixel size information; the unit pixel size information characterizes the size of the unit pixels in the partial image under the mechanical coordinate system;
and generating a drawing of the target plate according to the target position information of each edge point.
Optionally, determining the sampling point location information includes:
controlling global acquisition equipment to acquire global images of the target plates;
and extracting the rough contour of the target plate from the global image, and determining N sampling points in the rough contour as N contour sampling points to obtain the position information of the sampling points.
Optionally, before extracting the rough contour of the target board from the global image, the method further includes: and carrying out binarization processing on the global image.
Optionally, determining N sampling points in the coarse contour as the N contour sampling points, to obtain the sampling point position information includes:
and determining the sampling point position information according to the positions of the N sampling points in the global image and the conversion relation between the image coordinate system of the total image and the mechanical coordinate system, which are calibrated in advance.
Optionally, before determining the sampling point position information, the method further includes:
selecting any at least four position points in the visual field range of the global acquisition equipment, and determining first position information of the at least four position points under an image coordinate system of the global acquisition equipment; any three of the at least four location points are non-collinear;
controlling the cutting head and/or the code spraying component to sequentially move to the at least four position points, and determining second position information of the at least four position points under the mechanical coordinate system;
and calibrating the conversion relation according to the first position information and the second position information.
Optionally, before determining the sampling point position information, the method further includes:
selecting any at least two position points in the visual field range of the local acquisition equipment, and determining third position information of the at least two position points under an image coordinate system of the local acquisition equipment;
determining distance information of the at least two position points in the mechanical coordinate system;
and calibrating the unit pixel size information according to the third position information and the distance information.
Optionally, the target plate is provided with a hole, the N profile sampling points include sampling points of an outer profile of the target plate and sampling points of an edge profile of the hole, and the found edge points include edge points of the outer profile of the target plate and edge points of the edge profile of the hole.
According to a second aspect of the present invention, there is provided a contour mapping apparatus for a blank sheet, comprising:
the sampling point determining module is used for determining the position information of the sampling points; the sampling point position information characterizes the positions of N contour sampling points of the target plate under a mechanical coordinate system; wherein N is an integer greater than or equal to 1;
the local acquisition module is used for controlling the local acquisition equipment to translate to the positions of the N contour sampling points according to the position information of the sampling points; after each time reaching the position of one contour sampling point, controlling the local acquisition equipment to acquire a corresponding local image;
the edge point determining module is used for searching edge points in each partial image and determining target position information of the edge points under a mechanical coordinate system according to the positions of the edge points in the corresponding partial images, the position information of the sampling points and the pre-calibrated unit pixel size information; the unit pixel size information characterizes the size of the unit pixels in the partial image under the mechanical coordinate system;
and the drawing generation module is used for generating a drawing of the target plate according to the target position information of each edge point.
According to a third aspect of the present invention, there is provided an electronic device comprising a processor and a memory,
the memory is used for storing codes and related data;
the processor is configured to execute the code in the memory to implement the method according to the first aspect and its alternatives.
According to a fourth aspect of the present invention there is provided a storage medium having stored thereon a computer program which when executed by a processor implements the method of the first aspect and alternatives thereof.
According to the contour mapping method, the contour mapping device, the contour mapping electronic device and the contour mapping storage medium for the residual plate, through controlling the local acquisition equipment to translate and acquire the local image and searching the edge points in the local image, the target position information of each edge point of the target plate under the mechanical coordinate system can be automatically determined, so that accurate and sufficient basis is provided for drawing generation, manual participation is not needed in the process, the defect of mapping realized completely through manual work is avoided, and the mapping precision and efficiency are effectively improved.
Meanwhile, the invention can firstly determine the sampled contour sampling points, then control the local acquisition equipment to reach the corresponding positions for image acquisition, and can be favorable for obtaining the target position information with higher precision, thereby further improving the mapping precision. In addition, in the process of determining the target position information, the method can be processed based on the pre-calibrated single-bit pixel size information, and compared with a mode of calibrating a conversion relation by using a conversion matrix, the method has the advantages of being relatively simple and efficient in processing and calibrating.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present invention;
FIG. 2a is a schematic flow chart of a method for mapping the contour of a blank sheet according to an embodiment of the invention;
FIG. 2b is a second flow chart of a method for mapping the contour of a blank according to an embodiment of the invention;
FIG. 3 is a diagram of a global image after binarization according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of the profile of a target sheet in accordance with one embodiment of the present invention;
FIG. 5 is a schematic view of a partial profile of a target sheet in accordance with an embodiment of the invention;
FIG. 6 is a flow chart of a method of mapping the contour of a blank sheet in accordance with an embodiment of the present invention;
FIG. 7 is a flow chart of acquiring rough position information of a contour according to an embodiment of the present invention;
FIG. 8 is a flow chart of obtaining contour accurate position information according to an embodiment of the present invention;
FIG. 9 is a flow chart III of a method for mapping the contour of a blank sheet according to an embodiment of the invention;
FIG. 10 is a flow chart of a method for mapping the contour of a blank sheet according to an embodiment of the invention;
FIG. 11 is a schematic view of a program module of a contour mapping apparatus for a blank sheet according to an embodiment of the invention;
FIG. 12 is a schematic diagram of a program module II of a contour mapping apparatus for a blank sheet according to an embodiment of the invention;
FIG. 13 is a schematic diagram of a program module III of a contour mapping apparatus for a blank sheet according to an embodiment of the invention;
fig. 14 is a schematic view of the configuration of an electronic device in an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without creative efforts, are within the protection scope of the invention.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The technical scheme of the invention is described in detail below by specific examples. The following specific embodiments may be combined with each other and some embodiments may not be repeated for the same or similar concepts or processes.
Referring to fig. 1, in an application scenario of the embodiment of the present invention, a local collection device 102 may be used, which may move along with a cutting head 103, and a board 104 may be disposed on a table 105 of a machine tool, which may be a remainder board to be mapped.
In some application scenarios, a global acquisition device 101 may also be employed, which global acquisition device 101 may acquire a global image of the sheet 104. The position of the global acquisition device 101 in the machine tool may be fixed and the position of the global acquisition device 101 relative to the sheet material 104 may be fixed.
The global acquisition device 101 and the local acquisition device 102 may be any device with image acquisition capability, for example, a camera, a mobile phone, a tablet computer, or other devices with image acquisition capability but not dedicated to image acquisition. Meanwhile, since the global image needs to be acquired by the global acquisition apparatus 101 and only the local image needs to be acquired by the local acquisition apparatus 102, the field of view of the global acquisition apparatus is generally large, and the pixel precision may be configured to be low, the field of view of the local acquisition apparatus is generally small, but the pixel precision may be configured to be high.
Further, the global acquisition device 101 may be installed to: the global acquisition device 101 may also be oriented perpendicular to the sheet surface and may be mounted to: the global acquisition device 101 is oriented non-perpendicularly to the sheet surface and the local acquisition device 102 is typically mounted as: the local collection device 102 is oriented perpendicular to the sheet surface, and embodiments of the present invention do not exclude implementations that are not perpendicular to the sheet surface.
In practical implementation, referring to fig. 1, a plate 104 may be placed on a machine table 105, a global collecting device 101 (for example, may be a camera 1) is fixed directly above the plate 104, a local collecting device 102 (for example, may be a camera 2) is fixed on the right side of a cutting head 103, and the two devices are in parallel relation, where the local collecting device 102 (for example, may be a camera 2) and the cutting head 103 can move together within the range of the machine.
Referring to fig. 2a, the method for mapping the contour of the blank sheet includes:
s201: determining sampling point position information;
s202: according to the position information of the sampling points, controlling the local acquisition equipment to translate to the positions of the N contour sampling points; after each time reaching the position of one contour sampling point, controlling the local acquisition equipment to acquire a corresponding local image;
s203: searching edge points in each partial image, and determining target position information of the edge points under a mechanical coordinate system according to the positions of the edge points in the corresponding partial images, the position information of the sampling points and the pre-calibrated unit pixel size information;
s204: and generating a drawing of the target plate according to the target position information of each edge point.
The sampling point position information characterizes the positions of N contour sampling points of the target plate under a mechanical coordinate system; wherein N is an integer greater than or equal to 1. Specifically, the position information of the sampling point may be, for example, coordinates of a contour sampling point in a mechanical coordinate system.
The mechanical coordinate system is understood to be the coordinate system adopted when the machine tool controls the cutting head to move, and the mechanical coordinate system is also understood to be the coordinate system adopted when the local acquisition equipment moves because the local acquisition equipment can move along with the cutting head.
The unit pixel size information characterizes the size of the unit pixels in the partial image under the mechanical coordinate system; for example: if a unit pixel refers to a single pixel, the size of the unit pixel may be, for example, the length, width, diagonal length, etc. of the single pixel when projected to the mechanical coordinate system, and further, if a single pixel is square, the size of the unit pixel may be described by the side length, diagonal length, etc. of the single pixel when projected to the mechanical coordinate system. If the unit pixel refers to a combination of a plurality of pixels arranged in an array, the size of the unit pixel may be, for example, a length, a width, a diagonal length, or the like of a pixel region of the plurality of pixels arranged in an array when projected to a mechanical coordinate system. The single pixel size information may be calibrated later by a calibration process shown in fig. 10.
The target plate can be provided with holes or not, and if the target plate is provided with holes, the target plate is provided with holes: the N contour sampling points comprise sampling points of the outer contour of the target plate and sampling points of the edge contour of the hole, and the searched edge points also comprise edge points of the outer contour of the target plate and edge points of the edge contour of the hole.
The drawing may be, for example, a CAD drawing, but embodiments of other format drawings are not excluded.
According to the scheme, through controlling the process of translating and collecting the local image by the local collecting equipment and searching the edge points in the local image, the target position information of each edge point of the target plate under the mechanical coordinate system can be automatically determined, so that accurate and sufficient basis is provided for drawing generation, manual participation is not needed in the process, the defect of completely realizing mapping by manual work is avoided, and the mapping precision and efficiency are effectively improved.
Meanwhile, the embodiment of the invention can firstly determine the sampled contour sampling points and then control the local acquisition equipment to reach the corresponding position for image acquisition, thereby being beneficial to obtaining the target position information with higher precision and further improving the mapping precision. In addition, in the process of determining the target position information, the processing can be performed based on the pre-calibrated unit pixel size information, and compared with the mode of calibrating the conversion relation by using the conversion matrix, the embodiment of the invention has the positive effects that the processing process and the calibration process are relatively simple and efficient.
The profile sampling points can be manually specified or automatically determined, can be determined based on a visual mode, and do not exclude other modes of determination, for example, the profile sampling points can be selected by controlling the movement of the cutting head and acquiring capacitance detection signals of the cutting head in the movement process. In any manner, without departing from the scope of embodiments of the present invention.
One implementation for vision will be highlighted below as an example.
Referring to fig. 2b, in one embodiment, step S201 may include:
s2011: controlling global acquisition equipment to acquire global images of the target plates;
s2013: and extracting the rough contour of the target plate from the global image, and determining N sampling points in the rough contour as N contour sampling points to obtain the position information of the sampling points.
In a further alternative, before step S2013, the method may further include:
s2012: and carrying out binarization processing on the global image.
The binarized image may be as shown in fig. 3, for example.
In a further alternative, in step S2013, determining N sampling points in the coarse contour as the N contour sampling points to obtain the sampling point position information may specifically include:
and determining the sampling point position information according to the positions of the N sampling points in the global image and the conversion relation between the image coordinate system of the total image and the mechanical coordinate system, which are calibrated in advance.
The conversion relation can be understood as any information calibrated in advance, for example, a conversion matrix or a group of conversion matrices. The conversion relationship can be calibrated later by the processing shown in fig. 9.
In an example, corresponding to steps S201, S202, S203 and S204, please refer to fig. 6 to 8, the global acquisition device referred to above may be, for example, camera 1, the local acquisition device may be, for example, camera 2, the camera 1 uses a large-field-of-view camera, which can shoot all the plates, but has lower pixel accuracy; before using the camera 1, the camera needs to be calibrated;
then, the camera 1 can be used for photographing, and the acquired plate picture is subjected to binarization processing by a computer to obtain a binary image shown in fig. 3, wherein the plate is a white area, and the holes and the outside of the boundary are black areas).
Referring to fig. 7, the process of extracting the contour information (i.e. the position information of the contour sampling points) from the binarized global image (i.e. the process of step S2013) may specifically be, for example:
s20131: the binary image is recorded as G (x, y), x represents the horizontal axis coordinate of the image, y represents the vertical axis coordinate of the image, and G (x, y) =0 represents that the pixel value at the (x, y) position in the image coordinate system is black; g (x, y) =1 represents that in the image coordinate system, the pixel value of the (x, y) position is white;
s20132: notation S (x, y), wherein S (x, y) =g (x-1, y) +g (x+1, y) +g (x, y-1) +g (x, y+1); it can be seen that the sum of the values (0 or 1) after binarization of the four pixels above, below, left and right of the pixel can be taken as the S value of the pixel;
s20133: let E (x, y) =s (x, y), traverse S (x, y), when S (x, y) =1, 2,3, E (x, y) =1, otherwise E (x, y) =0; as can be seen, if the pixel value of 1,2 or 3 pixels in four adjacent pixels is 1, the E value of the pixel is taken as 1, otherwise, the E value of the pixel is taken as 0;
s20134: after S20133, E (x, y) is obtained, as shown in fig. 4, where when the contour point is white, the corresponding E (x, y) =1;
s20135: traversing E (x, y), and arranging white points in E (x, y) into a continuous contour point set C1 according to a backtracking algorithm; the contour point set C1 is obtained through calculation in the process, and can be regarded as the rough contour of the target plate extracted from the global image;
s20136: sampling the contour point set C1 once every 20 points to obtain a discrete contour point set C2; the contour point set C2 is obtained through calculation in the above process, and can be regarded as position information of N contour sampling points under an image coordinate system.
S20137: converting the contour point set C2 into a coordinate point set W under a mechanical coordinate system of the machine tool by combining the calibration result of the camera 1; further, the coordinate point set W can be understood as the above-mentioned sampling point position information, and can be understood as the rough position of the plate contour.
Further, by the above process, the step "acquire rough information of the sheet material profile" shown in fig. 6, that is, the process of step S201 is realized.
Referring to fig. 8, in the specific examples of steps S202 and S203, the camera 2 (i.e. the local collection device) may be used to take a picture, wherein the camera 2 uses a small-field-of-view camera, and only a field of view of 2cm x 2cm can be taken, so that the pixel accuracy is high (the camera needs to be calibrated before using the camera 2).
On the basis of obtaining rough position information of the plate profile, the machine tool can be controlled to move to coordinate point positions in the coordinate point set W in sequence (namely, the position of the local acquisition equipment and the cutting head translating to corresponding coordinate points is controlled); every time the camera 2 is moved to a coordinate point position, the camera 2 can be controlled to shoot, then edge detection is carried out on the picture to obtain the picture of fig. 5, wherein the view range of the camera 2 is small, and a local enlarged picture which is the outline of the plate at the current position is obtained, so that higher precision can be achieved.
Then, the coordinates of the edge points (for example, white pixels in the figure) can be converted into mechanical coordinates of the machine tool according to the calibration result of the camera 2 and stored in the point set E; after all the coordinate positions in the set of coordinate points W have been moved, a precise set of coordinate points E of the sheet profile can be obtained, which can be regarded as the target position information referred to above.
Further, through the above process, the step "acquire accurate information of the sheet profile" shown in fig. 6 can be realized, that is, the processing procedures of steps S202 and S203 are realized.
Furthermore:
the pixel precision referred to above may refer to an actual length corresponding to a single pixel in an image, and it is generally considered that the smaller the corresponding actual length is, the more accurate the result is calculated by image processing, and the pixel precision may be described by the unit pixel size information referred to above;
the image obtained after the binarization process can also be understood as a binary image, which can be understood as a picture of only two colors, black and white, with a pixel value of 0 representing black and a pixel value of 1 representing white. Correspondingly, the outline information related to the above can be understood as coordinate information of the boundary between the black and white pixels in the binary image, and the coordinate information can be continuous;
the image coordinate system of the global acquisition apparatus related to above may be, for example, a coordinate system established with the upper left corner of the image as the origin, and the mechanical coordinate system related to above may be, for example, a coordinate system established with the lower left corner of the machine tool as the origin.
If the number of holes in the plate is less than 10 and the size of the plate is less than 6mx 2.5m in a specific application scene, the time for forming the drawing by the visual mapping can be within 20s, and the precision of the CAD drawing generated by the mapping can be within 0.1 mm.
Some or all of the above steps S201 to S204 of the present embodiment can be regarded as a processing procedure for computer-controlled laser cutting software.
Taking the camera 1 and the camera 2 as examples, after the camera 1 is fixed, the whole image information (i.e. global image) of the plate can be shot by using the camera 1, rough position information (i.e. position information of sampling contour points in a mechanical coordinate system) of the holes and edges of the plate can be extracted from the image by a binarization and contour extraction method, and the information is transmitted to the laser control software; the laser control software controls the cutting head and the camera 2 to move at a uniform speed according to the rough information of the contour of the plate until all rough positions are traversed, meanwhile, the camera 2 collects pictures and performs image processing, calculates the accurate coordinate position (namely target position information) of the contour of the current plate at the position in a mode of extracting edges, and transmits the accurate position to the laser control software. And finally, generating a drawing by the laser control software according to the transmitted accurate position coordinates.
The above process avoids manual input of the information such as the frame position, the hole position and the like of the plate, and effectively improves the processing efficiency and the accuracy of the information.
In one embodiment, please refer to fig. 9, which specifically illustrates a calibration conversion process, including:
s205: selecting any at least four position points in the visual field range of the global acquisition equipment, and determining first position information of the at least four position points under an image coordinate system of the global acquisition equipment; any three of the at least four location points are non-collinear;
s206: controlling the cutting head and/or the code spraying component to sequentially move to the at least four position points, and determining second position information of the at least four position points under the mechanical coordinate system;
s207: and calibrating the conversion relation according to the first position information and the second position information.
For example, any 4 points (none of the 3 points are collinear) in the field of view of the camera 1 (i.e., the global acquisition device) may be selected, and the coordinates (x) recorded in the camera 1 image coordinate system 1 ,y 1 )、(x 2 ,y 2 )、(x 3 ,y 3 ) The coordinates can be understood as the first position information referred to in step S205.
Then, the nozzle centers of the cutting heads can be sequentially moved to the corresponding four point center positions, and the coordinates (X 1 ,Y 1 ),(X 2 ,Y 2 ),(X 3 ,Y 3 ) The coordinates may be understood as the second location information referred to in step S206.
According to the above coordinate points (i.e., the first position information and the second position information), they can be substituted into the formula:marking the calibration matrix as +.>Unknown parameters of M can be obtained; after determining the matrix M, for any point (X, Y) on the camera 1, the corresponding point (X, Y) in the mechanical coordinate system can be obtained by the above formula; thus, the matrix M can be understood as a calibration result of the conversion relation.
In one embodiment, please refer to fig. 10, which specifically illustrates an implementation process of calibrating size information of a unit pixel, including:
s208: selecting any at least two position points in the visual field range of the local acquisition equipment, and determining third position information of the at least two position points under an image coordinate system of the local acquisition equipment;
s209: determining distance information of the at least two position points in the mechanical coordinate system;
s210: and calibrating the unit pixel size information according to the third position information and the distance information.
If the number of the location points determined in steps S208 and S209 is two, the distance information is the distance information of the two location points, and if the number is at least three, the distance information may be, for example, a set of distance information between every two location points.
The following is described by taking two position points as examples:
in a specific example, since the field of view of the camera 2 (i.e. the local acquisition device) is very small, any two points a (x) in the field of view of the camera 2 can be selected first 1 ,y 1 ) And B (x) 2 ,y 2 ) Measuring the distance D of AB under a mechanical coordinate system; calculating the pixel length L:
the pixel length L is the calibrated unit pixel size information, which can be understood as the actual side length of a single square pixel or the actual side length of a square area formed by a plurality of pixel arrays.
In step S204, when the unit pixel size information is used, if the image coordinate system of the camera 2 is set to the origin of the image center, and the center of the partial image can reach the contour sampling point when the camera 2 is controlled to translate, then: the coordinates of the single edge point in the mechanical coordinate system in the target position information may be, for example:
(X i +L*x j ,Y i +L*y j )。
wherein, the liquid crystal display device comprises a liquid crystal display device,
(x j ,y j ) Is the coordinate of the camera 2 in the image coordinate system, and at the same time, x is j The value of (2) can be matched with the number of pixels spaced along the X-axis between the edge point and the origin in the image coordinate system, wherein y j The value of (2) can be matched with the number of pixels which are spaced along the Y-axis direction between the edge point and the origin in the image coordinate system, x j And x j-1 Can be separated by one unit pixel, y j And y is j-1 Can be separated by one unit pixel, x j And x j-1 In the mechanical coordinate system, y j And y is j-1 The length of the intervals of (a) in the mechanical coordinate system is the actual length of the unit pixels, and can be understood as the unit pixel size information referred to above.
(X i ,Y i ) The coordinates of the corresponding contour sampling points in a mechanical coordinate system are obtained.
In summary, in the contour mapping method of the excess material plate provided by the embodiment of the invention, through controlling the process of translating and collecting the local image by the local collecting equipment and searching the edge points in the local image, the target position information of each edge point of the target plate under the mechanical coordinate system can be automatically determined, thereby providing accurate and sufficient basis for the generation of drawings, avoiding the defect of mapping by completely realizing manual work in the process, and effectively improving the mapping precision and efficiency.
Referring to fig. 11, a contour mapping apparatus 300 for a blank sheet includes:
a sampling point determining module 301, configured to determine sampling point location information; the sampling point position information characterizes the positions of N contour sampling points of the target plate under a mechanical coordinate system; wherein N is an integer greater than or equal to 1;
the local acquisition module 302 is configured to control the local acquisition device to translate to the positions of the N profile sampling points according to the sampling point position information; after reaching the position of one contour sampling point each time, controlling the local acquisition equipment to acquire a corresponding local image;
the edge point determining module 303 is configured to find an edge point in each partial image, and determine target position information of the edge point under a mechanical coordinate system according to a position of the edge point in the corresponding partial image, the position information of the sampling point, and pre-calibrated single pixel size information; the single pixel size information characterizes the size of the single pixel in the local image under the mechanical coordinate system;
and the drawing generation module 304 is configured to generate a drawing of the target board according to the target position information of each edge point.
Optionally, the sampling point determining module 301 is specifically configured to:
controlling global acquisition equipment to acquire global images of the target plates;
and extracting the rough contour of the target plate from the global image, and determining N sampling points in the rough contour as N contour sampling points to obtain the position information of the sampling points.
Optionally, the sampling point determining module 301 is further configured to: and performing binarization processing on the global image.
Optionally, the edge point determining module 303 is specifically configured to:
and determining the sampling point position information according to the positions of the N sampling points in the global image and the conversion relation between the image coordinate system of the total image and the mechanical coordinate system, which are calibrated in advance.
Optionally, referring to fig. 12, the apparatus further includes:
a first selecting module 305, configured to select any at least four location points within a field of view of the global collecting device, and determine first location information of the at least four location points under an image coordinate system of the global collecting device; any three of the at least four location points are non-collinear;
a movement determining module 306, configured to control the cutting head and/or the code spraying component to sequentially move to the at least four location points, and determine second location information of the at least four location points under the mechanical coordinate system;
the conversion calibration module 307 is configured to calibrate the conversion relationship according to the first position information and the second position information.
Optionally, referring to fig. 13, the apparatus further includes:
a second selecting module 308, configured to select any at least two location points within a field of view of the local acquisition device, and determine third location information of the at least two location points under an image coordinate system of the local acquisition device;
a distance determining module 309, configured to determine distance information of the at least two location points in the mechanical coordinate system;
the pixel size calibration module 310 is configured to calibrate the unit pixel size information according to the third position information and the distance information.
Optionally, the target plate is provided with a hole, the N profile sampling points include sampling points of an outer profile of the target plate and sampling points of an edge profile of the hole, and the found edge points include edge points of the outer profile of the target plate and edge points of the edge profile of the hole.
In summary, in the contour mapping device for the excess material plate provided by the embodiment of the invention, through controlling the process of translating and collecting the local image by the local collecting equipment and searching the edge points in the local image, the target position information of each edge point of the target plate under the mechanical coordinate system can be automatically determined, so that accurate and sufficient basis is provided for the generation of drawings, manual participation is not needed in the process, the defect of completely realizing mapping by manual work is avoided, and the mapping precision and efficiency are effectively improved.
Fig. 14 is a schematic view of the configuration of an electronic device in an embodiment of the invention.
Referring to fig. 14, there is provided an electronic device 40 including:
a processor 41; the method comprises the steps of,
a memory 42 for storing executable instructions of the processor;
wherein the processor 41 is configured to perform the above-mentioned method via execution of the executable instructions.
The processor 41 is capable of communicating with the memory 42 via a bus 43.
The embodiments of the present invention also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the methods referred to above.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer-readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media such as ROM, RAM, magnetic or optical disks, etc. that can store the program code.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (7)

1. A method of mapping a contour of a blank sheet, comprising:
determining sampling point position information; the sampling point position information characterizes the positions of N contour sampling points of the target plate under a mechanical coordinate system; wherein N is an integer greater than or equal to 1;
according to the position information of the sampling points, controlling the local acquisition equipment to translate to the positions of the N contour sampling points; after reaching the position of one contour sampling point each time, controlling the local acquisition equipment to acquire a corresponding local image;
searching edge points in each partial image, and determining target position information of the edge points under a mechanical coordinate system according to the positions of the edge points in the corresponding partial images, the position information of the sampling points and the pre-calibrated unit pixel size information; the unit pixel size information characterizes the size of the unit pixels in the partial image under the mechanical coordinate system;
generating a drawing of the target plate according to the target position information of each edge point;
determining position information of a sampling point, wherein the method comprises the steps of controlling global acquisition equipment to acquire a global image of the target plate;
extracting a rough contour of the target plate from the global image, and determining N sampling points in the rough contour as N contour sampling points to obtain the position information of the sampling points;
before extracting the rough outline of the target plate from the global image, binarizing the global image;
and determining N sampling points in the rough contour as N contour sampling points to obtain the sampling point position information, wherein the sampling point position information is determined according to the positions of the N sampling points in the global image and the conversion relation between the pre-calibrated image coordinate system of the global image and the mechanical coordinate system.
2. The method of mapping a contour of a blank sheet as defined in claim 1, further comprising, prior to determining the sampling point location information:
selecting any at least four position points in the visual field range of the global acquisition equipment, and determining first position information of the at least four position points under an image coordinate system of the global acquisition equipment; any three of the at least four location points are non-collinear;
controlling the cutting head and/or the code spraying component to sequentially move to the at least four position points, and determining second position information of the at least four position points under the mechanical coordinate system;
and calibrating the conversion relation according to the first position information and the second position information.
3. The method of mapping a contour of a cull sheet as defined in claim 2, further comprising, prior to determining the sampling point location information:
selecting any at least two position points in the visual field range of the local acquisition equipment, and determining third position information of the at least two position points under an image coordinate system of the local acquisition equipment;
determining distance information of the at least two position points in the mechanical coordinate system;
and calibrating the unit pixel size information according to the third position information and the distance information.
4. A method of profiling a blank sheet according to claim 3, wherein the target sheet has a hole, the N profile sampling points include sampling points of the outer profile of the target sheet and sampling points of the edge profile of the hole, and the found edge points include edge points of the outer profile of the target sheet and edge points of the edge profile of the hole.
5. A device for contour mapping of a blank sheet, characterized by performing a contour mapping method of a blank sheet as defined in any one of claims 1-4, comprising:
the sampling point determining module is used for determining the position information of the sampling points; the sampling point position information characterizes the positions of N contour sampling points of the target plate under a mechanical coordinate system; wherein N is an integer greater than or equal to 1;
the local acquisition module is used for controlling the local acquisition equipment to translate to the positions of the N contour sampling points according to the position information of the sampling points; after reaching the position of one contour sampling point each time, controlling the local acquisition equipment to acquire a corresponding local image;
the edge point determining module is used for searching edge points in each partial image and determining target position information of the edge points under a mechanical coordinate system according to the positions of the edge points in the corresponding partial images, the position information of the sampling points and the pre-calibrated unit pixel size information; the unit pixel size information characterizes the size of the unit pixels in the partial image under the mechanical coordinate system;
and the drawing generation module is used for generating a drawing of the target plate according to the target position information of each edge point.
6. An electronic device, comprising a processor and a memory,
the memory is used for storing codes;
the processor for executing code in the memory for implementing the method of any one of claims 1 to 4.
7. A storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of claims 1 to 4.
CN202010800646.3A 2020-08-11 2020-08-11 Contour mapping method and device for residual plate, electronic equipment and storage medium Active CN111932517B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010800646.3A CN111932517B (en) 2020-08-11 2020-08-11 Contour mapping method and device for residual plate, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010800646.3A CN111932517B (en) 2020-08-11 2020-08-11 Contour mapping method and device for residual plate, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111932517A CN111932517A (en) 2020-11-13
CN111932517B true CN111932517B (en) 2023-08-15

Family

ID=73306541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010800646.3A Active CN111932517B (en) 2020-08-11 2020-08-11 Contour mapping method and device for residual plate, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111932517B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114782474B (en) * 2022-05-16 2022-12-20 杭州未名信科科技有限公司 Self-adaptive locking screw pressing method and device and storage medium
CN116071429B (en) * 2023-03-29 2023-06-16 天津市再登软件有限公司 Method and device for identifying outline of sub-pattern, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104715106A (en) * 2015-02-12 2015-06-17 联合汽车电子有限公司 Part measuring and drawing method
CN106022337A (en) * 2016-05-22 2016-10-12 复旦大学 Planar object detection method based on continuous edge characteristic
CN107240090A (en) * 2017-04-18 2017-10-10 上海柏楚电子科技有限公司 A kind of method of sheet material contours extract
CN107942949A (en) * 2017-03-31 2018-04-20 沈机(上海)智能系统研发设计有限公司 A kind of lathe vision positioning method and system, lathe

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104715106A (en) * 2015-02-12 2015-06-17 联合汽车电子有限公司 Part measuring and drawing method
CN106022337A (en) * 2016-05-22 2016-10-12 复旦大学 Planar object detection method based on continuous edge characteristic
CN107942949A (en) * 2017-03-31 2018-04-20 沈机(上海)智能系统研发设计有限公司 A kind of lathe vision positioning method and system, lathe
CN107240090A (en) * 2017-04-18 2017-10-10 上海柏楚电子科技有限公司 A kind of method of sheet material contours extract

Also Published As

Publication number Publication date
CN111932517A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
CN111179358B (en) Calibration method, device, equipment and storage medium
EP3449466B1 (en) Pallet detection using units of physical length
CN109543665B (en) Image positioning method and device
CN109801333B (en) Volume measurement method, device and system and computing equipment
CN113592950B (en) Multi-camera calibration method and related equipment in large space environment based on optical dynamic capturing
US7747080B2 (en) System and method for scanning edges of a workpiece
CN108562250B (en) Keyboard keycap flatness rapid measurement method and device based on structured light imaging
CN111932517B (en) Contour mapping method and device for residual plate, electronic equipment and storage medium
JP2003254748A (en) Stereo image characteristic inspection system
CN104760812B (en) Product real-time positioning system and method on conveyer belt based on monocular vision
CN106952262B (en) Ship plate machining precision analysis method based on stereoscopic vision
CN110533649B (en) Unmanned aerial vehicle general structure crack identification and detection device and method
CN113538583A (en) Method for accurately positioning position of workpiece on machine tool and vision system
CN109493418B (en) Three-dimensional point cloud obtaining method based on LabVIEW
CN116342718A (en) Calibration method, device, storage medium and equipment of line laser 3D camera
KR102023087B1 (en) Method for camera calibration
CN110223356A (en) A kind of monocular camera full automatic calibration method based on energy growth
CN114396875A (en) Rectangular parcel volume measurement method based on vertical shooting of depth camera
CN113538399A (en) Method for obtaining accurate contour of workpiece, machine tool and storage medium
US20100073550A1 (en) System and method for measuring a border of an image of an object
CN115984197A (en) Defect detection method based on standard PCB image and related device
CN112700415B (en) Pen electric shell defect rapid detection algorithm
CN114782556A (en) Camera and laser radar registration method, system and storage medium
CN109509224B (en) Centralized polar coordinate display method for stress of small holes of planar material
CN113570670A (en) Linear array camera calibration method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 200241 No. 1000, Lanxiang Hunan Road, Minhang District, Shanghai

Applicant after: SHANGHAI FRIENDESS ELECTRONIC TECHNOLOGY Co.,Ltd.

Address before: 200241, room 1033, building B, 555 Dongchuan Road, Shanghai, Minhang District

Applicant before: SHANGHAI FRIENDESS ELECTRONIC TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant