Go to Post FIRST already has 494 Martians, plus 70 more. - GaryVoshol [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 29-01-2015, 21:07
thetimelord thetimelord is offline
Registered User
None #2035
 
Join Date: Jan 2015
Location: California
Posts: 3
thetimelord is an unknown quantity at this point
Vision Processing in Java

Hello, I am currently the head of vision processing in my team's programming department and I have come across a few issues. First let me clarify that my team is java exclusive, we have switched to the eclipse IDE this year, and we have successfully been able to capture an image, save it to the roboRIO, then process it to find the yellow tote. However, my main problem is that I cannot seem to find a way to isolate the location of a tote on a processed image after it has acknowledged that a tote is in view. I am trying to find the centered coordinates of the tote on the image. It would be EXTREMELY helpful if there was an API for the NIvision tools in eclipse because the javadoc created by eclipse DOES NOT provide adequate information. Thanks for any help.
Team 2035, Robo-Rockin'Bots.
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2015, 21:19
MatthewC529 MatthewC529 is offline
Lcom/mattc/halp;
AKA: Matthew
FRC #1554 (Oceanside Sailors)
Team Role: Mentor
 
Join Date: Feb 2014
Rookie Year: 2013
Location: New York
Posts: 39
MatthewC529 is on a distinguished road
Re: Vision Processing in Java

I was having fun re-writing their CameraServer and making a Camera API (with functions like the ones you are describing but more generalized) and was lucky enough to find this early on:

http://www.ni.com/pdf/manuals/371266e.pdf

It describes several examples and stuff that doesn't pertain to finding a Yellow Tote's center, but helpful nonetheless. Look around for NIVision IMAQdx and NIVision imaq references and documentation. It's bothersome because the Java NIVision wrapper is completely undocumented and 30,000+ lines long but it contains a lot.

Note: Not all NIVision functions are available in the Java Wrapper.

I have not done so but looking at WPILib's vision processing classes may be helpful. I am not sure but I believe you can access documentation through the start menu if you have NIVision installed. I do most of my development at home so I have not check on the team laptop.
__________________
Team 1554 -- Oceanside Sailors
  • 2013-2014 - Lead/Sole Programmer
  • 2014-2015 - Lead Programmer, President
  • 2015-? - Team 1554 Mentor
Independent Public Projects

Developer at Legend Zero LLC.
Java/C++ Programmer
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2015, 00:32
Lloydpro Lloydpro is offline
Registered User
AKA: Jacob Beeman
FRC #3495 (Mindcraft)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Fresno, CA
Posts: 10
Lloydpro is an unknown quantity at this point
Re: Vision Processing in Java

Quote:
Originally Posted by thetimelord View Post
Hello, I am currently the head of vision processing in my team's programming department and I have come across a few issues. First let me clarify that my team is java exclusive, we have switched to the eclipse IDE this year, and we have successfully been able to capture an image, save it to the roboRIO, then process it to find the yellow tote. However, my main problem is that I cannot seem to find a way to isolate the location of a tote on a processed image after it has acknowledged that a tote is in view. I am trying to find the centered coordinates of the tote on the image. It would be EXTREMELY helpful if there was an API for the NIvision tools in eclipse because the javadoc created by eclipse DOES NOT provide adequate information. Thanks for any help.
Team 2035, Robo-Rockin'Bots.
If you are able to show me what you did for vision, I would be really appreciative. The first question I should be asking though is did you use OpenCV or did you actually use the NI Vision libraries. If you used the vision libraries I would be very interested to see what you have done. I have been trying to figure this out since the beginning of the build season, and I have recently given up because it was too much of a pain in the behind, and we could achieve the same thing using encoders. If you are willing to share some of your code, assuming it uses the NI vision libraries I would be most appreciative.
Reply With Quote
  #4   Spotlight this post!  
Unread 31-01-2015, 12:35
thetimelord thetimelord is offline
Registered User
None #2035
 
Join Date: Jan 2015
Location: California
Posts: 3
thetimelord is an unknown quantity at this point
Re: Vision Processing in Java

Quote:
Originally Posted by Lloydpro View Post
If you are able to show me what you did for vision, I would be really appreciative. The first question I should be asking though is did you use OpenCV or did you actually use the NI Vision libraries. If you used the vision libraries I would be very interested to see what you have done. I have been trying to figure this out since the beginning of the build season, and I have recently given up because it was too much of a pain in the behind, and we could achieve the same thing using encoders. If you are willing to share some of your code, assuming it uses the NI vision libraries I would be most appreciative.
Yes, we have indeed been using the NIvision libraries. We have have been using a modified version of the provided sample code for processing color in images (not reflective tape). Here is the link to our GitHub repository with regards to vision.
NOTE: we have two commands for vision; 1) Vision: this is for capturing images and saving them to the roboRIO 2) ProcessImage: this is the command that processes the image saved by the Vision command

https://github.com/CarmelRobotics/ex...robot/commands
Reply With Quote
  #5   Spotlight this post!  
Unread 30-01-2015, 17:33
sebflippers sebflippers is offline
Registered User
FRC #2914
 
Join Date: Jan 2012
Location: dc
Posts: 56
sebflippers will become famous soon enoughsebflippers will become famous soon enough
Re: Vision Processing in Java

Check out some examples here:

https://github.com/search?l=java&q=i...f8= %E2%9C%93
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:24.

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