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
615 stars 157 forks source link

Regarding license token_data #184

Closed AdityaZ12 closed 3 years ago

AdityaZ12 commented 3 years ago

Hello,

The license key is working for us when used with your recognizer executable

./recognizer --image ../../../assets/images/lic_us_1280x720.jpg --assets ../../../assets --charset latin --parallel false --rectify true --tokendata XYHSA@12 OUTPUT : 3PEDLM4 But doesnt work when I use it with my own code. The code compiles without any error, but doesnt print full license plate

./my_code --image ../../../assets/images/lic_us_1280x720.jpg --assets ../../../assets --charset latin --parallel false --rectify true --tokendata XYHSA@12 OUTPUT : 3PEDLM*

DoubangoTelecom commented 3 years ago

Hi, please share your code and the full logs

AdityaZ12 commented 3 years ago
// my_code.cpp (Inspired by benchmark.cpp)
// TO RUN -->>
// ./my_code --image ../../../assets/images/lic_us_1280x720.jpg --assets ../../../assets --charset latin 
// --parallel false --rectify true --tokendata XYHSA@12

#include "opencv2/opencv.hpp"
#include "iostream"
#include "ultimateALPR-SDK-API-PUBLIC.h"
#include <fstream>
#include <cmath>
#include <string>
#include "nlohmann/json.hpp"
//FROM BENCHMARK
#include "../alpr_utils.h"
#include <chrono>
#include <vector>
#include <algorithm>
#include <random>
#include <mutex>
#include <condition_variable>
#include <algorithm>
//END BENCHMARK
#include <opencv2/core/core.hpp>
// Drawing shapes
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

using namespace cv;
using json = nlohmann::json;
using namespace std;
static void printUsage(const std::string& message = "");
static const char* __jsonConfig =
"{"
"\"debug_level\": \"info\","
"\"debug_write_input_image_enabled\": false,"
"\"debug_internal_data_path\": \".\","
"\"num_threads\": -1,"
"\"klass_vcr_gamma\": 1.5,"
"\"detect_roi\": [0, 0, 0, 0],"
"\"detect_minscore\": 0.1,"
"\"car_noplate_detect_min_score\": 0.8,"
"\"pyramidal_search_enabled\": true,"
"\"pyramidal_search_sensitivity\": 1.0,"
"\"pyramidal_search_minscore\": 0.3,"
"\"pyramidal_search_min_image_size_inpixels\": 800,"
"\"recogn_minscore\": 0.3,"
"\"recogn_score_type\": \"min\","
"\"recogn_rectify_enabled\": false,"
"\"assets_folder\": \"/home/xav_nx/ultimateALPR-SDK/assets\","
"\"charset\": \"latin\","
"\"car_noplate_detect_enabled\": false,"
"\"gpgpu_enabled\": false,"
"\"ienv_enabled\": false,"
"\"openvino_enabled\": false,"
"\"klass_lpci_enabled\": false,"
"\"klass_vcr_enabled\": false,"
"\"klass_vmmr_enabled\": false,"
"\"klass_vbsr_enabled\": false"
//"\"tokendata\": " 
"}";

using namespace ultimateAlprSdk;

int main(int argc, char *argv[]) 
{
        std::string assetsFolder, licenseTokenData, licenseTokenFile;
        bool isParallelDeliveryEnabled = true;
    bool isRectificationEnabled = false;
    bool isIENVEnabled = false;
    bool isOpenVinoEnabled = true;
    bool isKlassLPCI_Enabled = false;
    bool isKlassVCR_Enabled = false;
    bool isKlassVMMR_Enabled = false;
    bool isKlassVBSR_Enabled = false;
    std::string charset = "latin";
    std::string openvinoDevice = "CPU";
    size_t loopCount = 100;
    double percentPositives = .2; // 20%
    std::string pathFilePositive;
    std::string pathFileNegative;

    // Parsing args
    std::map<std::string, std::string > args;
       if (!alprParseArgs(argc, argv, args)) {
        //printUsage();
        return -1;
    }
    if (args.find("--positive") == args.end()) {
        //printUsage("--positive required");
        return -1;
    }
    if (args.find("--negative") == args.end()) {
        //printUsage("--negative required");
        return -1;
    }
    pathFilePositive = args["--positive"];
    pathFileNegative = args["--negative"];
    if (args.find("--rate") != args.end()) {
        const double rate = std::atof(args["--rate"].c_str());
        if (rate > 1.0 || rate < 0.0) {
            //printUsage("--rate must be within [0.0, 1.0]");
            return -1;
        }
        percentPositives = rate;
    }
    if (args.find("--loops") != args.end()) {
        const int loops = std::atoi(args["--loops"].c_str());
        if (loops < 1) {
            //printUsage("--loops must be within [1, inf]");
            return -1;
        }
        loopCount = static_cast<size_t>(loops);
    }
    if (args.find("--parallel") != args.end()) {
        isParallelDeliveryEnabled = (args["--parallel"].compare("true") == 0);
    }
    if (args.find("--assets") != args.end()) {
        assetsFolder = args["--assets"];
#if defined(_WIN32)
        std::replace(assetsFolder.begin(), assetsFolder.end(), '\\', '/');
#endif
    }
    if (args.find("--charset") != args.end()) {
        charset = args["--charset"];
    }
    if (args.find("--rectify") != args.end()) {
        isRectificationEnabled = (args["--rectify"].compare("true") == 0);
    }
    if (args.find("--ienv_enabled") != args.end()) {
        isIENVEnabled = (args["--ienv_enabled"].compare("true") == 0);
    }
    if (args.find("--openvino_enabled") != args.end()) {
        isOpenVinoEnabled = (args["--openvino_enabled"].compare("true") == 0);
    }
    if (args.find("--openvino_device") != args.end()) {
        openvinoDevice = args["--openvino_device"];
    }
    if (args.find("--klass_lpci_enabled") != args.end()) {
        isKlassLPCI_Enabled = (args["--klass_lpci_enabled"].compare("true") == 0);
    }
    if (args.find("--klass_vcr_enabled") != args.end()) {
        isKlassVCR_Enabled = (args["--klass_vcr_enabled"].compare("true") == 0);
    }
    if (args.find("--klass_vmmr_enabled") != args.end()) {
        isKlassVMMR_Enabled = (args["--klass_vmmr_enabled"].compare("true") == 0);
    }
    if (args.find("--klass_vbsr_enabled") != args.end()) {
        isKlassVBSR_Enabled = (args["--klass_vbsr_enabled"].compare("true") == 0);
    }
    if (args.find("--tokenfile") != args.end()) {
        licenseTokenFile = args["--tokenfile"];

        if (args.find("--tokendata") != args.end()) {
        licenseTokenData = args["--tokendata"];
    }
        //END ARG PARSE 

        cv::Mat frame;
        cv::VideoCapture cap("video.mp4");

        if (!cap.isOpened()) {
                std::cout << "Cannot open the video" << std::endl;
                return -1;
        }

        UltAlprSdkResult result;
        //std::string jsonConfig = __jsonConfig;
        //static const char* __jsonConfig =
        //JSONCONF
         // Update JSON config
    std::string jsonConfig = __jsonConfig;
    if (!assetsFolder.empty()) {
        jsonConfig += std::string(",\"assets_folder\": \"") + assetsFolder + std::string("\"");
    }
    if (!charset.empty()) {
        jsonConfig += std::string(",\"charset\": \"") + charset + std::string("\"");
    }
    jsonConfig += std::string(",\"recogn_rectify_enabled\": ") + (isRectificationEnabled ? "true" : "false");   
    jsonConfig += std::string(",\"ienv_enabled\": ") + (isIENVEnabled ? "true" : "false");
    jsonConfig += std::string(",\"openvino_enabled\": ") + (isOpenVinoEnabled ? "true" : "false");
    if (!openvinoDevice.empty()) {
        jsonConfig += std::string(",\"openvino_device\": \"") + openvinoDevice + std::string("\"");
    }
    jsonConfig += std::string(",\"klass_lpci_enabled\": ") + (isKlassLPCI_Enabled ? "true" : "false");
    jsonConfig += std::string(",\"klass_vcr_enabled\": ") + (isKlassVCR_Enabled ? "true" : "false");
    jsonConfig += std::string(",\"klass_vmmr_enabled\": ") + (isKlassVMMR_Enabled ? "true" : "false");
    jsonConfig += std::string(",\"klass_vbsr_enabled\": ") + (isKlassVBSR_Enabled ? "true" : "false");
    if (!licenseTokenFile.empty()) {
        jsonConfig += std::string(",\"license_token_file\": \"") + licenseTokenFile + std::string("\"");
    }
    if (!licenseTokenData.empty()) {
        jsonConfig += std::string(",\"license_token_data\": \"") + licenseTokenData + std::string("\"");
    }

    jsonConfig += "}";
        //END JSONCONF
        ULTALPR_SDK_ASSERT((result = UltAlprSdkEngine::init(jsonConfig.c_str())).isOK());

        while(1) {
                cap >> frame;

                if (frame.empty())
                        break;

                ULTALPR_SDK_ASSERT((result = UltAlprSdkEngine::process(
                        ULTALPR_SDK_IMAGE_TYPE_BGR24,
                        frame.ptr(),
                        frame.size().width,
                        frame.size().height
                )).isOK());

                const std::string& json = result.json();
                if (!json.empty())
                        ULTALPR_SDK_PRINT_INFO("result: %s", json.c_str());
                        auto j3 = json::parse(result.json()); 
                        std::cout << "==============1234567890================";
                        //std::cout << j3["plates"][0]["text"] << "\n";
                        std::string name=j3["plates"][0]["text"] ;
                        float f1=j3["plates"][0]["warpedBox"][0];
                        float f2=j3["plates"][0]["warpedBox"][1];
                        float f3=j3["plates"][0]["warpedBox"][4];
                        float f4=j3["plates"][0]["warpedBox"][5];
                        std::cout << j3["plates"][0]["warpedBox"][0] << "\n";
                        std::cout << j3["plates"][0]["warpedBox"][1] << "\n";
                        std::cout << j3["plates"][0]["warpedBox"][4] << "\n";
                        std::cout << j3["plates"][0]["warpedBox"][5] << "\n";

                       // Draw output
                        Point p1(f1,f2);

                       // Bottom Right Coordinates
                        Point p2(f3,f4);
                        int thickness = 2;
                       // Drawing the Rectangle
                        rectangle(frame, p1, p2,
                                  Scalar(255, 0, 0),
                                  thickness, LINE_8);
                        cv::putText(frame, //target image
                                    name, //text
                                    cv::Point(f1, f2-10), //top-left position
                                    cv::FONT_HERSHEY_DUPLEX,
                                    1.0,
                                    CV_RGB(118, 185, 0), //font color
                                    2);

                        imshow( "Frame", frame );
                        // Press  ESC on keyboard to exit

                    char c=(char)waitKey(25);
                        if(c==27)
                        break;

        }

        cap.release();
        destroyAllWindows();

        ULTALPR_SDK_ASSERT((result = UltAlprSdkEngine::deInit()).isOK());

        return 0;
    }
}

