CN102768764A - Method for smoothing image on basis of Bezier curve - Google Patents

Method for smoothing image on basis of Bezier curve Download PDF

Info

Publication number
CN102768764A
CN102768764A CN2012100825378A CN201210082537A CN102768764A CN 102768764 A CN102768764 A CN 102768764A CN 2012100825378 A CN2012100825378 A CN 2012100825378A CN 201210082537 A CN201210082537 A CN 201210082537A CN 102768764 A CN102768764 A CN 102768764A
Authority
CN
China
Prior art keywords
broken line
bezier
reference mark
tie point
length
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
Application number
CN2012100825378A
Other languages
Chinese (zh)
Other versions
CN102768764B (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.)
China Digital Video Beijing Ltd
Original Assignee
China Digital Video Beijing 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 China Digital Video Beijing Ltd filed Critical China Digital Video Beijing Ltd
Priority to CN201210082537.8A priority Critical patent/CN102768764B/en
Publication of CN102768764A publication Critical patent/CN102768764A/en
Application granted granted Critical
Publication of CN102768764B publication Critical patent/CN102768764B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

The invention discloses a method for smoothing an image on the basis of a Bezier curve, and the method mainly comprises the steps as follows: receiving the image; acquiring a to-be-processed image region; converting the image region into N strips of broken lines mutually connected in space; calculating and generating all control points as per the sequence of the broken lines; generating the Bezier curve as per the control points and connecting points of the broken lines; and smoothing the image region as per the Bezier curve. According to the method, all control points of N strips of broken lines mutually connected in space are calculated as per the sequence, and then, the Bezier curve is generated as per all the control points and the connecting points of the broken lines, so that the smooth effect of the image can be realized.

Description

