Here is my wrapper for createTrackbar. I'm not sure if it's the way I'm using it or the way it's written. So far I changed the O's in onChange and userdata to NULL's, I changed the String* types to const char*. It could be the way I defined TrackbarCallback* as a pointer. but I'm not sure of any other way to define it.
int cv_createTrackbar(String* trackbarname,String* winname, int* value,
int count, TrackbarCallback* onChange=0, void* userdata=0)
{
return cv::createTrackbar(*trackbarname, *winname, value,
count, *onChange, userdata);
}
Here is a section of the code I used it in. all of the other code ran but when I added just the cv_createTrackbar line I got the error in the post title. I take out the line and the code runs fine. I tried calling the new String (a) and (b) as *(&a)
when I declared a and b as const char* I also tried calling as &a and &b right after. All my old tricks don't seem to be working on this one so if someone can give me advice on this I sure would appreciate it.
namedWindow("My Window", 1);
const char* a = "Contrast";
const char* b = "My Window";
int iSliderValue1 = 50;
cv_createTrackbar(new String (a), new String(b), &iSliderValue1, 100);
Error Again: Compilation segmentation fault (core dumped) at Wed Mar 26 16:35:55