***[COMPV ERROR]: function: "updateLicenseInfo()"

484 views
Skip to first unread message

Shalini S

unread,
Dec 20, 2021, 4:04:26 PM12/20/21
to doubango-ai
Dear Sir,

The recognizer.cxx code inside the samples/c++/recognizer runs fine with the tokendata.

But doesnt run when we are trying to run it with the modified recognizer.cxx (to work on video.mp4 file). 

Heres the code :-

#include "opencv2/opencv.hpp"
#include "iostream"
#include "ultimateALPR-SDK-API-PUBLIC.h"
#include <fstream>
#include <cmath>
#include <string>
#include "nlohmann/json.hpp"
#include <unistd.h>
#include <opencv2/core/core.hpp>

//FROM BENCHMARK
#include "../alpr_utils.h"
#include <chrono>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include <random>
#include <mutex>
#include <condition_variable>
#include <algorithm>
//END BENCHMARK


// Drawing shapes
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <typeinfo>
#include <iostream>
#include <map>

using std::string;
using namespace cv;
using json = nlohmann::json;
using namespace std;
using namespace std::chrono;
using namespace ultimateAlprSdk;





#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;

// 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\""
"";

// 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 = "");

// Get current date/time, format is YYYY-MM-DD.HH:mm:ss
const std::string currentDateTime() {
    time_t     now = time(0);
    struct tm  tstruct;
    char       buf[80];
    tstruct = *localtime(&now);
    // Visit http://en.cppreference.com/w/cpp/chrono/c/strftime
    // for more information about date/time format
    strftime(buf, sizeof(buf), "%Y-%m-%d.%X", &tstruct);

    return buf;
}



/*
* Entry point
*/
std::string name;
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 = false; // 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

        cv::Mat frame;
        //cv::VideoCapture cap("video.mp4");
        cv::VideoCapture cap("v4l2src device=/dev/video3 ! videoconvert ! videoscale ! video/x-raw, width=640, height=480, framerate=30/1 ! appsink drop=1", cv::CAP_GSTREAMER);
        sleep(5);
       
        std::map<std::string, float> score_dict;

        if (!cap.isOpened()) {
                std::cout << "Cannot open the video" << std::endl;
                return -1;
        }
//UltAlprSdkResult result;
 
        ULTALPR_SDK_ASSERT((result = UltAlprSdkEngine::init(jsonConfig.c_str())).isOK());

        while(1) {

                cap >> frame;
                cv::Size sz = frame.size();
                int imageWidth = sz.width;
                int imageHeight = sz.height;
                std::cout << imageWidth << imageHeight;
                if (frame.empty())
                        break;

                ULTALPR_SDK_ASSERT((result = UltAlprSdkEngine::process(
                        ULTALPR_SDK_IMAGE_TYPE_BGR24,
                        frame.ptr(),
                        frame.size().width,
                        frame.size().height
                )).isOK());
                float perc;
                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 << "==============PLATE================";
                        std::cout << j3["plates"][0]["text"] << "\n";
                        std::cout << json.size();

                        if (json.size()>100)
                         { name =j3["plates"][0]["text"] ;
                          std::cout << name;



                        //SAVE IMG
                         //Mat cropped_image = frame(Range(80,280), Range(150,330));
                        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";
                                    imwrite("/home/anpr/dump/images/"+name+".png", frame(Range(f2,f4), Range(f1,f3)));


               
                            cout << "\n\n";
                        }
                     

                        char c=(char)waitKey(25);
                        if(c==27)
                            {//myFile.close();
                            break;}



        }
         
        cap.release();
        destroyAllWindows();

        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"
        );
}