====CONSOLE LOG (this is the only output on console while runnign the code)==== ./my_code --image ../../../assets/images/lic_us_1280x720.jpg --assets ../../../assets --charset latin --parallel false --rectify true --tokendata XYHSA@12

2021-08-12 15:46:02.084549: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.2

DoubangoTelecom commented 3 years ago

This cannot be the output of the console. We always output information about the license, the hardware... I don't know what you did.

I suspect you hard-coded the JSON entry for the token data and misspelled it. Because you cut the logs, I cannot confirm. Just to tell you how hard it is for us, we even don't know what's your operating system. This kind of information is in the log but you're not sharing it.

The name of the json entry isn't "tokendata" but "license_token_data" -> https://github.com/DoubangoTelecom/ultimateALPR-SDK/blob/99824b0aa0f70cdf3d4f35083c5dc6c317587a1d/samples/c%2B%2B/benchmark/benchmark.cxx#L241

Read documentation at https://www.doubango.org/SDKs/anpr/docs/Configuration_options.html before using the configuration entries.

AdityaZ12 commented 3 years ago

Apologies Sir, Ill try my best again and get back with relevant snippets and logs

AdityaZ12 commented 3 years ago

Hi Sir, The code is working on video file (https://www.youtube.com/watch?v=xZMrRB36CVw&t=0s) , now two issues are there :

1.] I simply compiled your recognizer.cxx code and its able to detect --tokendata from command line and prints full number plate But 2.] Then I modified recognizer.cxx to work on offline video file.It doesnt recognize the same licenseKey on video sample and prints partial output with star "*"

The only problem now is that this video processing code which is modified recognizer.cxx code, isnt able to load tokendata. I didnt delete anything in the working recognizer code for image, I only did some additions. But still I cant figure out why video recognizer code isnt reading tokendata.

====THE WORKING CODE FOR OFFLINE VIDEO PROCESSING======

/*
    https://github.com/DoubangoTelecom/ultimateALPR/blob/master/SDK_dist/samples/c++/recognizer/README.md
    Usage: 
        recognizer \
            --image <path-to-image-with-to-recognize> \
            [--parallel <whether-to-enable-parallel-mode:true/false>] \
            [--rectify <whether-to-enable-rectification-layer:true/false>] \
            [--assets <path-to-assets-folder>] \
            [--charset <recognition-charset:latin/korean/chinese>] \
            [--car_noplate_detect_enabled <whether-to-enable-detecting-cars-with-no-plate:true/false>] \
            [--ienv_enabled <whether-to-enable-IENV:true/false>] \
            [--openvino_enabled <whether-to-enable-OpenVINO:true/false>] \
            [--openvino_device <openvino_device-to-use>] \
            [--klass_lpci_enabled <whether-to-enable-LPCI:true/false>] \
            [--klass_vcr_enabled <whether-to-enable-VCR:true/false>] \
            [--klass_vmmr_enabled <whether-to-enable-VMMR:true/false>] \
            [--klass_vbsr_enabled <whether-to-enable-VBSR:true/false>] \
            [--tokenfile <path-to-license-token-file>] \
            [--tokendata <base64-license-token-data>]

    Example:
        recognizer \
            --image C:/Projects/GitHub/ultimate/ultimateALPR/SDK_dist/assets/images/lic_us_1280x720.jpg \
            --parallel true \
            --rectify false \
            --assets C:/Projects/GitHub/ultimate/ultimateALPR/SDK_dist/assets \
            --charset latin \
            --tokenfile C:/Projects/GitHub/ultimate/ultimateALPR/SDK_dev/tokens/windows-iMac.lic

*/
#include "opencv2/opencv.hpp"
#include "iostream"
#include "ultimateALPR-SDK-API-PUBLIC.h"
#include <fstream>
#include <cmath>
#include <string>
#include "nlohmann/json.hpp"
//FROM BENCHMARK
#include "../alpr_utils.h"
#include <chrono>
#include <vector>
#include <algorithm>
#include <random>
#include <mutex>
#include <condition_variable>
#include <algorithm>
//END BENCHMARK
#include <opencv2/core/core.hpp>
// Drawing shapes
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

#include <ultimateALPR-SDK-API-PUBLIC.h>
#include "../alpr_utils.h"

#include <iostream> // std::cout
#if defined(_WIN32)
#   include <Windows.h> // SetConsoleOutputCP
#   include <algorithm> // std::replace
#endif

using namespace ultimateAlprSdk;
using namespace cv;
using json = nlohmann::json;
using namespace std;
static void printUsage(const std::string& message = "");

