Ask Your Question

addisonElliott's profile - activity

2016-12-22 08:59:28 -0600 commented question OpenCV C++11 Timeline

Well, no, my question is more along the lines of "When will C++11 be implemented into OpenCV?" I do think 3D matrices are necessary in OpenCV because 3D images are very common. I am working with MRI data that is a 3D image and can even be 4D images if you factor in a time element. The fact is that a lot of the algorithms like findNonZero or flip are applicable to multidimensional matrices as well but are not implemented in OpenCV that way.

2016-12-21 17:04:58 -0600 commented question OpenCV C++11 Timeline

Hm, that is an interesting way to do things. However, the method is a 'hack' to using multidimensional arrays. For example, I need to flip my 3D matrix along the Z dimension. This becomes very difficult to do efficiently using the channel method. (I am currently working on a flip function that works on multidimensional arrays).

2016-12-21 14:32:19 -0600 received badge  Student (source)
2016-12-21 11:34:50 -0600 asked a question OpenCV C++11 Timeline

I am working on a project that involves working with 3D images. I am using OpenCV because they have the best multidimensional matrix support. With that in mind, many of the functionality in OpenCV is geared towards 2D matrices.

When creating matrices, the general functionality is:
    (int ndims, const int* sizes, ...)

The issue with this is that it requires two lines of code; one to initialize the int pointer and another to actual create the array. Although this is a small issue, it can be solved using C++11 with std::initializer_list.

Old syntax:

int dims[] = { 12, 2, 3 };
cv::Mat mat(3, dims, CV_32FC1);

New syntax:

cv::Mat mat({ 12, 2, 3 }, CV_32FC1);

This syntax can be added to the following functions: Mat::zeros, Mat::ones, Mat constructor, Mat::create, UMat constructor, OutputArray::create.

What is the timeline for C++11 support? Any approximate date when it will be added? I noticed that OpenCV has discussed adding it in the near future according to their meeting notes.