3

The documentation of cv::optflow::createOptFlow_DeepFlow states:

Parameters - class fields - that may be modified after creating a class instance

How can one modify these parameters? All one gets is a Ptr<DenseOpticalFlow> and cv::optflow::OpticalFlowDeepFlow is not in the public interface, so one can not even dynamic_cast to it.

Tobias Hermann
  • 9,936
  • 6
  • 61
  • 134
  • 1
    I am pretty sure you can't based on https://github.com/opencv/opencv_contrib/blob/master/modules/optflow/src/deepflow.cpp. – user3667089 Aug 10 '18 at 22:07
  • 1
    I was able to set the parameters by creating a dummy `DenseOpticalFlow` subclass with the same layout and `reinterpret_cast`ing the algorithm to that class. It's UB, though. – Anton3 May 23 '20 at 07:36

0 Answers0