Ask Your Question

ryhor's profile - activity

2020-05-15 12:52:13 -0600 received badge  Popular Question (source)
2016-10-14 10:00:46 -0600 received badge  Famous Question (source)
2014-12-04 00:37:30 -0600 received badge  Notable Question (source)
2014-05-21 04:32:26 -0600 received badge  Popular Question (source)
2012-12-04 07:22:24 -0600 received badge  Supporter (source)
2012-12-04 03:48:17 -0600 received badge  Student (source)
2012-12-03 10:45:17 -0600 asked a question cv::sum() and cv::norm() for CV_U8...

result of cv::sum() is double - could you please tell how calculation is performed for CV_8U Matrix? Same question for cv::norm() please

Will it convert to double every element or result only?

Also could you please tell how to locate implementation in source code as direct search shows only *.hpp?

2012-12-03 05:45:52 -0600 commented answer N-dimentional Matrix support

Well.. 3D "cost" volume is one of example, which is quite widely used for boosted detector training and for stereo algorithms.

I.e. why not to do it right ones and for all? why to skip basics and implement something "complicated"?

And finally It is just data manipulation or even just data representation.

2012-11-30 09:48:08 -0600 asked a question N-dimentional Matrix support

Could you please tell me is there support for n-dim matrix to reflect these Matlab operations:

a = zeros([3 3 5]) - well I know there is Mat::create(int, int*, int)

b = a(2,2,:) - i.e. I would like stack of elements "in depth" of my 3d matrix

c = a(:,2,:) - i.e. I would like this slice of data

s = sum(a,2) - i.e. I would like to sum along dimension 2

I have assumed it is basic types of data processing, but to my surprise at the moment it looks like OpenCV is lacking of these basics. Thanks

2012-11-30 08:44:32 -0600 commented question missing cv::Mat::zeros(int ndims, const int* sz, int type)

file core.hpp, lines

2778 static MatExpr zeros(int rows, int cols);

2779 static MatExpr zeros(Size size);

2780 static MatExpr zeros(int _ndims, const int* _sizes);

where can I find implementation of last function? I can find first two, but not the last. What is a point to include function declaration in class if there is no implementation for it?

2012-11-30 04:54:45 -0600 received badge  Editor (source)
2012-11-30 04:52:44 -0600 asked a question missing cv::Mat::zeros(int ndims, const int* sz, int type)

Under Ubuntu 12.04 I have got from linker "undefined reference to `cv::Mat::zeros(int, int const*, int)'"

for 2.3 from repo and for 2.4.3 compiled from source.

And indeed if I go to the lib directory and ask for list of symbols from object files I can see

~/src/OpenCV-2.4.3/build/lib$ nm ./libopencv_core.so | c++filt | grep zeros

000000000015d690 T cv::Mat::zeros(cv::Size_<int>, int)

000000000015d460 T cv::Mat::zeros(int, int, int)

I.e. there is no cv::Mat::zeros(int , const int* , int)

it is same story for cv::Mat::ones(int , const int* , int)

Any suggestion how to get this into lib?

Update

file core.hpp, lines

1766 static MatExpr zeros(int rows, int cols);

1767 static MatExpr zeros(Size size);

1768 static MatExpr zeros(int _ndims, const int* _sizes);

where can I find implementation of last function? I can find first two, but not the last. What is a point to include function declaration in class if there is no implementation for it?

What is a level of support for N dim Mat in the light of line

91 typedef Mat MatND; ?