I solved it,
cv::Ptr<cv::optflow::RLOFOpticalFlowParameter> rlof_param = cv::optflow::RLOFOpticalFlowParameter::create();
rlof_param->useInitialFlow= true;
rlof_param->useGlobalMotionPrior = false;
At that time, rlof-param ->useInitialFlow=true; was used;, This rlof-param ->useGlobalMotionPrior=false; It must be false, otherwise the above error will be reported.