cv::multiply (Bug #3341)
Description
cv::mulptiply can not deduce output matrix type in case when the first argument is double and the second is matrix with Size(1, 1)
Below the test which reproduces the problem:
@typedef testing::TestWithParam<Size> Mul1;
TEST_P(Mul1, One)
{
Size s = GetParam();
cv::Mat s1(s, CV_32F, cv::Scalar::all(0)), d1(s, CV_32F, cv::Scalar::all(0));
cv::multiply(1, s1, d1);
}
INSTANTIATE_TEST_CASE_P(Arithm, Mul1, Values(Size(2, 2), Size(1, 1)));@
p.s.: the problem in this strange condition (it's false in this case): if( src1.size != src2.size || src1.channels() != src2.channels() ||
((kind1 _InputArray::MATX || kind2 _InputArray::MATX) &&
src1.cols 1 && src2.rows 4) )
Associated revisions
fixed bug #3341
fixed bug #3341
(cherry picked from commit 09d25e11c65fa20f9ddba1d25ee4f3344ba4e655)
Merge pull request #3341 from jet47:deb-package-lib-symlinks
History
Updated by Dmitry Retinskiy over 11 years ago
- Status changed from New to Open
- Target version changed from 2.4.7 to 2.4.8
Updated by l w about 11 years ago
Don't know if I've understood the problem correctly, but I tried the following and it turns out fine?
cv::Size s(3, 4);
cv::Mat s1(s, CV_32F, cv::Scalar::all(0)), d1(s, CV_32F, cv::Scalar::all(0));
cv::multiply(1, s1, d1);
Updated by Ilya Lavrenov about 11 years ago
- Assignee changed from Vadim Pisarevsky to Ilya Lavrenov
- Status changed from Open to Done
- Pull request set to https://github.com/Itseez/opencv/pull/2086