图像到 N 个三角形,颜色损失最小

发布于 2025-01-13 19:56:21 字数 146 浏览 2 评论 0原文

需要使用 Delaunay 三角剖分将图像转换为 N 个三角形。每个三角形一种颜色,并且颜色可以重复。 损失函数由每个像素颜色差的平方给出。 那么如何优化颜色三角形的顶点呢?

Required to turn an image into N triangles with Delaunay triangulation. One color for each triangle, and colors can be repeated.
The loss function is given by the square of the difference in the color of each pixel.
So how to optimize the color and the vertices of triangles?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心安伴我暖 2025-01-20 19:56:21

递归分割过程概述:

Terminate the recursion if N < 2

Split the given area A in two triangles A1 and A2 in such a way that the
sum of standard deviations of the pixel colors is cut in halves. 
Assign N/2 colors to A1 and N - N/2 colors to A2.

Recursively split A1 and A2.

生成的 N 个三角形网络被着色以最小化损失函数:

For every triangle the color chosen is the average color of the pixels within that triangle.

可能值得对有关该主题的现有文献进行调查。第一个搜索引擎点击返回基于 Delaunay 三角测量和矢量量化的分形图像压缩

A recursive splitting procedure outline:

Terminate the recursion if N < 2

Split the given area A in two triangles A1 and A2 in such a way that the
sum of standard deviations of the pixel colors is cut in halves. 
Assign N/2 colors to A1 and N - N/2 colors to A2.

Recursively split A1 and A2.

The resulting net of N triangles is colored to minimize the loss function:

For every triangle the color chosen is the average color of the pixels within that triangle.

It might be worthwhile to conduct a survey of existing literature on the topic. A first search engine hit returned Fractal image compression based on Delaunay triangulation and vector quantization

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文