Using GaussianMotionFilter

asked 2013-01-14 00:06:13 -0500

gary gravatar image

Hi, trying to use a very simple test with GaussianMotionFilter in Xcode/iOS:

vector<Mat> motions;
for (int i = 0; i < 12; i++) {
    Mat mat = [self grayscaleMatWithPath:path withSize:CGSizeMake(320, 480)];
    motions.push_back(mat);
}
GaussianMotionFilter *filter = new GaussianMotionFilter();
filter->setParams(1, 0.0f);
pair<int, int> range(0, (int)motions.size() - 1);
filter->stabilize(0, motions, range);

but getting the following error:

OpenCV Error: Sizes of input arguments do not match (The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array') in arithm_op, file opencv/modules/core/src/arithm.cpp, line 1273

Has anyone used this or MotionStabilizationPipeline with any success?

Thanks!

edit retag flag offensive close merge delete