top of page

Berk Server

 

Overview:
 

Berk Server is a local API service running at https://0.0.0.0:5003, providing image processing capabilities. Key features include:
 

Get Coordinates (/getCoordinates Endpoint): Identifies coordinates of an element within a screenshot, useful for locating specific elements in images.


Get Text (/getText Endpoint): Extracts text from dynamic elements in images, aiding in scenarios that require Optical Character Recognition (OCR).



Download/Installation:

You can download Berk Server from here. 
After installation and launch navigate to https://0.0.0.0:5003/check_service' and use a GET request. It should return 'Berk server is working'.

 

Important Prerequisite: For the application to function properly, it is required to download Tesseract OCR from the provided link and configure the path settings accordingly.

        Use this link for Tesseract installation

 

Launch:  You can launch it with CLI (Terminal):

                 Mac:  

                              chmod +x BerkServer

                             ./BerkServer --host <"host number">  --port <port number> or default  ./BerkServer

 

                 Windows

                            BerkServer.exe --host <"host number"> --port  <port number> or default  BerkServer.exe

 

Usage:



1. Get Element Coordinates:

 

  • Endpoint: /get-coordinates

  • Method: POST

  Request Body:

      

{
  "element_path": "path/to/template/image",
  "screenshot_path": "path/to/screenshot/image",

  "deviceScreenWidth":    {Integer}
  "deviceScreenHeight":   {Integer}

}

   Response:

{
  "status": "success",
  "centerX": {Integer},
  "centerY": {Integer}
}


 

2. Get Text:

 

  • Endpoint: /get-text

  • Method: POST

  Request Body:

      

{
  "element_path": "path/to/template/image",
  "screenshot_path": "path/to/screenshot/image",

  "deviceScreenWidth":    {Integer}
  "deviceScreenHeight":   {Integer}

}

   Response:

{

"status": "success",

"text": "Extracted text from image"

}



 

bottom of page