exist a way of recognize number without the fonts ?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

exist a way of recognize number without the fonts ?

Post by diegomage »

I have two images but i dont have the fonts for recognize exist any way of use the digit for output true when the image contain this digit or another way of recognize creating a fonts from jpg file (I use tesseract but not work with this image)

Image


Image


please give me a recommendation
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: exist a way of recognize number without the fonts ?

Post by snibgo »

The are only ten digits: 0, 1, 2, ... 9. You can crop each to a sample. Then, when you want to find the digits in an image, you can sub-search the image for each sample in turn.
snibgo's IM pages: im.snibgo.com
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: exist a way of recognize number without the fonts ?

Post by diegomage »

hi thanks but i use subsearch but this output a coordinate not output true or false and when the image dont recognize then output other rare cordinate magick compare -metric rmse -subimage-search -dissimilarity-threshold 1 circle4.png NUMERO0.png null: 2>&1

how i could use a command for print true or false
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: exist a way of recognize number without the fonts ?

Post by snibgo »

Code: Select all

compare -metric RMSE -subimage-search -dissimilarity-threshold 1 r2.png r.png NULL:

8152.75 (0.124403) @ 32,20
The number in parenthesis 0.124403 is between 0.0 (the match is perfect) and 1.0 (the match is as bad as it gets). Write a script to find which of the ten digits has the best match.
snibgo's IM pages: im.snibgo.com
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: exist a way of recognize number without the fonts ?

Post by diegomage »

when i do with diferent image appears 19967.9 (0.304691) @ 151,53d
19967.9 (0.304691) @ 151,53d
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: exist a way of recognize number without the fonts ?

Post by diegomage »

circle4
Image


then this command not doing a perfect match cant output true or false when does match
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: exist a way of recognize number without the fonts ?

Post by diegomage »

compare -metric RMSE -subimage-search -dissimilarity-threshold 1 circle4.png NUMERO0.png NULL:
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: exist a way of recognize number without the fonts ?

Post by diegomage »

how i can do a perferct match i use the same command with various image and i get another coordinates Although the image does not appears the number
Post Reply