|
Boost Users : |
From: Eric Pruneau (reinterpret_cast_at_[hidden])
Date: 2005-10-25 21:27:29
Hi
Here is my problem.
I need to specify a callback function for use with OpenCV cvcam dll. I
modified OpenCV to accept a boost::function1<void,IplImage*> instead of a
simple void pointer to a function. The function is called by openCv on every
frame of a video stream.
Im trying to have the callback function member of a class e.g
Class A
{
...
void init()
{
...
boost::function1<void,IplImage*> Myfunct;
Myfunct = boost::bind(&A::Callback, this);
cvcamSetcallback(Myfunct); // OpenCV function to set the callback
}
void Start() { /* tell opencv to start grabbing frames and to call Callback
on every frame */ }
void Callback(IplImage* img) { /* process the image */ }
...
};
Its not like I want to directly call the callback function and use it like a
functor. I want OpenCv to call my member function.
When I try to compile this it give me: error C2091: function returns
function on a C++ .net compiler. Im really confused and I dont have a clue
about how to solve this.
Thanks in advance
Eric
_________________________________________________________________
Balayez vos courriels entrants et sortants et les pièces jointes et
contribuez à éliminer les virus destructeurs susceptibles dy être intégrés.
http://join.msn.com/?pgmarket=fr-ca&page=features/virus Commencez dès
maintenant à profiter de tous les avantages de MSN Premium et obtenez les
deux premiers mois GRATUITS*.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net