![]() |
Camera Declaration/Initialization
I know there are lots of threads on the camera, but i havn't seen any on this topic specifically.
I'm just wondering how to declare/initalize the camera in an Iterative Robot based program. Because (correct me if im wrong) you have to use AxisCamera &camera = AxisCamera::GetInstance(), the &camera is a reference, and MUST be initialized when it is declared. If i put this line of code in the constructor, or TeleopInit, the reference can't be accessed in any other function. If i put it in TeleopPeriodic, I will be able to access the camera reference where i need it, but it will be inneficiently called every loop What is the best, or atleast a working way to get a working variable/reference of the camera that i can access in TeleopPeriodic for tracking? |
Re: Camera Declaration/Initialization
Has anybody gotten the camera feed and tracking to work in iterative robot?
|
Re: Camera Declaration/Initialization
Yes. We resorted to a global variable so above our robot declaration we have:
AxisCamera &g_camera = AxisCamera::GetInstance(); class Robot281: public IterativeRobot { etc. }; |
Re: Camera Declaration/Initialization
put it in the class:
Code:
public yourrobot:public IterativeRobot |
| All times are GMT -5. The time now is 13:05. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi