getting_started_web_logo

How to integrate RapidPixel SDK into your project

The RapidPixel SDK builds the available C++17 modules into one static library: libRapidPixel.a on Linux or RapidPixel.lib with MSVC on Windows. Module selection still uses a trial CMake configuration: a module with unavailable sources or dependencies is excluded. Successful configuration is not a guarantee that every module will compile; review the build output and the AVAILABLE LIBRARIES summary.

Use CMake 3.15 or newer, a C++17 compiler, and Ninja, Make or Visual Studio. Hardware-specific modules require their own SDKs, drivers and target platform. A source checkout requires access to its Git submodules; a supplied sdksrc package already contains their sources.

Prefer individual headers such as <RapidPixel/Frame.h>. The umbrella <RapidPixel/RapidPixel.h> includes every selected module and may therefore require development headers for all of them. <RapidPixel/RapidPixelVersion.h> exposes the SDK version without optional module headers.

Then all you need to do is connect the RapidPixel SDK to your project, depending on your configuration:

External dependencies

Some of the libraries in the RapidPixel SDK depend on a few external libraries. If an external library (that is necessary for proper usage of the chosen library) is not installed, the related library of the RapidPixel SDK will not be built. The detailed list of libraries and their dependencies can be found here: RapidPixel.

There is no mandatory OpenCV dependency for the SDK wrapper or its version example. Install and link dependencies for the modules you actually use. The merged archive includes built SDK static libraries, not system shared libraries, GPU drivers or runtime services. An installed or bundled package does not automatically discover every optional external dependency; consumers must provide the compile/link requirements of their selected modules.

Dependency Relevant modules or use
OpenCV VSourceOpenCv, DnnOpenCvDetector, PlotOpenCv, Fmd, graphical examples
OpenMP CPU parallelism in selected modules, including Denoiser; use the compiler’s matching runtime
OpenSSL License, MServer, SConnector, OServer; OServer also uses ZLIB
FFmpeg / libav VCodecLibav, MvExtractorLibav, examples that encode/decode through libav
libcamera VSourceLibCamera and Raspberry Pi camera examples
OpenVINO, oneVPL, GStreamer, VA-API Their corresponding detector/codec modules
CUDA, NVIDIA VPI, Jetson Multimedia API, EGL/GLES, NXP SDKs Optional or platform-specific acceleration; check the selected module’s configuration

The 1.22.x SDK no longer includes RtspServer, RtspServerLive555, FormatConverterOpenCv, VideoRecorderOpenCv or VCodecOpenH264. Their replacements are documented in the changelog. Denoiser no longer requires Intel IPP. VStabiliserCv has a C++17 CPU implementation; EGL/GLES acceleration is optional. License now verifies ECDSA P-256 signatures with OpenSSL; old AES-based licenses must be reissued. These changes do not remove OpenCV or other dependencies from unrelated modules.

OpenMP install

OpenMP comes with many modern compilers. If you need to install it, follow these steps:

  • On Windows OpenMP is included in the Visual Studio installation, so no additional steps are required.

  • On Linux GCC normally uses its bundled libgomp runtime. Clang installations may need libomp-dev; do not mix compiler runtimes:

    sudo apt-get install libomp-dev
    

OpenCV install

  • On Windows

    Only versions >= 4.5.0 are supported. Download the OpenCV installer from the official website, for example LINK. Run the opencv-version-windows.exe file and extract the library to your desired directory, for example C:/Libs/OpenCV.

  • On Linux On Linux, it can be installed either from source code or from the apt package manager. If you are installing by using the package manager, ensure that you have the proper version of OpenCV. Command to install:

    sudo apt-get install -y libopencv-dev
    

Linking OpenCV in a Visual Studio project on Windows

  1. In Properties, go to VC++ Directories -> General -> Include Directories -> Edit and add the OpenCV include directory:

    C:\Libs\OpenCV\opencv\build\include
    
  2. In Properties, go to VC++ Directories -> General -> Library Directories -> Edit and add the OpenCV lib directory:

    C:\Libs\OpenCV\opencv\build\x64\vc16\lib
    
  3. In Properties, go to Linker -> Input -> Additional Dependencies -> Edit and add lib files, depending on your current project configuration:

    Debug configuration:
    opencv_world480d.lib
    Release configuration:
    opencv_world480.lib
    

Linking OpenCV in a Qt Creator project on Windows

  1. To include headers, edit the YourProject.pro file by adding:

    INCLUDEPATH += C:\Libs\OpenCV\opencv\build\include
    
  2. Specify lib files:

    CONFIG(debug, debug|release) {
        LIBS += C:\Libs\OpenCV\opencv\build\x64\vc16\lib\opencv_world480d.lib
    } else {
        LIBS += C:\Libs\OpenCV\opencv\build\x64\vc16\lib\opencv_world480.lib
    }
    

