Making a braille translator

Similarly, if every first letter on each line is missing dots in the first column (positions 1, 3, 5), we need to make sure to account for the fact that our dot array will be starting from the middle of a letter and combine pairs of rows accordingly.At this point we have ourselves a matrix that looks something like this:What remains is to just go through the matrix with a window of size 3×2 and stride of 2, collect the locations of 1’s into lists and convert these lists into letters using a dictionary..For example [1,2,4] corresponds to a letter “d” since those are the dots that are colored in.For this particular picture the output isabcdefghijklm nopqrstuvwxyz 1bcdefghijNotice that only the first number was converted (represented as #a)..That is because I haven’t gotten around to making sure the pattern indicating an integer gets extended beyond the first number yet.Overall, this was kind of pain, but I learned some neat tricks..The entire code can be found on my GitHub..It would be interesting to see if letter recognition technique could be applied here, since patterns of dots don’t constitute a solid contour that can be easily interpreted..Another thought was to pixelate the image so each black dot corresponds to one black pixel, maybe something like this..Should I do Morse code next?.Everyone still uses that, right?. More details

Leave a Reply