// Configuration for ANPR deep learning engine
static const char* __jsonConfig =
//"{"
//"\"debug_level\": \"info\","
//"\"debug_write_input_image_enabled\": false,"
//"\"debug_internal_data_path\": \".\","
//""
//"\"num_threads\": -1,"
//"\"gpgpu_enabled\": true,"
//""
//"\"klass_vcr_gamma\": 1.5,"
//""
//"\"detect_roi\": [0, 0, 0, 0],"
//"\"detect_minscore\": 0.1,"
//""
//"\"car_noplate_detect_min_score\": 0.8,"
//""
//"\"pyramidal_search_enabled\": true,"
//"\"pyramidal_search_sensitivity\": 1.0,"
//"\"pyramidal_search_minscore\": 0.3,"
//"\"pyramidal_search_min_image_size_inpixels\": 800,"
//""
//"\"recogn_minscore\": 0.3,"
//"\"recogn_score_type\": \"min\""
//"";
"{"
"\"debug_level\": \"info\","
"\"debug_write_input_image_enabled\": false,"
"\"debug_internal_data_path\": \".\","
"\"num_threads\": -1,"
"\"klass_vcr_gamma\": 1.5,"
"\"detect_roi\": [0, 0, 0, 0],"
"\"detect_minscore\": 0.1,"
"\"car_noplate_detect_min_score\": 0.8,"
"\"pyramidal_search_enabled\": true,"
"\"pyramidal_search_sensitivity\": 1.0,"
"\"pyramidal_search_minscore\": 0.3,"
"\"pyramidal_search_min_image_size_inpixels\": 800,"
"\"recogn_minscore\": 0.3,"
"\"recogn_score_type\": \"min\","
"\"recogn_rectify_enabled\": false,"
"\"assets_folder\": \"/home/anpr/ultimateALPR-SDK/assets\","
"\"charset\": \"latin\","
"\"car_noplate_detect_enabled\": false,"
"\"gpgpu_enabled\": false,"
"\"ienv_enabled\": false,"
"\"openvino_enabled\": false,"
"\"klass_lpci_enabled\": false,"
"\"klass_vcr_enabled\": false,"
"\"klass_vmmr_enabled\": false,"
"\"klass_vbsr_enabled\": false"
//"\"tokendata\": " 
"}";

// Asset manager used on Android to files in "assets" folder
#if ULTALPR_SDK_OS_ANDROID 
#   define ASSET_MGR_PARAM() __sdk_android_assetmgr, 
#else
#   define ASSET_MGR_PARAM() 
#endif /* ULTALPR_SDK_OS_ANDROID */

/*
* Parallel callback function used for notification. Not mandatory.
* More info about parallel delivery: https://www.doubango.org/SDKs/anpr/docs/Parallel_versus_sequential_processing.html
*/
class MyUltAlprSdkParallelDeliveryCallback : public UltAlprSdkParallelDeliveryCallback {
public:
    MyUltAlprSdkParallelDeliveryCallback(const std::string& charset) : m_strCharset(charset) {}
    virtual void onNewResult(const UltAlprSdkResult* result) const override {
        static size_t numParallelDeliveryResults = 0;
        ULTALPR_SDK_ASSERT(result != nullptr);
        const std::string& json = result->json();
        ULTALPR_SDK_PRINT_INFO("MyUltAlprSdkParallelDeliveryCallback::onNewResult(%d, %s, %zu): %s",
            result->code(),
            result->phrase(),
            ++numParallelDeliveryResults,
            !json.empty() ? json.c_str() : "{}"
        );
    }
private:
    std::string m_strCharset;
};

//static void printUsage(const std::string& message = "");

/*
* Entry point
*/
int main(int argc, char *argv[])
{
    // Activate UT8 display
#if defined(_WIN32)
    SetConsoleOutputCP(CP_UTF8);
#endif

    // local variables
    UltAlprSdkResult result;
    std::string assetsFolder, licenseTokenData, licenseTokenFile;
    bool isParallelDeliveryEnabled = true; // Single image -> no need for parallel processing
    bool isRectificationEnabled = false;
    bool isCarNoPlateDetectEnabled = false;
    bool isIENVEnabled =
#if defined(__arm__) || defined(__thumb__) || defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || defined(_ARM) || defined(_M_ARM) || defined(_M_ARMT) || defined(__arm) || defined(__aarch64__)
        false;
#else // x86-64
        true;
#endif
    bool isOpenVinoEnabled = true;
    bool isKlassLPCI_Enabled = false;
    bool isKlassVCR_Enabled = false;
    bool isKlassVMMR_Enabled = false;
    bool isKlassVBSR_Enabled = false;
    std::string charset = "latin";
    std::string openvinoDevice = "CPU";
    std::string pathFileImage;

    // Parsing args
    std::map<std::string, std::string > args;
    if (!alprParseArgs(argc, argv, args)) {
        printUsage();
        return -1;
    }
    if (args.find("--image") == args.end()) {
        printUsage("--image required");
        return -1;
    }
    pathFileImage = args["--image"];

    if (args.find("--parallel") != args.end()) {
        isParallelDeliveryEnabled = (args["--parallel"].compare("true") == 0);
    }
    if (args.find("--assets") != args.end()) {
        assetsFolder = args["--assets"];
#if defined(_WIN32)
        std::replace(assetsFolder.begin(), assetsFolder.end(), '\\', '/');
#endif
    }
    if (args.find("--charset") != args.end()) {
        charset = args["--charset"];
    }
    if (args.find("--rectify") != args.end()) {
        isRectificationEnabled = (args["--rectify"].compare("true") == 0);
    }   
    if (args.find("--car_noplate_detect_enabled") != args.end()) {
        isCarNoPlateDetectEnabled = (args["--car_noplate_detect_enabled"].compare("true") == 0);
    }
    if (args.find("--ienv_enabled") != args.end()) {
        isIENVEnabled = (args["--ienv_enabled"].compare("true") == 0);
    }
    if (args.find("--openvino_enabled") != args.end()) {
        isOpenVinoEnabled = (args["--openvino_enabled"].compare("true") == 0);
    }
    if (args.find("--openvino_device") != args.end()) {
        openvinoDevice = args["--openvino_device"];
    }
    if (args.find("--klass_lpci_enabled") != args.end()) {
        isKlassLPCI_Enabled = (args["--klass_lpci_enabled"].compare("true") == 0);
    }
    if (args.find("--klass_vcr_enabled") != args.end()) {
        isKlassVCR_Enabled = (args["--klass_vcr_enabled"].compare("true") == 0);
    }
    if (args.find("--klass_vmmr_enabled") != args.end()) {
        isKlassVMMR_Enabled = (args["--klass_vmmr_enabled"].compare("true") == 0);
    }
    if (args.find("--klass_vbsr_enabled") != args.end()) {
        isKlassVBSR_Enabled = (args["--klass_vbsr_enabled"].compare("true") == 0);
    }
    if (args.find("--tokenfile") != args.end()) {
        licenseTokenFile = args["--tokenfile"];
#if defined(_WIN32)
        std::replace(licenseTokenFile.begin(), licenseTokenFile.end(), '\\', '/');
#endif
    }
    if (args.find("--tokendata") != args.end()) {
        licenseTokenData = args["--tokendata"];
    }

    // Update JSON config
    std::string jsonConfig = __jsonConfig;
    if (!assetsFolder.empty()) {
        jsonConfig += std::string(",\"assets_folder\": \"") + assetsFolder + std::string("\"");
    }
    if (!charset.empty()) {
        jsonConfig += std::string(",\"charset\": \"") + charset + std::string("\"");
    }
    jsonConfig += std::string(",\"recogn_rectify_enabled\": ") + (isRectificationEnabled ? "true" : "false");   
    jsonConfig += std::string(",\"car_noplate_detect_enabled\": ") + (isCarNoPlateDetectEnabled ? "true" : "false");
    jsonConfig += std::string(",\"ienv_enabled\": ") + (isIENVEnabled ? "true" : "false");
    jsonConfig += std::string(",\"openvino_enabled\": ") + (isOpenVinoEnabled ? "true" : "false");
    if (!openvinoDevice.empty()) {
        jsonConfig += std::string(",\"openvino_device\": \"") + openvinoDevice + std::string("\"");
    }
    jsonConfig += std::string(",\"klass_lpci_enabled\": ") + (isKlassLPCI_Enabled ? "true" : "false");
    jsonConfig += std::string(",\"klass_vcr_enabled\": ") + (isKlassVCR_Enabled ? "true" : "false");
    jsonConfig += std::string(",\"klass_vmmr_enabled\": ") + (isKlassVMMR_Enabled ? "true" : "false");
    jsonConfig += std::string(",\"klass_vbsr_enabled\": ") + (isKlassVBSR_Enabled ? "true" : "false");
    if (!licenseTokenFile.empty()) {
        jsonConfig += std::string(",\"license_token_file\": \"") + licenseTokenFile + std::string("\"");
    }
    if (!licenseTokenData.empty()) {
        jsonConfig += std::string(",\"license_token_data\": \"") + licenseTokenData + std::string("\"");
    }

    jsonConfig += "}"; // end-of-config

    // Decode image
    AlprFile fileImage;
    if (!alprDecodeFile(pathFileImage, fileImage)) {
        ULTALPR_SDK_PRINT_INFO("Failed to read image file: %s", pathFileImage.c_str());
        return -1;
    }

        cv::Mat frame;
        cv::VideoCapture cap("video.mp4");

        if (!cap.isOpened()) {
                std::cout << "Cannot open the video" << std::endl;
                return -1;
        }

    // Init
    ULTALPR_SDK_PRINT_INFO("Starting recognizer...");
    MyUltAlprSdkParallelDeliveryCallback parallelDeliveryCallbackCallback(charset);
    ULTALPR_SDK_ASSERT((result = UltAlprSdkEngine::init(
        ASSET_MGR_PARAM()
        jsonConfig.c_str(),
        isParallelDeliveryEnabled ? &parallelDeliveryCallbackCallback : nullptr
    )).isOK());
        while (1) {

        cap >> frame;
        if (frame.empty())
            break;
    // Recognize/Process
    // We load the models when this function is called for the first time. This make the first inference slow.
    // Use benchmark application to compute the average inference time: https://github.com/DoubangoTelecom/ultimateALPR-SDK/tree/master/samples/c%2B%2B/benchmark
    ULTALPR_SDK_ASSERT((result = UltAlprSdkEngine::process(
        //frame.type, // If you're using data from your camera then, the type would be YUV-family instead of RGB-family. https://www.doubango.org/SDKs/anpr/docs/cpp-api.html#_CPPv4N15ultimateAlprSdk22ULTALPR_SDK_IMAGE_TYPEE
        //frame.uncompressedData,
        //frame.width,
        //frame.height
               ULTALPR_SDK_IMAGE_TYPE_BGR24,
                        frame.ptr(),
                        frame.size().width,
                        frame.size().height

    )).isOK());
    ULTALPR_SDK_PRINT_INFO("Processing done.");

    // Print latest result
    if (!isParallelDeliveryEnabled && result.json()) { // for parallel delivery the result will be printed by the callback function
        const std::string& json_ = result.json();
        if (!json_.empty()) {
            ULTALPR_SDK_PRINT_INFO("result: %s", json_.c_str());
        }
    }

       char c=(char)waitKey(25);
       if(c==27)
           break;

        }

        cap.release();
        destroyAllWindows();

    ULTALPR_SDK_PRINT_INFO("Press any key to terminate !!");
    getchar();

    // DeInit
    ULTALPR_SDK_PRINT_INFO("Ending recognizer...");
    ULTALPR_SDK_ASSERT((result = UltAlprSdkEngine::deInit()).isOK());

    return 0;
}

