Using AWS Rekognition to detect credit card numbers.
- Maven
- JDK 1.8
- mvn spring-boot:run
Detecting credit card number
- Request (image was converted to base64)
{
"type": "CREDIT_CARD",
"base64": "iVBORw0KGgoAAAANSUhEUgAAAloAAAF7CAMAAAA9ndXWAAAAAXNSR0IArs4c6QAAAwBQ..."
}
- Response
{
"number": "4000 1234 5678 9010",
"brand": "VISA"
}
Detecting full image content
- Request
{
"type": "DETECT_TEXT",
"base64": "iVBORw0KGgoAAAANSUhEUgAAAloAAAF7CAMAAAA9ndXWAAAAAXNSR0IArs4c6QAAAwBQ..."
}
- Response
{
"lines": [
"Mission",
"Lane",
"4000 1234 5678 9010",
"4000",
"GOOD 09/22",
"THRU",
"CARDHOLDER NAME",
"VISA"
]
}