Go to Post I find it ironic how the game "Recycle Rush" can create so much waste. - bEdhEd [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-03-2016, 02:48
Manusha4Lyfe Manusha4Lyfe is offline
Registered User
FRC #5124
 
Join Date: Jan 2015
Location: Torrance
Posts: 6
Manusha4Lyfe is an unknown quantity at this point
Question Saving Pictures And Other Data During A Match

We'd like to use vision tracking, but at our last regional the strength lights on the tower interfered with the tracking of the retro reflective tape. We were unable to replicate the field conditions in the pit so I was wondering how you would go about saving pictures (we use the Axis M1013 and Java) so I could use them after a match to help calibrate the tracking. Also if anyone knows how to save variables in the code to a text file so they could be reviewed after a match as well, that would also be appreciated. Thank you in advance for your replies.
  #2   Spotlight this post!  
Unread 15-03-2016, 08:30
ProfessorAlekM ProfessorAlekM is offline
Registered User
FRC #6190
 
Join Date: Jan 2016
Location: Canton, Michigan
Posts: 32
ProfessorAlekM has a little shameless behaviour in the past
Re: Saving Pictures And Other Data During A Match

If you are viewing video through the driver station during a match, you could take a screenshot and crop it.

If you are using openCV on a co-proccessor, you could try this:http://stackoverflow.com/questions/1...ncv-and-python
  #3   Spotlight this post!  
Unread 15-03-2016, 08:30
dubiousSwain's Avatar
dubiousSwain dubiousSwain is offline
The ride never ends
AKA: Christian Steward
FRC #5420 (Velocity)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2011
Location: USA
Posts: 304
dubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond repute
Re: Saving Pictures And Other Data During A Match

Quote:
Originally Posted by Manusha4Lyfe View Post
We'd like to use vision tracking, but at our last regional the strength lights on the tower interfered with the tracking of the retro reflective tape. We were unable to replicate the field conditions in the pit so I was wondering how you would go about saving pictures (we use the Axis M1013 and Java) so I could use them after a match to help calibrate the tracking. Also if anyone knows how to save variables in the code to a text file so they could be reviewed after a match as well, that would also be appreciated. Thank you in advance for your replies.
In Java you can put the variables in a text file and then read the text file to load the constants. I'm not exactly sure how to do it though, the programmer that did it on our team graduated and we switched to labview.

I have implemented saving images in labview but haven't tested it. I just used IMAQ save and made the filepath a timestamp. I'll let you know if it works when I test it tonight or thursday.
__________________
2015 MAR District Champions




  #4   Spotlight this post!  
Unread 15-03-2016, 09:44
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 322
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: Saving Pictures And Other Data During A Match

You can record the stream from your axis camera on your drive laptop using VLC. See the documentation here: https://wiki.videolan.org/Documentat..._using_the_GUI
Then you can look at the recorded file and save relevant images from it.

There are also sample tower images taken with a green led ring that were released shortly after kickoff (located somewhere on usfirst.collab.net). You can use these to develop your vision if you also use a green led ring. It includes tower lights, so you can make sure you filter those out.

We prevented tower lights from interfering with vision by filtering out small particles (in NI vision - I'm sure grip and plain OpenCV allow something similar)
  #5   Spotlight this post!  
Unread 15-03-2016, 11:41
Brian Selle's Avatar
Brian Selle Brian Selle is offline
Mentor
FRC #3310 (Black Hawk Robotics)
Team Role: Engineer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Texas
Posts: 162
Brian Selle has a spectacular aura aboutBrian Selle has a spectacular aura aboutBrian Selle has a spectacular aura about
Re: Saving Pictures And Other Data During A Match

We have a button on the SmartDashboard so our drivers can save camera images to the roboRIO during practice matches. We then use ftp to download them for offline processing or read/process the saved images on the roboRIO and post the results.

To save images:
Code:
NIVision.RGBValue rgbValues = new NIVision.RGBValue();
NIVision.imaqWriteFile(currentImage, "/home/lvuser/image" + imageCounter + ".jpg", rgbValues);
To read images:
Code:
NIVision.imaqReadFile(currentImage, "/home/lvuser/image" + imageCounter + ".jpg");
__________________
2015 Newton Semi-Finalist (3130, 2468, 3310, 537)
2015 Lubbock Regional Winner (2468, 3310, 4799)
2014 Galileo Quarter-Finalist (2052, 70, 3310, 3360)
2014 Colorado Regional Winner (1138, 3310, 2543)
2013 Texas Robot Roundup Winner (3310, 624, 2848)
2013 Archimedes Semi-Finalist (126, 3310, 1756)
2013 Dallas Regional Winner (148, 3310, 4610)
2012 Dallas West Regional Winner (935, 3310, 4206)
Closed Thread


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 17:01.

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