/*
* Print usage
*/
static void printUsage(const std::string& message /*= ""*/)
{
    if (!message.empty()) {
        ULTALPR_SDK_PRINT_ERROR("%s", message.c_str());
    }

    ULTALPR_SDK_PRINT_INFO(
        "\n********************************************************************************\n"
        "recognizer\n"
        "\t--image <path-to-image-with-to-recognize> \n"
        "\t[--assets <path-to-assets-folder>] \n"
        "\t[--charset <recognition-charset:latin/korean/chinese>] \n"
        "\t[--car_noplate_detect_enabled <whether-to-enable-detecting-cars-with-no-plate:true/false>] \n"
        "\t[--ienv_enabled <whether-to-enable-IENV:true/false>] \n"
        "\t[--openvino_enabled <whether-to-enable-OpenVINO:true/false>] \n"
        "\t[--openvino_device <openvino_device-to-use>] \n"
        "\t[--klass_lpci_enabled <whether-to-enable-LPCI:true/false>] \n"
        "\t[--klass_vcr_enabled <whether-to-enable-VCR:true/false>] \n"
        "\t[--klass_vmmr_enabled <whether-to-enable-VMMR:true/false>] \n"
        "\t[--klass_vbsr_enabled <whether-to-enable-VBSR:true/false>] \n"
        "\t[--parallel <whether-to-enable-parallel-mode:true / false>] \n"
        "\t[--rectify <whether-to-enable-rectification-layer:true / false>] \n"
        "\t[--tokenfile <path-to-license-token-file>] \n"
        "\t[--tokendata <base64-license-token-data>] \n"
        "\n"
        "Options surrounded with [] are optional.\n"
        "\n"
        "--image: Path to the image(JPEG/PNG/BMP) to process. You can use default image at ../../../assets/images/lic_us_1280x720.jpg.\n\n"
        "--assets: Path to the assets folder containing the configuration files and models. Default value is the current folder.\n\n"
        "--charset: Defines the recognition charset (a.k.a alphabet) value (latin, korean, chinese...). Default: latin.\n\n"
        "--charset: Defines the recognition charset value (latin, korean, chinese...). Default: latin.\n\n"
        "--car_noplate_detect_enabled: Whether to detect and return cars with no plate. Default: false.\n\n"
        "--ienv_enabled: Whether to enable Image Enhancement for Night-Vision (IENV). More info about IENV at https://www.doubango.org/SDKs/anpr/docs/Features.html#image-enhancement-for-night-vision-ienv. Default: true for x86-64 and false for ARM.\n\n"
        "--openvino_enabled: Whether to enable OpenVINO. Tensorflow will be used when OpenVINO is disabled. Default: true.\n\n"
        "--openvino_device: Defines the OpenVINO device to use (CPU, GPU, FPGA...). More info at https://www.doubango.org/SDKs/anpr/docs/Configuration_options.html#openvino_device. Default: CPU.\n\n"
        "--klass_lpci_enabled: Whether to enable License Plate Country Identification (LPCI). More info at https://www.doubango.org/SDKs/anpr/docs/Features.html#license-plate-country-identification-lpci. Default: false.\n\n"
        "--klass_vcr_enabled: Whether to enable Vehicle Color Recognition (VCR). More info at https://www.doubango.org/SDKs/anpr/docs/Features.html#vehicle-color-recognition-vcr. Default: false.\n\n"
        "--klass_vmmr_enabled: Whether to enable Vehicle Make Model Recognition (VMMR). More info at https://www.doubango.org/SDKs/anpr/docs/Features.html#vehicle-make-model-recognition-vmmr. Default: false.\n\n"
        "--klass_vbsr_enabled: Whether to enable Vehicle Body Style Recognition (VBSR). More info at https://www.doubango.org/SDKs/anpr/docs/Features.html#vehicle-make-model-recognition-vbsr. Default: false.\n\n"
        "--parallel: Whether to enabled the parallel mode.More info about the parallel mode at https://www.doubango.org/SDKs/anpr/docs/Parallel_versus_sequential_processing.html. Default: true.\n\n"
        "--rectify: Whether to enable the rectification layer. More info about the rectification layer at https ://www.doubango.org/SDKs/anpr/docs/Rectification_layer.html. Default: false.\n\n"
        "--tokenfile: Path to the file containing the base64 license token if you have one. If not provided then, the application will act like a trial version. Default: null.\n\n"
        "--tokendata: Base64 license token if you have one. If not provided then, the application will act like a trial version. Default: null.\n\n"
        "********************************************************************************\n"
    );
}

=====================