A kind ofly make the level and smooth method of figure based on Bezier
Technical field
The present invention relates to video and image graphics processing technology field, particularly a kind ofly make the level and smooth method of figure based on Bezier.
Background technology
Bezier (B é zier curve) is claimed Bezier curve or Bezier surface again, and general vector graphics software accurately draws curve through it, and Bezier curve is made up of line segment and node, and node is the fulcrum that can drag, and line segment is as telescopic rubber band.Bezier is the basic tool of computer graphic image moulding, is that one of basic lines are used at most in the figure moulding.It through four points (starting point, terminating point and two intermediate points that are separated from each other) of control on the curve create, editing graph.As shown in Figure 1, what play an important role is the control line that is positioned at curve central authorities.This line is virtual, and the centre intersects with Bezier, and two ends are control end points.Bezier changes the curvature (crooked degree) of curve when moving the end points at two ends; When moving intermediate point (control line of mobile virtual just); Bezier is done evenly under the situation of starting point and terminating point locking and is moved; The curve that Bezier comes to this, it is according to four positions smooth curve drawing out of point coordinate arbitrarily.Wherein, the most common with three Beziers, cube bezier curve is as giving a definition: P 0, P 1, P 2, P 3Four points have defined cubic Bezier curve on the plane or in three dimensions.Curve originates in P 0Move towards P 1, and from P 2Direction come P 3Generally can not pass through P 1Or P 2These two points just there the provider to information.P 0And P 1Between spacing, determined curve then the into P that becomes 3Before, move towards P 2" how long length has " of direction.
The parametric form of curve is:
B(t)=P 0(1-t) 3+3P 1t(1-t) 2+3P 2t 2(1-t)+P 3t 3,t∈[0,1]。
In to video and graph and image processing process, the corner angle of some graph image are too sharp-pointed or dissatisfied to the effect of some regional lines of graph image, at this moment just need carry out level and smooth processing to it, make it the effect that reaches even more ideal.
Summary of the invention
The invention provides and a kind ofly make the level and smooth method of figure in order to solve above technical matters, specifically comprise based on Bezier:
Receive figure;
Obtain the graphics field that to handle according to user instruction;
Convert said graphics field to the N bar links to each other in the space broken line;
Generate all reference mark according to said broken line order computation;
Tie point according to said reference mark and said broken line generates the Bei Saier curve;
According to said Bei Saier curve smoothing processing is carried out in said graphics field.
Wherein, saidly convert said graphics field to broken line that N bar in the space links to each other, the span of said N is more than or equal to two;
Adjacent broken line line segment length is Li, L (i+1), and the span of said i is 0 to N-1.
Wherein, saidly generate all reference mark according to said broken line order computation and specifically comprise:
On said adjacent broken line, get a Pi and P (i+1) respectively, the length of the tie point of the said broken line of said Pi and P (i+1) distance is respectively Ki*Li, K (i+1) * L (i+1), said Ki=Li/ (Li+L (i+1)), K (i+1)=L (i+1)/(Li+L (i+1));
(Pi, P (i+1)) gets a P ' at line segment, and said (Pi, P (i+1)) length is L ', and the length of the said P i of said P ' distance is L ' * (Li/ (Li+L (i+1)));
Said (Pi, P (i+1)) moved to said P ' overlap the place with the tie point of said broken line, said Pi moves to Pi ', and said P (i+1) moves to P (i+1) ';
Generate said reference mark Pi ' and P (i+1) '.
Wherein, said tie point generation Bezier according to said reference mark and said broken line specifically comprises:
The said reference mark that will obtain according to the parametric equation of Bezier and the tie point substitution of said broken line generate Bezier.
Compared with prior art; The embodiment of the invention has the following advantages: through all reference mark of the continuous broken line of any bar in the order computation space; Tie point according to all reference mark and broken line generates Bezier bezier curve again, has realized the effect that figure is level and smooth.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work property, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1: the synoptic diagram that is Bezier in the prior art;
Fig. 2: be a kind of process flow diagram that makes the level and smooth method of figure based on Bezier in the embodiment of the invention 1;
Fig. 3: be the synoptic diagram that a kind of broken line that is linked to each other by any bar in the space generates the method for Bezier in the embodiment of the invention 2.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obvious described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Provide a kind of in the embodiment of the invention 1 and made the level and smooth method of figure based on Bezier, as shown in Figure 2, may further comprise the steps:
Step S101 receives figure.
Step S102 obtains the graphics field that will handle according to user instruction.
Step S103 converts said graphics field to the N bar links to each other in the space broken line, wherein,
The span of said N is more than or equal to two;
Adjacent broken line line segment length is Li, L (i+1), and the span of said i is 0 to N-1.
Step S104 generates all reference mark according to said broken line order computation, specifically comprises:
On said adjacent broken line, get a Pi and P (i+1) respectively, the length of the tie point of the said broken line of said Pi and P (i+1) distance is respectively Ki*Li, K (i+1) * L (i+1), said Ki=Li/ (Li+L (i+1)), K (i+1)=L (i+1)/(Li+L (i+1));
(Pi, P (i+1)) gets a P ' at line segment, and said (Pi, P (i+1)) length is L ', and the length of the said Pi of said P ' distance is L ' * (Li/ (Li+L (i+1)));
Said (Pi, P (i+1)) moved to said P ' overlap the place with the tie point of said broken line, said Pi moves to Pi ', and said P (i+1) moves to P (i+1) ';
Generate said reference mark Pi ' and P (i+1) '.
Step S105, the tie point generation Bei Saier curve according to said reference mark and said broken line specifically comprises:
The said reference mark that will obtain according to the parametric equation of Bezier and the tie point substitution of said broken line generate Bezier.
Step S106 carries out smoothing processing according to said Bei Saier curve to said graphics field.
The beneficial effect that the technical scheme of the embodiment of the invention is brought is following: through all reference mark of the continuous broken line of any bar in the order computation space; Tie point according to all reference mark and broken line generates Bezier bezier curve again, has realized the effect that figure is level and smooth.
Provide a kind of broken line that links to each other by any bar in the space to generate the method for Bezier in the embodiment of the invention 2, as shown in Figure 3, concrete; During N=4; Promptly generate Bezier by 4 continuous broken lines in the space, L1, L2 is the length of two broken lines that link to each other; Point O is the tie point of L1, L2, may further comprise the steps:
Step S201, at a last P1, the P2 of getting respectively of said adjacent broken line L1, L2, the length of the tie point of said P1 and the said broken line of P2 distance is respectively K1*L1, K2*L2, said K1=L1/ (L1+L2), K2=L2/ (L1+L2).
Step S202, connect P1, P2 generate line segment (P1, P2), line segment (P1 P2) gets a P ', said (and P1, P2) length is L ', the length of the said P1 of said P ' distance is L ' * (L1/ (L1+L2)).
Step S203, (P1 P2) moves to said P ' and overlaps the place with the tie point of said broken line, and said P1 moves to P1 ', and said P2 moves to P2 ' with said.
Step S204 confirms said reference mark P1 ' and P2 '.
Step S205 confirms Bezier according to the tie point M and the N of reference mark P1 ' and P2 ' and broken line, and is concrete, through the parametric form of Bezier:
B(t)=P 0(1-t) 3+3P 1t(1-t) 2+3P 2t 2(1-t)+P 3t 3,t∈[0,1]
With the tie point M and the N substitution of reference mark P1 ' and P2 ' and broken line, wherein P1 in the Bezier parameter formula and P2 are equivalent to reference mark P1 ' and P2 ', and P0 in the parameter of curve formula and P3 are equivalent to the tie point M and the N of broken line.
Repeat above step S201 to S205,4 Beziers finally can be confirmed according to the tie point of reference mark and broken line again in the reference mark that order computation is all.
The beneficial effect that the technical scheme of the embodiment of the invention is brought is following: through all reference mark of the continuous broken line of any bar in the order computation space, the tie point according to all reference mark and broken line generates continuous Bezier bezier curve again.
Through the description of above embodiment, those skilled in the art can be well understood to the present invention and can realize through hardware, also can realize by the mode that software adds necessary general hardware platform.Based on such understanding; Technical scheme of the present invention can be come out with the embodied of software product, this software product can be stored in a non-volatile memory medium (can be CD-ROM, USB flash disk; Portable hard drive etc.) in; Comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is the synoptic diagram of a preferred embodiment, module in the accompanying drawing or flow process might not be that embodiment of the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device among the embodiment can be distributed in the device of embodiment according to the embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from present embodiment.The module of the foregoing description can be merged into a module, also can further split into a plurality of submodules.
The invention described above embodiment sequence number is not represented the quality of embodiment just to description.
More than disclosedly be merely several specific embodiment of the present invention, still, the present invention is not limited thereto, any those skilled in the art can think variation all should fall into protection scope of the present invention.

