拼图,切断从形象片 [英] Jigsaw Puzzle, cutting pieces from image

查看:164
本文介绍了拼图,切断从形象片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做出切割图像转换成拼图的应用程序。我的问题是,我不知道如何做到这一点(任何一种算法)。我也希望有男性和困惑的女性的结局,但不是在同一个地方所有的时间(如在拼图边框的正中间),所以这样的:的如何使用C#的解决方案不适合我创造拼图图片拼图。

I'm trying to make an application that cuts image into jigsaw puzzles. My problem is that I don't know how to do this (any kind of algorithm). I do want to have male and female endings of puzzles, but not in the same place all the time (like in the middle of puzzle border) so this: How to create Jigsaw image puzzle using C# solution doesn't fit me.

有没有一种智能的算法,使这种情况发生。我想使用贝塞尔曲线,但我不知道该怎么做的权利。

Is there any kind of "smart" algorithm to make this happens. I was thinking about using bezier curves, but I don't know how to do this right.

推荐答案

您可以使用一个随机偏移。您存储每个边的那种互动(即男性或女性),锚类型(您可以使用一组不同的寻找锚(不知道名字),和偏移。

You could use a random offset. You store for each side the kind of interaction (ie male or female), the anchor type (you could use a set of different looking "anchors" (don't know the name), and the offset.

此,易于进行检查:你必须有相同的锚,相同的偏移和不同类型的两个片能够链接

This make for easy check : you must have same anchor, same offset and different kind for the two piece to be able to link.

问候
纪尧姆

这篇关于拼图,切断从形象片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