MasteringOpenCV / code

Code for the book "Mastering OpenCV with Practical Computer Vision Projects" by Packt Publishing 2012.
Other
2.72k stars 1.64k forks source link

kd - tree generation for SiftGPU #30

Open Reena24 opened 10 years ago

Reena24 commented 10 years ago

Hi i am trying to write an OpenCV code to generate a kd-tree for SiftGPU features based on SiftGPU of http://cs.unc.edu/~ccwu/siftgpu/. Its like I have generate keyframes which are keyoints that is reconstructed in 3D for which the SiftGPU features are extracted and the kd - tree is generated. I started from the SiftGPU feature extraction but when i try to store it in the kd-tree I get Assertion error problem.

I tried every possible way but I still get the Assertion errors during runtime like OpenCV Error: Assertion failed (data.dims <= 2 && type == CV_32F && K > 0) in unknown function, file ......\OpenCV-2.3.0\modules\core\src\matrix.cpp, line 2271

and when i change the code accordingly I get the error opencv error assertion failed (data type<_Tp>::Type=type == type &&cols==1)

I really need some help with the code work I need help from scratch because I need to use the code in other places also. Is there anywhere I can refer to get a clear idea on how to generate the code .Its urgent cause I have a dead line by day after tomorrow. So please help.

jackyzzy commented 10 years ago

"(data.dims <= 2 && type == CV_32F && K > 0)" means the data you fill into the struct type data is not correct. If the data of the struct is generated by yourself, I think you should check it.

2014-03-11 14:34 GMT+08:00 Reena24 notifications@github.com:

Hi i am trying to write an OpenCV code to generate a kd-tree for SiftGPU features based on SiftGPU of http://cs.unc.edu/~ccwu/siftgpu/. Its like I have generate keyframes which are keyoints that is reconstructed in 3D for which the SiftGPU features are extracted and the kd - tree is generated. I started from the SiftGPU feature extraction but when i try to store it in the kd-tree I get Assertion error problem.

I tried every possible way but I still get the Assertion errors during runtime like OpenCV Error: Assertion failed (data.dims <= 2 && type == CV_32F && K > 0) in unknown function, file ......\OpenCV-2.3.0\modules\core\src\matrix.cpp, line 2271

and when i change the code accordingly I get the error opencv error assertion failed (data type<_Tp>::Type=type == type &&cols==1)

I really need some help with the code work I need help from scratch because I need to use the code in other places also. Is there anywhere I can refer to get a clear idea on how to generate the code .Its urgent cause I have a dead line by day after tomorrow. So please help.

Reply to this email directly or view it on GitHubhttps://github.com/MasteringOpenCV/code/issues/30 .