Search code examples
c#matrixletters

How to convert matrix 7x7 to char?


I have matrix 7x7 which consist of 1 and 0 only. How I can detect some letter from this matrix? For example:

0000000
0100010
0100010
0111110
0100010
0100010
0000000

This must be converted as H character. Thank you.


Solution

  • You have to define a "matrix/letter dictionnary". For example, the string 0000000010001001000100111110010001001000100000000 (your matrix put on one line) corresponds to H.

    Then, you can search this matrix string in your dictionnary and return the letter it corresponds to.