Ask Your Question

Superresolution: error with createOptFlow_DualTVL1()

asked 2013-05-21 13:16:46 -0500

student gravatar image


For choosing optical flow with super-resolution, the following compiles fine:

Ptr<DenseOpticalFlowExt> opflow = createOptFlow_Farneback();

But the following gives error:

Ptr<DenseOpticalFlowExt> opflow = createOptFlow_DualTVL1();

The error given is:

error C2668: 'cv::superres::createOptFlow_DualTVL1' : ambiguous call to overloaded function

How can I avoid the error? Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-05-22 01:59:29 -0500

Vladislav Vinogradov gravatar image

Add superres:: prefix:

Ptr<DenseOpticalFlowExt> opflow = superres::createOptFlow_DualTVL1();
edit flag offensive delete link more


Thanks, it works! But I'm confused on why createOptFlow_DualTVL1() needs superres:: prefix in front whilst createOptFlow_Farneback() doesn't need it. Also I have the "using namespace superres;" above the main function.

student gravatar imagestudent ( 2013-05-22 05:59:46 -0500 )edit

There are two function createOptFlow_DualTVL1:

cv::Ptr<cv::DenseOpticalFlow> cv::createOptFlow_DualTVL1();

cv::Ptr<cv::superres::DenseOpticalFlowExt> cv::superres::createOptFlow_DualTVL1();

If you use "using namespace ..." compiler can't decide which function used.

Vladislav Vinogradov gravatar imageVladislav Vinogradov ( 2013-05-22 06:45:15 -0500 )edit

Question Tools


Asked: 2013-05-21 13:16:46 -0500

Seen: 1,311 times

Last updated: May 22 '13