B样条曲线曲面密集控制点是造成CAD模型数据量庞大的因素之一,对其进行压缩编码,能有效减少CAD模型数据量。提出一种局部坐标系下二阶预测编码算法,对B样条控制网格构造局部坐标系,在局部坐标系下对控制点进行一阶预测,对相邻控制点一阶预测误差再进行二阶预测,对二阶预测误差量化后进行算术编码。分析了量化参数对曲线曲面误差的影响。实验结果表明,该算法预测准确性较高,预测误差分布集中,可以获得较高压缩率,达到压缩CAD产品模型目的。
To reduce the data size of CAD product model, we presented an algorithm to compress the B-spline curves and surfaces based on second-order prediction in local coordinate system. The algorithm procedure included constructing local coordinates for control points, first-order prediction in local coordinate system, second-order prediction, quantization and entropy coding for second- order prediction errors. We analyzed the curve and surface distortion brought by quantization. Experimental results show that of the prediction error is lesser and the distribution is more centralized than that of the previous work. The algorithm can obtain higher compression ratios.