-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Vec Matx like initializers #4650
Copy link
Copy link
Open
Description
Transferred from http://code.opencv.org/issues/3380
|| José Franco on 2013-11-12 22:59
|| Priority: Normal
|| Affected: None
|| Category: core
|| Tracker: Feature
|| Difficulty: Easy
|| PR:
|| Platform: None / None
Vec Matx like initializers
Hello,
Despite cv::Vec<_Tp, int> being equivalent to cv::Matx<_Tp, int, 1>, it is currently not possible to initialize them with the Matx<_Tp, int, int> initializers cv::Matx<_Tp, int, int>::zeros(), ones(), etc. It is also not clear how to assign a cv::Matx<_Tp, int, 1> to a cv::Vec<_Tp, int>. These initializers would be very helpful.
Thanks
History
Ivan Korolev on 2013-11-13 08:38
Hi José,
thanks for feature request.
Yes, actually these initializers would be helpful. Unfortunately, now we have limited human resources. So if you could implement this functionality and send a pull request on GitHub (http://www.code.opencv.org/projects/opencv/wiki/How_to_contribute), it would be much appreciated!
- Status changed from New to Open
Rohit Girdhar on 2014-01-29 13:32
Hi Ivan,
I'm a student and just getting started with contributing to openCV (though have a lot of experience in using openCV).
I've already forked, cloned, built and played a bit with the source code.
I want to work on this task, and think it'd be better to run my ideas through you before starting to code.
If I understand the question correctly, we essentially want the ::zeros() kind-of initializers for the Vec.
In my understanding, Vec is implemented using Mat in modules/core/include/opencv2/core/matx.hpp (line 869).
So essentially, I need to add another function there for initialization.
Please let me know if I'm on the right track or not.
I'm really a noob in working on open source, so please forgive me for mistakes.
Thanks a lot!
Rohit Girdhar on 2014-02-09 12:51
PR for ::zeros() initializer (https://github.com/Itseez/opencv/pull/2307)
Reactions are currently unavailable