=====THE VIDEO FILE LOG (GETTING ONLY HIDDEN OUTPUT=======

anpr@anpr-desktop:~/ultimateALPR-SDK/binaries/jetson_tftrt/aarch64$ LD_LIBRARY_PATH=../../../binaries/jetson_tftrt/aarch64:$LD_LIBRARY_PATH ./recog_1    --image ../../../assets/images/lic_us_1280x720.jpg     --assets ../../../assets     --charset latin     --parallel false     --rectify true    --tokendata XYHSA@12
2021-08-14 10:35:27.151362: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.2
*[ULTALPR_SDK INFO]: Starting recognizer...
*[COMPV INFO]: [UltAlprSdkEngine] Call: init
*[COMPV INFO]: [UltAlprSdkEngine] jsonConfig: {"debug_level": "info","debug_write_input_image_enabled": false,"debug_internal_data_path": ".","num_threads": -1,"klass_vcr_gamma": 1.5,"detect_roi": [0, 0, 0, 0],"detect_minscore": 0.1,"car_noplate_detect_min_score": 0.8,"pyramidal_search_enabled": true,"pyramidal_search_sensitivity": 1.0,"pyramidal_search_minscore": 0.3,"pyramidal_search_min_image_size_inpixels": 800,"recogn_minscore": 0.3,"recogn_score_type": "min","recogn_rectify_enabled": false,"assets_folder": "/home/anpr/ultimateALPR-SDK/assets","charset": "latin","car_noplate_detect_enabled": false,"gpgpu_enabled": false,"ienv_enabled": false,"openvino_enabled": false,"klass_lpci_enabled": false,"klass_vcr_enabled": false,"klass_vmmr_enabled": false,"klass_vbsr_enabled": false},"assets_folder": "../../../assets","charset": "latin","recogn_rectify_enabled": true,"car_noplate_detect_enabled": false,"ienv_enabled": false,"openvino_enabled": true,"openvino_device": "CPU","klass_lpci_enabled": false,"klass_vcr_enabled": false,"klass_vmmr_enabled": false,"klass_vbsr_enabled": false,"license_token_data": "XYHSA@12"}
*[COMPV INFO]: [UltAlprSdkEngine] **** Copyright (C) 2011-2021 Doubango Telecom <https://www.doubango.org> ****
ultimateALPR-SDK <https://github.com/DoubangoTelecom/ultimateALPR-SDK> version 3.3.0