Claims (4)

1. one kind makes the level and smooth method of figure based on the Bei Saier curve, it is characterized in that, comprising:
Receive figure;
Obtain the graphics field that to handle according to user instruction;
Convert said graphics field to the N bar links to each other in the space broken line;
Generate all reference mark according to said broken line order computation;
Tie point according to said reference mark and said broken line generates the Bei Saier curve;
According to said Bei Saier curve smoothing processing is carried out in said graphics field.
2. the method for claim 1 is characterized in that, saidly converts said graphics field to broken line that N bar in the space links to each other, wherein,
The span of said N is more than or equal to two;
Adjacent broken line line segment length is Li, L (i+1), and the span of said i is 0 to N-1.
3. according to claim 1 or claim 2 method is characterized in that, saidly generates all reference mark according to said broken line order computation and specifically comprises:
On said adjacent broken line, get a Pi and P (i+1) respectively, the length of the tie point of the said broken line of said Pi and P (i+1) distance is respectively Ki*Li, K (i+1) * L (i+1), said Ki=Li/ (Li+L (i+1)), K (i+1)=L (i+1)/(Li+L (i+1));
(Pi, P (i+1)) gets a P ' at line segment, and said (Pi, P (i+1)) length is L ', and the length of the said P i of said P ' distance is L ' * (Li/ (Li+L (i+1)));
Said (Pi, P (i+1)) moved to said P ' overlap the place with the tie point of said broken line, said Pi moves to Pi ', and said P (i+1) moves to P (i+1) ';
Generate said reference mark Pi ' and P (i+1) '.
4. the method for claim 1 is characterized in that, said tie point according to said reference mark and said broken line generates Bezier and specifically comprises:
The said reference mark that will obtain according to the parametric equation of Bezier and the tie point substitution of said broken line generate Bezier.
CN201210082537.8A 2012-03-26 2012-03-26 It is a kind of that the smooth method of figure is made based on Bezier Expired - Fee Related CN102768764B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210082537.8A CN102768764B (en) 2012-03-26 2012-03-26 It is a kind of that the smooth method of figure is made based on Bezier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210082537.8A CN102768764B (en) 2012-03-26 2012-03-26 It is a kind of that the smooth method of figure is made based on Bezier