How to build the SDK

  1. Download the SDK source package, or initialize the pinned modules in an existing Git checkout:

    git submodule update --init --recursive
    

    Do not use --remote for reproducible SDK builds: it changes the module revisions. Git metadata is intentionally absent from a packaged sdksrc tree.

  2. The unpacked folder should look like this:

    RapidPixelSdk
    	> example
    	> modules
    	> RapidPixel
    		CMakeLists.txt
    	GettingStarted.md
    	RapidPixelConfig.cmake
    	CMakeLists.txt
    
  3. Open the terminal inside the RapidPixelSdk folder and run the following commands:

    For Windows:

    # Configure CMake project with specified build type (Debug/Release).
    cmake -S . -B build
    # Build all libraries with proper target and specified build type (Debug/Release).
    cmake --build build --config Release --parallel
    

    For Linux:

    # Configure CMake project with specified build type (Debug/Release).
    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
    # Build all libraries with proper target and specified build type (Debug/Release).
    cmake --build build --parallel
    
  4. Review your new RapidPixelSdk structure:

    RapidPixelSdk
    	> build
    	> docs
    	> example
    	> include
    	> lib
    	> modules
    	> RapidPixel
    		CMakeLists.txt
    		RapidPixel.h
    	GettingStarted.md
    	RapidPixelConfig.cmake
    	CMakeLists.txt
    
  5. Review the selected modules in build/RapidPixel/RapidPixelModules.txt. The bundle has headers in include/RapidPixel and archives in lib/<configuration>. Build the complete default target (or combine_libs) to refresh the bundle; the RapidPixel target alone builds the archive inside the build tree.

For Visual Studio and other multi-config generators, select Debug/Release at build time with --config; CMAKE_BUILD_TYPE is for single-config generators. Use matching compiler, architecture and runtime settings for the SDK and the consuming application.

Useful options, all enabled by default:

Option Purpose
RAPIDPIXEL_BUILD_MODULES Probe and build SDK modules
RAPIDPIXEL_BUILD_EXAMPLES Probe and build example applications
RAPIDPIXEL_BUILD_DOCS Generate the documentation collection
RAPIDPIXEL_PACKAGE_SOURCES Run source packaging during the default build
COMPILE_<category>/<module> Select one module or example, e.g. -DCOMPILE_VideoCoding/VCodecJetPack=OFF

RAPIDPIXEL_OUTPUT_DIR selects a separate bundle/docs directory; it defaults to the source root for compatibility. Use distinct output directories for concurrent builds or different module selections. SDKSRC_DIR defaults to build/sdksrc. Packaging only replaces an empty directory or a package previously created by this packager; select a new path when migrating an older unmarked package. It refuses source directories, their ancestors and destinations inside copied source folders.

When upgrading an older SDK output without file manifests, use a fresh RAPIDPIXEL_OUTPUT_DIR. Subsequent bundle updates remove obsolete files recorded by this SDK, but do not delete unrecognized files from older builds or user-added content. Refresh the installation into a clean staging prefix when removing modules; CMake installation does not uninstall files from previous versions.

