Go to Post A person is not defined by what mistakes they make, but more so by what they do after they realize their mistake. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-10-2011, 16:39
Djur's Avatar
Djur Djur is offline
WPILib
AKA: Sam Carlberg
no team
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Massachusetts
Posts: 182
Djur will become famous soon enough
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.
__________________
WPILib dev (RobotBuilder, SmartDashboard, GRIP)
Reply With Quote
  #2   Spotlight this post!  
Unread 20-12-2011, 22:38
shuhao shuhao is offline
Registered User
FRC #4069 (Lo-Ellen Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Sudbury
Posts: 138
shuhao is an unknown quantity at this point
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...

Last edited by shuhao : 20-12-2011 at 22:42.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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