Go to Post Just wait till Heidi learns video-editing skills. - tkwetzel [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 03-02-2016, 22:10
robert1356 robert1356 is offline
Registered User
AKA: Robert Palmer
FRC #3824 (RoHAWKtics)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Knoxville, TN
Posts: 48
robert1356 is an unknown quantity at this point
Cool USBCamera won't disconnect from camera for GRIP to run

I'm wanting to write the following code for our robot code:

Startup:
- create USBCamera object
- set the brightness and exposure from stored preferences
- disconnect from camera
- run GRIP

Currently when I try this, GRIP says that the frame grabber could not connect to the camera.

Here's what I know so far:

- I have created my own USBCamera class that is an exact copy of the WPI lib version, but gives me the ability to set the exposure with better control
- The constructor for USBCamera calls openCamera() which calls NIVision.IMAQdxOpenCamera()
- The USBCamera method closeCamera() calls NIVision.IMAQdxCloseCamera
- I do not use the autocpature feature, I call getImage() and push that to the CameraServer object so startCapture() is never called.

I assumed that NIVision.IMAQdxCloseCamera() would close the connection to the camera, but that does not seem to be the case. I am calling that and then trying to start GRIP and grip fails connecting to the frame grabber for cam0 (the same camera I just used in USBCamera).

Does anyone have any idea how to do this? Any idea why calling USBCamera.closeCamera() does not disconnect from the camera object?

Thanks in advance
 


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 20:05.

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