As far as C++ goes, your mistake is that the class FrameObserver has no default constructor (i.e. a constructor that can be called without arguments). It's not defined explicitly, nor will it be generated, since another constructor has already been defined (see here). Thus, you can't write
Since this invokes the default constructor FrameObserver::FrameObserver() which (see above) is not present. Thus, you should create the FrameObserver object using the existing constructor with arguments FrameObserver::FrameObserver( CameraPtr pCamera, FrameInfos eFrameInfos, ColorProcessing eColorProcessing );
Now on to the actual problem. Since this class is a part of a supplied API, you shouldn't try to change it, rather learn to use it correctly. By the name of it, it appears to be an observer. Thus, you need to create an instance of it (a single one, at that), and carefully read the docs on how it's supposed to supply you frame data as a matrix. I don't know how exactly it works, but by common sense, since it's an "observer", it should automatically provide you with notifications about incoming frames. Again, have a close look at the documentation.
Here it is, look at the header:
// This is our callback routine that will be executed on every received frame
virtual void FrameReceivedLeft( const FramePtr pFrame );
virtual void FrameReceivedRight(const FramePtr pFrame);
By the looks of it, you are supposed to subclass FrameObserver and reimplement the two above functions. That means that the code to process or extract those frames must reside inside those routines in the subclass you're going to create.
Anyway, while the details may vary, the co
Asked in February 2016Viewed 3,852 timesVoted 14Answered 1 times