我如何可以检测JPEG图像基本的2D几何形状(如正方形,三角形,圆形)? [英] How can I detect basic 2D geometric shapes (e.g. square, triangle, circle) on a JPEG image?

查看:301
本文介绍了我如何可以检测JPEG图像基本的2D几何形状(如正方形,三角形,圆形)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在拍照,我想检测和拍摄对象的形状。我正在寻找的是类似人脸检测,但我想要的应用程序,以检测出的形状,而不是面孔。我创建使用Java和Android SDK的Andr​​oid应用程序。什么库或资源,我可以访问任何想法做这样的事情?

After taking a picture, I'm trying to detect the shape of the object that is shot. What I'm looking for is similar to face detection, except I want the app to detect shapes instead of faces. I'm creating an Android app using Java and the android SDK. Any Ideas on what libraries or resources I can access to do this sort of thing?

推荐答案

我会用在马文处理的边缘检测滤波器。 http://marvinproject.sourceforge.net/en/plugins/edgeDetector.html

I'd use the edge detection filter in marvin processing. http://marvinproject.sourceforge.net/en/plugins/edgeDetector.html

然后再通过像素,SEACH在附近的暗像素和存储你已经找到了线。然后,您可以为您在该线的交叉点。集团相交线一起,检查交汇的角度。这至少应该给你一个起点多边形。

Then go through the pixels, seach for dark pixels in the vicinity and store the lines you have found. Then you can check for intersections in the lines. Group intersecting lines together and check the angles of intersection. That should at least give you a starting point for polygons.

这篇关于我如何可以检测JPEG图像基本的2D几何形状(如正方形,三角形,圆形)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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