Fixed arguments of the function calcOpticalFlowSF.
This commit is contained in:
parent
66b90d19a6
commit
02646427fb
@ -328,16 +328,16 @@ CV_EXPORTS_W Mat estimateRigidTransform( InputArray src, InputArray dst,
|
|||||||
bool fullAffine);
|
bool fullAffine);
|
||||||
|
|
||||||
//! computes dense optical flow using Simple Flow algorithm
|
//! computes dense optical flow using Simple Flow algorithm
|
||||||
CV_EXPORTS_W void calcOpticalFlowSF(Mat& from,
|
CV_EXPORTS_W void calcOpticalFlowSF(InputArray from,
|
||||||
Mat& to,
|
InputArray to,
|
||||||
Mat& flow,
|
OutputArray flow,
|
||||||
int layers,
|
int layers,
|
||||||
int averaging_block_size,
|
int averaging_block_size,
|
||||||
int max_flow);
|
int max_flow);
|
||||||
|
|
||||||
CV_EXPORTS_W void calcOpticalFlowSF(Mat& from,
|
CV_EXPORTS_W void calcOpticalFlowSF(InputArray from,
|
||||||
Mat& to,
|
InputArray to,
|
||||||
Mat& flow,
|
OutputArray flow,
|
||||||
int layers,
|
int layers,
|
||||||
int averaging_block_size,
|
int averaging_block_size,
|
||||||
int max_flow,
|
int max_flow,
|
||||||
|
@ -447,7 +447,7 @@ static void extrapolateFlow(Mat& flow,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void buildPyramidWithResizeMethod(Mat& src,
|
static void buildPyramidWithResizeMethod(const Mat& src,
|
||||||
vector<Mat>& pyramid,
|
vector<Mat>& pyramid,
|
||||||
int layers,
|
int layers,
|
||||||
int interpolation_type) {
|
int interpolation_type) {
|
||||||
@ -464,9 +464,9 @@ static void buildPyramidWithResizeMethod(Mat& src,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CV_EXPORTS_W void calcOpticalFlowSF(Mat& from,
|
CV_EXPORTS_W void calcOpticalFlowSF(InputArray _from,
|
||||||
Mat& to,
|
InputArray _to,
|
||||||
Mat& resulted_flow,
|
OutputArray _resulted_flow,
|
||||||
int layers,
|
int layers,
|
||||||
int averaging_radius,
|
int averaging_radius,
|
||||||
int max_flow,
|
int max_flow,
|
||||||
@ -479,7 +479,11 @@ CV_EXPORTS_W void calcOpticalFlowSF(Mat& from,
|
|||||||
int upscale_averaging_radius,
|
int upscale_averaging_radius,
|
||||||
double upscale_sigma_dist,
|
double upscale_sigma_dist,
|
||||||
double upscale_sigma_color,
|
double upscale_sigma_color,
|
||||||
double speed_up_thr) {
|
double speed_up_thr)
|
||||||
|
{
|
||||||
|
Mat from = _from.getMat();
|
||||||
|
Mat to = _to.getMat();
|
||||||
|
|
||||||
vector<Mat> pyr_from_images;
|
vector<Mat> pyr_from_images;
|
||||||
vector<Mat> pyr_to_images;
|
vector<Mat> pyr_to_images;
|
||||||
|
|
||||||
@ -632,14 +636,15 @@ CV_EXPORTS_W void calcOpticalFlowSF(Mat& from,
|
|||||||
|
|
||||||
GaussianBlur(flow, flow, Size(3, 3), 5);
|
GaussianBlur(flow, flow, Size(3, 3), 5);
|
||||||
|
|
||||||
resulted_flow = Mat(flow.size(), CV_32FC2);
|
_resulted_flow.create(flow.size(), CV_32FC2);
|
||||||
|
Mat resulted_flow = _resulted_flow.getMat();
|
||||||
int from_to[] = {0,1 , 1,0};
|
int from_to[] = {0,1 , 1,0};
|
||||||
mixChannels(&flow, 1, &resulted_flow, 1, from_to, 2);
|
mixChannels(&flow, 1, &resulted_flow, 1, from_to, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
CV_EXPORTS_W void calcOpticalFlowSF(Mat& from,
|
CV_EXPORTS_W void calcOpticalFlowSF(InputArray from,
|
||||||
Mat& to,
|
InputArray to,
|
||||||
Mat& flow,
|
OutputArray flow,
|
||||||
int layers,
|
int layers,
|
||||||
int averaging_block_size,
|
int averaging_block_size,
|
||||||
int max_flow) {
|
int max_flow) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user