Publications (2)

Publication Number Publication Date
CN102768764A true CN102768764A (en) 2012-11-07
CN102768764B CN102768764B (en) 2017-12-29

Family

ID=47096157

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210082537.8A Expired - Fee Related CN102768764B (en) 2012-03-26 2012-03-26 It is a kind of that the smooth method of figure is made based on Bezier

Country Status (1)

Country Link
CN (1) CN102768764B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104200423A (en) * 2014-08-27 2014-12-10 大连海事大学 Multi-control-point based automatic adjusting method for upper and lower border line shapes of vector graphics
CN106504300A (en) * 2016-10-21 2017-03-15 福建中金在线信息科技有限公司 The method for building up of component and system when a kind of
CN106709970A (en) * 2017-01-06 2017-05-24 和创(北京)科技股份有限公司 Method and server for optimizing track segment
CN107369191A (en) * 2017-08-15 2017-11-21 国网湖南省电力公司 Power grid meteorological disaster prediction color spot figure modification method, system and device
CN107767429A (en) * 2016-08-18 2018-03-06 阿里巴巴集团控股有限公司 Curve generation method and equipment
CN108577987A (en) * 2018-04-27 2018-09-28 江阴高峰医疗科技有限公司 A kind of dentistry rotation instrument hard alloy vehicle needle
CN109129473A (en) * 2018-08-07 2019-01-04 北京云迹科技有限公司 One kind, which is cruised, method and cruises robot
CN112215937A (en) * 2020-10-21 2021-01-12 北京高途云集教育科技有限公司 Hose state simulation method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020005856A1 (en) * 1998-04-09 2002-01-17 Nobuo Sasaki Image processing device, image processing method and program distribution medium and data distribution medium for processing images
CN102129710A (en) * 2010-12-30 2011-07-20 北京像素软件科技股份有限公司 Method and system for simulating flight path

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020005856A1 (en) * 1998-04-09 2002-01-17 Nobuo Sasaki Image processing device, image processing method and program distribution medium and data distribution medium for processing images
CN102129710A (en) * 2010-12-30 2011-07-20 北京像素软件科技股份有限公司 Method and system for simulating flight path

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
刘贤梅等: "四元数样条插值的人体运动数据重构", 《计算机工程与应用》 *
张超等: "一种改进的折线转分段Bezier曲线的拟合方法", 《测绘通报》 *
李芸等: "带有给定切线多边形的有理二次贝齐尔样条曲线", 《数学理论与应用》 *
王家润等: "分段连续三次Bezier曲线控制点的构造算法", 《计算机工程与应用》 *
王成伟: "带有给定切线多边形的C-Bezier闭曲线和B-型样条闭曲线", 《数值计算与计算机应用》 *
王成伟等: "带有给定切线多边形的三次Bezier闭曲线", 《北京服装学院学报(自然科学版)》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104200423A (en) * 2014-08-27 2014-12-10 大连海事大学 Multi-control-point based automatic adjusting method for upper and lower border line shapes of vector graphics
CN104200423B (en) * 2014-08-27 2018-01-12 大连海事大学 Vector graphics up-and-down boundary wire shaped automatic adjusting method based on more control points
CN107767429B (en) * 2016-08-18 2021-11-16 阿里巴巴集团控股有限公司 Curve generation method and equipment
CN107767429A (en) * 2016-08-18 2018-03-06 阿里巴巴集团控股有限公司 Curve generation method and equipment
CN106504300A (en) * 2016-10-21 2017-03-15 福建中金在线信息科技有限公司 The method for building up of component and system when a kind of
CN106709970A (en) * 2017-01-06 2017-05-24 和创(北京)科技股份有限公司 Method and server for optimizing track segment
CN107369191B (en) * 2017-08-15 2021-01-15 国网湖南省电力有限公司 Method, system and device for correcting power grid meteorological disaster prediction color spot pattern
CN107369191A (en) * 2017-08-15 2017-11-21 国网湖南省电力公司 Power grid meteorological disaster prediction color spot figure modification method, system and device
CN108577987A (en) * 2018-04-27 2018-09-28 江阴高峰医疗科技有限公司 A kind of dentistry rotation instrument hard alloy vehicle needle
CN108577987B (en) * 2018-04-27 2023-09-22 高峰医疗器械(无锡)有限公司 Hard alloy turning needle for dental rotary instrument
CN109129473A (en) * 2018-08-07 2019-01-04 北京云迹科技有限公司 One kind, which is cruised, method and cruises robot
CN109129473B (en) * 2018-08-07 2021-09-14 北京云迹科技有限公司 Tour method and tour robot
CN112215937A (en) * 2020-10-21 2021-01-12 北京高途云集教育科技有限公司 Hose state simulation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN102768764B (en) 2017-12-29

