Google cloud vision OCR reads the same letter more than once - ocr

I'm using google cloud vision OCR to extract text from receipt images and came across this weird issue where the OCR reads the same letter twice but with different coordinates.
To visualize the issue, I draw rectangles around each letter using the coordinates returned from the API:
This is the part of the image with the issue:
As you can see, there are overlapping rectangles on the 'M' and the 'a'.
The result is something like this:
'''MMaay 10, 2019'''
Why this is happening?
Is there a way to fix it?
I tried to change the image format from bmp to png. The only difference is that the overlapping rectangle is moved from the 'a' to the 'y'.

Related

Swap a draw with an image in Google Doc

I have various Word documents (.docx) saved in Google Drive, everyone has inside a draw composed of text, borders, and a pen-draw, grouped together.
When opened in Google Doc the .docx files to edit, the group appear as a draw composed of the same elements except the pen-draw that is missing.
So I need to solve this, 2 options:
Replace the draw with a saved image
Edit the draw and put inside an image, save&close the draw
Since it is an operation repeated ten times every day I want to find a way to automate this with google appscripts
Any suggestion ?

Static image positioned far north gets stretched

In our application we have a backend that does some raster processing on a region of a map and sends back an image to the OL-based frontend which inserts the image at the specified extent.
The polygon to process is sent as GeoJSON-coords (EPSG:4326) to the backend which then transforms the polygon to a rectangular projection (EPSG:3035 in this case), does the processing and sends the heatmapped results back to the frontend as a PNG-encoded image, reprojected server-side to EPSG:3857 (to match the projection of our OSM-based background map). The image is then inserted in an ImageLayer using an ImageStatic object, whose extent is computed by the backend (the EPSG:3035-transformed bounding box of the image transformed to EPSG:3857).
This works fine, except for polygons in the far north of Scandinavia. For instance, the image whose extent in EPSG:3857 is [1684632.9133543067,9544855.787615912,2902401.684702249,10831736.048522325] is visualized the following way when added to the map:
The desirable result is for the image to follow the south-eastern boundaries of the shadowed polygon. Instead it is skewed and stretched out to the north-east.
I would be very grateful for any ideas and pointers as to why this is not working as expected.
I solved this by cropping the image to be reprojected as much as possible. The resulting envelope is then much smaller which did away with the distortions. Thanks for hint #Ian!

Google Maps API returns zoomed out repeated view of the globe - possible incorrect coordinates?

I'm working on a project where I am showing 8,000+ lat/long coordinates on a Google Map. Works great.
Today I uploaded another 3,000+, and now the Google Map shows a world view of the globe, repeated horizontally, with a lot of gray space on top.
I've looked through the 3,000+ entries, and do not see any where alpha characters, missing lat/long values, etc - something obvious.
The only thing that I can think of is that a lat/long entry is incorrect, and thus the Google Map zoom breaks? Reviewing questions on SO show hacks such as setting minZoom or zoom levels - but I feel that isn't the right path to go across to solve this, since it was working before and something is happening with my new records. I've checked that no pins are on the map outside USA which may cause the entire world view to show.
I'm reaching out to the community to see if anyone smarter than me has a tip or suggestion to help edge case occurrences like this, and/or if my assumption of a wrong lat/long is breaking the Map?
One of your lat/long is incorrect. Instead of Google Maps API failing and alerting, it just breaks the map. I'd advise you to run your locations to confirm decimals exists per each record.

geoserver preview error when output format is openlayers and png

After I imported shapefiles into geoserver following a tutorial and tried to preview, I find the output image is not right while there is no errors in logs when i choose openlayers or png, jpeg, gif. The image is like a map stained by ink.
However, when I output the layer as PDF, the image is normal ....
All the configurations are default except SRS.
The url is
http://localhost:7070/geoserver/mygis/wms?service=WMS&version=1.1.0&request=GetMap&layers=mygis:roads&styles=&bbox=1.2878111774224255E7,4781149.089993679,1.3037623853023177E7,4928041.91732644&width=768&height=707&srs=EPSG:4326&format=application/openlayers
And the tiled layer of my imported shapefiles is blank.
Is there any way to solve this ?
Thanks in advance !!
With out seeing the map and some more information about the shapefile it is hard to give a definitive answer but looking at the URL you provide the problem seems to be that you have specified the SRS (projection) as EPSG:4326 which is lat/lon degrees while your bounding box appears to be measured in meters which means that all your data will be clustered in the very centre of the map if it really is in degrees or distorted due to the mismatch in projections if it is projected.
As a first guess I would change the SRS parameter to epsg:3875 (web mercator) and see if it looks better.

Best way to display 100k+ points on map

I have a dataset with several hundred thousand lat/long points. I would like to render these points on a map for info-graphic purposes (as small dots or something similar).
This is not something that necessarily has to be interactive, or rendered in a browser. It's okay if it's just an image.
I know that attempting this with markers and Google maps would be tough... any other tools out there that would generate this type of map? Preferably free/open source?
Or, do you have a method to make this work with something like Google maps? I don't want to use a marker clusterer... I need to be able to see all of the points.
In short :)
Download and fire-up Quantum GIS
Add some background map (e.g. OSM WMS layer from http://129.206.228.72/cached/osm)
Have your data in a CSV file, in WKT format, and load it on top (using add delimited text layer)
Save as image
You might want to peek what stackexchange.com has on GIS, too.