首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
Line segment clipping is a basic operation of the visualization process in computer graphics.So far there exist four computational models for clipping a line segment against a window,(1)the encoding,(2)the parametric,(3)the geometric transforma tion,and (4)the parallel cutting.This paper presents an algorithm that is based on the third method.By making use of symmetric properties of a window and transformation operations,both endpoints of a line segment are transformed,so that the basic cases are reduced into two that can be easily handled,thus the problems in NLN and AS where there are too many sub-procedure calls and basic cases that are difficult to deal with are tackled.Both analytical and experimental results from random input data show that the algorithm is better than other developed ones,in view of the speed and the number of operations.  相似文献   

2.
New algorithm for two-dimensional line clipping   总被引:6,自引:0,他引:6  
Line segment clipping is a basic element of the visualization process in a graphics system. So far there exist two approaches for development of algorithms for clipping a line segment with respect to a rectangular window. According to the first approach the line segment locations with respect to the window are described by a certain generalized model. As a result all line segments are clipped identically. The second approach is based on the observation that the great diversity of line segment locations could by systematized in several basic cases. For each one of them the clipping is performed in a preliminary defined way. The algorithm described in the papers uses the second approach. The basic cases of the line segment locations with respect to the window are selected so that the time consuming computations as division and multiplication are reduced to a minimum. An analytical comparison is made with the other algorithms using this approach that are theoretically and experimentally proved to be more efficient than those developed on base of the first approach.  相似文献   

3.
分析与讨论了几种线段二维裁减和绘制算法,为了提高图形绘制的精确度和计算速度,通过实验在Windows平台上利用C语言和DirectDraw接口实现了这些算法。针对不同的实验参数,对各个算法性能作出了比较。分析结果显示:在实现过程中可以对直线裁剪的累计误差处理,对整数除法的四舍五入处理等细节改良,从而使得绘制的图形更加精确,付出的代价非常小。实验结果表明,采用最优树裁剪算法对线段进行二维裁剪并利用步距长度片算法进行绘制,能够高效完成显示任务,结果具有较好的参考价值。  相似文献   

4.
One of the classical problems of Computer Graphics: line clipping against a rectangle is revisited. Coordinate raster refinement and some unusual forms of the parametric equation of the line are used to develop formulae for a line clipping algorithm. The algorithm is first presented in a form, where clarity of presentation is the prime concern. It is then transformed into one big nested branch, which after optimisation is assumed to be the most efficient form with a heavy cost on size. It is assumed that any mathematical consideration of the clipping problem would after a similar optimisation lead to a branching structure of equal complexity and speed. Line clipping thus belongs to the class of problems for which after a proper mathematical and logical analysis automatic program transformations may do the rest. This work has been supported by a grant from the Hungarian Academy of Sciences, Project No. OTKA 2572/1991  相似文献   

5.
在智能CAD、图形识别与理解等复杂图形应用系统中,由于图元数量多、 图元间关系复杂,且系统实时交互响应要求较高,现有圆形窗口裁剪算法较难满足要求。为 此提出圆形窗口对线段的一种新的快速裁剪算法。该算法由基于切线分隔的圆外线段快速适 应性测试方法、基于最小范围的圆内线段测试方法和基于点斜式查表的线段与窗口圆快速求 交方法三部分组成。通过按端点位置选择适应的测试方法、尽量避免不必要的操作、尽量以 简单操作代替复杂操作等措施,大大提高了圆形窗口对线段的裁剪速度。在图形识别及智能 CAD 等应用中的实验结果表明,采用文中算法可较大地提高效率。  相似文献   

6.
Cohen-Sutherland裁剪算法因直线与窗口边界求交点次数多而降低算法效率。提出了一种改进Sutherland-Cohen裁剪算法,将完全在窗口内和窗口外的直线判断出来,根据直线端点编码确定辅助线,利用平面上三点的关系判断直线与窗口的哪条边相交。改进的算法使得求交点次数降为最多两次,且避免计算斜率与距离,大大提高算法的效率。算法思想简单,操作方便,有利于硬件实现,对图形学的应用具有重要的实用价值。  相似文献   

