Ask Your Question

BloodAxe's profile - activity

2020-05-30 10:42:45 -0600 received badge  Necromancer (source)
2014-08-16 15:31:22 -0600 answered a question MatrixXf eigen and Mat opencv

Well, Eigen differs from OpenCV matrices in two things:

  • Eigen use column-major ordering by default.
  • Eigen use aligned memory allocators by default.

How this affect your code

Column-major ordering will lead to incorrect result if you pass Eigen data directly to OpenCV functions. Your data will be treated as 'transposed'. Depending on your application you can either declare your Eigen types with Eigen::RowMajor option or transpose OpenCV matrix that you create from Eigen data.

Aligned memory allocators allows faster memory access during vector load/stores. This reduce memory access latency and improve performance. So if your code is math-heavy using Eigen is a really good idea. However if you map OpenCV types to Eigen using Eigen::Map remember that it assumes there is no alignment for external data.

How to map Eigen to OpenCV and back

I have made a tutorial post on mapping Eigen plain matrices and expressions to OpenCV types. In my project I switched from OpenCV to Eigen for matrix operations, so I needed a handy wrapper to pass my Eigen data to OpenCV: http://computer-vision-talks.com/articles/mapping-eigen-to-opencv/. I hope this post will help you.

2013-06-18 07:40:54 -0600 commented question Faster cv::remap on arm v7 devices for undistorting images

From my experience, rewriting SSE code to NEON is worth trying for several reasons: 1) It's faster to implement and test because you don't have to take care about GPU 2) You already have very optimal SSE routine. All you need is to translate SSE instructions to NEON intrinsics and you're done.

The GPGPU can be faster than NEON in general, but you should be always remember about GPU-CPU synchronization when you want to read the output from GPU. Usually you call glFlush / glFinish before accessing the pixel buffer. Depending on your shared this can cause 1-5ms delay which can be too much for your case.

Personally i have choosen to use NEON for KLT tracking on iOS and i mananged to reach 12ms tracking time for 640x480 frame on iPhone 4S. NEON version is 5x times faster than original.

2013-01-23 04:19:12 -0600 commented question iOS6 + Opencv (Latest Compile) Linker Only for classes in Feature2D module

Hi. Do you get linker errors related to features2d module only? Does "cv::Mat::eye(3,3, CV_8UC1)" cause linker errors too?

2012-08-27 09:07:08 -0600 received badge  Supporter (source)
2012-07-09 05:42:40 -0600 received badge  Teacher (source)
2012-07-09 03:33:24 -0600 answered a question what is CV_FM_RANSAC_ONLY ?

I would expect that CV_FM_RANSAC_ONLY computes rough fundamental matrix and filter outliers, while the CV_FM_RANSAC performs fundamental matrix computation using RANSAC algorithm to find rough fundamental matrix and then perform robust fundamental matrix estimation using only inliers from previous stage. This gives you better result but needs more time.