Skip to main content

Barcode Detection

Given an image returns any barcode that the image might contain.

How to Get Your Endpoint:

Go to https://ezout.store/contact and reach out to our team. We should get back to you soon with personal support and a custom endpoint if needed.

Query Params:

  • barcode_only: 0 (0 for no upload to S3 bucket, 1 for upload to S3 bucket)

Body

form-data:

  • image: /home/my_image.jpg

API Calls:

Here is how to call the API in each language:

import requests

url = "http://18.117.166.142/detect_b64?barcode_only=1"

payload = {}
files=[
  ('image',('20141027_0848251.jpg',open('/Users/user/Desktop/image-name.jpg','rb'),'image/jpeg'))
]
headers = {}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)

Output Format:

{
"BarcodeLabels": [
label 0,
...,
label n
]
"BarcodePositions": [
{'area', height','left','top','width' for label 0}
...
{.. label n}
]
}

Example Output:

{
"BarcodeLabels": [
"0073935942400"
],
"BarcodePositions": [
{
"area": 88531,
"height": 223,
"left": 517,
"top": 481,
"width": 397
}
]
}

Example API Call:

import requests

output = requests.get('http://18.117.166.142/detect_b64',
params={'image': 'image.jpg'})