Go to Post I don't think 330 should have built 330's 2016 robot - Joe Ross [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 07-02-2015, 18:25
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Program crashing when grabbing USB Camera frame + misc comm issues

Quote:
Originally Posted by bob.wolff68 View Post
In the case of wanting it on the smartdashboard - that can be accomplished by adding the video pane to the smartdashboard directly. I think this is in the menus or it is a right-click on the dashboard to add it. No programming necessary.

bob
This is not true for the USB camera. You need code to forward the image.

OP, you should check to make sure that you are actually getting a non-null image of non-zero size back from your call to GetImage. If you are calling GetImage every 20ms that's 50FPS which the camera can't provide, I haven't played with this enough to know if that's why your having an issue, but it would be my first suspicion.
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2015, 18:48
FleventyFive FleventyFive is offline
Registered User
FRC #4118
 
Join Date: Sep 2014
Location: Gainesville, FL
Posts: 23
FleventyFive is on a distinguished road
Re: Program crashing when grabbing USB Camera frame + misc comm issues

Quote:
Originally Posted by RufflesRidge View Post
OP, you should check to make sure that you are actually getting a non-null image of non-zero size back from your call to GetImage. If you are calling GetImage every 20ms that's 50FPS which the camera can't provide, I haven't played with this enough to know if that's why your having an issue, but it would be my first suspicion.
This was my guess as well. How to I check if it is non-null? The WPILIB image class has no public functions or attributes at all. It's very confusing... like how can I convert between the Image returned from the USBcamera and the other wpilib image classes like ColorImage (which have public functions like thresholding or w/e)? The AxisCamera class has functions to return these other types of images, but not the USBcamera. Thanks for the help.
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2015, 18:59
Team3266Spencer's Avatar
Team3266Spencer Team3266Spencer is offline
Team Captain and Lead Programmer
AKA: Spencer Lanman
FRC #3266 (Robots-R-US)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2012
Location: Richmond, Indiana
Posts: 280
Team3266Spencer is an unknown quantity at this point
Re: Program crashing when grabbing USB Camera frame + misc comm issues

I know that I have to power cycle the roboRIO when I upload code it can find the camera sometimes.
__________________
2012: Buckeye Regional, Queen City Regional, Human Player
2013: Queen City Regional, Buckeye Regional, Crossroads Regional
Shooter Operator
2014: Crossroads Regional, Queen City Regional
Catapult Operator
2015: Georgia Southern Classic Regional (Winner), Queen City Regional
Chainsaw Operator
Want to talk? TeamSpeak: team3266.noip.me
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 12:07.

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