CN110097613A - A kind of B-spline curves generation method and system based on probability calculation - Google Patents

A kind of B-spline curves generation method and system based on probability calculation Download PDF

Info

Publication number
CN110097613A
CN110097613A CN201910378599.5A CN201910378599A CN110097613A CN 110097613 A CN110097613 A CN 110097613A CN 201910378599 A CN201910378599 A CN 201910378599A CN 110097613 A CN110097613 A CN 110097613A
Authority
CN
China
Prior art keywords
group
binary string
probability
control point
spline curves
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
CN201910378599.5A
Other languages
Chinese (zh)
Other versions
CN110097613B (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.)
Guangxi University
Original Assignee
Guangxi University
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 Guangxi University filed Critical Guangxi University
Priority to CN201910378599.5A priority Critical patent/CN110097613B/en
Publication of CN110097613A publication Critical patent/CN110097613A/en
Application granted granted Critical
Publication of CN110097613B publication Critical patent/CN110097613B/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
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Complex Calculations (AREA)

Abstract

The invention discloses a kind of B-spline curves generation method and system based on probability calculation.The step of method includes: node group progress binary conversion treatment the step of being coordinately transformed to input control point group, the step of control point coordinates group is normalized, to mapping value group and input, obtains the first binary string group and the second binary string group carries out the step of multi channel selecting is to obtain probability value group to the first binary string group based on the second binary string group using method for calculating probability, successively carries out decoding the step of normalizing inverse operation at random to probability value group.System includes that sequentially connected coordinate transformation module, normalization module, binarization block, probability evaluation entity and data decoder module, coordinate transformation module receive control point group, binarization block receiving node group.The mode that the present invention more directly calculates generates B-spline curves, can substantially reduce system complexity, reduces calculation amount, Reduction Computation time.

Description