*[COMPV INFO]: [CompVBase] Initializing [base] modules (v 1.0.0, nt -1)...
*[COMPV INFO]: [CompVBase] sizeof(compv_scalar_t)= #8
*[COMPV INFO]: [CompVBase] sizeof(float)= #4
*[COMPV INFO]: Initializing window registery
*[COMPV INFO]: [ImageDecoder] Initializing image decoder...
*[COMPV INFO]: [CompVCpu] H: '', S: '', M: '', MN: 'ARMv8 Processor rev 1 (v8l)'
*[COMPV INFO]: [CompVBase] CPU features: [arm];[arm64];neon;neon_fma;vfpv4;
*[COMPV INFO]: [CompVBase] CPU cores: #4
*[COMPV INFO]: [CompVBase] CPU cache1: line size: #64B, size :#0KB
*[COMPV INFO]: [CompVBase] CPU Phys RAM size: #3962GB
*[COMPV INFO]: [CompVBase] CPU endianness: LITTLE
*[COMPV INFO]: [CompVBase] Binary type: AArch64
*[COMPV INFO]: [CompVBase] Intrinsic enabled
*[COMPV INFO]: [CompVBase] Assembler enabled
*[COMPV INFO]: [CompVBase] Code built with option /arch:NEON
*[COMPV INFO]: [CompVBase] OS name: Jetson
*[COMPV INFO]: [CompVBase] Math Fast Trig.: true
*[COMPV INFO]: [CompVBase] Math Fixed Point: true
*[COMPV INFO]: [CompVMathExp] Init
*[COMPV INFO]: [CompVBase] Default alignment: #32
*[COMPV INFO]: [CompVBase] Best alignment: #32
*[COMPV INFO]: [CompVBase] Heap limit: #262144KB (#256MB)
*[COMPV INFO]: [CompVParallel] Initializing [parallel] module...
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=0,set=useless, threadId:0x7f6c20fa70, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=1,set=useless, threadId:0x7f6ba0ea70, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVThreadDispatcher] Thread dispatcher created with #4 threads/#4 cores
*[COMPV INFO]: [CompVParallel] [Parallel] module initialized
*[COMPV INFO]: [CompVBase] [Base] modules initialized
*[COMPV INFO]: [CompVCore] Initializing [core] module (v 1.0.0)...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 1 and name = 'FAST (Features from Accelerated Segment Test)'...
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=3,set=useless, threadId:0x7f6aa0ca70, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 8 and name = 'ORB (Oriented FAST and Rotated BRIEF)'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 27 and name = 'Sobel edge detector'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 28 and name = 'Scharr edge detector'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 29 and name = 'Prewitt edge detector'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 20 and name = 'Canny edge detector'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 30 and name = 'Hough standard (STD)'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 31 and name = 'Kernel-based Hough transform (KHT)'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 41 and name = 'Standard Histogram of oriented gradients (S-HOG)'...
*[COMPV INFO]: [CompVMatcher] Registering matcher factory with id = 0 and name = 'Brute force matcher'...
*[COMPV INFO]: [CompVConnectedComponentLabeling] Registering connected component labeling factory with id = 1 and name = 'PLSL (Parallel Light Speed Labeling)'...
*[COMPV INFO]: [CompVConnectedComponentLabeling] Registering connected component labeling factory with id = 19 and name = 'LMSER (Linear Time Maximally Stable Extremal Regions)'...
*[COMPV INFO]: [CompVGL] Initializing [gl] module (v 1.0.0)...
*[COMPV INFO]: [CompVGL] GL module initialized
*[COMPV INFO]: [CompVGpu] Initializing [gpu] module (v 1.0.0)...
*[COMPV INFO]: [CompVCamera] Initializing [camera] module (v 1.0.0)...
*[COMPV INFO]: [CompVDrawing] Initializing [drawing] module (v 1.0.0)...
*[COMPV INFO]: [CompVDrawing] /!\ No jpeg decoder found
*[COMPV INFO]: [CompVDrawing] Drawing module initialized
*[COMPV INFO]: [CompVGpu] GPU enabled: false
*[COMPV INFO]: /!\ Code in file '/home/ultimate/ultimateBase/lib/source/ultimate_base_engine.cxx' in function 'init' starting at line #75: Not optimized for GPU -> GPGPU computing not enabled or deactivated
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=2,set=useless, threadId:0x7f6b20da70, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [UltOcrEngine] Tensorflow version: 2.4.0-rc1
*[COMPV INFO]: [UltAlprSdkEnginePrivate] **** Copyright (C) 2011-2021 Doubango Telecom <https://www.doubango.org> ****
You're using an unlicensed version of ultimateALPR-SDK <https://github.com/DoubangoTelecom/ultimateALPR-SDK>
without the rights to include the SDK in any form of commercial product.
*[COMPV INFO]: [UltAlprSdkEnginePrivate] IC took 0 millis
*[COMPV INFO]: [CompVCpu] Enabling asm code
*[COMPV INFO]: [CompVCpu] Enabling intrinsic code
*[COMPV INFO]: [UltAlprSdkEnginePrivate] pysearch_sensitivity(1.000000) >= 1.0, using the most accurate model possible. More info at https://www.doubango.org/SDKs/anpr/docs/Improving_the_accuracy.html#golden-number.
*[COMPV INFO]: [UltAlprSdkEnginePrivate] recogn_tf_num_threads: 4
2021-08-14 10:35:27.799967: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-08-14 10:35:27.805455: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2021-08-14 10:35:27.848338: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:908] ARM64 does not support NUMA - returning NUMA node zero
2021-08-14 10:35:27.848545: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties: 
pciBusID: 0000:00:00.0 name: NVIDIA Tegra X1 computeCapability: 5.3
coreClock: 0.9216GHz coreCount: 1 deviceMemorySize: 3.87GiB deviceMemoryBandwidth: 194.55MiB/s
2021-08-14 10:35:27.848662: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.2
2021-08-14 10:35:28.021558: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.10
2021-08-14 10:35:28.021852: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.10
2021-08-14 10:35:28.103639: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2021-08-14 10:35:28.214778: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2021-08-14 10:35:28.355769: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.10
2021-08-14 10:35:28.439532: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.10
2021-08-14 10:35:28.446625: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8
2021-08-14 10:35:28.447214: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:908] ARM64 does not support NUMA - returning NUMA node zero
2021-08-14 10:35:28.447945: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:908] ARM64 does not support NUMA - returning NUMA node zero
2021-08-14 10:35:28.448433: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2021-08-14 10:35:28.450258: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.2
2021-08-14 10:35:33.907329: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-08-14 10:35:33.907418: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]      0 
2021-08-14 10:35:33.907459: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0:   N 
2021-08-14 10:35:33.907838: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:908] ARM64 does not support NUMA - returning NUMA node zero
2021-08-14 10:35:33.908097: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:908] ARM64 does not support NUMA - returning NUMA node zero
2021-08-14 10:35:33.908309: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:908] ARM64 does not support NUMA - returning NUMA node zero
2021-08-14 10:35:33.908440: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3962 MB memory) -> physical GPU (device: 0, name: NVIDIA Tegra X1, pci bus id: 0000:00:00.0, compute capability: 5.3)
*[COMPV INFO]: [CompVSharedLib] Loaded shared lib: /home/anpr/ultimateALPR-SDK/binaries/jetson_tftrt/aarch64/libultimatePluginTensorRT.so
*[PLUGIN_TENSORRT INFO]: [TensorRT Inference] Loading TensorRT local plugins...
*[PLUGIN_TENSORRT INFO]: [TensorRT Inference] Loading TensorRT local plugins done.
***[PLUGIN_TENSORRT ERROR]: function: "log()" 
file: "/home/projects/ultimateTRT/pluginTensorRT/source/plugin_tensorrt_inference_engine.cxx" 
line: "33" 
message: [TensorRT Inference] From logger: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
2021-08-14 10:35:38.815251: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8
2021-08-14 10:35:41.667237: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.10
*[COMPV INFO]: [CompVSharedLib] Loaded shared lib: /home/anpr/ultimateALPR-SDK/binaries/jetson_tftrt/aarch64/libultimatePluginTensorRT.so
***[PLUGIN_TENSORRT ERROR]: function: "log()" 
file: "/home/projects/ultimateTRT/pluginTensorRT/source/plugin_tensorrt_inference_engine.cxx" 
line: "33" 
message: [TensorRT Inference] From logger: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/image/compv_image_conv_to_rgbx.cxx' in function 'rgbx' starting at line #560: Not optimized -> No in-place conversion found for BGRA32/BGR24 -> RGB24. You should consider using RGBA32/RGB24 instead of BGRA32/BGR24
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/intrin/arm/compv_mem_intrin_neon.cxx' in function 'CompVMemUnpack3_Intrin_NEON' starting at line #96: Not optimized -> ASM code faster
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 2 -> 1
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 2 -> 1
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 2 -> 1
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 2 -> 0
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/compv_mem.cxx' in function 'CompVMemCopy_C' starting at line #956: Not optimized -> No SIMD implementation found. On ARM consider http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka13544.html
2021-08-14 10:35:52.118949: W tensorflow/core/platform/profile_utils/cpu_utils.cc:116] Failed to find bogomips or clock in /proc/cpuinfo; cannot determine CPU frequency
2021-08-14 10:35:55.035138: I tensorflow/compiler/tf2tensorrt/common/utils.cc:58] Linked TensorRT version: 7.1.3
2021-08-14 10:35:55.036627: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libnvinfer.so.7
2021-08-14 10:35:55.036823: I tensorflow/compiler/tf2tensorrt/common/utils.cc:60] Loaded TensorRT version: 7.1.3
2021-08-14 10:35:55.038300: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libnvinfer_plugin.so.7
*[ULTALPR_SDK INFO]: Processing done.
*[ULTALPR_SDK INFO]: result: {"duration":117080,"frame_id":0,"plates":[{"car":{"confidence":56.71895,"warpedBox":[930.6198,164.4178,1072.409,164.4178,1072.409,270.981,930.6198,270.981]},"confidences":[39.10286,99.84724,39.10286,90.57087,61.66218,90.12225,89.11861,90.79021,90.73245],"text":"ML57ZY*","warpedBox":[981.421,236.3304,1032.929,236.3304,1032.929,259.6312,981.421,259.6312]},{"car":{"confidence":99.99997,"warpedBox":[41.63523,361.6184,259.8984,361.6184,259.8984,543.4509,41.63523,543.4509]},"confidences":[89.04491,97.57922,89.38998,90.22331,89.56444,90.11355,89.04491,90.79486,90.75546],"text":"HG53LL*","warpedBox":[113.6906,445.558,182.6973,445.558,182.6973,472.9902,113.6906,472.9902]}]}
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 2 -> 1
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 2 -> 1
*[ULTALPR_SDK INFO]: Processing done.
*[ULTALPR_SDK INFO]: result: {"duration":273,"frame_id":1,"plates":[{"car":{"confidence":99.9999,"warpedBox":[46.50862,353.1401,261.4158,353.1401,261.4158,537.769,46.50862,537.769]},"confidences":[52.98632,93.64616,90.44177,52.98632,88.86395,90.19672,55.49805,89.19109,90.60928],"text":"H053LL*","warpedBox":[105.3337,428.9704,204.2812,428.9704,204.2812,466.7018,105.3337,466.7018]}]}
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 1 -> 0
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 3 -> 1
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 2 -> 1
*[ULTALPR_SDK INFO]: Processing done.
*[ULTALPR_SDK INFO]: result: {"duration":265,"frame_id":2,"plates":[{"car":{"confidence":30.14721,"warpedBox":[918.1094,150.812,1081.081,150.812,1081.081,292.7214,918.1094,292.7214]},"confidences":[73.44829,98.9759,73.44829,90.4642,90.474,90.16226,88.05311,89.96651,90.37245],"text":"ML57ZY*","warpedBox":[994.267,241.8029,1045.085,241.8029,1045.085,264.4538,994.267,264.4538]},{"car":{"confidence":99.99958,"warpedBox":[47.01932,342.7633,263.6011,342.7633,263.6011,526.7737,47.01932,526.7737]},"confidences":[31.10059,86.79837,88.8581,92.09056,90.4345,89.25504,31.10059,89.3662,91.42932],"text":"HG53LL*","warpedBox":[103.0916,419.9209,199.4365,419.9209,199.4365,457.2982,103.0916,457.2982]}]}
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 2 -> 1
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 1 -> 0
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 3 -> 1
*[COMPV INFO]: [UltAlprPysearch] Small plates removed after Pysearch: 2 -> 1
*[ULTALPR_SDK INFO]: Processing done.

====Output log from single image (GETTING FULL NUMBER PLATE EASILY)==================

// ./recogizer    --image ../../../assets/images/lic_us_1280x720.jpg     --assets ../../../assets     --charset latin     --parallel false
//     --rectify true    --tokendata XYHSA@12

