I am using node SDK for barcode recognize. This is failing for few of the images https://testops.lifedata.ai/api/storage/workspace/21b9f06a-cf29-4246-a626-04618e4ddfdb/3eaa79ee-27cb-4b4b-a86a-742e15b11d76/1626968513420_IMG-20210722-WA0007.jpg
Also for few URLS we are getting 405 error
Eg : https://media.messagebird.com/v1/media/1c8b4b5b-8c36-482c-a104-0326b83d7a6b
Also recognize is taking more than 20sec to respond.
Pls help me in getting these sorted and getting higher rate of recognition
We are sorry for the inconvenience. I tested the scenario using your shared image. I noticed the processing time issue but the barcode is recognized without any issue. The API method recognizes two barcodes in the image. I have logged a ticket BARCODECLOUD-193 to investigate the processing time issue.
@tilal.ahmad Thanks for the update
Its taking more than 50sec for recognition. Is there specific image format to be used? what is the average time for each req?
Below is the node js code I am using for barcode recognition
async function recognizeBarcode(url) {
const request = new Barcode.PostBarcodeRecognizeFromUrlOrContentRequest();
request.timeout = 50000;
request.checksumValidation = "Off";
request.preset = "HighPerformance"
request.url = url;
var ISBNValue = null;
await api.postBarcodeRecognizeFromUrlOrContent(request)
.then(result => {
console.log("response is ", result.body.barcodes)
})
.catch(err => {
console.log(err);
})
}
We are facing to the below URLS https://media.messagebird.com/v1/media/2bf9baa3-6873-45e5-8dbc-0cd1586c6090 https://media.messagebird.com/v1/media/3a799119-beed-4a7c-a610-fc5a4d568bd8 https://media.messagebird.com/v1/media/69051e73-4f79-4864-9e65-de6ef5ed92bf
Hello Shwetha07,
The best way to speed up recognition is to specify barcode type with request.type = “ISBN”. It allows scanner not to try other barcode type. To prevent fake barcode recognition please do not turn checksumValidation off.
Error 405 occurs because server that serves image could not handle HTTP HEAD request which we are using to check URL before processing. This error could be easily simulated with curl command
Average time for each recognition mostly depends on image size barcode type hints and server performance. There is no specific image format (PNG is the best option to save barcodes) but other format should not affect performance too much.
I’ve checked recognition speed with and without barcode type hint and get at least twice faster performance with explicit barcode type “ISBN”. As far as I can see, your images has pretty big resolution and could be resized at least half of their original size. You can try reduce image size at half or quarter size (try to use integer scaling factor like 2, 3, 4, 5 etc).