How to determine a DSL in an Alphabet using C codes

This is a discussion on How to determine a DSL in an Alphabet using C codes within the C Programming forums, part of the General Programming Boards category; I require to find the number of DSL (Digital Straight Line) in any given alphabet. For example A. The conditions ...

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    1

    How to determine a DSL in an Alphabet using C codes

    I require to find the number of DSL (Digital Straight Line) in any given alphabet. For example A.

    The conditions to be fulfilled for a point to be DSL are:

    1) There exist runs of pixels in at most 2 directions which differ by 45degree.
    2) For runs of 2 directions,the run lengths in one of the directions
    is always one.
    3) The run length in the other direction can have at most 2 values
    differing by unity(e.g. n and n+1).

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    That's nice, how about asking a question. No one will do the work for you.

    The first method would be to read/get the pixelmap (a map of pixels), ask specific questions if you have problems with that or other stages after...

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Seems to me that an 'A' would have lines of pixels in three directions:

    One for each leg of the letter, and a third for the horizontal line between the legs.

  4. #4
    Banned
    Join Date
    Nov 2007
    Posts
    678
    Adak is clever How many lines will be in B?

  5. #5
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Infinite

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Determine length of an array
    By ulillillia in forum C Programming
    Replies: 7
    Last Post: 04-21-2007, 09:32 PM
  2. codes
    By IfYouSaySo in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 11-18-2005, 03:09 PM
  3. action replay codes
    By c++.prog.newbie in forum Game Programming
    Replies: 2
    Last Post: 02-28-2004, 08:47 AM
  4. DSL & Router
    By Thantos in forum Tech Board
    Replies: 6
    Last Post: 08-14-2003, 02:55 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21