Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Trackbar callback as a member function

$
0
0
I am modeling my whole app with one class, let's call it X. As I intend to have many X objects, I need to use a Videocapture object as a member of each X object and I need to have a member function thereof to act as a callback for GUI trackbars. Plus, my callback needs to access X.cap status. However, C++ pointers to functions as required by createTrackbar() have to be either global or static, thus defeating the idea of having many X objects. Has somebody worked around this problem? *StackOverflow and other communities present non-working or non-feasible solutions.* Thank you in advance! EDIT: In all fairness, StackOverflow user **Daniel** offers a good, similar response I was not able to understand in http://stackoverflow.com/questions/8636689/opencv-trackbar-callback-in-c-class

Viewing all articles
Browse latest Browse all 41027

Trending Articles