7.
Thresholding is an important form of image segmentation and is used in the processing of images for many applications. One of the criteria to select a suitable threshold is the maximization of the two-dimensional (2-D) entropies based on the 2-D (gray-level/local average gray-level) histogram. The rationale of this approach is introduced. In order to reduce the computation time of entropy function, a fast recurring algorithm for 2-D entropic thresholding method is presented. The experimental results show that the processing time to obtain the threshold vector from 2-D histogram is reduced from 30 to 0.15 s.  相似文献   

8.
在圆形窗口圆心为坐标原点的前提下,确定两端点同时在外切正方形某边 界之外或至少有一端点在圆形窗口之内的线段之后,当线段两端点都在圆形窗口之外时:如 果线段所在直线在x 或y 任意坐标轴上截距的绝对值小于或等于圆半径r,则可快速判断线 段与圆形窗口是否相交;否则,再根据点-线位置关系以及所引切线与线段分别相交外切正 方形边的交点坐标相比较判断线段与圆形窗口是否相交。该方法可以加快线段与圆形窗口的 求交进程,避免复杂的辅助操作,显著提高裁剪效率。  相似文献   

9.
An efficient algorithm for line and polygon clipping   总被引:7,自引:2,他引:5  
We present an algorithm for clipping a polygon or a line against a convex polygonal window. The algorithm demonstrates the practicality of various ideas from computational geometry. It spendsO(logp) time on each edge of the clipped polygon, wherep is the number of window edges, while the Sutherland-Hodgman algorithm spendsO(p) time per edge. Theoretical and experimental analyses show that the constants involved are small enough to make the algorithm competitive even for windows with four edges. The algorithm enables image-space clipping against windows whose boundaries are convex spline curves. The paper contains detailed pseudo-code implementation of the algorithm and an adaptation of the simulation of simplicity method for handling degenerate cases.  相似文献   

10.
Wavelet moments are perfect representations of moments in multiresolution wavelet domain, which integrates the theory of moment invariants into wavelet analysis. However, the calculations of moments are very complicated in terms of computational complexity, so it is difficult to implement them in real time. An exact and fast projection-based algorithm for two-dimensional wavelet moments is presented in this paper. In our approach, the computation of a two-dimensional wavelet moment of order of r is performed in (r+1) different one-dimensional spaces. Since only additions are required to perform the projection transform, the total computational complexity can be greatly reduced.  相似文献   

11.
针对目前运动估计算法中分割块选择与阈值造成的算法搜索冗余现象,提出一种自适应选择编码模式的快速运动估计算法。在阈值的选取上通过提出自适应的阈值选取方式,来提高算法的搜索精度。而在模块的选取上,则是通过结合视频图像的空间相关性与运动特性来对其进行择优,并采用几种搜索模板来对分割块进行搜索,进而降低运动估计模块的计算复杂度。实验结果表明,该算法能够在得到与全搜索算法相近重构图像质量的情况下减少97%的运算时间。  相似文献   

12.
传统二维Otsu算法的阈值选取大都采用穷尽搜索方式,造成算法分割时间较长、实时性差等缺点,影响图像分割效果。为提高算法的运行效率,采用狼群算法来搜索最优阈值,每匹人工狼代表一个可行的二维阈值向量,狼群通过游走、召唤、围攻这三种智能行为的不断迭代以及狼群间的信息交互来获取最佳阈值。仿真结果表明,与标准粒子群优化二维Otsu算法和传统二维Otsu算法相比,狼群优化算法降低了分割时间并提高了图像分割精度。  相似文献   

13.
为满足大容量NAND Flash的容错需求,解决传统BCH编码存在长码字编码效率低下的问题,提出一种长BCH编码的快速算法.算法利用分圆陪集和中国剩余定理,在确定生成多项式时,由每个最小多项式的根构造分圆陪集,避免了重复计算所有的根;采用等价多项式代替除法多项式,将计算的最小多项式和理想循环码的生成元加入分圆陪集,后续编码可通过查找分圆陪集得到等价余数多项式,无须每次都进行除法运算,减少了除法运算时间.实验结果表明,与传统BCH编码算法和相关算法相比,该算法在长BCH编码时具有较高的编码效率,特别是对极长BCH编码,效果更加明显.  相似文献   

