Ask Your Question
0

feature tracking assertion fail error

asked 2012-07-21 12:42:41 -0600

frondeur gravatar image

Hi,

I am trying to track feature using optical flow method. The features are corners extracted from fast as a gpu::GpuMat keypoints. The problem is that the call to "sparse" function fail with following error:

OpenCV Error: Assertion failed (prevPts.rows == 1 && prevPts.type() == CV32FC2) in unknown function, file H:\opencv\modules\gpu\src\pyrlk.cpp, line 114 CV error occured : C:\opencv\modules\gpu\src\pyrlk.cpp:114: error: (-215) prevPt s.rows == 1 && prevPts.type() == CV32FC2

I've checked that the previous keypoints that i am passing to it are non zero. Although i have two rows in gpu::GpuMat. Is that correct? Actually i tried the fast_GPU documentation but i couldn't understand "Location Row"/"Response Row". Even if i use only single row from it for passing to sparse, i still get the assertion. It is unclear how could i make the features points from fast to be compatible with optical flow function? Kindly help in this regard.

Best Regards,

edit retag flag offensive close merge delete

Comments

I have checked from the documentation about the type of FASTGPU return type but it is not listed there. So then i have tried printing from the code and it returns '5' which means 'CV32F' . They are keypoints so shoudn't it be possible to pass them to pyrLK even though they have slightly different type?

frondeur gravatar imagefrondeur ( 2012-07-23 05:59:09 -0600 )edit

Were you able to solve this issue ?

kjoshi gravatar imagekjoshi ( 2018-03-19 13:00:59 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2012-07-22 22:56:39 -0600

This might sound too obvious, but are you certain that the previous keypoints have type CV32FC2 and only one row?

edit flag offensive delete link more

Comments

How can I convert the points of type 5 to type 13 that is taken by the OpticalFlowPyrLK ?

kjoshi gravatar imagekjoshi ( 2018-03-19 13:02:04 -0600 )edit

Question Tools

Stats

Asked: 2012-07-21 12:42:41 -0600

Seen: 973 times

Last updated: Jul 22 '12