View Full Version : 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.
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
1 -1
for horizontal edge and
1
-1
for vertical edge,
I assume that your "rectangle" will look like
/ \
/ \
/ \
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...
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.