iOS - 以编程方式从位图中提取轮廓
我正在研究从 这个类型。
我做了一些谷歌搜索,找到了很多关于 ImageMagick、CoreImages 和 OpenCV 的链接,但我很难评估这样做的难度以及步骤是什么。
通过最多几周的开发时间,从使用用户设备仔细拍摄的照片中生成类似的轮廓,这是否是一个可行的目标?
指向已知过程/算法的指针当然会特别有帮助。
I'm investigating the possibility of creating a b&w silhouette picture from a bitmap (from a photo taken on an iOS device's camera), of this type.
I've done some Googling and come up with a lot of links about ImageMagick, CoreImages and OpenCV but I have some difficulty evaluating how hard it would be to do so and what the steps would be.
Is it a feasible goal to with maximum a few weeks development generate a similar silhouette from a carefully taken photo using the users device?
Pointers to known processes/algorithms would of course be extra helpful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 iDevice 上可以,但前提是照片是用户在非常浅/颜色均匀的背景下拍摄的。
如果情况并非如此,您将需要做更多的工作才能实现这一目标。
如果用户面对的是颜色相对较浅且颜色均匀的背景。通过使用白点/伽玛和亮度/对比度来冲掉人物所在的较暗区域,您应该能够大致了解您正在寻找的内容。如果您从那里进行处理,您应该能够检测到该形状的“轮廓”并使用这些图形从那里重新绘制您的轮廓。
On an iDevice yes but only if the photo is of the user against a very light/uniformly colored background.
If that's not the case, you're going to need to do a LOT more work to achieve this goal.
If the user is against a relatively lightly colored background that's uniform in color. You should be able to get the basic idea of what you're looking for my playing with the whitepoint/gamma and brightness/contrast to sort of flush out a darker area where the person is. If you process from there, you should be able to detect an "outline" of that shape and use those figures to re-draw your silhouette from there.