Mat create bug (Bug #2666)


Added by wuling Chang about 12 years ago. Updated about 12 years ago.


Status:Cancelled Start date:2012-12-27
Priority:Normal Due date:
Assignee:Vladislav Vinogradov % Done:

0%

Category:core
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

Hi all,
I find a bug when create mat variable.
I using mat.create(size,CV_64FC1), the rows size change cols size, and cols size change rows size.
Code list here.

@ Mat src2;
Mat src3;

half_win = (win_size) / 2;
win_count = win_size * win_size;
dst.create(src.size(),src.type());
src3.create(cv::Size(src.rows+2*half_win,src.cols+2*half_win),CV_64FC1);
//src3.create(cv::Size(src.cols+2*half_win,src.rows+2*half_win),CV_64FC1);
src2.create(cv::Size(src.rows+2*half_win,src.cols+2*half_win),CV_8UC1);@

OS: Windows 7 x64 & Opencv ver:2.4.3


a.bmp (14 kB) wuling Chang, 2012-12-27 03:31 pm


History

Updated by wuling Chang about 12 years ago

Sorry, opencv ver is 2.4.2

Updated by Vladislav Vinogradov about 12 years ago

Size constructor signature:
Size::Size(int width, int height)

Mat create signature:
void Mat::create(int rows, int cols, int type);
void Mat::create(Size size, int type);

Sou you should use
mat.create(rows, cols, type);
or
mat.create(Size(cols, rows), type);

Updated by wuling Chang about 12 years ago

Dear Vladislav
I check again.I make a mistake.
Thanks

Updated by Alexander Smorkalov about 12 years ago

  • Category set to core
  • Status changed from Open to Cancelled
  • Assignee set to Vladislav Vinogradov

Also available in: Atom PDF