c++ - opencv keypoints -1.#IND -


boy, need help!

i need iterate on detected keypoints accessing x, y, , size fields of each keypoint. code using copied tutorials.

here section of code i'm having trouble.

// draw detected blobs red circles. mat im_with_keypoints;  drawkeypoints( im, keypoints, im_with_keypoints, scalar(0,0,255), drawmatchesflags::draw_rich_keypoints );  // show blobs imshow("keypoints", im_with_keypoints );  vector<keypoint>::const_iterator = keypoints.begin(), end = keypoints.end();  cout << "num keypts: " << keypoints.size() << "\n";  for( ; != end; ++it ) {   cout << "  kpt x " << it->pt.x << ", y " << it->pt.y << ", size " << it->size << "\n"; }  waitkey(0); 

and output get.

num keypts: 12   kpt x -1.#ind, y -1.#ind, size 2.20732   kpt x 1232.18, y 573.16, size 2.01719   kpt x 1469.27, y 569.461, size 2.77548   kpt x 1706.66, y 566.156, size 3.7563   kpt x 1946.15, y 561.098, size 3.2482   kpt x 2189.41, y 557.673, size 3.83277   kpt x 31.4306, y 372.063, size 3.01084   kpt x 982.995, y 359.899, size 3.33982   kpt x 1218.8, y 355.892, size 3.8553   kpt x 1699.99, y 348.004, size 3.38391   kpt x 1935.74, y 122.263, size 2.75298   kpt x 2181.73, y 117.866, size 4.08995 

i 12 keypoints. imshow looks correct , shows 12 keypoints. but, looking @ cout first keypoint, x , y values soft nans. first size correct. next 11 x, y, , size values correct.

why first keypoint x , y values nans? accessing them incorrectly, have tried gives same results.

thanks help. barry.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -