Ask Your Question

BIOS the Zerg's profile - activity

2020-06-08 03:17:51 -0600 commented question Why could OpenCV wait for a stream-ed CUDA operation instead of proceeding asynchronously?

Cool, thanks a lot! Can you make it into an answer so that I can accept it?

2020-06-05 11:55:36 -0600 commented question Why could OpenCV wait for a stream-ed CUDA operation instead of proceeding asynchronously?

Also, if it was the GPU being slow, wouldn't there be the two kernel launches at the beginning very shortly after each o

2020-06-05 11:53:50 -0600 commented question Why could OpenCV wait for a stream-ed CUDA operation instead of proceeding asynchronously?

I was thinking that that might be the case, but the same happened when I cropped the images to 64x64...

2020-06-05 04:15:13 -0600 received badge  Editor (source)
2020-06-05 04:15:13 -0600 edited question Why could OpenCV wait for a stream-ed CUDA operation instead of proceeding asynchronously?

Why could OpenCV wait for a stream-ed CUDA operation instead of proceeding asynchronously? I'm trying to perform some im

2020-06-05 04:14:36 -0600 commented question Why could OpenCV wait for a stream-ed CUDA operation instead of proceeding asynchronously?

I've got a GTX 1070, it's no longer anything awesome, but still decent enough to do two dilations at once, I'd expect! (

2020-06-04 12:27:26 -0600 asked a question Why could OpenCV wait for a stream-ed CUDA operation instead of proceeding asynchronously?

Why could OpenCV wait for a stream-ed CUDA operation instead of proceeding asynchronously? I'm trying to perform some im

2016-11-22 10:35:31 -0600 commented answer Per pixel labeling in distanceTransform?

One little, but vital detail: since the labels are returned as a matrix of 32b ints, you need to do background.at<int>(row,col)==0!

2016-11-16 04:46:23 -0600 answered a question Finding Rank of Kernel

The answer can be found e.g. here: http://stackoverflow.com/questions/37...

From there, extracting: 1) first we compute the SVD

Mat s, u, vt;
SVD::compute(M, s, u, vt);

2) Now we have singular values in s and rotation matrices (you can ignore those) in u and vt. Next we could count the number of non-zero singular values, which is equal to the rank:

int rank = countNonZero(s);

However, due to limited numerical precision, some singular values will be nearly-zero and we might (and probably will) want to count them as zeros, working with some threshold:

int rank = countNonZero(s > thr);

In the link above, they recommend value of the threshold thr as 0.0001. I think that's a bit too high, but that depends on what your problem is and how different your singular values will be. I wouldn't go below 1e-16, but maybe something like thr = 1e-10 * s.at<double>(0,0) isn't a bad choice in my opinion, weighting by the largest singular value...

2016-11-15 09:49:20 -0600 received badge  Supporter (source)