When I create trackbar by this code
createTrackbar( "Canny thresh:", source_window, &thresh, thresh_max, thresh_callback );
Below warning is reported:
[ WARN:firstname.lastname@example.org] global D:\projects\opencv-src\modules\highgui\src\window.cpp (697) createTrackbar UI/Trackbar(Canny thresh:@Source): Using ‘value’ pointer is unsafe and deprecated. Use NULL as value pointer. To fetch trackbar value setup callback.
Seems it suggest this way
createTrackbar( "Canny thresh:", source_window, nullptr, thresh_max, thresh_callback );
But I can’t set trackbar’s initial position by this.
Is there other ways to set trackbar position?