How to generate Pixel Map Of Image - ocr

How can I create a pixel map image like the following examples?
'00100000010110000011110000011110000011011000011001110011000101111000010011000001', //DIGIT 2
'01000000101100000011100000000110001000011000100001110111001101110111100010001100', //DIGIT 3
'00000110000000111000000110100000110010000110001000111111111111111111110000001000', //DIGIT 4
i use code from github
https://github.com/ndunks/PHP-Simple-Captcha-Reader

Related

OCD digit recognition on a LCD display

I'm tring to get the digit from this LCD display:
LCD Display
I used pytesseract whit this code:
img = cv2.imread('1.png')
img = get_grayscale(img)
img = cv2.bitwise_not(img)
custom_config = r'--psm 7 --oem 3 -c tessedit_char_whitelist=0123456789'
print(pytesseract.image_to_string(img,lang='eng',config=custom_config)
But i didn't get a good result.
I also tried passing the cropped image:
Cropped LCD Display
I get better result but not good enough.
I tried also to insall other OCR (lie calamari-ocr, easyocr) module but i always get some different error while tring to install that.
What i can try?

Color limits from the HERE Map Image REST API

We've signed up to the Pro plan and now we need to create a report using Map Image REST API to generate heatmaps using multiple colors (more than 4 colors).
I saw on the documentation that there is a limit of 4 levels and colors, I'm wondering if it's possible to use more colors in order to reach our requirements.
Do you have plans to increase the limits or beta version that doesn't have those limits?
For instance, we need to create 6 areas each one with different colors and 6 levels on the same map as shown on the following image, I should be able to use 6 different colors but only shows up 4 colors.
Map image example with 6 areas
Here is the request
GET https://image.maps.ls.hereapi.com/mia/1.6/heat
?apiKey={{API_KEY}}
# Area 1 - Yellow
&a0=49.27,-123.48
&rad0=1900
&l0=0
# Area 2 - Red
&a1=49.25,-123.38
&rad1=1500
&l1=1
# Area 3 - Blue
&a2=49.18,-123.342144
&rad2=1500
&l2=2
# Area 4 - Green
&a3=49.28,-123.35
&rad3=1000
&l3=3
# Area 5 - Orange
&a4=49.21,-123.55
&rad4=1800
&l4=4
# Area 6 - White
&a5=49.30,-123.60
&rad5=1000
&l5=5
#
&z=11
&w=900
&h=900
&plt=FCFF00,EB2501,001EFF,1FE80C,FF8C0D,FFFFFF
Thanks!
I can't speak to our plans for this API, I can, however, raise a ticket internally asking that this be considered. My guess is that it's for performance as well as "length of URL" concerns, but at minimum I can ask.

Google static maps - group some points with custom marker

I'm using google static maps
I'm trying to display 2 groups (with option for more) of geo points.
Each group has different icon.
this url displays only the center icon with out others
http://maps.googleapis.com/maps/api/staticmap
?center=31.909440199627042,35.00186054020873
&zoom=14
&size=1200x1200
&markers=icon:http%3A%2F%2Ftinyurl.com%2F2ftvtt6|31.909440199627042,35.00186054020873|31.909440199627042,35.00186054020873
&markers=icon:http%3A%2F%2Ftinyurl.com%2F2ftvtt6|31.909440199627042,35.00186054020873|31.909440199627042,35.00186054020873&sensor=false
What am I doing wrong?
The problem is your request:
http://maps.googleapis.com/maps/api/staticmap
?center=31.909440199627042,35.00186054020873
&zoom=14
&size=1200x1200
&markers=icon:http%3A%2F%2Ftinyurl.com%2F2ftvtt6|31.909440199627042,35.00186054020873|31.909440199627042,35.00186054020873
&markers=icon:http%3A%2F%2Ftinyurl.com%2F2ftvtt6|31.909440199627042,35.00186054020873|31.909440199627042,35.00186054020873&sensor=false
First: why do you have 2 markers fields?
Then: your markers are at exactly the same locations... So you see only 1 pin.
If I try the following (removed the 2nd markers and changed a value) I see 2 pins:
http://maps.googleapis.com/maps/api/staticmap
?center=31.909440199627042,35.00186054020873
&zoom=14
&size=1200x1200
&markers=icon:http%3A%2F%2Ftinyurl.com%2F2ftvtt6|31.909440199627042,35.00186054020873|31.909440199627042,35.0000
&sensor=false

What is the name of this style?

I would like to if the style as highlighted in below 3 images are defined in static resources. if yes what is its name ?
e.g StaticResource PhoneTextExtraLargeStyle is a StaticResource and can be usedto set Style.
Image 1
Image 2
Image 3

shape fitting - gis

Let us say I have two shapes. One is a polygon and the other a square. Each shape consists of lines which two points (a latitude/logitude pair). I would like to determine the degree to which the square is within the polygon (percentages 0 ... 100). Is this possible? Any pointers to relevant algorithms would be very much appreciated. Thanks.
Christian
In C++ you could try CGAL. or GEOS
Found CGAL in the intersection detection section of the Stonybrook Algorithm Repository maintained by Steven Skiena and GEOS on OpenGeo
If you know the projection, add the data to a Postgis/postgres table, compute the area, and then do a matrix between all your boxes such that the data is area_box_1 / area_box_2
Boxes | 1 | 2 | 3 | 4 | 5
1 20% 0% 0% 5% 0%
----------------------------------
2
----------------------------------
3
----------------------------------
4
----------------------------------
5