Go to Post I've always believed that being who I was will not limit me to who I will be. That's what keeps me trying to learn more and become a better person. Otherwise I would've settled being someone ordinary and not care about anything around my life. - Ken Leung [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 4.50 average. Display Modes
  #16   Spotlight this post!  
Unread 17-06-2009, 17:30
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Recording with the Camera

We were able to save video from the camera to the crio's 2GBish drive, and then copy it to a computer and assemble it into a avi on a laptop. in the code we used imaqSaveImage or imaqWriteImage (look in nivision.h) to save to a folder, and just ftp'ed to ftp://10.xx.yy.2/ and copied it off after matches. we used a simple C# program that i wrote to play it back, and vidshot capture to save it to avi. here are some of ours:
http://thecatattack.org/VOB/Practice...ilermaker2009/
http://thecatattack.org/VOB/Practice...ilermaker2009/
http://thecatattack.org/VOB/Match4Boilermaker2009/
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #17   Spotlight this post!  
Unread 05-07-2009, 00:18
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Lightbulb Re: Recording with the Camera

you can make the videos directly on the cRio
(it probably takes more space to store though)

AVISession imaqCreateAVI(const char* fileName, const char* compressionFilter, int quality, unsigned int framesPerSecond, unsigned int maxDataSize);
int imaqWriteAVIFrame(Image* image, AVISession session, const void* data, unsigned int dataLength);
int imaqCloseAVI(AVISession session);
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #18   Spotlight this post!  
Unread 05-07-2009, 01:08
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Recording with the Camera

Quote:
you can make the videos directly on the cRio
(it probably takes more space to store though)
I think you will find that the AVI functions are documented for IMAQ in general, and they are in the header file as well, but they will not work on a nonWindows OS. I'm not sure if you will get a runtime error or a compiler error.

Greg McKaskle
Reply With Quote
  #19   Spotlight this post!  
Unread 06-07-2009, 01:04
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Cool Re: Recording with the Camera

Quote:
Originally Posted by Greg McKaskle View Post
I think you will find that the AVI functions are documented for IMAQ in general, and they are in the header file as well, but they will not work on a nonWindows OS. I'm not sure if you will get a runtime error or a compiler error.

Greg McKaskle
well, i will try it out on saturday then, (my team doesn't really do offseason robot work and thats the only time that i will have with the robot until IRI), i would imagine that it would at least compile if its in the header file.

just throwing around ideas, as i have enough time to sift through the huge NIvision.h
(Really 200 defines, 150 typedefs and 50 functions in 1 file )
i think NI should refactor that thing

i did have ours take pictures when a button was pushed on the joystick though

(image taken at LA regional during camera calibration time)
Attached Thumbnails
Click image for larger version

Name:	Image#18.JPG
Views:	35
Size:	9.1 KB
ID:	8027  
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #20   Spotlight this post!  
Unread 06-07-2009, 14:14
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Recording with the Camera

Quote:
Originally Posted by biojae View Post
you can make the videos directly on the cRio
(it probably takes more space to store though)

AVISession imaqCreateAVI(const char* fileName, const char* compressionFilter, int quality, unsigned int framesPerSecond, unsigned int maxDataSize);
int imaqWriteAVIFrame(Image* image, AVISession session, const void* data, unsigned int dataLength);
int imaqCloseAVI(AVISession session);
we tried that, and it does not work.
http://decibel.ni.com/content/thread/2473?tstart=30
Quote:
This may be due to these functions not be expected to be used by FIRST teams (all of the standard FIRST Vision functions use JPEGs), and therefore are not found in the headerfile. This being said I will double check with R&D to see if this is the case.



Cheers,

Mark

NI FIRST Support
Also, I'm not sure how it works, but it maybe choppy, even if it did work, say you get 3 images in 10ms, then it slows down and the next 3 images are taken over 30ms. we compensated this by saving the images as picnumb auto/telop enable/disable timestamp cameraCapt.jpg (ex. 05 ae 128963 cameraCapt.jpg) and used the timestamp's to set the delay for the next photo. before we did this, we had it play at the average speed, fixed at 16ms, and you can see it slow down, and then speed back up.
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib

Last edited by byteit101 : 06-07-2009 at 14:21.
Reply With Quote
  #21   Spotlight this post!  
Unread 06-07-2009, 18:18
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Recording with the Camera

The AVI stuff will work on a desktop development computer running Windows. It will not work on the PPC cRIO running vxWorks.

The second part about choppy is valid, but the times listed aren't. The camera will not return images faster than one every 33ms, and even that is dependent upon the lighting, size, etc.

I'm not that knowledgeable of codecs for video encoding. Ideally, you'd select one that allows for arbitrary timings on the frames. I'm not sure which support that.

Greg McKaskle
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with the camera frcchile NI LabVIEW 5 11-02-2009 20:20
PROBLEMS WITH THE CAMERA RDD Programming 2 18-02-2007 15:12
problems mounting the camera to the 'bot with the default servo/mount set up Redneck Programming 0 16-02-2005 20:53
I need help with the camera WesleyBalmer Programming 7 15-01-2005 17:25
Problem with recording, help Animentor 3D Animation and Competition 2 22-01-2003 18:21


All times are GMT -5. The time now is 05:23.

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