Go to Post what is FIRST?...It's about innovation, hard work, inspiration, teaching, learning, experiment, strategy, competition, meeting new people, being inspired, aiming high and changing paradigms...Really, FIRST is what you make of it. - jarowe [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 28-11-2015, 07:21
gofmannir gofmannir is offline
Registered User
AKA: Nir Gofman
FRC #2096 (RoboActive)
Team Role: Programmer
 
Join Date: Nov 2015
Rookie Year: 2015
Location: Israel
Posts: 13
gofmannir is an unknown quantity at this point
Question How to recognise an object with camera

Hello, Im new to FRC java development but with a fewer years with Java Development..
Me and my team build a simple robot (tank drive), and every thing work great, we also connect the Microsoft Lifecam to the RoboRio, and we can see image on the smart dashboard from the camera..

I want to start learning how to recognise an objects at the front of the robot (for example a yellow big box, and to stop at front of him, but if the box is coloured blue so it will keep driving straight..)

How can I do that?
Reply With Quote
  #2   Spotlight this post!  
Unread 28-11-2015, 12:08
GeeTwo's Avatar
GeeTwo GeeTwo is online now
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,609
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: How to recognise an object with camera

We've used the OpenCV library in the past. It has a number of utilities to do vision processing and identify/localize features. I was not involved in the programming, so I do not know any of the details. Here's the link to our github repository we used in 2013 and 2014 to find goals; we had implemented it on a raspberry pi, as in 2012 our goal finder bogged the cRIO down too much between network traffic and CPU time. I understand that the latest raspberry pi offerings start at $5, and are more powerful than the ones we used in 2013 and 2014. You can connect the USB camera directly to the pi, and only send back the coordinates and key attributes of the goal/object over the network.

If you want an image to help drive, you can also so some vision processing to reduce the package being sent back. I had good luck with the "Canny Edge Detector" algorithm in ImageMagick when I played around with it last year; it sent back a useful schematic image in a very small number of kilobytes. I see that OpenCV does have the Canny algorithm as well.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-12-2015, 02:21
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: How to recognise an object with camera

I believe all three languages come with example vision programs, so you can check out the code there. The ScreenStepsLive documentation from 2014 also has some explanation: http://wpilib.screenstepslive.com/s/3120/m/8731

If your team still has the license code for RoboRealm that was given out in the KoP last year, I would highly recommend downloading it. At the very least, it's a great way to rapidly experiment with a bunch of different vision algorithms to give you a sense of when each is useful. You can use RoboRealm as the final vision solution, or you can convert the algorithm to something else (like NI Vision or OpenCV).
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
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:36.

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