CN107204022A - A kind of method that machining path is obtained according to processing curve - Google Patents
A kind of method that machining path is obtained according to processing curve Download PDFInfo
- Publication number
- CN107204022A CN107204022A CN201710399940.6A CN201710399940A CN107204022A CN 107204022 A CN107204022 A CN 107204022A CN 201710399940 A CN201710399940 A CN 201710399940A CN 107204022 A CN107204022 A CN 107204022A
- Authority
- CN
- China
- Prior art keywords
- coordinate
- point
- curve
- path
- difference
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/203—Drawing of straight lines or curves
Abstract
The invention provides a kind of method that machining path is obtained according to processing curve, comprise the following steps:1. curve is obtained:Obtain curved path to be processed from incoming parameter by way of function call from system;2. curve is decoded:Curved path to be processed is projected into plane coordinate system, the coordinate point set of plane coordinate system is sequentially decoded as;3. curve segmentation:Based on difference between adjacent coordinates point, to coordinate point set is divided into multiple coordinate subsets;4. generation paragraph by paragraph:To each coordinate subset, linear fit is carried out, multiple matched curves are obtained;5. synthesis path.The present invention is by way of handling obtain machining path paragraph by paragraph, and the technology realization that operation code is automatically generated before starting for processing provides sufficient premise so that processing automatically generates operation code technology before starting is implemented as possibility.
Description
Technical field
The present invention relates to a kind of method that machining path is obtained according to processing curve.
Background technology
For the cinnabar handicraft design of designed, designed, drawing can only be compareed by dedicated technician after being typically designed
Progressively process, it is impossible to directly generate the operation code of automation processing, automation of the prior art generates machining code, also only
It is the processing compared in real time against drawing by interpolation mode, and cinnabar handicraft airborne dust in processing is larger, compares in real time
Sensor used (such as video is first-class) be able to can not be accurately identified because of airborne dust, so that real-time comparison can not be correctly completed, only
It can depend on first all to generate operation code before processing starts and be only possible to accurately complete to process.
The content of the invention
In order to solve the above technical problems, the invention provides a kind of method that machining path is obtained according to processing curve, should
The method for obtaining machining path according to processing curve is started before certainly by way of handling obtain machining path paragraph by paragraph for processing
The technology of dynamic generation operation code, which is realized, provides sufficient premise so that processing automatically generates the skill of operation code before starting
Art is implemented as possibility.
The present invention is achieved by the following technical programs.
A kind of method that machining path is obtained according to processing curve that the present invention is provided, comprises the following steps:
1. curve is obtained:Obtain curve road to be processed from incoming parameter by way of function call from system
Footpath;
2. curve is decoded:Curved path to be processed is projected into plane coordinate system, plane coordinate system is sequentially decoded as
Coordinate point set;
3. curve segmentation:Based on difference between adjacent coordinates point, to coordinate point set is divided into multiple coordinate subsets;
4. generation paragraph by paragraph:To each coordinate subset, linear fit is carried out, multiple matched curves are obtained;
5. synthesis path:By matched curve arranged in sequence turn into processing curve path set, using processing curve path set as
Function returned data.
The curved path to be processed of the step 1. middle acquisition, is rgb pixel figure;
The step 2. in, during decoding, to per unit pixel, coordinate where capture vegetarian refreshments center is the unit picture
Vegetarian refreshments coordinate.
3. the step comprises the following steps:
3.1:Difference setting value is read from parameter list, and the first coordinate points are set to changing coordinates point;
3.2:The coordinate difference between changing coordinates point and next coordinate points is calculated, is sat until coordinate points are concentrated without next
Punctuate;
3.3:To each coordinate difference, its difference between next coordinate difference is calculated, the difference such as calculated is big
In difference setting value, then the corresponding changing coordinates point of the coordinate difference is labeled as breakpoint;
3.4:A coordinate points are removed for changing coordinates point, step 3.2 is back to, such as coordinate points are concentrated without next coordinate
Point, then into next step;
3.5:Using the first coordinate points as starting point, using breakpoint as end point, by starting point to all seats between end point
Punctuate is added to the first coordinate subset, regard next coordinate points of each breakpoint as starting point, breakpoint or last seat thereafter
Punctuate is end point, and each section of all coordinate points between starting point and end point are sequentially added into coordinate subset respectively.
The step 4. in, linear fit uses quadratic equation with one unknown for linear model.
5. the step 1. to being encapsulated as C language function library.
The step 2. in, first point of coordinate point set order is first point from the bottom to top of the leftmost side.
The beneficial effects of the present invention are:By way of handling obtain machining path paragraph by paragraph, before starting for processing certainly
The technology of dynamic generation operation code, which is realized, provides sufficient premise so that processing automatically generates the skill of operation code before starting
Art is implemented as possibility.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the present invention.
Embodiment
Be described further below technical scheme, but claimed scope be not limited to it is described.
A kind of method that machining path is obtained according to processing curve as shown in Figure 1, comprises the following steps:
1. curve is obtained:Obtain curve road to be processed from incoming parameter by way of function call from system
Footpath;
2. curve is decoded:Curved path to be processed is projected into plane coordinate system, plane coordinate system is sequentially decoded as
Coordinate point set;
3. curve segmentation:Based on difference between adjacent coordinates point, to coordinate point set is divided into multiple coordinate subsets;
4. generation paragraph by paragraph:To each coordinate subset, linear fit is carried out, multiple matched curves are obtained;
5. synthesis path:By matched curve arranged in sequence turn into processing curve path set, using processing curve path set as
Function returned data.
The curved path to be processed of the step 1. middle acquisition, is rgb pixel figure;
The step 2. in, during decoding, to per unit pixel, coordinate where capture vegetarian refreshments center is the unit picture
Vegetarian refreshments coordinate.
3. the step comprises the following steps:
3.1:Difference setting value is read from parameter list, and the first coordinate points are set to changing coordinates point;
3.2:The coordinate difference between changing coordinates point and next coordinate points is calculated, is sat until coordinate points are concentrated without next
Punctuate;
3.3:To each coordinate difference, its difference between next coordinate difference is calculated, the difference such as calculated is big
In difference setting value, then the corresponding changing coordinates point of the coordinate difference is labeled as breakpoint;
3.4:A coordinate points are removed for changing coordinates point, step 3.2 is back to, such as coordinate points are concentrated without next coordinate
Point, then into next step;
3.5:Using the first coordinate points as starting point, using breakpoint as end point, by starting point to all seats between end point
Punctuate is added to the first coordinate subset, regard next coordinate points of each breakpoint as starting point, breakpoint or last seat thereafter
Punctuate is end point, and each section of all coordinate points between starting point and end point are sequentially added into coordinate subset respectively.
The step 4. in, linear fit uses quadratic equation with one unknown for linear model.
5. the step 1. to being encapsulated as C language function library.
The step 2. in, first point of coordinate point set order is first point from the bottom to top of the leftmost side.
In practical operation, precision is high again in leading portion image recognition processes, and what is obtained is also only figure line, not adds
The exercisable regular curve of construction equipment, therefore to realize automatic code generating it may first have to by the curve processing of image be processing
Path, that is, regular curve.
On the other hand, to ensure that height reducing process product working height reduces the design of designer's script, during image recognition
Must be using high precision image collection, but the computing capability of process equipment is limited, and pixel is excessive in high precision image, meeting
Computational efficiency is had a strong impact on, therefore also needs high-precision figure line being converted into the lower machining path of calculating demand, that is, rule is bent
Line.
Steps taken of the present invention, then the problem of can solving the curve processing of image well as regular curve.
Claims (7)
1. a kind of method that machining path is obtained according to processing curve, it is characterised in that:Comprise the following steps:
1. curve is obtained:Obtain curved path to be processed from incoming parameter by way of function call from system;
2. curve is decoded:Curved path to be processed is projected into plane coordinate system, the seat of plane coordinate system is sequentially decoded as
Punctuate collection;
3. curve segmentation:Based on difference between adjacent coordinates point, to coordinate point set is divided into multiple coordinate subsets;
4. generation paragraph by paragraph:To each coordinate subset, linear fit is carried out, multiple matched curves are obtained;
5. synthesis path:Matched curve arranged in sequence is turned into processing curve path set, processing curve path set is regard as function
Returned data.
2. the method as claimed in claim 1 that machining path is obtained according to processing curve, it is characterised in that:The step 1. in
The curved path to be processed obtained, is rgb pixel figure.
3. the method as claimed in claim 1 that machining path is obtained according to processing curve, it is characterised in that:The step is 2.
In, during decoding, to per unit pixel, coordinate where capture vegetarian refreshments center is the unit pixel point coordinates.
4. the method as claimed in claim 1 that machining path is obtained according to processing curve, it is characterised in that:3. the step wraps
Include following steps:
3.1:Difference setting value is read from parameter list, and the first coordinate points are set to changing coordinates point;
3.2:The coordinate difference between changing coordinates point and next coordinate points is calculated, until coordinate points are concentrated without next coordinate
Point;
3.3:To each coordinate difference, its difference between next coordinate difference is calculated, it is poor that the difference such as calculated is more than
It is worth setting value, then the corresponding changing coordinates point of the coordinate difference is labeled as breakpoint;
3.4:A coordinate points are removed for changing coordinates point, step 3.2 is back to, such as coordinate points concentrate no next coordinate points, then
Into next step;
3.5:Using the first coordinate points as starting point, using breakpoint as end point, by starting point to all coordinate points between end point
The first coordinate subset is added to, next coordinate points of each breakpoint are regard as starting point, breakpoint or last coordinate points thereafter
For end point, each section of all coordinate points between starting point and end point are sequentially added to coordinate subset respectively.
5. the method as claimed in claim 1 that machining path is obtained according to processing curve, it is characterised in that:The step is 4.
In, linear fit uses quadratic equation with one unknown for linear model.
6. the method as claimed in claim 1 that machining path is obtained according to processing curve, it is characterised in that:The step is 1. extremely
5. it is encapsulated as C language function library.
7. the method as claimed in claim 1 that machining path is obtained according to processing curve, it is characterised in that:The step is 2.
In, first point of coordinate point set order is first point from the bottom to top of the leftmost side.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710399940.6A CN107204022B (en) | 2017-05-31 | 2017-05-31 | Method for acquiring machining path according to machining curve |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710399940.6A CN107204022B (en) | 2017-05-31 | 2017-05-31 | Method for acquiring machining path according to machining curve |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107204022A true CN107204022A (en) | 2017-09-26 |
CN107204022B CN107204022B (en) | 2021-01-05 |
Family
ID=59906869
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710399940.6A Active CN107204022B (en) | 2017-05-31 | 2017-05-31 | Method for acquiring machining path according to machining curve |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107204022B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090097747A1 (en) * | 2007-10-10 | 2009-04-16 | Himax Technologies Limited | Method of image processing and device thereof |
CN101957609B (en) * | 2010-08-11 | 2012-12-19 | 北京数码大方科技有限公司 | C-axis code generation method and device for multiple-section characteristic processing |
CN104714477A (en) * | 2015-03-13 | 2015-06-17 | 江俊逢 | Machining file planning system and machining file generating method |
CN105446269A (en) * | 2016-01-15 | 2016-03-30 | 广东工业大学 | A profilogram numerical control code generation method based on the genetic algorithm and a numerical control machine tool thereof |
CN105652800A (en) * | 2014-11-28 | 2016-06-08 | 发那科株式会社 | Tool path curve generation method and tool path curve generation apparatus |
CN106020120A (en) * | 2016-07-29 | 2016-10-12 | 芜湖哈特机器人产业技术研究院有限公司 | Method for generating G code by using image based on ios system |
CN106133628A (en) * | 2014-03-26 | 2016-11-16 | 三菱电机株式会社 | For determining the method and system in the path of the cutter of processing groove shapes |
-
2017
- 2017-05-31 CN CN201710399940.6A patent/CN107204022B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090097747A1 (en) * | 2007-10-10 | 2009-04-16 | Himax Technologies Limited | Method of image processing and device thereof |
CN101957609B (en) * | 2010-08-11 | 2012-12-19 | 北京数码大方科技有限公司 | C-axis code generation method and device for multiple-section characteristic processing |
CN106133628A (en) * | 2014-03-26 | 2016-11-16 | 三菱电机株式会社 | For determining the method and system in the path of the cutter of processing groove shapes |
CN105652800A (en) * | 2014-11-28 | 2016-06-08 | 发那科株式会社 | Tool path curve generation method and tool path curve generation apparatus |
CN104714477A (en) * | 2015-03-13 | 2015-06-17 | 江俊逢 | Machining file planning system and machining file generating method |
CN105446269A (en) * | 2016-01-15 | 2016-03-30 | 广东工业大学 | A profilogram numerical control code generation method based on the genetic algorithm and a numerical control machine tool thereof |
CN106020120A (en) * | 2016-07-29 | 2016-10-12 | 芜湖哈特机器人产业技术研究院有限公司 | Method for generating G code by using image based on ios system |
Non-Patent Citations (1)
Title |
---|
张国栋 等: "应用Auto CAD实现数控加工曲线拟合的研究", 《全国第十四届计算机科学及其在仪器仪表中的应用学术交流会论文集》 * |
Also Published As
Publication number | Publication date |
---|---|
CN107204022B (en) | 2021-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8401333B2 (en) | Image processing method and apparatus for multi-resolution feature based image registration | |
CN104573674B (en) | Towards the bar code recognition methods of real time embedded system | |
CN108806059B (en) | Text region positioning method based on note alignment and eight-neighborhood connector offset correction of feature points | |
CN110570481A (en) | calligraphy word stock automatic repairing method and system based on style migration | |
KR20170137170A (en) | Method and apparatus for text image processing | |
CN109614933B (en) | Motion segmentation method based on deterministic fitting | |
US8428365B2 (en) | Image processing apparatus, method and computer program product | |
CN107679437B (en) | Bar code image recognition method based on Zbar | |
JP2014041486A (en) | Signal processing method and signal processing apparatus | |
CN112088393A (en) | Image processing method, device and equipment | |
CN101315664A (en) | Text image preprocessing method for character recognition | |
CN110111243B (en) | Method and device for beautifying handwriting fonts by using AI technology | |
JPH01307878A (en) | Pattern recognizing device | |
CN116168404B (en) | Intelligent document processing method and system based on space transformation | |
CN113780276A (en) | Text detection and identification method and system combined with text classification | |
CN107204022A (en) | A kind of method that machining path is obtained according to processing curve | |
KR101001184B1 (en) | Iterative 3D head pose estimation method using a face normal vector | |
Sun et al. | Uni6Dv2: Noise elimination for 6D pose estimation | |
CN116541912A (en) | Method and device for generating wiring diagram based on CAD image recognition | |
US20220122281A1 (en) | Depth information processing method, apparatus, and storage medium | |
JP5051671B2 (en) | Information processing apparatus, information processing method, and program | |
CN115546796A (en) | Non-contact data acquisition method and system based on visual computation | |
JPS62131382A (en) | Vector conversion system for binary picture | |
CN115221909A (en) | Two-dimensional code identification method, device and equipment and computer readable storage medium | |
CN111104553B (en) | Efficient motor complementary neural network system |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |