Open i-am-leo opened 1 year ago
Ahh yes, the cropping issue :D
First of all, you should have identified the font/font-size that is most likely used. I have not found (meaning I have not looked) a way to automatically determine the symbols that are the "highest" / "lowest" or the letters with biggest ascent and descent, so you have to try out a bit. You have to crop your images in a way that the height and width are obviously multiples of 6, and the height should be so that the highest/lowest letters fit into your cropped image, even if this let some completely white rows at the top and/or bottom.
If you have an example, you can post it here. If it is this one: https://github.com/i-am-leo/pic/blob/main/response.png it might become difficult, because there is more than just simple pixelation going on.
I tried this image
.This is directly cropped on the sample image, but it prompts me "X has 96 features, but KMeans is expecting 72 features as input". Do you know the reason?
When I run your code, I get an error saying that the number of k-means clusters is not valid. I am still not sure how to crop the image. If it is an image with a block size of 6, how should I crop the image?