Set CMAKE_PREFIX_PATH, package-specific *_DIR/*_ROOT paths or CMAKE_TOOLCHAIN_FILE when dependencies are not in default locations. Trial configurations inherit these settings and store logs under build/_test_wrapper/<module>/<configuration-key>/configure.log. Disabling a module does not remove a dependency required by another enabled module.

Build the SDK without elevated privileges. Do not mix root-owned and user-owned files in the same build/output directory.

Install into the OS

Build before installing. For a user-local installation on Linux:

cmake --install build --config Release --component RapidPixel --prefix "$HOME/.local"

For an administrator-managed installation, use a writable staging prefix first, then install to /usr/local with the appropriate permissions. DESTDIR staging and CMAKE_INSTALL_LIBDIR are supported. On Windows, pass a writable absolute prefix such as C:/Libs/RapidPixel.

The RapidPixel component installs only the SDK headers, merged archive, CMake package/version files, module manifest and SDK license, not unrelated module test programs. Files are placed in <prefix>/include/RapidPixel, <prefix>/<libdir>/RapidPixel/<configuration>, <prefix>/<libdir>/cmake/RapidPixel and <prefix>/share. <libdir> follows GNUInstallDirs, so it can be lib, lib64 or a multiarch directory. Debug and Release archives have the same filename in separate directories; there is no RapidPixeld.lib.

The installation is relocatable. External runtime libraries and executables still need deployment according to their own documentation and licenses. A static archive does not require ldconfig. The installation manifest in the build tree lists installed files; there is no automatic uninstall target.

Connect using a CMake-based project

  1. Go to your CMake-based project directory and modify the CMakeLists.txt file to include the RapidPixel library.

    # Link the RapidPixel libraries
    find_package(RapidPixel CONFIG REQUIRED)
    target_link_libraries(${PROJECT_NAME} PRIVATE RapidPixel::RapidPixel)
    
  2. Point CMAKE_PREFIX_PATH at an installed prefix:

    cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/installed/prefix
    

    For a bundle, use -DRapidPixel_DIR=/path/to/RapidPixelSdk, the directory containing RapidPixelConfig.cmake. For an installation, RapidPixel_DIR can instead name <prefix>/<libdir>/cmake/RapidPixel. The legacy target name RapidPixel is also supported. Package discovery works without CMAKE_BUILD_TYPE; CMake falls back to an available configuration when necessary. On MSVC, install the matching Debug/Release runtime configuration rather than relying on fallback.

    For source integration, add_subdirectory(path/to/RapidPixelSdk rapidpixel-build) creates the same target. Set SDK options before this call and use a distinct RAPIDPIXEL_OUTPUT_DIR. Individual modules may have their own source-integration limitations.

Connect using a Visual Studio project

  1. Open your project, for instance YourProject.sln.

  2. Right-click on YourProject in Solution Explorer and hit Properties.

  3. In Properties, go to VC++ Directories -> General -> Include Directories -> Edit and add the RapidPixel include directory:

    C:\Libs\Windows_RP_INCLUDE_PACK\RapidPixel\include
    
  4. In Properties, go to VC++ Directories -> General -> Library Directories -> Edit and add the RapidPixel lib directory:

    Debug configuration:
    C:\Libs\Windows_RP_INCLUDE_PACK\RapidPixel\lib\Debug
    Release configuration:
    C:\Libs\Windows_RP_INCLUDE_PACK\RapidPixel\lib\Release
    
  5. In Properties, go to Linker -> Input -> Additional Dependencies -> Edit and add RapidPixel.lib for the selected configuration:

    Debug configuration:
    RapidPixel.lib
    Release configuration:
    RapidPixel.lib
    
  6. Remember to apply C++17 standard: General -> C++ Language Standard -> ISO C++17 Standard (/std:c++17).

  7. Hit the Apply button and close the Properties page.

Connect using a Qt Creator project

  1. Open your qmake project, for instance YourProject.

  2. To include headers, edit the YourProject.pro file by adding:

    INCLUDEPATH += C:\Libs\Windows_RP_INCLUDE_PACK\RapidPixel\include
    
  3. Specify lib files:

       CONFIG(debug, debug|release) {
          LIBS += "C:/Libs/Windows_RP_INCLUDE_PACK/RapidPixel/lib/Debug/RapidPixel.lib"
       } else {
          LIBS += "C:/Libs/Windows_RP_INCLUDE_PACK/RapidPixel/lib/Release/RapidPixel.lib"
    }
    
  4. Remember to keep C++17 language standard:

    CONFIG += c++17
    
  5. Save the YourProject.pro file; your project is now ready to use the RapidPixel SDK.

Example application

The example application provides a brief showcase of how to include RapidPixel SDK headers in your project and use its utilities. The example is a CMake-based project with the following CMakeLists.txt file:

cmake_minimum_required(VERSION 3.15)

project(RapidPixelExample VERSION 1.0.0 LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Create glob patterns for *.h and *.cpp files
file (GLOB H_FILES   ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
file (GLOB CPP_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
# Concatenate the results (glob files) into variable
set  (SOURCES ${CPP_FILES} ${H_FILES})
# Create executable from sources
if (NOT TARGET ${PROJECT_NAME})
    add_executable(${PROJECT_NAME} ${SOURCES})
endif()

# Link the RapidPixel libraries
find_package(RapidPixel CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE RapidPixel::RapidPixel)

While including RapidPixel SDK headers, remember to add RapidPixel/ before the library name; use the following structure:

#include <RapidPixel/LibraryNameHeader.h>

Alternatively, if it’s more convenient, you can include all headers at once using:

#include <RapidPixel/RapidPixel.h>

NOTE: To use a particular library, all its dependencies have to be included in your project. For instance, in order to use a library that is OpenCV and OpenMP dependent, you have to add the following code to your project:

find_package(OpenCV REQUIRED)
target_include_directories(${PROJECT_NAME} PRIVATE ${OpenCV_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} PRIVATE ${OpenCV_LIBS})

find_package(OpenMP REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE OpenMP::OpenMP_CXX)

Source code of the example:

#include <iostream>
#include <RapidPixel/RapidPixelVersion.h>

int main()
{
	std::cout << "======================================" << std::endl;
	std::cout << "========= RapidPixel example =========" << std::endl;
	std::cout << "======================================" << std::endl;

   std::cout << "RapidPixel SDK version: " << cr::RapidPixel::getVersion() << std::endl;

	return 0;
}

The minimal example does not require OpenCV or OpenMP. From the SDK root, configure and build it against the completed bundle:

cmake -S example -B build/example -DRapidPixel_DIR=/absolute/path/to/RapidPixelSdk
cmake --build build/example --config Release

On Linux, run build/example/RapidPixelExample. A multi-config generator places the executable in build/example/Release. To verify an OS installation, replace RapidPixel_DIR with CMAKE_PREFIX_PATH pointing at the installed prefix.

The larger applications in modules/ExamplesTemplates are selected and built from the SDK root. For example, build the VPipelineDemo target after its dependencies have configured successfully; its executable is under build/bin (and a configuration subdirectory for multi-config generators). Hardware, network endpoints, models and configuration files must be supplied separately. Demo control protocols, including the web template, are not a substitute for authenticated production management interfaces.


Table of contents