how to call aws rekognition detectText service.sending base64 encoded image and getting text from the image. please any one provide the javascript code for that
Calling the detectText operation
var params = {
Image: { /* required */
Bytes: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
S3Object: {
Bucket: 'STRING_VALUE',
Name: 'STRING_VALUE',
Version: 'STRING_VALUE'
}
},
Filters: {
RegionsOfInterest: [
{
BoundingBox: {
Height: 'NUMBER_VALUE',
Left: 'NUMBER_VALUE',
Top: 'NUMBER_VALUE',
Width: 'NUMBER_VALUE'
}
},
/* more items */
],
WordFilter: {
MinBoundingBoxHeight: 'NUMBER_VALUE',
MinBoundingBoxWidth: 'NUMBER_VALUE',
MinConfidence: 'NUMBER_VALUE'
}
}
};
rekognition.detectText(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});