Basically I want to find the rank of a given kernel/matrix so that I can check whether it is separable or not?
Is there a function in OpenCV to find the rank of a kernel?
If I'm correct, we can use the compute method of svd class to find the singular values, but after that how do we calculate the rank? The below is the code I used.
double k = 3;
float kdata[] = {2,0,2,0,1,0,0,0,0};
Mat kernel(k,k,CV_32F, kdata);
Mat s,u,v;
SVD::compute(kernel,s,u,v);
Aucun commentaire:
Enregistrer un commentaire