Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Curve erasing method and system

A curve and curve drawing technology, applied in the field of image processing, can solve problems such as large amount of calculation, long time, poor user experience, etc., and achieve the effect of small amount of calculation, fast erasing speed, and accurate erasing

Active Publication Date: 2018-11-13
FUJIAN TIANQUAN EDUCATION TECH LTD
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Using the above method to erase curves requires a relatively large amount of calculation, and the mathematical formulas of each curve are different, which may easily cause inaccurate erasure.
[0003] In the prior art, there is also a method of erasing a curve by directly covering the corresponding area of ​​the curve, but it takes a long time to erase a curve, and the eraser needs to be dragged back and forth, and the user experience is poor

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Curve erasing method and system
  • Curve erasing method and system
  • Curve erasing method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0081] Please refer to figure 2 as well as image 3 , Embodiment 1 of the present invention is:

[0082] A curve erasing method, comprising:

[0083] S1: Obtain the coordinates of all points on the curve in an orderly manner according to the curve drawing process to form the first set; specifically, obtain the coordinates of all points on the curve in an orderly manner according to the order of curve drawing through the touchesmove event;

[0084] S2: Calculate the rectangle formed by two adjacent points in the first set, and all the calculated rectangles form the second set; specifically, the calculation of the rectangle formed by two adjacent points in the first set includes: S21: Sequentially compare the rectangles in the first set The abscissa size of the adjacent two points, the smaller abscissa mark is used as the abscissa rx of the upper left corner of the rectangle corresponding to the adjacent two points; The small ordinate is marked as the ordinate ry of the uppe...

specific example

[0090] (1) When drawing a curve on the electronic canvas in the device, the coordinates of all points on the curve are obtained through the response touchesmove event of the device to form an ordered set C1;

[0091] (2) Then obtain the points p1, p2, p3...pn in the set C1 in the order of drawing;

[0092] (3) Calculate the rectangle R formed by two adjacent points (pn-1, pn), specifically: compare the size of pn-1x and pnx, and assign the smaller value to rx as the abscissa of the upper left corner of the rectangle R ;Compare the size of pn-1y and pny, take the smaller value and assign it to ry, as the vertical coordinate of the upper left corner of the rectangle R; subtract pny from pn-1y to get dy, take the absolute value of dy and assign it to rw, as the length of the rectangle R; -1x minus pnx to get dx, take the absolute value of dx and assign it to rh as the width of rectangle R;

[0093] (4) Put all the calculated rectangles R (rx, ry, rw, rh) into the set C2 in order...

Embodiment 2

[0098] Please refer to Figure 5 , the second embodiment of the present invention is:

[0099] A system that cooperates with the curve erasing method of the first embodiment above includes:

[0100] The first acquisition module 1 is used to sequentially acquire the coordinates of all points on the curve according to the curve drawing process to form the first set; specifically, orderly acquire the coordinates of all points on the curve according to the order of curve drawing through the touchesmove event ;

[0101] The abscissa calculation module 21 is used to compare the abscissa size of adjacent two points in the first set in turn, and use the smaller abscissa mark as the abscissa rx of the upper left corner of the rectangle corresponding to the adjacent two points; the ordinate calculation Module 22, for comparing the size of the ordinates of the two adjacent points in turn, using the smaller ordinate mark as the ordinate ry of the upper left corner of the rectangle; the ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a curve erasure method and system. The method comprises the steps of orderly obtaining coordinates of all points on curves according to a curve drawing process to form a first set; calculating rectangles formed by every two adjacent points in the first set and forming a second set by all the calculated rectangles; obtaining coordinates of a to-be-erased point; obtaining the rectangle where the to-be-erased point is located according to the coordinates of the to-be-erased point and the second set; and removing a curve corresponding to the rectangle where the to-be-erased point is located. The coordinates of all the points on the curves are orderly obtained and the rectangles formed by every two adjacent points are calculated, so that the rectangle where the to-be-erased point is located is obtained through the coordinates of the to-be-erased point and the calculated rectangles during curve erasure; the curve corresponding to the rectangle where the to-be-erased point is located is removed, so that the curve erasure is realized; and the method and the system do not need to depend on a mathematic formula of the curve, are accurate in erasure and have the advantages of small calculation amount and high erasure speed.

Description

technical field [0001] The invention relates to the field of image processing, in particular to a curve erasing method and system. Background technique [0002] With the development of technology, the use of computer software to draw or process images has become popular, and image drawing or processing often requires erasing curves. The current method of erasing the curve is to calculate whether the area corresponding to the eraser has an intersection with the curve, and if there is an intersection, delete the corresponding curve. For example, the Chinese patent with the publication number CN 104992460A discloses a method for erasing vector notes, which includes the following steps: when an erasing action is detected, save the vector handwriting before the erasing starts, and convert all vector handwriting into corresponding The non-vector handwriting, display the non-vector handwriting and hide the vector handwriting; detect the moving track of the board eraser, calculate ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06T11/80
CPCG06T11/80
Inventor 蔡专锡方振华刘德建郭玉湖
Owner FUJIAN TIANQUAN EDUCATION TECH LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products