And heres the error log :-
[ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (935) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
*[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": "ANI6+wWgBUVDUFFVdzBBR1VQRkMuBApERW4nS1FTRkg/KTEAGTwQeEtZREJRdkdXMUFnAlhOaU4+aiwMfC42R3NLSUlRUAkjIBQTBgQJX1t2QEtFVzlyUEF1KXJORUtFKC4nFiRoQU5bRWxlMylPAT1vM31mVyxKS2YwTkFXNAEaN1ptSkAYPV8JFyFtcWxTZzVwCRY7ExkRR3NsfU49W3oxeU5HeFo="}
*[COMPV INFO]: [UltAlprSdkEngine] **** Copyright (C) 2011-2021 Doubango Telecom <https://www.doubango.org> ****
ultimateALPR-SDK <https://github.com/DoubangoTelecom/ultimateALPR-SDK> version 3.5.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: 'Khadas VIM3', S: '***', M: '', MN: ''
*[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: #3707GB
*[COMPV INFO]: [CompVBase] CPU endianness: LITTLE
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/compv_base.cxx' in function 'init' starting at line #195: Not optimized -> Your ARM OS is neither Android nor Raspberry Pi nor iOS nor NVIDIA Jetson. You may miss some optimizations. Let us know what's your OS.
*[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: Generic Linux
*[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]: [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]: [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]: [CompVAsyncTask11] run(coreId:requested=1,set=useless, threadId:0x7f5ffdfbd0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=3,set=useless, threadId:0x7f5efddbd0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=2,set=useless, threadId:0x7f5f7debd0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=0,set=useless, threadId:0x7f64c1cbd0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [UltBaseOpenCL] Loaded [libOpenCL.so], looksLikeValid: yes...
*[COMPV INFO]: [UltBaseOpenCLUtils] Selected platform vendor: Vivante Corporation
*[COMPV INFO]: [UltBaseOpenCLUtils] deviceCount=1
*[COMPV INFO]: [UltBaseOpenCLUtils] Device -> name: Vivante OpenCL Device VIPNano-QI.7120.0000, id: 0x558fb89800
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT=4
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE=0
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_COMPUTE_UNITS=1
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS=3
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_ITEM_SIZES=256, 256, 256,
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_GROUP_SIZE=256
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_CLOCK_FREQUENCY=800 MHz
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE=64 B
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_GLOBAL_MEM_SIZE=268435456 B (256 MB)
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_LOCAL_MEM_SIZE=32768 B (32 KB)
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_MEM_ALLOC_SIZE=128 MB
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_PLATFORM_VERSION=OpenCL 1.2 V6.4.4.3.310723AAA
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_VERSION=OpenCL 1.2
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DRIVER_VERSION=OpenCL 1.2 V6.4.4.3.310723AAA
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_OPENCL_C_VERSION=OpenCL C 1.2
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_EXTENSIONS=cl_khr_byte_addressable_store cl_khr_gl_sharing cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics
*[COMPV INFO]: [UltBaseOpenCL] !!!Booom!!!, OpenCL successfully loaded [libOpenCL.so]
*[COMPV INFO]: [UltOcrEngine] Tensorflow version: 1.12.3
***[COMPV ERROR]: function: "open()"
file: "/home/ultimate/compv/base/compv_sharedlib.cxx"
line: "70"
message: [CompVSharedLib] Failed to load library with path=libultimatePluginOpenVINO.so, Error: libultimatePluginOpenVINO.so: cannot open shared object file: No such file or directory
***[COMPV ERROR]: function: "open()"
file: "/home/ultimate/compv/base/compv_sharedlib.cxx"
line: "72"
message: Operation Failed (COMPV_ERROR_CODE_E_NOT_FOUND) ->
***[COMPV ERROR]: function: "newObj()"
file: "/home/ultimate/compv/base/compv_sharedlib.cxx"
line: "118"
message: Operation Failed (COMPV_ERROR_CODE_E_NOT_FOUND) ->
***[COMPV ERROR]: function: "init()"
file: "/home/ultimate/ultimateALPR/lib/source/ultimate_alpr_plugin.cxx"
line: "97"
message: Operation Failed (COMPV_ERROR_CODE_E_NOT_FOUND) ->
*[COMPV INFO]: [UltBaseEngine] UltBaseEngineReadSystemFile: fgets[18446744073709551615] returned valid string
***[COMPV ERROR]: function: "updateLicenseInfo()"
file: "/home/ultimate/ultimateALPR/SDK_dev/lib/source/ultimate_alpr_sdk_private_engine.cxx"
line: "787"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) -> Field [6]
***[COMPV ERROR]: function: "init()"
file: "/home/ultimate/ultimateALPR/SDK_dev/lib/source/ultimate_alpr_sdk_private_engine.cxx"
line: "143"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) ->
***[COMPV ERROR]: function: "init()"
file: "/home/ultimate/ultimateALPR/SDK_dev/lib/source/ultimate_alpr_sdk_public_engine.cxx"
line: "131"
message: [UltAlprSdkEngine] Failed to initialize the engine
dob: dob.cpp:305: int main(int, char**): Assertion `__ULTALPR_SDK_b_ret' failed.
Aborted


But while running recognizer.cxx with the tokendata, we are getting the correct & full output "3PEDLM4"

 *[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": "ANI6+wWgBUVDUFFVdzBBR1VQRkMuBApERW4nS1FTRkg/KTEAGTwQeEtZREJRdkdXMUFnAlhOaU4+aiwMfC42R3NLSUlRUAkjIBQTBgQJX1t2QEtFVzlyUEF1KXJORUtFKC4nFiRoQU5bRWxlMylPAT1vM31mVyxKS2YwTkFXNAEaN1ptSkAYPV8JFyFtcWxTZzVwCRY7ExkRR3NsfU49W3oxeU5HeFo="}
*[COMPV INFO]: [UltAlprSdkEngine] **** Copyright (C) 2011-2021 Doubango Telecom <https://www.doubango.org> ****
ultimateALPR-SDK <https://github.com/DoubangoTelecom/ultimateALPR-SDK> version 3.5.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: 'Khadas VIM3', S: '***', M: '', MN: ''
*[COMPV INFO]: [CompVBase] CPU features: [arm];[arm64];neon;neon_fma;vfpv4;
*[COMPV INFO]: [CompVBase] CPU cores: #6
*[COMPV INFO]: [CompVBase] CPU cache1: line size: #64B, size :#0KB
*[COMPV INFO]: [CompVBase] CPU Phys RAM size: #3707GB
*[COMPV INFO]: [CompVBase] CPU endianness: LITTLE
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/compv_base.cxx' in function 'init' starting at line #195: Not optimized -> Your ARM OS is neither Android nor Raspberry Pi nor iOS nor NVIDIA Jetson. You may miss some optimizations. Let us know what's your OS.
*[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: Generic Linux
*[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:0x7fa57a7170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=2,set=useless, threadId:0x7fa47a5170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=1,set=useless, threadId:0x7fa4fa6170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=3,set=useless, threadId:0x7fa3fa4170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=4,set=useless, threadId:0x7fa37a3170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVThreadDispatcher] Thread dispatcher created with #6 threads/#6 cores
*[COMPV INFO]: [CompVParallel] [Parallel] module initialized
*[COMPV INFO]: [CompVBase] [Base] modules initialized
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=5,set=useless, threadId:0x7fa2fa2170, kThreadSetAffinity:false) - ENTER
*[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]: [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] Loaded [libOpenCL.so], looksLikeValid: yes...
*[COMPV INFO]: [UltBaseOpenCLUtils] Selected platform vendor: Vivante Corporation
*[COMPV INFO]: [UltBaseOpenCLUtils] deviceCount=1
*[COMPV INFO]: [UltBaseOpenCLUtils] Device -> name: Vivante OpenCL Device VIPNano-QI.7120.0000, id: 0x559cad4be0
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT=4
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE=0
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_COMPUTE_UNITS=1
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS=3
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_ITEM_SIZES=256, 256, 256,
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_GROUP_SIZE=256
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_CLOCK_FREQUENCY=800 MHz
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE=64 B
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_GLOBAL_MEM_SIZE=268435456 B (256 MB)
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_LOCAL_MEM_SIZE=32768 B (32 KB)
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_MEM_ALLOC_SIZE=128 MB
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_PLATFORM_VERSION=OpenCL 1.2 V6.4.4.3.310723AAA
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_VERSION=OpenCL 1.2
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DRIVER_VERSION=OpenCL 1.2 V6.4.4.3.310723AAA
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_OPENCL_C_VERSION=OpenCL C 1.2
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_EXTENSIONS=cl_khr_byte_addressable_store cl_khr_gl_sharing cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics
*[COMPV INFO]: [UltBaseOpenCL] !!!Booom!!!, OpenCL successfully loaded [libOpenCL.so]
*[COMPV INFO]: [UltOcrEngine] Tensorflow version: 1.12.3
***[COMPV ERROR]: function: "open()"
file: "/home/ultimate/compv/base/compv_sharedlib.cxx"
line: "70"
message: [CompVSharedLib] Failed to load library with path=libultimatePluginOpenVINO.so, Error: libultimatePluginOpenVINO.so: cannot open shared object file: No such file or directory
***[COMPV ERROR]: function: "open()"
file: "/home/ultimate/compv/base/compv_sharedlib.cxx"
line: "72"
message: Operation Failed (COMPV_ERROR_CODE_E_NOT_FOUND) ->
***[COMPV ERROR]: function: "newObj()"
file: "/home/ultimate/compv/base/compv_sharedlib.cxx"
line: "118"
message: Operation Failed (COMPV_ERROR_CODE_E_NOT_FOUND) ->
***[COMPV ERROR]: function: "init()"
file: "/home/ultimate/ultimateALPR/lib/source/ultimate_alpr_plugin.cxx"
line: "97"
message: Operation Failed (COMPV_ERROR_CODE_E_NOT_FOUND) ->
*[COMPV INFO]: [UltBaseEngine] UltBaseEngineReadSystemFile: fgets[18446744073709551615] returned valid string
*[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: 6
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/compv_mem.cxx' in function 'CompVMemCopy_C' starting at line #985: Not optimized -> No SIMD implementation found. On ARM consider http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka13544.html
*[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 #881: 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/math/compv_math_matrix.cxx' in function 'invA3x3' starting at line #515: Not optimized -> No SIMD or GPU implementation found.
*[ULTALPR_SDK INFO]: Processing done.
*[ULTALPR_SDK INFO]: result: {"duration":329,"frame_id":0,"plates":[{"car":{"confidence":99.60938,"warpedBox":[79.10919,165.281,1068.545,165.281,1068.545,620.1945,79.10919,620.1945]},"confidences":[89.75845,99.60938,90.11087,90.94353,91.59162,89.75845,90.27162,90.41463,90.88544],"text":"3PEDLM4","warpedBox":[824.4489,341.9126,942.7615,341.9126,942.7615,401.7117,824.4489,401.7117]}]}
*[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=0x7fa57a7170 will join
*[COMPV INFO]: [CompVMem] poolCleanBuffersForCurrentThread(threadId:0x7fa57a7170)
*[COMPV INFO]: [CompVAsyncTask11] run(threadId:0x7fa57a7170) - EXIT
*[COMPV INFO]: Thread with id=0x7fa57a7170 will join
*[COMPV INFO]: [Thread] ***Thread with id=0x7fa57a7170 destroyed***
*[COMPV INFO]: [Thread] Thread with id=0x7fa4fa6170 will join
*[COMPV INFO]: [CompVMem] poolCleanBuffersForCurrentThread(threadId:0x7fa4fa6170)
*[COMPV INFO]: [CompVAsyncTask11] run(threadId:0x7fa4fa6170) - EXIT
*[COMPV INFO]: Thread with id=0x7fa4fa6170 will join
*[COMPV INFO]: [Thread] ***Thread with id=0x7fa4fa6170 destroyed***
*[COMPV INFO]: [Thread] Thread with id=0x7fa47a5170 will join
*[COMPV INFO]: [CompVMem] poolCleanBuffersForCurrentThread(threadId:0x7fa47a5170)
*[COMPV INFO]: [CompVAsyncTask11] run(threadId:0x7fa47a5170) - EXIT
*[COMPV INFO]: Thread with id=0x7fa47a5170 will join
*[COMPV INFO]: [Thread] ***Thread with id=0x7fa47a5170 destroyed***
*[COMPV INFO]: [Thread] Thread with id=0x7fa3fa4170 will join
*[COMPV INFO]: [CompVMem] poolCleanBuffersForCurrentThread(threadId:0x7fa3fa4170)
*[COMPV INFO]: [CompVAsyncTask11] run(threadId:0x7fa3fa4170) - EXIT
*[COMPV INFO]: Thread with id=0x7fa3fa4170 will join
*[COMPV INFO]: [Thread] ***Thread with id=0x7fa3fa4170 destroyed***
*[COMPV INFO]: [Thread] Thread with id=0x7fa37a3170 will join
*[COMPV INFO]: [CompVMem] poolCleanBuffersForCurrentThread(threadId:0x7fa37a3170)
*[COMPV INFO]: [CompVAsyncTask11] run(threadId:0x7fa37a3170) - EXIT
*[COMPV INFO]: Thread with id=0x7fa37a3170 will join
*[COMPV INFO]: [Thread] ***Thread with id=0x7fa37a3170 destroyed***
*[COMPV INFO]: [Thread] Thread with id=0x7fa2fa2170 will join
*[COMPV INFO]: [CompVMem] poolCleanBuffersForCurrentThread(threadId:0x7fa2fa2170)
*[COMPV INFO]: [CompVAsyncTask11] run(threadId:0x7fa2fa2170) - EXIT
*[COMPV INFO]: Thread with id=0x7fa2fa2170 will join
*[COMPV INFO]: [Thread] ***Thread with id=0x7fa2fa2170 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


Kindly help sir.

Mamadou DIOP

unread,
Dec 20, 2021, 5:04:40 PM12/20/21
to Shalini S, doubango-ai
Hi,

1/ run the code with —openvino_enabled false to skip loading openvino and printing errors.
2/ From one program I see that the number of cores reported is #6 and from the other I see #4. Are you running the program on the same device?

--
You received this message because you are subscribed to the Google Groups "doubango-ai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doubango-ai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/doubango-ai/433ca11a-6e89-4c2d-b9b9-7b1c8c30256an%40googlegroups.com.

Shalini S

unread,
Dec 20, 2021, 9:15:04 PM12/20/21
to doubango-ai
Sir the board is big-little architecture : 4big + 2 little cpu. That could be the reason of the cpu being reported either 6 or 4.
I ran the code with --openvino_enabled false, its printing no errors  but code still failing :-

[ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (935) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
*[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.8,"car_noplate_detect_min_score": 0.8,"pyramidal_search_enabled": true,"pyramidal_search_sensitivity": 1.0,"pyramidal_search_minscore": 0.8,"pyramidal_search_min_image_size_inpixels": 800,"ienv_enabled": true,"recogn_rectify_enabled": true,"recogn_minscore": 0.8,"recogn_score_type": "min","assets_folder": "../../../assets","charset": "latin","recogn_rectify_enabled": true,"car_noplate_detect_enabled": false,"ienv_enabled": false,"openvino_enabled": false,"openvino_device": "CPU","klass_lpci_enabled": false,"klass_vcr_enabled": false,"klass_vmmr_enabled": false,"klass_vbsr_enabled": false,"license_token_data": "ANI6+wWgBUVDUFFVdzBBR1VQRkMuBApERW4nS1FTRkgKTEAGTwQeEtZREJRdkdXMUFnAlhOaU4+aiwMfC42R3NLSUlRUAkjIBQTBgQJX1t2QEtFVzlyUEF1KXJORUtFKC4nFiRoQU5bRWxlMylPAT1vM31mVyxKS2YwTkFXNAEaN1ptSkAYPV8JFyFtcWxTZzVwCRY7ExkRR3NsfU49W3oxeU5HeFo="}
*[COMPV INFO]: [CompVThreadDispatcher] Thread dispatcher created with #6 threads/#6 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]: [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]: [CompVAsyncTask11] run(coreId:requested=5,set=useless, threadId:0x7f715dabd0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=1,set=useless, threadId:0x7f735debd0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=3,set=useless, threadId:0x7f725dcbd0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=4,set=useless, threadId:0x7f71ddbbd0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=0,set=useless, threadId:0x7f73ddfbd0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=2,set=useless, threadId:0x7f72dddbd0, kThreadSetAffinity:false) - ENTER

*[COMPV INFO]: [UltBaseOpenCL] Loaded [libOpenCL.so], looksLikeValid: yes...
*[COMPV INFO]: [UltBaseOpenCLUtils] Selected platform vendor: Vivante Corporation
*[COMPV INFO]: [UltBaseOpenCLUtils] deviceCount=1
*[COMPV INFO]: [UltBaseOpenCLUtils] Device -> name: Vivante OpenCL Device VIPNano-QI.7120.0000, id: 0x5587490600

*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT=4
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE=0
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_COMPUTE_UNITS=1
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS=3
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_ITEM_SIZES=256, 256, 256,
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_GROUP_SIZE=256
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_CLOCK_FREQUENCY=800 MHz
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE=64 B
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_GLOBAL_MEM_SIZE=268435456 B (256 MB)
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_LOCAL_MEM_SIZE=32768 B (32 KB)
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_MEM_ALLOC_SIZE=128 MB
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_PLATFORM_VERSION=OpenCL 1.2 V6.4.4.3.310723AAA
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_VERSION=OpenCL 1.2
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DRIVER_VERSION=OpenCL 1.2 V6.4.4.3.310723AAA
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_OPENCL_C_VERSION=OpenCL C 1.2
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_EXTENSIONS=cl_khr_byte_addressable_store cl_khr_gl_sharing cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics
*[COMPV INFO]: [UltBaseOpenCL] !!!Booom!!!, OpenCL successfully loaded [libOpenCL.so]
*[COMPV INFO]: [UltOcrEngine] Tensorflow version: 1.12.3
***[COMPV ERROR]: function: "UltBaseLicenseGeneratorDeSerializeRuntimeToken()"
file: "/home/ultimate/ultimateALPR/SDK_dev/lib/../../../ultimateBase/lib/include/ultimate_base_license_generator.h"
line: "713"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_PARAMETER) -> Too short

***[COMPV ERROR]: function: "updateLicenseInfo()"
file: "/home/ultimate/ultimateALPR/SDK_dev/lib/source/ultimate_alpr_sdk_private_engine.cxx"
line: "767"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_PARAMETER) ->
***[COMPV ERROR]: function: "init()"
file: "/home/ultimate/ultimateALPR/SDK_dev/lib/source/ultimate_alpr_sdk_private_engine.cxx"
line: "143"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_PARAMETER) ->
***[COMPV ERROR]: function: "init()"
file: "/home/ultimate/ultimateALPR/SDK_dev/lib/source/ultimate_alpr_sdk_public_engine.cxx"
line: "131"
message: [UltAlprSdkEngine] Failed to initialize the engine
dob2: dob2.cpp:304: int main(int, char**): Assertion `__ULTALPR_SDK_b_ret' failed.
Aborted


Mamadou DIOP

unread,
Dec 20, 2021, 9:31:31 PM12/20/21
to Shalini S, doubango-ai

--openvino_enabled false wasn't supposed to fix the issue.

Now the reported number of CPUs is correct but you have completely different issue. I very curious to know how you have managed to remove a character from the license token. The error says the license is too short.

Your first message you shared this token: ANI6+wWgBUVDUFFVdzBBR1VQRkMuBApERW4nS1FTRkg/KTEAGTwQeEtZREJRdkdXMUFnAlhOaU4+aiwMfC42R3NLSUlRUAkjIBQTBgQJX1t2QEtFVzlyUEF1KXJORUtFKC4nFiRoQU5bRWxlMylPAT1vM31mVyxKS2YwTkFXNAEaN1ptSkAYPV8JFyFtcWxTZzVwCRY7ExkRR3NsfU49W3oxeU5HeFo=

In your second message you shared this token: ANI6+wWgBUVDUFFVdzBBR1VQRkMuBApERW4nS1FTRkgKTEAGTwQeEtZREJRdkdXMUFnAlhOaU4+aiwMfC42R3NLSUlRUAkjIBQTBgQJX1t2QEtFVzlyUEF1KXJORUtFKC4nFiRoQU5bRWxlMylPAT1vM31mVyxKS2YwTkFXNAEaN1ptSkAYPV8JFyFtcWxTZzVwCRY7ExkRR3NsfU49W3oxeU5HeFo=

You'll notice that the second token is 1 character shorter. You have removed the '/' no idea why you did that but that's not correct.

Fix that issue by using a correct token. I have checked our license manager and the token you're using is a free license.

You have a "Khadas VIM3" and for some reasons some CPU cores are disabled. I'll fix the issue about number of cores (to report total instead of available) tomorrow: https://github.com/DoubangoTelecom/ultimateALPR-SDK/issues/226

Shalini S

unread,
Dec 20, 2021, 9:57:17 PM12/20/21
to doubango-ai
Hi Sir,

Is the error because of incorrect cpu cores being assigned ?
Sir '/' was missing in license .  Error log now :-

[ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (935) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
*[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": false,"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": false,"openvino_device": "CPU","klass_lpci_enabled": false,"klass_vcr_enabled": false,"klass_vmmr_enabled": false,"klass_vbsr_enabled": false,"license_token_data": "ABTPWw8ABQQBBAECAAj/BQQBAwCPREkFBAQICQwCP0IgCwUzL3cAc0c7CwEAAQQHAQgAQS8bUwINCW1vTE0BBAQOCAMASikDFRIhdwF4cD0hCTc/MGo1NDR1DwBtcTAzW1dSditmZj46bjUwcFxJUEA9Wz4yNA=="}
*[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:0x7f77fdfbd0, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=4,set=useless, threadId:0x7f76fddbd0, kThreadSetAffinity:false) - ENTER

*[COMPV INFO]: [UltOcrEngine] Tensorflow version: 1.12.3
***[COMPV ERROR]: function: "UltBaseLicenseGeneratorDeSerializeRuntimeToken()"
file: "/home/ultimate/ultimateALPR/SDK_dev/lib/../../../ultimateBase/lib/include/ultimate_base_license_generator.h"
line: "705"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) -> Invalid cookie

***[COMPV ERROR]: function: "updateLicenseInfo()"
file: "/home/ultimate/ultimateALPR/SDK_dev/lib/source/ultimate_alpr_sdk_private_engine.cxx"
line: "767"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) ->
***[COMPV ERROR]: function: "init()"
file: "/home/ultimate/ultimateALPR/SDK_dev/lib/source/ultimate_alpr_sdk_private_engine.cxx"
line: "143"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) ->
***[COMPV ERROR]: function: "init()"
file: "/home/ultimate/ultimateALPR/SDK_dev/lib/source/ultimate_alpr_sdk_public_engine.cxx"
line: "131"
message: [UltAlprSdkEngine] Failed to initialize the engine
dob: dob.cpp:305: int main(int, char**): Assertion `__ULTALPR_SDK_b_ret' failed.
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=0,set=useless, threadId:0x7f7d738bd0, kThreadSetAffinity:false) - ENTER
Aborted

Mamadou DIOP

unread,
Dec 20, 2021, 11:57:09 PM12/20/21
to Shalini S, doubango-ai
Now you're using a runtime key as a token.

Your first message had the correct.

Sent from my Galaxy
"/home/ultimate/ultimateALPR/SDK_dev/lib/../../../ultimateBase/lib/include/ultimate_base_license_generator.h"
line: "705"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) -> Invalid cookie
***[COMPV ERROR]: function: "updateLicenseInfo()"
"/home/ultimate/ultimateALPR/SDK_dev/lib/source/ultimate_alpr_sdk_private_engine.cxx"
line: "767"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) ->
***[COMPV ERROR]: function: "init()"
"/home/ultimate/ultimateALPR/SDK_dev/lib/source/ultimate_alpr_sdk_private_engine.cxx"
line: "143"
message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) ->
***[COMPV ERROR]: function: "init()"
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/compv_mem.cxx' in function 'CompVMemCopy_C' starting at line #985: Not optimized -> No SIMD implementation found. On ARM consider <a data-saferedirecturl="https://www.google.com/url?hl=en&<BR><BR>...<BR><BR>Email truncated<BR>

Mamadou DIOP

unread,
Dec 21, 2021, 12:14:42 PM12/21/21
to Shalini S, doubango-ai

Pull version v3.5.1 and it will fix the issue. Off course you must use a correct license token. You keep using different (invalid) license tokens for a reason I don't really understand.

Please comment on ticket #226 (https://github.com/DoubangoTelecom/ultimateALPR-SDK/issues/226) instead of here if you have additional issues.

*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/compv_mem.cxx' in function 'CompVMemCopy_C' starting at line #985: Not optimized -> No SIMD implementation found. On ARM consider doubango-ai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/doubango-ai/1MEVFi-1nFURU0amA-00G4Cr%40mrelayeu.kundenserver.de.
Reply all
Reply to author
Forward
0 new messages