I would like to use opencv callback in more details than described in OpenCV documentation.
For example, createTrackbar(const string& trackbarname, const string& winname, int* value, int count, TrackbarCallback onChange=0, void* userdata=0)
here I hardly know more information about TrackbarCallback. It's arguments input/output or whether I can modify this interface.
Could I have some support or reference with more details?
Thank you!
Edit 01:
I've tested this code:
int arr[3] = {3,2,1};
int *iptr = arr;
createTrackbar( "trackbar value:", "window", &val, max_val, thresh_callback, (void*)iptr);
and
void thresh_callback(int num, void* data)
{
cout << num << endl;
cout << *((int*)data) << endl;
}
I'm trying to add more data and change original interface of callback i.e. callback(int,void*) there's no compile error but the call back evokes "Access violation reading location"