14.
裁剪算法的核心问题是速度问题,而求裁剪窗口和裁剪对象的交点是影响裁剪速度的主要因素。特别是椭圆对线段的裁剪,由于椭圆的方程是二次的,求椭圆与线段的交点 需要求解一元二次方程,涉及开方运算,非常浪费机器时间。为提高裁剪速度,设计出5位的区域编码,利用此技术能够迅速而准确地判断出椭圆和线段的位置关系。对于完全可见 或显然完全不可见的线段立即做出保留或弃掉的决定,避免求交运算;对于能够明确断定与椭圆相交的线段,采用中点分割算法求椭圆和线段的近似交点,避免求解一元二次方程 和开方运算;对于其他情形的线段通过求解一元二次方程来完成裁剪。基于前述思想设计出的椭圆对线段裁剪算法与现有的同类算法相比,算法实现简单,裁剪速度具有较大提高 。  相似文献   

15.
A new approach to parametric line clipping   总被引:7,自引:0,他引:7  
Michael D  rr 《Computers & Graphics》1990,14(3-4):449-464
Line clipping is an important operation in almost every graphical application. The most commonly used techniques are based on line end point encodings or the parametric representation of straight line segments. In this paper both techniques are combined in a new algorithm that computes accurately rounded coordinates, without the use of any floating point operations. It is shown that the new method is suited for implementations in software as well as in hardware. A performance study of the new and several other well-known line clipping algorithms indicates the superiority over all other examined algorithms.  相似文献   

16.
Vector quantization (VQ) for image compression requires expensive time to find the closest codevector in the encoding process. In this paper, a fast search algorithm is proposed for projection pyramid vector quantization using a lighter modified distortion with Hadamard transform of the vector. The algorithm uses projection pyramids of the vectors and codevectors after applying Hadamard transform and one elimination criterion based on deviation characteristic values in the Hadamard transform domain to eliminate unlikely codevectors. Experimental results are presented on image block data. These results confirm the effectiveness of the proposed algorithm with the same quality of the image as the full search algorithm.  相似文献   

17.
Line clipping against a polygon is widely used in computer graphics such as the hidden line problem. A newline‐clipping algorithm against a general polygon is presented in this paper. The basic idea of this algorithm is tochange the line to be clipped into a horizontal line by shearing transformation. Then each edge of the polygonalwindow is transformed by a shearing transformation with the same parameters as those used to the line. Eachedge of the polygon is processed against a horizontal line, which makes the clipping process simpler. The result inthis paper shows that less calculation is needed for the new algorithm with a higher speed compared to existingalgorithms.  相似文献   

18.
《传感器与微系统》2019,(11):157-160
针对汽车辅助驾驶中的车道偏离预警问题,提出一种车道线快速检测算法。引入当前车道的动态感兴趣区域(DROI),并依据空间坐标系去除摄像机视野底部车头区域,基于累计概率霍夫变换(PPHT)实时调整DROI,有效解决其他车道的车辆干扰;针对特殊路况中的灌木、围栏、路桩以及路面标识等干扰,基于动态规划,建立车道线检测优选模型,从PPHT检测到的候选线段中,选出最优线段;在此基础之上,进一步准确定位车道中心线位置,建立车道偏离预警模型,实现车道偏离预警。实验结果表明,提出的算法能够有效提高车道偏离预警的准确率以及鲁棒性。  相似文献   

19.
The clipping operation is still the bottleneck of the graphics pipeline in spite of the latest developments in graphical hardware and a significant increase in performance. Algorithms for line and line segment clipping have been studied for a long time and many research papers have been published so far. This paper presents a new robust approach to line and line segment clipping using a rectangular window. A simple extension for the case of convex polygon clipping is presented as well. The presented approach does not require a division operation and uses homogeneous coordinates for input and output point representation. The proposed algorithms can take advantage of operations supported by vector–vector hardware. The main contribution of this paper is a new approach to intersection computations applied to line and line segment clipping. This approach leads to algorithms that are simpler, robust, and easy to implement.  相似文献   

20.
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号