OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Tue, 04 Dec 2012 05:13:49 -0600N-dimentional Matrix supporthttp://answers.opencv.org/question/4757/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
Fri, 30 Nov 2012 09:48:08 -0600http://answers.opencv.org/question/4757/n-dimentional-matrix-support/Answer by Michael Burdinov for <p>Could you please tell me is there support for n-dim matrix to reflect these Matlab operations: </p>
<p>a = zeros([3 3 5]) - well I know there is Mat::create(int, int*, int)</p>
<p>b = a(2,2,:) - i.e. I would like stack of elements "in depth" of my 3d matrix</p>
<p>c = a(:,2,:) - i.e. I would like this slice of data</p>
<p>s = sum(a,2) - i.e. I would like to sum along dimension 2 </p>
<p>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</p>
http://answers.opencv.org/question/4757/n-dimentional-matrix-support/?answer=4789#post-id-4789Those are indeed basic types for data processing, but OpenCV is not a general purpose libary. It is "Open Computer Vision" library, i.e. this is collection of data structures and algorithms that are frequently used for Computer Vision and Image Processing. I guess slicing multi-dimentional matrix don't really fit to OpenCV.Sun, 02 Dec 2012 05:35:17 -0600http://answers.opencv.org/question/4757/n-dimentional-matrix-support/?answer=4789#post-id-4789Comment by Michael Burdinov for <p>Those are indeed basic types for data processing, but OpenCV is not a general purpose libary. It is "Open Computer Vision" library, i.e. this is collection of data structures and algorithms that are frequently used for Computer Vision and Image Processing. I guess slicing multi-dimentional matrix don't really fit to OpenCV.</p>
http://answers.opencv.org/question/4757/n-dimentional-matrix-support/?comment=4877#post-id-4877You are right that OpenCV indeed missing certain basic operations. But this is open source library so if it has some complicate algorithm that means that more people needed it than some basic one. As for 3D slices: OpenCV can do slices in 2D images, so you can make operation with 3D array as combination 2D operations. This is not as clean as it may be in Matlab, but this should do the work.Tue, 04 Dec 2012 05:13:49 -0600http://answers.opencv.org/question/4757/n-dimentional-matrix-support/?comment=4877#post-id-4877Comment by ryhor for <p>Those are indeed basic types for data processing, but OpenCV is not a general purpose libary. It is "Open Computer Vision" library, i.e. this is collection of data structures and algorithms that are frequently used for Computer Vision and Image Processing. I guess slicing multi-dimentional matrix don't really fit to OpenCV.</p>
http://answers.opencv.org/question/4757/n-dimentional-matrix-support/?comment=4830#post-id-4830Well.. 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.Mon, 03 Dec 2012 05:45:52 -0600http://answers.opencv.org/question/4757/n-dimentional-matrix-support/?comment=4830#post-id-4830