Similar Documents

Publication Publication Date Title
CN102768764A (en) Method for smoothing image on basis of Bezier curve
Pilz Flip distance between triangulations of a planar point set is APX-hard
CN102903134B (en) Fast Drawing is the method for curve repeatedly
Nöllenburg et al. A mixed-integer program for drawing high-quality metro maps
CN106649817B (en) Method and device for constructing and lofting three-dimensional pipe model of geographic information system
CN102201108A (en) Edge processing techniques
WO2019084767A1 (en) Movable device working control method and apparatus, and path planning method and apparatus
CN104732574A (en) Compression method and device for role play
WO2015010128A3 (en) Flexible 3-d character rigging blocks with interface obligations
JP2021504996A5 (en)
JP2015197899A5 (en)
CN111055274B (en) Robot path smoothing method and robot
CN102298787A (en) Control method and control system for animation object motion
CN104392104A (en) Determination method for length and number of low-frequency cable conductors of spacecraft
CN102622461A (en) Method for generating three-dimensional pipeline according to three-dimensional feasible path
CN105184372A (en) Knowledge network construction method and apparatus
CN102752491A (en) Generating method and system for satellite track
JPWO2016092588A1 (en) Drawing apparatus and drawing method
CN108507563A (en) Cruise path generating method and device
JP2016224801A (en) Parallel computer system, parallel calculation method and program
Roychowdhury et al. Tensor renormalization group approach to classical dimer models
Corry Maximal harmonic group actions on finite graphs
CN105488088B (en) Two-dimensional network angular distribution layout method based on tree structure
JP2019502287A5 (en)
CN108062097B (en) Composition correction method and device of sweeping robot

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171229

Termination date: 20180326

CF01 Termination of patent right due to non-payment of annual fee