Ged C++ lib. Detection of small changes on video for security systems

€10,000.00

C++ Ged library v2.0.3 designed for automatic detection of changes on videos. Used in video security system to detect small changes on video and aware operators about threats.

LICENSE: We sell source code of this library as is, without future updates and technical support according to perpetual non-exclusive royalty-free license. You pay once and can use this library in your software and hardware products without limits. Please read the license agreement before purchasing: DOWNLOAD LICENSE. You can buy technical support service for this product.

Add To Cart
Technical support service
Options:

Purchase options

You can by this software online by card or you can buy the software by bank transfer. Bank transfer available only for companies. To buy software by bank transfer please send us request to info@constantrobotics.com. Also, you can buy technical support service for this product.

Downloads

Programmer’s manual: DOWNLOAD

Demo application to check algorithms performance on your video: DOWNLOAD

Overview

C++ Ged library designed for automatic detection of changes on videos. The library is implemented in C++ (C++17 standard) and utilizes the OpenMP library (2.5 standard, built in C++ compiler) to facilitate parallel computation. It does not rely on any third-party code and doesn't include additional software libraries. The library works real-time on low-power CPU. The library is compatible with any processors and operating systems that support the C++ compiler with built-in support for the OpenMP. Algorithms work with various types of videos, including those from thermal cameras, and it ensures accurate detection of small-sized and low-contrast objects against complex backgrounds. The library performs frame-by-frame video processing and inherits its interface from the ObjectDetector class, which defines data structures and interface compatible with other type of detectors designed by ConstantRobotics. The library has simple interface and can be seamlessly integrated into systems of any complexity.

Demo video

Simple interface

class Ged : public ObjectDetector
{
public:
    /// Get string of current library version.
    static std::string getVersion();

    /// Init object detector.
    bool initObjectDetector(ObjectDetectorParams& params) override;

    /// Set object detector param.
    bool setParam(ObjectDetectorParam id, float value) override;

    /// Get object detector param value.
    float getParam(ObjectDetectorParam id) override;

    ///  Get object detector params including list of detected objects.
    void getParams(ObjectDetectorParams& params) override;

    /// Get list of detected objects.
    std::vector<Object> getObjects() override;

    /// Execute command.
    bool executeCommand(ObjectDetectorCommand id) override;

    /// Perform detection.
    bool detect(cr::video::Frame& frame) override;

    /// Set detection mask.
    bool setMask(cr::video::Frame mask) override;

    /// Decode and execute command.
    bool decodeAndExecuteCommand(uint8_t* data, int size) override;

    /// This method retrieves the motion detection binary mask.
    bool getMotionMask(cr::video::Frame& mask);
};

Simple example

#include <opencv2/opencv.hpp>
#include "Ged.h"

int main(void)
{
    // Open video file "test.mp4".
    cv::VideoCapture videoSource;
    if (!videoSource.open("test.mp4"))
        return -1;

    // Create detector and set params.
    cr::detector::Ged detector;
    detector.setParam(cr::detector::ObjectDetectorParam::MIN_OBJECT_WIDTH, 4);
    detector.setParam(cr::detector::ObjectDetectorParam::MAX_OBJECT_WIDTH, 96);
    detector.setParam(cr::detector::ObjectDetectorParam::MIN_OBJECT_HEIGHT, 4);
    detector.setParam(cr::detector::ObjectDetectorParam::MAX_OBJECT_HEIGHT, 96);
    detector.setParam(cr::detector::ObjectDetectorParam::SENSITIVITY, 10);

    // Create frames.
    cv::Mat frameBgrOpenCv;

    // Main loop.
    while (true)
    {
        // Capture next video frame.
        videoSource >> frameBgrOpenCv;
        if (frameBgrOpenCv.empty())
        {
            // Reset detector.
            detector.executeCommand(cr::detector::ObjectDetectorCommand::RESET);
            // Set initial video position to replay.
            videoSource.set(cv::CAP_PROP_POS_FRAMES, 0);
            continue;
        }

        // Create Frame object.
        cr::video::Frame bgrFrame;
        bgrFrame.width = frameBgrOpenCv.size().width;
        bgrFrame.height = frameBgrOpenCv.size().height;
        bgrFrame.size = bgrFrame.width * bgrFrame.height * 3;
        bgrFrame.data = frameBgrOpenCv.data;
        bgrFrame.fourcc = cr::video::Fourcc::BGR24;

        // Detect objects.
        detector.detect(bgrFrame);

        // Get list of objects.
        std::vector<cr::detector::Object> objects = detector.getObjects();

        // Draw detected objects.
        for (int n = 0; n < objects.size(); ++n)
        {
            rectangle(frameBgrOpenCv, cv::Rect(objects[n].x, objects[n].y,
                      objects[n].width, objects[n].height),
                      cv::Scalar(0, 0, 255), 1);
        }

        // Show video.
        cv::imshow("VIDEO", frameBgrOpenCv);

        // Wait ESC.
        if (cv::waitKey(1) == 27)
            return -1;
    }

    return 1;
}
CvTracker C++ lib. Fast cross-platforms video tracking library
€6,000.00