Best JSON config

Here is the best config we recommend:
  • Enable parallel mode: Regardless your use case this is definetly the mode to use. It’s faster and provide same accuracy as the sequential mode. If you think it’s not suitable for you, then please let us know and we’ll explain how to use it.

  • YUV420P image format as input: In fact the best format would be RGB24 but your camera most likely dosen’t support it. You should prefer YUV420P instead of YUV420SP (NV12 or NV21) as the later is semi-planar wich means the UV plane is interleaved. De-interleaving the UV plane take some extra time.

  • 720p image size: Higher the image size is better the quality will be or the recognition part. 720P is a good trade-off between quality and resource consumption. Higher image sizes will give your camera a hard time wich means more CPU and memory usage.

  • 50% for minimum detection score: This looks low but it’ll improve your recall. Off course it’ll decrease your precision but you should be worry about it as the score from the recognizer will be used to get ride of these false-positives. Please don’t use any value lower than 10% as it’ll increase the number of false-positives which means more images to recognize which means more CPU usage.
    JSON config: “detect_minscore”: 0.5

  • 20% for minimum recognition score: This score is very low and make sense if the score type is “min”. This means every character on the credit card have an accuracy at least equal to 0.2. For example, having a false-positive with #5 chars and each one is recognized with a score > 0.2 is very unlikely to happen. If you’re planning to use “median”, “mean”, “max” or “minmax” score types, then we recommend using a mimimum score at 70% or higher.
    JSON config: “recogn_score_type”: “min”, “recogn_minscore”: 0.2

The configuration should look like this:

{
            "debug_level": "warn",
            "detect_minscore": 0.5,

            "recogn_score_type": "min",
            "recogn_minscore": 0.2
}