0

I need to get data in the form: Title of the image, Latitude, Longitude

I have tried pytesseract but the resultant text is not accurate. I found alphabets in the text rather than latitude and longitude.

I need to get data in the form: Title of the image, Latitude, Longitude [![Lat_Image][2]][2]

path = 'C:/BackUp/PhD/Data_from_Core_AP/Python/GeoTaggingWellsImages/filtered_images/Chittoor/'+file
img = cv2.imread(path)
crop_img = img[365:385,10:395]
gray = cv2.cvtColor(crop_img, cv2.COLOR_BGR2GRAY)
ret, thresh = cv2.threshold(crop_img,245 ,255, cv2.THRESH_TRUNC)
cv2.imwrite("C:/BackUp/PhD/Data_from_Core_AP/Python/GeoTaggingWellsImages/filtered_images/temp.jpeg", gray)
text = pytesseract.image_to_string(Image.open("C:/BackUp/PhD/Data_from_Core_AP/Python/GeoTaggingWellsImages/filtered_images/temp.jpeg"), config='outputbase digits')


  [1]: https://i.stack.imgur.com/aoc3I.jpg
  [2]: https://i.stack.imgur.com/pMgER.jpg
G.S. J
  • 233
  • 1
  • 8
  • It would still be great if you can share your pytesseract code. Maybe there's room of improvement. In my opinion, it's best to do such a task with pytesseract. – Deep Bhatt Jul 16 '19 at 14:01
  • @DeepBhatt I have added code as per your suggestion. – G.S. J Jul 17 '19 at 08:44

0 Answers0