Processamento de Imagem
Para que seja possível fazer o reconhecimento dos caracteres o primeiro passo é aprimorar a qualidade das imagens.
Para isso são utilizados os endpoints:
→ POST Aprimoramento Imagem
Este endpoint melhora uma imagem fornecida. A imagem deve ser enviada como uma carga JSON, com o arquivo codificado no formato Base64. O arquivo não deve exceder 10 MB de tamanho.
- path: /api/image-processing/improve-img
- Swagger POST Processamento Imagem
Request Body:
{
"File":
{
"Blur": false,
"Brightness": 0,
"Contrast": 0,
"FileBase64": "string",
"FileName": "string"
}
}
Response Body:
200 Success - "Image successfully enhanced."
{
"data": {
"Base64Result": "string",
"FileName": "string"
},
"msg": "image enhanced successfully",
"status": true
}
400 Bad Request
"Bad request. This response is returned when more than one file is uploaded, as only a single file is allowed."
401 Unauthorized
"Unauthorized, occurs when authentication is required but not provided."
415 Unsupported Media Type
"Unsupported media type, when the file is not a JPEG/JPG or PNG."
500 Internal Server Error
"Internal Server Error indicating a failure in schema validation."
→ POST Aprimoramento PDF
Este endpoint converte um PDF fornecido em imagens aprimoradas ou em um único PDF. O arquivo PDF deve ser enviado como uma carga JSON com cada arquivo codificado no formato Base64. O arquivo deve ser um PDF e não exceder 10 MB de tamanho.
- path: /api/image-processing/improve-pdf
- Swagger POST Processamento PDF
Request Body:
{
"File":
{
"Blur": true,
"Brightness": 0,
"Contrast": 0,
"FileBase64": "string",
"FileName": "string"
}
}
Response Body:
200 Success - PDF converted successfully
{
"data": [
{
"Base64Result": "string",
"FileName": "string"
}
],
"msg": "PDF converted successfully",
"status": true
}
400 Bad Request
"Bad request. This response is returned when more than one file is uploaded, as only a single file is allowed."
415 Unsupported Media Type
"Bad request, when the file is not a PDF."
500 Internal Server Error
"Internal Server Error indicating a failure in schema validation."