DoubangoTelecom / ultimateALPR-SDK

World's fastest ANPR / ALPR implementation for CPUs, GPUs, VPUs and NPUs using deep learning (Tensorflow, Tensorflow lite, TensorRT, OpenVX, OpenVINO). Multi-Charset (Latin, Korean, Chinese) & Multi-OS (Jetson, Android, Raspberry Pi, Linux, Windows) & Multi-Arch (ARM, x86).
https://www.doubango.org/webapps/alpr/
Other
597 stars 157 forks source link

How to directly decode a binary into a structure which ultimateALPR-SDK can recognize? #217

Closed mochechan closed 2 years ago

mochechan commented 2 years ago

With the sample, a file can be loaded and decoded into a structure which ultimateALPR-SDK can recognize.

For performance consideration, suppose I have a jpg image binary saved as std::string in RAM, and I do not want to save as a file loaded for ultimateALPR-SDK. How to directly decode the std::string as the input structure for ultimateALPR-SDK?

DoubangoTelecom commented 2 years ago

If you check https://github.com/DoubangoTelecom/ultimateALPR-SDK/tree/master/samples/c%2B%2B/recognizer#readme you'll read The application accepts path to a JPEG/PNG/BMP file as input. This is not the recommended way to use the API.

Check the API function and you'll see that the processing function accept an image from a buffer (RAM). For std::string you'll pass string.c_str() memory address to the process function. https://www.doubango.org/SDKs/anpr/docs/cpp-api.html#_CPPv4N15ultimateAlprSdk16UltAlprSdkEngine7processEK22ULTALPR_SDK_IMAGE_TYPEPKvK6size_tK6size_tK6size_tKi

DoubangoTelecom commented 2 years ago

In the future please use the dev-group (https://groups.google.com/g/doubango-ai) for technical questions and this issue tracker to report bugs.