Is there a way to use OpenCV Mat_ with custom class?
<p>I have some algorithm in OpenCV and I want to rewrite it using fixed point value representation. I found class for fixed point arithmetic here: <a href="https://github.com/eteran/cpp-utilities" rel="nofollow">https://github.com/eteran/cpp-utilities</a>. I'd like to know if there's some elegant way to use Mat_ template class with Fixed class objects (or any custom class) as contents of Mat. When I use:</p>

<pre><code>cv::Mat_&lt;cv::Vec&lt;Fixed&lt;12, 4&gt;, 3&gt;&gt; num;
</code></pre>

<p>I'm getting following errors:</p>

<pre><code>Error   C2039   'value' : is not a member of 'cv::DataDepth&lt;numeric::Fixed&lt;0x0c,0x04&gt;&gt;' opencv_hog  D:\libs\x64\opencv_2_4_13\build\include\opencv2\core\core.hpp   1134
Error   C2065   'value' : undeclared identifier opencv_hog  D:\libs\x64\opencv_2_4_13\build\include\opencv2\core\core.hpp   1134
Error   C2039   'fmt' : is not a member of 'cv::DataDepth&lt;numeric::Fixed&lt;0x0c,0x04&gt;&gt;'   opencv_hog  D:\libs\x64\opencv_2_4_13\build\include\opencv2\core\core.hpp   1135    
Error   C2065   'fmt' : undeclared identifier   opencv_hog  D:\libs\x64\opencv_2_4_13\build\include\opencv2\core\core.hpp   1135    
Error   C2056   illegal expression  opencv_hog  D:\libs\x64\opencv_2_4_13\build\include\opencv2\core\core.hpp   1135
</code></pre>