A kind of B-spline curves generation method and system based on probability calculation
Technical field
The present invention relates to computer drawing fields, especially a kind of to generate B-spline curves using method for calculating probability Method and system.
Background technique
B-spline curves curved surface has many such as geometric invariance, convex closure, convexity-preserving, variation reduction property, local support Advantageous property is considerable parameter curve in computer graphics.The drafting efficiency of B-spline curves, directly influences meter Calculation machine Image Rendering efficiency.
In known n+1 control point PiIn the case where (n of i=1,2,3 ...) and node t, n times B-spline curves lead to It is as follows with expression formula:
N is the number of B-spline curves, t For input node, PkFor control point.
It is generated according to the method directly calculated, computation complexity is relatively high, is especially calculating generation high-order B-spline curves When, complexity is too high, and speed is slow.The critical path of the method directly calculated at present is made of multiplier, adder etc..3 B samples Plot against time complexity is O (t3), 4 B-spline curves time complexities are O (t4), n times B-spline curves time complexity is O(tn).As it can be seen that the time complexity of Traditional calculating methods is in O (t with the continuous increase of B-spline curves numbern) increase.
Probability calculation [1] is a kind of numerical representation method and calculation method, in probability calculation, utilize contain in sequence 1 number The ratio for accounting for entire sequence length carrys out characterization value, completes the operations such as to multiply, add by the gate level circuit of simple structure to realize.Generally The method that rate calculates is applied to digital filter, FFT, Turbo decoder, multi code Rate of Chinese character ldpc decoder [2- in recent years The research fields such as 4].Calculation amount can substantially be reduced using probability calculation.
Bibliography of the present invention is as follows:
[1]W.Qian and M.Riedel,“The synthesis of robust polynomial arithmetic with stochastic logic,”in DAC’08:Proceedings of the 45th Design Automation Conference,Anaheim,CA,USA,Jun.2008,pp.648–653.
[2] Wu Sili, Zhou Yan, pleasure is gorgeous, and radar detection probability calculation method [J] of Li Jiaqing based on measured data is micro- Computerized information, 2008,7-3.
[3] realization [J] Chinese Integrated Circuit of digital filter of Chen Jienan, the Hu Jianhao based on probability calculation, 2010, 11.
[4] application [J] the radio communication of Hu Jianhao, Chen Jienan probability calculation in communication signal process system realization Technology, 2015,41 (2): 01-06.
Summary of the invention
Goal of the invention of the invention is: in view of the above problems, providing and a kind of probability calculation is applied to B-spline Method and system in the drafting of curve.To pass through the structure and smaller fortune of low complex degree using the simple structure of probability calculation Calculation amount, rapid drawing produce accurate B-spline curves.
The technical solution adopted by the invention is as follows:
A kind of B-spline curves generation method based on probability calculation, which comprises the following steps:
The step of control point group of input is coordinately transformed, obtains corresponding control point coordinates group;
The step of control point coordinates group is normalized, corresponding mapping value group is obtained;
Binary conversion treatment is carried out to the value of the node group of each mapping value group and input respectively, obtains the corresponding 1st The step of system string group and the second binary string group;
Multi channel selecting is carried out to the first binary string group based on the second binary string group, the step of to obtain probability value group;
Probability value group is decoded at random, and inverse operation is normalized to decoding result, obtains corresponding coordinate The step of group.
Above scheme is based on method for calculating probability and generates B-spline curves, and calculating process only relates to addition, compares and select with multichannel It is logical, belong to the method that complexity increases with B-spline curves number and linearly increases, is O (t at complexity relatively directly in calculating4) Method, greatly reduce calculation amount, reduce computation complexity, it is time-consuming to reduce calculating, is generating high-order B-spline curves When, effect is especially prominent.
Further, the process of above-mentioned binary conversion treatment be will to binary conversion treatment data and preset length pseudo noise code Displacement is carried out to compare to obtain the process of comparison result.
Further, the above-mentioned second binary string group that is based on is to the first binary string group progress multi channel selecting specifically: with Second binary string group corresponds to the result of position addition as multi channel selecting control terminal, to carry out multichannel choosing to the first binary string group It is logical.
Further, above-mentioned that control point coordinates group is normalized, method for normalizing are as follows: GPi=(Ai-min (A0,A1,A2.....An))/(max(A0,A1,A2....An)-min(A0,A1,A2.....An)), (i=0,1,2 ... n);Its In, min () is function of minimizing, and max () is maximizing function, and n is control point group quantity, A0,A1,A2.....AnFor Control point coordinates group, GPiTo normalize obtained mapping value.
A kind of B-spline curves drawing system based on probability calculation comprising sequentially connected coordinate transformation module, normalizing Change module, binarization block, probability evaluation entity and data decoder module;Wherein:
Coordinate transformation module exports corresponding control point coordinates group for being coordinately transformed to the control point group of input;
Normalization module exports corresponding mapping value group for received control point coordinates group to be normalized;
Binarization block is used to receive the mapping value group of normalization module output, also receives the node group of input, binaryzation Module is used to analyze the received data carry out binary conversion treatment, exports corresponding binary string, for received probability value group, then right The first binary string group should be exported, it is for received node group, then corresponding to export the second binary string;
Probability evaluation entity is based on the second binary string and carries out multi channel selecting to the first binary string, with output probability value Group;
Data decoder module is decoded and is normalized at random inverse operation to received probability value group, obtains the position of graphical pointv Set coordinate.
Further, above-mentioned binarization block, which is used to analyze the received data, carries out binary conversion treatment based on pseudo noise code.
Further, above-mentioned binarization block includes a pseudorandom number generation unit and a comparator;The pseudo noise code Generation unit is used to generate the pseudo noise code of preset length, and the output end of the pseudorandom number generation unit connects the comparator First input end, the second input terminal of the comparator is used to receive the output valve for normalizing module, the output end of comparator Output corresponds to the binary string of its second input terminal received data.I.e. when the second input terminal input of comparator is mapping When value group, output end exports the first binary string, is that output end is defeated when the second input terminal input of comparator is node group Second binary string out.
Further, above-mentioned probability evaluation entity is based on the second binary string group and carries out multichannel choosing to the first binary string group It is logical specifically: probability evaluation entity carries out the first binary string group based on the result that the second binary string group corresponds to position addition more Road gating.
Further, above-mentioned probability evaluation entity includes an adder and a multi-channel gating device, and adder input terminal is used for The second binary string group is received, adder output connects the control terminal of multi-channel gating device, the coefficient input terminals of multi-channel gating device For receiving the first binary string group, the output end output probability value group of multi-channel gating device.
Further, the method for normalizing of above-mentioned normalization module are as follows:
GPi=(Ai-min(A0,A1,A2.....An))/(max(A0,A1,A2....An)-min(A0,A1,A2.....An)), (i=0,1,2 ... n);Wherein, min () is function of minimizing, and max () is maximizing function, and n is control point group number Amount, A0,A1,A2.....AnFor control point coordinates group, GPiTo normalize obtained mapping value.
In conclusion by adopting the above-described technical solution, the beneficial effects of the present invention are:
Existing scheme is by the way of directly calculating, and the critical path calculated is mainly made of multiplication, for n times B sample Curve, the complexity drawn are O (tn), it is seen then that it is in O (tn) increase, calculation amount is larger, and time-consuming for calculating.And it is of the invention Draw B-spline curves by the way of probability calculation, the critical path calculated by addition, compare and formed with multi channel selecting, it is right In n times B-spline curves, need to carry out the multi channel selecting that 2n comparison, 1 n addition and 1 n+1 select one, it is clear that drawing Calculation amount is continuously increased with B-spline curves number, and the complexity for calculating (or system structure) linearly increases, and is relatively directly counted The mode of calculation significantly reduces computation complexity, and calculation amount is small, and calculating speed is fast (particularly with drawing for high-order B-spline curves System), convenient for the realization on the hardware such as FPGA.
Detailed description of the invention
Examples of the present invention will be described by way of reference to the accompanying drawings, in which:
Fig. 1 is one embodiment of the B-spline curves generation method process based on probability calculation.
Fig. 2 is the structure chart of the B-spline curves method for drafting based on probability calculation.
Fig. 3 is one embodiment of binarization block structure.
Fig. 4 is one embodiment of probability evaluation entity structure.
Fig. 5 is scheme and the B-spline Curve drawn out by direct calculation through the invention.
Fig. 6 is several middle B-spline Curves that scheme is drawn out through the invention.
Wherein, in fig. 5 and fig., the B-spline Curve that dashed curve is drawn out for scheme through the invention, it is real Line curve is the B-spline Curve drawn out by way of directly calculating;In Fig. 6, (a) is to take 256 pseudo noise codes As a result, (b) for take 512 pseudo noise codes as a result, (c) for take 1024 pseudo noise codes as a result, (d) to take The result of 2048 pseudo noise codes.
Specific embodiment
All features disclosed in this specification or disclosed all methods or in the process the step of, in addition to mutually exclusive Feature and/or step other than, can combine in any way.
Any feature disclosed in this specification (including any accessory claim, abstract), unless specifically stated, It is replaced by other equivalent or with similar purpose alternative features.That is, unless specifically stated, each feature is a series of An example in equivalent or similar characteristics.
Embodiment one
The B-spline curves generation method based on probability calculation that present embodiment discloses a kind of, comprising the following steps:
Universal expression based on B-spline curves, to the control point P of inputi(n of i=1,2,3 ...) is coordinately transformed, Obtain corresponding control point coordinates AiThe step of (n of i=1,2,3 ...).
Control point coordinates are normalized, corresponding mapping value GP is obtainediThe step of (n of i=1,2,3 ...), Wherein, method for normalizing are as follows:
GPi=(Ai-min(A0,A1,A2.....An))/(max(A0,A1,A2....An)-min(A0,A1,A2.....An)), (i=0,1,2 ... n);Wherein, min () is function of minimizing, and max () is maximizing function.
Based on N pseudo noise code Ri(i=1,2,3 ... n), by each mapping value GPi(i=1,2,3 ... n) and input Node tk(k=1,2...n) carries out binary conversion treatment respectively, obtains corresponding binary string Bi(i=1,2...n) and Xi(i= 1,2...n) the step of.
With Xi(i=1,2...n) the result S (i) being added by turn=X1(i)+X2(i)+...+Xn(i), (i=1,2...N) As multi channel selecting control terminal, with Bi(i=1,2...n) is used as multi channel selecting coefficient input terminals, obtains probability value Y (i)=BS(i) (i=0,1,2...N) the step of.
Probability value is decoded at random, and inverse operation is normalized to decoding result, obtains corresponding coordinate Step.By the point on each point coordinate, corresponding B-spline curves can be drawn out.
Embodiment two
As shown in Figure 1, the present embodiment one discloses a kind of B-spline curves generation method based on probability calculation, including with Lower step:
1, based on the universal expression of B-spline curves, to the control point group P of inputi(n of i=1,2,3 ...) carries out coordinate change It changes, obtains corresponding control point coordinates group AiThe step of (n of i=1,2,3 ...).
The expression formula of B-spline curves are as follows:
Wherein, P0,P1,…PnFor the control point group of curve;Number of the n for B-spline curves, such as B-spline Curve, n are 3;T is the fractional value between 0 to 1;K is k-th point therein, the value range of k is 0,1,2 ... n.Formula (1) is converted and is arranged Obtain following formula (probability calculation multinomial):
By taking B-spline Curve as an example, B-spline curves expression formula is unfolded to obtain:
P (t)=1/6 (P0(-t3+3t2-3t+1)+P1(3t3-6t2+4)+P2(-3t3+3t2+3t+1)+P3t3) (2)
It is arranged by formula (2) and obtains formula (3):
P (t)=1/6 ((P0+4P1+P2)+(-3P0+3P2)t+(3P0-6P1+3P2)t2+(-P0+3P1-3P2+P3)t3)
(3), control point coordinates are corresponded to, transformation obtains:
Wherein:
A0=1/6 (P0+4P1+P2) (5),
A1=1/6 (4P1+2P2) (6),
A2=1/6 (2P1+4P2) (7),
A3=1/6 (P1+4P2+P3) (8)。
Pass through the control point group P of input0-P3To get arrive control point coordinates group A0-A3
2, by control point coordinates group A0A1,A2....AnIt is normalized, obtains corresponding mapping value group GPi(i=1, 2,3 ... n) the step of.
Normalized is by each control point coordinates group A0A1,A2....AnValue be respectively mapped between [0,1], normalizing It is as follows to change mapping conversion method:
GPi=(Ai-min(A0,A1,A2.....An))/(max(A0,A1,A2....An)-min(A0,A1,A2.....An)), (i=0,1,2 ... n) (9), min () they are functions of minimizing, and max () is maximizing function.
3, N pseudorandom code character R are based oni(i=1,2,3 ... n), by mapping value group GPi(i=1,2,3 ... is n) and defeated The node group t enteredk(k=1,2,3 ... n) carry out binary conversion treatment respectively, obtain corresponding binary string group Bi(i=1,2,3 ... And X n)iThe step of (i=1,2,3 ... n).
Binary conversion treatment is respectively by tkAnd GPiCorrespondence is transformed into binary string group XiAnd Bi.Transformation input tk, output obtains Xi, input GPi, export and obtain Bi.Transition process is completed based on pseudorandom code character, document " generation of pseudo noise code and computer " It mentions in (Wu Mingjie, Du Tiancang, Liaoning Project Technology University's journal, the 2nd phase of volume 21) and being moved primitive polynomial as feedback The proper polynomial of bit register, can produce pseudo-random code sequence.
Pseudorandom code character is shifted by primitive polynomial and is generated.Primitive polynomial is more as the feature of feedback shift register Item formula, that is, can produce pseudo noise code group.Primitive polynomial is as follows:
In the present embodiment, primitive polynomial takes 10 ranks, i.e. n takes 10, generates N at random with 110000101 feedback shifts Code Ri, N takes 256,512,1024 and 2048 to be tested respectively.The drawing result of corresponding B-spline Curve As in Fig. 6 (a), (b), (c), shown in (d).
By GPiWith Ri(i=0,1,2 ..., n) carries out displacement when comparing, if GPiMore than or equal to Ri, export as " 1 ", be less than Then output is " 0 ".It is demonstrated experimentally that obtained BiBinary string in (i takes 1,2 ... n), ratio and GP shared by " 1 "iIt indicates It is worth identical.This be just probability calculation be applied to B-spline curves draw in provide the foundation.If GPiValue be 0.4, N be 128, then BiIn the number of " 1 " be 128*0.4, although BiIn ratio shared by " 1 " it is identical, but due to RiIn " 1 " position Be it is random, so BiIn binary string in the position of " 1 " be also random.Equally, tkWith RiCarry out displacement comparison (i=0, 1,2 ..., n), obtain random binary string group Xi
4, with Xi(i=1,2,3...n) result S (i)=X that corresponding position is added1(i)+X2(i)+...+Xn(i), (i=1, 2...N it is used as multi channel selecting control terminal) with Bi(i=1,2...n) is used as multi channel selecting coefficient input terminals, obtains probability value group Y (i)=BS(i)(i=0,1,2...N) the step of.
As shown in figure 4, using in probability calculation to an adder and a multi-channel gating device, with Xi(i=1,2,3...n) As the input terminal of adder, everybody obtains S (1) S (2) ... S (N) at corresponding be added, wherein S (i)=X1(i)+X2(i)+...+ Xn(i) (i=1,2...N).Adder output SiThe control terminal of (i=1,2,3...N) as multi-channel gating device, Bi(i=1, 2...n) as the coefficient input terminals of multi-channel gating device (data input pin), multi-channel gating device output end exports Y (i)=BS(i)(i =0,1,2...N) output valve Y (1) Y (2) ... Y (N), is obtained.BS(i)The truth table of calculating is as shown in the table:
5, probability value group is decoded at random, and inverse operation is normalized to decoding result, the point for obtaining curve is sat Target step.By the point on each point coordinate, corresponding B-spline curves can be drawn out.
Random coding/decoding method are as follows:
For its number for counting " 1 " in Y (1) Y (2) ... Y (N) in the ratio of binary string, random decoding process is probability Calculating process.Inverse operation is normalized using formula (12), obtains the position coordinates of graphical pointv.
DY=Y (max (A0,A1,A2....An)-min(A0,A1,A2.....An))+min(A0,A1,A2....An) (12),
DY be obtained by probability calculation with input value tkWith control point group P0,P1,…PnCorresponding output coordinate value. B-spline curves can directly be drawn out by the value of DY.As shown in figure 5, the cubic B-spline drawn by the present embodiment method is bent Line, selected pseudo noise code length are 512.
Embodiment three
As shown in Fig. 2, present embodiment discloses a kind of, the B-spline curves based on probability calculation generate system comprising according to Coordinate transformation module, normalization module, binarization block, probability evaluation entity and the data decoder module of secondary connection;Wherein:
Coordinate transformation module is used for the control point P to inputi(n of i=1,2,3 ...) is coordinately transformed, and output corresponds to Control point coordinates Ai(n of i=1,2,3 ...);
Normalization module exports corresponding mapping value GP for received control point coordinates to be normalizedi(i =1,2,3 ... n);
Binarization block is used to receive the data of normalization module output, also receives the node t of inputk(k=1,2,3 ... N), binarization block, which is used to analyze the received data, carries out binary conversion treatment based on N pseudo noise codes, exports corresponding binary system String, for received probability value GPi, then corresponding to export binary string Bi(n of i=1,2,3 ...), for received node tk, then Corresponding output binary string Xi(n of i=1,2,3 ...);
Probability evaluation entity is with Xi(i=1,2,3......n) result S (i)=X that corresponding position is added1(i)+X2(i)+... +Xn(i), (i=1,2......N) is used as multi channel selecting control terminal, with BiIt is that multi channel selecting coefficient is defeated that (i=, 1,2 ... 3), which make n, Enter end, output probability value Y (i)=BS(i)(i=0,1,2...N);
Data decoder module to the received data Y (i) (i=0,1,2...N) of output (probability evaluation entity) carry out according to It is secondary to be decoded and normalized at random inverse operation, obtain the position coordinates of graphical pointv.Calculated each graphical pointv is marked on the diagram Remember and reaches B-spline curves out.As shown in figure 5, dotted line therein is drafting system according to the present embodiment in pseudorandom code length The B-spline Curve that degree is drawn out in the case of taking 512.
Example IV
Present embodiment discloses a kind of, and the B-spline curves based on probability calculation generate system, as shown in Figure 2 comprising according to Coordinate transformation module, normalization module, binarization block, probability evaluation entity and the data decoder module of secondary connection.
Coordinate transformation module includes a control point input port, for the control point group P inputted from control point input porti(i =1,2,3 ... n) are coordinately transformed, and export corresponding control point coordinates group Ai(n of i=1,2,3 ...).Coordinate transform side Method are as follows:
The expression formula of B-spline curves are as follows:
Wherein, P0,P1,…PnFor the control point group of curve;Number of the n for B-spline curves, such as B-spline Curve, n are 3;T is the fractional value between 0 to 1;K is k-th point therein, the value range of k is 0,1,2 ... n.Formula (1) is converted and is arranged It obtains:
By taking B-spline Curve as an example, B-spline curves expression formula is unfolded to obtain:
P (t)=1/6 (P0(-t3+3t2-3t+1)+P1(3t3-6t2+4)+P2(-3t3+3t2+3t+1)+P3t3) (2)
It is arranged by formula (2) and obtains formula (3):
P (t)=1/6 ((P0+4P1+P2)+(-3P0+3P2)t+(3P0-6P1+3P2)t2+(-P0+3P1-3P2+P3)t3)
(3), control point coordinates are corresponded to, transformation obtains:
Wherein:
A0=1/6 (P0+4P1+P2) (5),
A1=1/6 (4P1+2P2) (6),
A2=1/6 (2P1+4P2) (7),
A3=1/6 (P1+4P2+P3) (8)。
Pass through the control point group P of input0-P3To get arrive control point coordinates group A0-A3
Normalization module exports corresponding mapping value group for received control point coordinates group to be normalized GPi(n of i=1,2,3 ...).
Normalized is by each control point coordinates group A0A1,A2....AnValue be respectively mapped between [0,1], normalizing It is as follows to change mapping conversion method:
GPi=(Ai-min(A0,A1,A2.....An))/(max(A0,A1,A2....An)-min(A0,A1,A2.....An)), (i=0,1,2 ... n) (9),
Min () is function of minimizing, and max () is maximizing function, and n is control point coordinates group number.
Binarization block further includes a node input port, and binarization block is used to analyze the received data based on N pseudorandoms Code character Ri(i=1,2,3...n) carries out binary conversion treatment, obtains corresponding binary string.For received probability value group GPi, then Corresponding output binary string group Bi, for received node group tk, then corresponding to export binary string group Xi, wherein i=1,2, 3...n, k=1,2,3...n.
As shown in figure 3, binarization block includes a pseudorandom number generation unit and a comparator, pseudorandom number generation module Output end connection comparator an input terminal.In binary conversion treatment, pending data is input to another input of comparator End, comparator output terminal export corresponding binary string.
In one embodiment, pseudorandom number generation unit is shift register, the proper polynomial of the shift register For primitive polynomial:
In the present embodiment, primitive polynomial takes 10 ranks, i.e. n takes 10, generates N random codes with 110000101 feedback shifts Ri, N takes 256,512,1024 and 2048 to be tested respectively.Corresponding drawing result is corresponding in turn in Fig. 6 (a)、(b)、(c)、(d)。
Probability evaluation entity is with XiResult S (i)=X that the corresponding position (i=1,2,3 ... n) is added1(i)+X2(i)+...+Xn (i), (i=1,2 ..., N) is used as multi channel selecting control terminal, with Bi(n of i=1,2,3 ...) is used as multi channel selecting coefficient input terminals, Output probability value group Y (i)=BS(i)(i=0,1,2 ... N).
As shown in figure 4, probability evaluation entity is in one embodiment, including an adder and a multi-channel gating device, addition Device input terminal is for receiving Xi(i=1,2,3 ... n), and adder output connects the control terminal of multi-channel gating device, multi-channel gating device Coefficient input terminals for receiving BiThe output end of (n of i=1,2,3 ...), multi-channel gating device export Y (i)=BS(i)(i=0,1, 2,...N)。BS(i)The truth table of calculating is as shown in the table:
Data decoder module to received data (Y (i) (i=0,1,2 ... N) of probability evaluation entity output) successively into The random decoding of row and normalization inverse operation, obtain the position coordinates of graphical pointv.
Random coding/decoding method are as follows:
Ratio of its number for counting " 1 " in Y (1) Y (2) ... Y (N) in binary string.Normalizing is carried out using formula (12) Change inverse operation, obtains the position coordinates of graphical pointv.
DY=Y (max (A0,A1,A2....An)-min(A0,A1,A2.....An))+min(A0,A1,A2....An) (12),
DY be obtained by probability calculation with input value tkWith control point group P0,P1,…PnCorresponding output coordinate value.By DY Value can directly draw out B-spline curves.As shown in figure 5, being drawn by the position coordinates exported according to the present embodiment system B-spline Curve, selected pseudo noise code length be 512.Its resultant error is as follows:
As shown in fig. 6, B-spline Curve (other that the position coordinates to be exported according to the present embodiment system are drawn Multiple B-spline curves drawing result is similar), curve (a), (b), (c), (d) are corresponding in turn in 256 pseudo noise codes, 512 puppets Random code, 1024 pseudo noise codes and 2048 pseudo noise codes.The error for the B-spline curves that different length pseudo noise code is drawn It is as follows:
As can be seen from the above table, as the continuous increase of pseudo noise code length, difference are constantly reduced, result can be increasingly Accurately.
The critical path of the present embodiment system is made of adder, comparator, multi-channel gating device etc..From the figure 3, it may be seen that 3 B Spline curve needs 6 comparators, and 1 adder and 1 four select a multi-channel gating device, and 4 times B-spline curves need 8 comparisons Device, 1 adder and 1 five select a multi-channel gating device, and n times B-spline curves need 2n comparator, 1 addition and 1 n+1 choosing One multi-channel gating device.Therefore, being continuously increased with B-spline curves number, hardware needed for method for calculating probability linearly increases, Computation complexity is low.
The invention is not limited to specific embodiments above-mentioned.The present invention, which expands to, any in the present specification to be disclosed New feature or any new combination, and disclose any new method or process the step of or any new combination.

Claims (10)

1. a kind of B-spline curves generation method based on probability calculation, which comprises the following steps:
The step of control point group of input is coordinately transformed, obtains corresponding control point coordinates group;
The step of control point coordinates group is normalized, corresponding mapping value group is obtained;
Binary conversion treatment is carried out respectively to the node group of the mapping value group and input, obtain corresponding first binary string group and The step of second binary string group;
Multi channel selecting is carried out to the first binary string group based on the second binary string group, the step of to obtain probability value group;
Probability value group is decoded at random, and inverse operation is normalized to decoding result, obtains corresponding set of coordinates Step.
2. the B-spline curves generation method based on probability calculation as described in claim 1, which is characterized in that the binaryzation The process of processing is compared with carrying out displacement with preset length pseudo noise code to the data of binary conversion treatment to obtain comparison result Process.
3. the B-spline curves generation method based on probability calculation as claimed in claim 2, which is characterized in that described to be based on Two binary string groups carry out multi channel selecting to the first binary string group specifically: the knot of position addition is corresponded to the second binary string group Fruit is as multi channel selecting control terminal, to carry out multi channel selecting to the first binary string group.
4. the B-spline curves generation method based on probability calculation as described in one of claim 1-3, which is characterized in that described During control point coordinates group is normalized, method for normalizing are as follows:
GPi=(Ai-min(A0,A1,A2.....An))/(max(A0,A1,A2....An)-min(A0,A1,A2.....An)), (i= 0,1,2,...n);
Wherein, min () is function of minimizing, and max () is maximizing function, and n is control point group quantity, A0,A1, A2.....AnFor control point coordinates group, GPiTo normalize obtained mapping value.
5. a kind of B-spline curves drawing system based on probability calculation, which is characterized in that it includes sequentially connected coordinate transform Module, normalization module, binarization block, probability evaluation entity and data decoder module;Wherein:
Coordinate transformation module exports corresponding control point coordinates group for being coordinately transformed to the control point group of input;
Normalization module exports corresponding mapping value group for received control point coordinates group to be normalized;
Binarization block is used to receive the mapping value group of normalization module output, also receives the node group of input, binarization block It is used to analyze the received data carry out binary conversion treatment, exports corresponding binary string, for received probability value group, is then corresponded to defeated First binary string group out, it is for received node group, then corresponding to export the second binary string;
Probability evaluation entity is based on the second binary string and carries out multi channel selecting to the first binary string, with output probability value group;
Data decoder module is decoded and is normalized at random inverse operation to received probability value group, and the position for obtaining graphical pointv is sat Mark.
6. the B-spline curves drawing system based on probability calculation as claimed in claim 5, which is characterized in that the binaryzation Module, which is used to analyze the received data, carries out binary conversion treatment based on pseudo noise code.
7. the B-spline curves drawing system based on probability calculation as claimed in claim 6, which is characterized in that the binaryzation Module includes a pseudorandom number generation unit and a comparator;The pseudorandom number generation unit is used to generate the puppet of preset length Random code, the output end of the pseudorandom number generation unit connect the first input end of the comparator, and the of the comparator Two input terminals are used to receive the output valve of normalization module, and the output end output of comparator corresponds to its second input terminal and received Data binary string.
8. the B-spline curves drawing system based on probability calculation as claimed in claim 5, which is characterized in that the probability meter It calculates module and is based on the second binary string group and multi channel selecting is carried out to the first binary string group specifically: probability evaluation entity is based on the The result that two binary string groups correspond to position addition carries out multi channel selecting to the first binary string group.
9. the B-spline curves drawing system based on probability calculation as claimed in claim 8, which is characterized in that the probability meter Calculating module includes an adder and a multi-channel gating device, and for adder input terminal for receiving the second binary string group, adder is defeated Outlet connects the control terminal of multi-channel gating device, and the coefficient input terminals of multi-channel gating device are used to receive the first binary string group, The output end output probability value group of multi-channel gating device.
10. the B-spline curves drawing system based on probability calculation as described in one of claim 5-8, which is characterized in that described Normalize the method for normalizing of module are as follows:
GPi=(Ai-min(A0,A1,A2.....An))/(max(A0,A1,A2....An)-min(A0,A1,A2.....An)), (i= 0,1,2,...n);
Wherein, min () is function of minimizing, and max () is maximizing function, and n is control point group quantity, A0,A1, A2.....AnFor control point coordinates group, GPiTo normalize obtained mapping value.
CN201910378599.5A 2019-05-08 2019-05-08 B spline curve generation method and system based on probability calculation Active CN110097613B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910378599.5A CN110097613B (en) 2019-05-08 2019-05-08 B spline curve generation method and system based on probability calculation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910378599.5A CN110097613B (en) 2019-05-08 2019-05-08 B spline curve generation method and system based on probability calculation

Publications (2)

Publication Number Publication Date
CN110097613A true CN110097613A (en) 2019-08-06
CN110097613B CN110097613B (en) 2023-08-25

Family

ID=67447265

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910378599.5A Active CN110097613B (en) 2019-05-08 2019-05-08 B spline curve generation method and system based on probability calculation

Country Status (1)

Country Link
CN (1) CN110097613B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111325815A (en) * 2020-03-05 2020-06-23 成都威爱新经济技术研究院有限公司 Editing method of multi-level B-spline curve
CN112836982A (en) * 2021-02-22 2021-05-25 长春汇通光电技术有限公司 Instruction list generation method and device and computer readable storage medium
CN115861547A (en) * 2023-02-15 2023-03-28 南京铖联激光科技有限公司 Model surface sample line generation method based on projection

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007328522A (en) * 2006-06-07 2007-12-20 Tokyo Electric Power Co Inc:The Failure probability calculation device, method, and program
CN102222353A (en) * 2011-05-24 2011-10-19 南京信息工程大学 Curve drawing method based on secondary B spline iteration
CN103646422A (en) * 2013-12-19 2014-03-19 哈尔滨工程大学 Genetic multilayer B-spline interpolation algorithm based three-dimensional display method
CN107317701A (en) * 2017-06-13 2017-11-03 电子科技大学 A kind of network flow abnormal detecting method based on empirical mode decomposition

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007328522A (en) * 2006-06-07 2007-12-20 Tokyo Electric Power Co Inc:The Failure probability calculation device, method, and program
CN102222353A (en) * 2011-05-24 2011-10-19 南京信息工程大学 Curve drawing method based on secondary B spline iteration
CN103646422A (en) * 2013-12-19 2014-03-19 哈尔滨工程大学 Genetic multilayer B-spline interpolation algorithm based three-dimensional display method
CN107317701A (en) * 2017-06-13 2017-11-03 电子科技大学 A kind of network flow abnormal detecting method based on empirical mode decomposition

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111325815A (en) * 2020-03-05 2020-06-23 成都威爱新经济技术研究院有限公司 Editing method of multi-level B-spline curve
CN112836982A (en) * 2021-02-22 2021-05-25 长春汇通光电技术有限公司 Instruction list generation method and device and computer readable storage medium
CN112836982B (en) * 2021-02-22 2023-06-23 长春汇通光电技术有限公司 Instruction list generation method and device and computer readable storage medium
CN115861547A (en) * 2023-02-15 2023-03-28 南京铖联激光科技有限公司 Model surface sample line generation method based on projection

Also Published As

Publication number Publication date
CN110097613B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
CN110097613A (en) A kind of B-spline curves generation method and system based on probability calculation
Liu et al. A stochastic computational multi-layer perceptron with backward propagation
Ji et al. A hardware implementation of a radial basis function neural network using stochastic logic
CN103746731B (en) Multiple-input and multiple-output detector and detection method based on probability calculation
CN109739470A (en) A kind of computing system based on 2 type hyperbolic CORDIC arbitrary characteristics functions
CN106775577B (en) A kind of design method of the non-precision redundant manipulators multiplier of high-performance
CN107204782A (en) A kind of implementation method of BCH decoders and the compiler for generating the decoder
Russo et al. DNN model compression for IoT domain-specific hardware accelerators
Hussain et al. An efficient and fast softmax hardware architecture (EFSHA) for deep neural networks
CN107273624B (en) Method and device for generating burst random impulse noise based on FPGA (field programmable Gate array) and MC (media card) models
CN108804933A (en) A kind of system conversion method for big data
Wu et al. uGEMM: Unary computing for GEMM applications
CN108008665B (en) Large-scale circular array real-time beam former based on single-chip FPGA and beam forming calculation method
Yu et al. Approximate divider design based on counting-based stochastic computing division
CN106774624A (en) A kind of Parallel Implementation method of real-time white Gaussian noise hardware generator
CN107450886B (en) Method and device for generating Gaussian random signal simulating Gaussian white noise
Chen et al. Design and implementation of low-power hardware architecture with single-cycle divider for on-line clustering algorithm
Chen et al. High-accurate stochastic computing for artificial neural network by using extended stochastic logic
US20220066975A1 (en) Bit stream transformation in parallel data interfaces
Haselmayr et al. High-accuracy and fault tolerant stochastic inner product design
CN109150394A (en) External information weight merging approach and decoder for Turbo code
CN104199635B (en) The pseudorandom number generator of integrated CRC check circuit
Chen et al. Efficient sigmoid function for neural networks based FPGA design
CN110096677A (en) A kind of quick calculation method and system of the high-order differentiable functions based on probability calculation
CN101626249B (en) Soft-input soft-output coding system and soft-input soft-output coding method

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