在 iPhone 上使用遮罩进行照片边缘检测

发布于 2024-12-25 20:51:38 字数 249 浏览 7 评论 0原文

我正在寻找能够对比检测照片边缘的代码。

基本上,用户会用手指在 iPhone、iPod 或 iPad 上粗略地绘制遮罩。然后代码将检测边缘并将蒙版调整到边缘。

感谢您的帮助!

http://www.image-y.com/before.jpg http://www.image-y.com/after.jpg

I'm looking for code to be able to contrast detect edges in a photo.

Basically, the user will roughly paint the mask with their finger on Iphone, iPod or iPad. Then the code would detect the edges and adjust the mask to the edges.

Thanks for your help!

http://www.image-y.com/before.jpg
http://www.image-y.com/after.jpg

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

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

发布评论

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

评论(1

鹤舞 2025-01-01 20:51:38

我建议查看 OpenCV (它也可以在 iOS 上编译(查看 https ://github.com/aptogo/OpenCVForiPhone))。这篇文章 http://b2cloud 可以提供一个很好的补充(带有解释)。 com.au/tutorial/uiimage-pre-processing-category

当对 OpenCV 的用途有了基本的了解后,我个人会尝试进行某种阈值处理轮廓检测(看看 cv::找到轮廓)。之后,您可以使用用户给定的输入来过滤找到的轮廓。

I recommend taking a look at OpenCV (which is also compilable on iOS (take a look at https://github.com/aptogo/OpenCVForiPhone)). A nice addition (with explanations) could be provided by this article http://b2cloud.com.au/tutorial/uiimage-pre-processing-category.

When having gained a basic understanding of what you can do with OpenCV, I'd personally try to do some kind of thresholding and contour detection (take a look at cv::findContours). Afterwards you could filter the found contours by using the given input by your user.

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