anpr@anpr-desktop:~/ultimateALPR-SDK/binaries/jetson_tftrt/aarch64$ LD_LIBRARY_PATH=../../../binaries/jetson_tftrt/aarch64:$LD_LIBRARY_PATH ./recog    --image ../../../assets/images/lic_us_1280x720.jpg     --assets ../../../assets     --charset latin     --parallel false     --rectify true    --tokendata XYHSA@12
2021-08-14 12:40:03.971456: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.2
*[ULTALPR_SDK INFO]: Starting recognizer...
*[COMPV INFO]: [UltAlprSdkEngine] Call: init
*[COMPV INFO]: [UltAlprSdkEngine] jsonConfig: {"debug_level": "info","debug_write_input_image_enabled": false,"debug_internal_data_path": ".","num_threads": -1,"gpgpu_enabled": true,"klass_vcr_gamma": 1.5,"detect_roi": [0, 0, 0, 0],"detect_minscore": 0.1,"car_noplate_detect_min_score": 0.8,"pyramidal_search_enabled": true,"pyramidal_search_sensitivity": 1.0,"pyramidal_search_minscore": 0.3,"pyramidal_search_min_image_size_inpixels": 800,"recogn_minscore": 0.3,"recogn_score_type": "min","assets_folder": "../../../assets","charset": "latin","recogn_rectify_enabled": true,"car_noplate_detect_enabled": false,"ienv_enabled": false,"openvino_enabled": true,"openvino_device": "CPU","klass_lpci_enabled": false,"klass_vcr_enabled": false,"klass_vmmr_enabled": false,"klass_vbsr_enabled": false,"license_token_data": "XYHSA@12"}
*[COMPV INFO]: [UltAlprSdkEngine] **** Copyright (C) 2011-2021 Doubango Telecom <https://www.doubango.org> ****
ultimateALPR-SDK <https://github.com/DoubangoTelecom/ultimateALPR-SDK> version 3.3.0

*[COMPV INFO]: [CompVBase] Initializing [base] modules (v 1.0.0, nt -1)...
*[COMPV INFO]: [CompVBase] sizeof(compv_scalar_t)= #8
*[COMPV INFO]: [CompVBase] sizeof(float)= #4
*[COMPV INFO]: Initializing window registery
*[COMPV INFO]: [ImageDecoder] Initializing image decoder...
*[COMPV INFO]: [CompVCpu] H: '', S: '', M: '', MN: 'ARMv8 Processor rev 1 (v8l)'
*[COMPV INFO]: [CompVBase] CPU features: [arm];[arm64];neon;neon_fma;vfpv4;
*[COMPV INFO]: [CompVBase] CPU cores: #4
*[COMPV INFO]: [CompVBase] CPU cache1: line size: #64B, size :#0KB
*[COMPV INFO]: [CompVBase] CPU Phys RAM size: #3962GB
*[COMPV INFO]: [CompVBase] CPU endianness: LITTLE
*[COMPV INFO]: [CompVBase] Binary type: AArch64
*[COMPV INFO]: [CompVBase] Intrinsic enabled
*[COMPV INFO]: [CompVBase] Assembler enabled
*[COMPV INFO]: [CompVBase] Code built with option /arch:NEON
*[COMPV INFO]: [CompVBase] OS name: Jetson
*[COMPV INFO]: [CompVBase] Math Fast Trig.: true
*[COMPV INFO]: [CompVBase] Math Fixed Point: true
*[COMPV INFO]: [CompVMathExp] Init
*[COMPV INFO]: [CompVBase] Default alignment: #32
*[COMPV INFO]: [CompVBase] Best alignment: #32
*[COMPV INFO]: [CompVBase] Heap limit: #262144KB (#256MB)
*[COMPV INFO]: [CompVParallel] Initializing [parallel] module...
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=0,set=useless, threadId:0x7f6181cde0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=1,set=useless, threadId:0x7f6101bde0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVThreadDispatcher] Thread dispatcher created with #4 threads/#4 cores
*[COMPV INFO]: [CompVParallel] [Parallel] module initialized
*[COMPV INFO]: [CompVBase] [Base] modules initialized
*[COMPV INFO]: [CompVCore] Initializing [core] module (v 1.0.0)...
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=2,set=useless, threadId:0x7f6081ade0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=3,set=useless, threadId:0x7f60019de0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 1 and name = 'FAST (Features from Accelerated Segment Test)'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 8 and name = 'ORB (Oriented FAST and Rotated BRIEF)'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 27 and name = 'Sobel edge detector'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 28 and name = 'Scharr edge detector'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 29 and name = 'Prewitt edge detector'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 20 and name = 'Canny edge detector'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 30 and name = 'Hough standard (STD)'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 31 and name = 'Kernel-based Hough transform (KHT)'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 41 and name = 'Standard Histogram of oriented gradients (S-HOG)'...
*[COMPV INFO]: [CompVMatcher] Registering matcher factory with id = 0 and name = 'Brute force matcher'...
*[COMPV INFO]: [CompVConnectedComponentLabeling] Registering connected component labeling factory with id = 1 and name = 'PLSL (Parallel Light Speed Labeling)'...
*[COMPV INFO]: [CompVConnectedComponentLabeling] Registering connected component labeling factory with id = 19 and name = 'LMSER (Linear Time Maximally Stable Extremal Regions)'...
*[COMPV INFO]: [CompVGL] Initializing [gl] module (v 1.0.0)...
*[COMPV INFO]: [CompVGL] GL module initialized
*[COMPV INFO]: [CompVGpu] Initializing [gpu] module (v 1.0.0)...
*[COMPV INFO]: [CompVCamera] Initializing [camera] module (v 1.0.0)...
*[COMPV INFO]: [CompVDrawing] Initializing [drawing] module (v 1.0.0)...
*[COMPV INFO]: [CompVDrawing] /!\ No jpeg decoder found
*[COMPV INFO]: [CompVDrawing] Drawing module initialized
*[COMPV INFO]: [CompVGpu] GPU enabled: true
*[COMPV INFO]: /!\ Code in file '/home/ultimate/ultimateBase/lib/source/ultimate_base_engine.cxx' in function 'init' starting at line #75: Not optimized for GPU -> GPGPU computing not enabled or deactivated
*[COMPV INFO]: [UltBaseOpenCL] Trying to load [libOpenCL.so]
*[COMPV INFO]: [UltBaseOpenCL] Failed to load [libOpenCL.so]
*[COMPV INFO]: [UltOcrEngine] Tensorflow version: 2.4.0-rc1
*[COMPV INFO]: [UltBaseEngine] UltBaseEngineReadSystemFile: fgets[18446744073709551615] returned valid string
*[COMPV INFO]: [UltBaseEngine] UltBaseEngineReadSystemFile: fgets[0] returned valid string
*[COMPV INFO]: [UltBaseEngine] UltBaseEngineReadSystemFile: fgets[18446744073709551614] returned valid string
*[COMPV INFO]: [UltBaseEngine] [Activation][S] If you try to activate a license, you'll be fine
*[COMPV INFO]: [UltAlprSdkEnginePrivate] IC took 0 millis
*[COMPV INFO]: [CompVCpu] Enabling asm code
*[COMPV INFO]: [CompVCpu] Enabling intrinsic code
*[COMPV INFO]: [UltAlprSdkEnginePrivate] pysearch_sensitivity(1.000000) >= 1.0, using the most accurate model possible. More info at https://www.doubango.org/SDKs/anpr/docs/Improving_the_accuracy.html#golden-number.
*[COMPV INFO]: [UltAlprSdkEnginePrivate] recogn_tf_num_threads: 4
2021-08-14 12:40:04.545765: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-08-14 12:40:04.626333: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2021-08-14 12:40:04.678900: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:908] ARM64 does not support NUMA - returning NUMA node zero
2021-08-14 12:40:04.679081: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties: 
pciBusID: 0000:00:00.0 name: NVIDIA Tegra X1 computeCapability: 5.3
coreClock: 0.9216GHz coreCount: 1 deviceMemorySize: 3.87GiB deviceMemoryBandwidth: 194.55MiB/s
2021-08-14 12:40:04.679167: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.2
2021-08-14 12:40:04.847999: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.10
2021-08-14 12:40:04.848401: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.10
2021-08-14 12:40:04.936831: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2021-08-14 12:40:05.046689: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2021-08-14 12:40:05.187578: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.10
2021-08-14 12:40:05.266388: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.10
2021-08-14 12:40:05.273958: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8
2021-08-14 12:40:05.274122: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:908] ARM64 does not support NUMA - returning NUMA node zero
2021-08-14 12:40:05.274288: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:908] ARM64 does not support NUMA - returning NUMA node zero
2021-08-14 12:40:05.274404: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2021-08-14 12:40:05.274510: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.2
2021-08-14 12:40:10.781812: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-08-14 12:40:10.781936: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]      0 
2021-08-14 12:40:10.781985: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0:   N 
2021-08-14 12:40:10.782267: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:908] ARM64 does not support NUMA - returning NUMA node zero
2021-08-14 12:40:10.782461: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:908] ARM64 does not support NUMA - returning NUMA node zero
2021-08-14 12:40:10.782613: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:908] ARM64 does not support NUMA - returning NUMA node zero
2021-08-14 12:40:10.782744: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3962 MB memory) -> physical GPU (device: 0, name: NVIDIA Tegra X1, pci bus id: 0000:00:00.0, compute capability: 5.3)
*[COMPV INFO]: [CompVSharedLib] Loaded shared lib: /home/anpr/ultimateALPR-SDK/binaries/jetson_tftrt/aarch64/libultimatePluginTensorRT.so
*[PLUGIN_TENSORRT INFO]: [TensorRT Inference] Loading TensorRT local plugins...
*[PLUGIN_TENSORRT INFO]: [TensorRT Inference] Loading TensorRT local plugins done.
***[PLUGIN_TENSORRT ERROR]: function: "log()" 
file: "/home/projects/ultimateTRT/pluginTensorRT/source/plugin_tensorrt_inference_engine.cxx" 
line: "33" 
message: [TensorRT Inference] From logger: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
2021-08-14 12:40:15.759289: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8
2021-08-14 12:40:18.546405: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.10
*[COMPV INFO]: [CompVSharedLib] Loaded shared lib: /home/anpr/ultimateALPR-SDK/binaries/jetson_tftrt/aarch64/libultimatePluginTensorRT.so
***[PLUGIN_TENSORRT ERROR]: function: "log()" 
file: "/home/projects/ultimateTRT/pluginTensorRT/source/plugin_tensorrt_inference_engine.cxx" 
line: "33" 
message: [TensorRT Inference] From logger: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/intrin/arm/compv_mem_intrin_neon.cxx' in function 'CompVMemUnpack3_Intrin_NEON' starting at line #96: Not optimized -> ASM code faster
*[COMPV INFO]: /!\ Code in file '/home/ultimate/ultimateText/lib/source/ultimate_text_fuser.cxx' in function 'process' starting at line #189: Is for testing and must not be called -> Fragments should be trimmed
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/math/compv_math_matrix.cxx' in function 'mulAtA' starting at line #879: Contains a TODO: -> Deprecated: use CompVMath::mulAB
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/math/compv_math_matrix.cxx' in function 'transpose' starting at line #619: Not optimized -> No MT implementation could be found
*[COMPV INFO]: /!\ Code in file '/home/ultimate/ultimateText/lib/source/ultimate_text_slant.cxx' in function 'applyTransformation' starting at line #90: Not optimized -> Bundle homogenous transformation + transpose + mulABt + homogeneousToCartesian2D
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/math/compv_math_matrix.cxx' in function 'transpose' starting at line #619: Not optimized -> No MT implementation could be found
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/math/compv_math_transform.cxx' in function 'homogeneousToCartesian2D' starting at line #98: Not optimized -> No SIMD or GPU implementation found
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/math/compv_math_matrix.cxx' in function 'invA3x3' starting at line #515: Not optimized -> No SIMD or GPU implementation found.
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/compv_mem.cxx' in function 'CompVMemCopy_C' starting at line #956: Not optimized -> No SIMD implementation found. On ARM consider http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka13544.html
2021-08-14 12:40:27.746596: W tensorflow/core/platform/profile_utils/cpu_utils.cc:116] Failed to find bogomips or clock in /proc/cpuinfo; cannot determine CPU frequency
2021-08-14 12:40:30.150522: I tensorflow/compiler/tf2tensorrt/common/utils.cc:58] Linked TensorRT version: 7.1.3
2021-08-14 12:40:30.150805: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libnvinfer.so.7
2021-08-14 12:40:30.151059: I tensorflow/compiler/tf2tensorrt/common/utils.cc:60] Loaded TensorRT version: 7.1.3
2021-08-14 12:40:30.151299: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libnvinfer_plugin.so.7
*[ULTALPR_SDK INFO]: Processing done.
*[ULTALPR_SDK INFO]: result: {"duration":113282,"frame_id":0,"plates":[{"car":{"confidence":99.9999,"warpedBox":[78.17871,171.6239,1088.733,171.6239,1088.733,607.6115,78.17871,607.6115]},"confidences":[89.66476,99.84826,90.22782,91.27964,91.74539,89.66476,90.53017,90.65504,89.98389],"text":"3PEDLM4","warpedBox":[820.0173,343.1933,941.6364,343.1933,941.6364,406.0498,820.0173,406.0498]}]}
*[ULTALPR_SDK INFO]: Press any key to terminate !!

