本文介绍了位图转换为多边形 - (反向光栅化)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑到与在其上固色的一些印迹位图图像,你将采用什么算法来构造多边形的形状相同印迹

Given a bitmap image with some blots of solid color on it, what algorithm would you employ to construct polygons in the same shape as the blots?

这可以在多个步骤来完成:一个高分辨率多边形可以由最适合的算法稍后砍伐。奖励积分,如果你能告诉我如何产生的多边形切割成凸部,使他们可以在OpenGL渲染没有问题。

This can be done in multiple steps: a high-resolution polygon could be later cut down by a best fit algorithm. Bonus points if you can tell me how to cut the resulting polygons into convex components so that they can be rendered in OpenGL without problems.

推荐答案

反向光栅化被称为的。该算法一般都相当复杂,这里有一个他们几个的。退房稀疏像素追踪以及稀疏像素的矢量的一些很好的例子。

Reverse rasterizing is referred to as vectorizing. The algorithms are generally quite complex, here's a googlet of a few of them. Check out sparse pixel tracking and sparse pixel vectorization for some good examples.

有关良好的算法多边形分区,用C计算几何退房Joespeh O'Rourkes,ISBN 0-521-44034-3,或搜索<一个href=\"http://www.google.com/search?hl=en&safe=off&rls=p%2Ccom.microsoft%3Aen-gb&q=concave+polygon+partitioning\"相对=nofollow>凹多边形分区算法,如的

For good algorithms for polygon partitioning, check out Joespeh O'Rourkes 'Computational Geometry in C', ISBN 0-521-44034-3, or search for concave polygon partitioning algorithms, such as this

这篇关于位图转换为多边形 - (反向光栅化)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 16:32