Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 753099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:51:29+00:00 2026-05-14T14:51:29+00:00

So I want to be able to recognise patterns in images (such as a

  • 0

So I want to be able to recognise patterns in images (such as a number 4), I have been reading about different algorithms and I would really like to use the Nearest Neighbour algorithm, it looks simple and I do understand it based on this tutorial:
http://people.revoledu.com/kardi/tutorial/KNN/KNN_Numerical-example.html
Problem is, although I understand how to use it to fill in missing data sets, I don’t understand how I could use it as a pattern recognition tool to aim in Image Shape Recognition. Could someone please shed some light as to how this algorithm could work for pattern recognition? I have seen tutorials using OpenCV, however I don’t really want to use this library as I have the ability to do the pre-processing myself, and it seems silly that I would implement this library just for what should be a simple nearest neighbour algorithm.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:51:30+00:00Added an answer on May 14, 2026 at 2:51 pm

    You simply (simply?) have to define a measure of “distance” for your data.

    Lets asume you have already segmented you big image in small images, each one corresponding to a text character you want to classified. Lets assume that we are dealing with digital monocrome images, so each image is represented as a rectangular matrix of values (pixels) in (say) the 0-255 integer range (brightness). It is also assumed (NN is a “supervised clasification algorithm”) that you have a lot of already well classified images (your training set).

    Given a new small image, you must define a distance between two images so that the most close in the training set is chosen, and its “label” chosen as the recognized text character.

    One naive approach would be to take the difference of pixels (sum of squares, for example). But this distance measure would be sensitive to translations (and rotations and scaling) and we usually don’t want that. An alternative would be to compute the modulus of the Fourier transform, which is translation invariant (but this is not enough). From here you can start – and appreciate that the problem is difficult, and these kind of classification needs a lot of work to perform acceptably.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to recognise ALL touches in an interface, no matter
I want to be able to take an image that i have already captured
Ok so I have been looking around at just about every option under the
I have an object that I want to be able to recognize in AS3.
I have a localhost Apache/PHP configuration on my computer. I want to be able
I'm using LaTeX and BibTeX for an article, and I want to able to
Want to be able to provide a search interface for a collection of objects
I want to be able to replicate only the folder structure (not the contents)
I want to be able to do the following actions with a form submit
I want to be able to hide a selector if it contains any data.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.