Ask Your Question
0

How to implement k nearest neighbour in opencv 3.2.0

asked 2017-05-20 02:38:52 -0600

Dhruv gravatar image

updated 2017-05-20 03:50:38 -0600

berak gravatar image

AttributeError: module 'cv2' has no attribute 'KNearest'

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-05-20 03:41:39 -0600

berak gravatar image

updated 2017-05-20 03:44:58 -0600

the good news is: you don't have to "implement" it, it's already built in ;)

but the api has changed slightly from opencv2.4, have a look at the digits.py sample

also:

>>> help(cv2.ml.KNearest_create())

for pydocs

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-05-20 02:38:52 -0600

Seen: 1,129 times

Last updated: May 20 '17