Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

kNN Problem

Hello.

I've read this script, which detects characters using kNN in OpenCV. It uses pixel values as features. I'm confused about how this works, will the kNN verify every pixel on the data being passed in find_nearest() function with the pixels of every class in response data (already trained characters)?

Also, how would you plot the data being tested with, for example, one of the responses?

I've plotted the pixel data of characters O and 0 (100 pixels), but I think it's not right. C:\fakepath\Capture.JPG

Thanks in advance.

kNN Problem

Hello.

I've read this script, which detects characters using kNN in OpenCV. It uses pixel values as features. I'm confused about how this works, will the kNN verify every pixel on the data being passed in find_nearest() function with the pixels of every class in response data (already trained characters)?

Also, how would you plot the data being tested with, for example, one of the responses?

I've plotted the pixel data of characters O and 0 (100 pixels), but I think it's not right. C:\fakepath\Capture.JPGImage

Thanks in advance.

click to hide/show revision 3
retagged

updated 2014-06-12 00:39:00 -0600

berak gravatar image

kNN Problem

Hello.

I've read this script, which detects characters using kNN in OpenCV. It uses pixel values as features. I'm confused about how this works, will the kNN verify every pixel on the data being passed in find_nearest() function with the pixels of every class in response data (already trained characters)?

Also, how would you plot the data being tested with, for example, one of the responses?

I've plotted the pixel data of characters O and 0 (100 pixels), but I think it's not right. Image

Thanks in advance.