*[ULTALPR_SDK INFO]: Ending recognizer...
*[COMPV INFO]: [UltAlprSdkEngine] Call: deInit
*[COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)...
*[COMPV INFO]: [Thread] Thread with id=0x7f6181cde0 will join
*[COMPV INFO]: [CompVAsyncTask11] run(threadId:0x7f6181cde0) - EXIT
*[COMPV INFO]: Thread with id=0x7f6181cde0 will join
*[COMPV INFO]: [Thread] ***Thread with id=0x7f6181cde0 destroyed***
*[COMPV INFO]: [Thread] Thread with id=0x7f6101bde0 will join
*[COMPV INFO]: [CompVAsyncTask11] run(threadId:0x7f6101bde0) - EXIT
*[COMPV INFO]: Thread with id=0x7f6101bde0 will join
*[COMPV INFO]: [Thread] ***Thread with id=0x7f6101bde0 destroyed***
*[COMPV INFO]: [Thread] Thread with id=0x7f6081ade0 will join
*[COMPV INFO]: [CompVAsyncTask11] run(threadId:0x7f6081ade0) - EXIT
*[COMPV INFO]: Thread with id=0x7f6081ade0 will join
*[COMPV INFO]: [Thread] ***Thread with id=0x7f6081ade0 destroyed***
*[COMPV INFO]: [Thread] Thread with id=0x7f60019de0 will join
*[COMPV INFO]: [CompVAsyncTask11] run(threadId:0x7f60019de0) - EXIT
*[COMPV INFO]: Thread with id=0x7f60019de0 will join
*[COMPV INFO]: [Thread] ***Thread with id=0x7f60019de0 destroyed***
*[COMPV INFO]: [CompVBase] Base modules deinitialized
*[COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)...
*[COMPV INFO]: [CompVBase] Base modules deinitialized
*[COMPV INFO]: Drawing module deinitialized
*[COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)...
*[COMPV INFO]: [CompVBase] Base modules deinitialized
*[COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)...
*[COMPV INFO]: [CompVBase] Base modules deinitialized
*[COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)...
*[COMPV INFO]: [CompVBase] Base modules deinitialized
*[COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)...
*[COMPV INFO]: [CompVBase] Base modules deinitialized
*[COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)...
*[COMPV INFO]: [CompVBase] Base modules deinitialized
DoubangoTelecom commented 3 years ago

Send us a mail with your company name. As a license owner you received a mail from the support team, use that address to contact us and we'll check your license data.

DoubangoTelecom commented 3 years ago

Based on your ip address and location I can retrieve your company name (NeuralS****). You are not registered as a license owner.

AdityaZ12 commented 3 years ago

Hi Sir,

No problems. Just wanted to know why is the license working on image file then. Ive sent you an email also

DoubangoTelecom commented 3 years ago

Hi Sir,

No problems. Just wanted to know why is the license working on image file then. Ive sent you an email also

You should have been transparent and provided your company name instead of hiding it for obvious reasons. We provided a refund to your company and you're not authorized to use unpaid license.

This said, I will help you. Check the logs and you'll see that your JSON is malformed. You closed the brakes } too soon and the token is ignored.

DoubangoTelecom commented 3 years ago

From your logs: klass_vbsr_enabled": false},"assets_folder notice how you closed the json string then started a new one. The second part contains the token and is ignored.