2 Replies - 309 Views - Last Post: 01 February 2013 - 04:09 PM Rate Topic: -----

#1 ConfusedN00b  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 01-February 13

Recognize Letters Written With Asterisks

Posted 01 February 2013 - 03:20 PM

Hey guys,
I've been trying for about a week now to figure out a programming algorithm to convert pixels into asteriks then into letters. I'm not 100% sure if that makes sense but to quote from the challenge "to write a program to recognize letter patterns in a ten by ten grid of pixels. Your program will analyze the input and look for matches for the following letters of the alphabet.

A, B, C, E, F, G, H, I, L, M, P, S, T, Y

The patterns will be given as asterisks and blank spaces in a text file, where asterisks indicate a black pixel and all other characters indicate a white one. The input file will consist of a number of such patterns, and your program must read in each pattern and classify it as one of the letters given above or as unrecognizable(that is, the input pattern does not match any of the given letters).

For ease of computation, your program should read the input into arrays of integers, loading 0's for blanks, and 1's for asterisks. We recommend that you embed the 10x10 array in the interior of a 12x12 array, whose leftmost and rightmost columns, and topmost and bottommost rows are all 0's. The reason for this will be made clearer below.

To distinguish the letters, the following three features must be calculated for each input pattern. Each feature has an integer value that is greater than or equal to 0. "

just to be clear: While I would appreciate the gesture of someone writing out the code I am not asking for this. Simply help in a few things.
1) how to set up a 10x10 array and a 12x12 array to ..overlap it?...
2) steps in figuring out how to do the conversion
3) how I can make it run in eclipse

I've seriously been struggling with this for a long time now. I can't get an array to work for starters and secondly I've read through "Basic Java Programs" 2nd edition by Reges chapters 8-10 and still can't quite comprehend this. I'm very new to this, and outside help isn't really working. I would really appreciate the help. Thanks.

This post has been edited by macosxnerd101: 01 February 2013 - 03:22 PM
Reason for edit:: Please use a descriptive title


Is This A Good Question/Topic? 0
  • +

Replies To: Recognize Letters Written With Asterisks

#2 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 797
  • View blog
  • Posts: 2,422
  • Joined: 29-July 11

Re: Recognize Letters Written With Asterisks

Posted 01 February 2013 - 04:02 PM

You've been struggling with it because it doesn't make much sense. You can certainly create a 2d array (10x10) and fill it with 1 and 0, then iterate over the array and print nothing for 0 and * for 1. Thats easy but after that, you've lost me.
Was This Post Helpful? 0
  • +
  • -

#3 CasiOo  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1275
  • View blog
  • Posts: 2,837
  • Joined: 05-April 11

Re: Recognize Letters Written With Asterisks

Posted 01 February 2013 - 04:09 PM

It makes sense with a 12*12 2d array so you have a white border :) it just makes it easier/prettier to code that's all
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1