Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Detecting rectangles with the camera and Java (http://www.chiefdelphi.com/forums/showthread.php?t=97904)

Djur 19-10-2011 16:39

Detecting rectangles with the camera and Java
 
I'm a programmer for my team and I'm working on autonomous during the offseason, but for it to work properly, the robot has to be parallel with the sides of the field. I was thinking of aligning the robot to face the plexi sheet in front of the drivers' area, but I really have no idea how to make the robot actually recognize that rectangle. Help would be greatly appreciated.

shuhao 20-12-2011 22:38

Re: Detecting rectangles with the camera and Java
 
Apply an edge finding (both vertical and horizontal) algorithm. Try to scale your image down first (< 100x100) and take the grey scale for optimization.

Try the simplistic kernel of

Code:

1 -1
for horizontal edge and

Code:

1
-1

for vertical edge,

I assume that your "rectangle" will look like

Code:

  / \
 /  \
/    \

as it seems to be on the ground, so go through your filtered image and try to recognize those pattern with something like a machine learning algorithm

Either way, it's pretty tough...


All times are GMT -5. The time now is 22:19.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi