GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Categories
  • Newsletter
  • Submit
  • Login
  • Awesome C++
  • Image Processing

This view

  • Original page
  • New address

GeezerVison is showing cpp.libhunt.com — Video++ Alternatives - C++ Image Processing | LibHunt

  • Subscribe
  • Submit
  • Categories
  • About
  • Login

Video++

Video++, a C++14 high performance video and image processing library.

matt-42 logo
documentup.com    Source Code    Changelog
Suggest Changes
Take the C++ Developer Survey - About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email. Take the survey »
Popularity
4.8
Stable
Activity
0.0
Stable
Stars 740
Watchers 51
Forks 112
Last Commit almost 8 years ago

Code Quality Rank: L2
Programming language: C++
License: MIT License
Tags: Image Processing    
Latest version: v0.2

Video++ alternatives and similar libraries

Based on the "Image Processing" category.
Alternatively, view Video++ alternatives based on common mentions on social networks and blogs.

  • OpenCV

    10.0 9.9 L1 Video++ VS OpenCV
    Open Source Computer Vision Library
    opencv logo
  • tesseract-ocr

    9.9 9.3 L1 Video++ VS tesseract-ocr
    Tesseract Open Source OCR Engine (main repository)
    tesseract-ocr logo
  • SaaSHub - Software Alternatives and Reviews

    SaaSHub helps you find the best software and product alternatives
    Promo www.saashub.com
    SaaSHub Logo
  • libvips

    9.0 9.4 L3 Video++ VS libvips
    A fast image processing library with low memory needs.
    libvips logo
  • OpenMVG (open Multiple View Geometry)

    8.6 4.6 Video++ VS OpenMVG (open Multiple View Geometry)
    open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.
    openMVG logo
  • VTK

    8.0 10.0 L1 Video++ VS VTK
    Mirror of Visualization Toolkit repository
    Kitware logo
  • OpenImageIO

    7.4 9.7 L1 Video++ VS OpenImageIO
    Reading, writing, and processing images in a wide variety of file formats, using a format-agnostic API, aimed at VFX applications.
    AcademySoftwareFoundation logo
  • OpenEXR

    7.1 9.6 L1 Video++ VS OpenEXR
    The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.
    AcademySoftwareFoundation logo
  • ITK

    7.0 10.0 L2 Video++ VS ITK
    Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
    InsightSoftwareConsortium logo
  • CImg

    6.4 9.7 Video++ VS CImg
    The CImg Library is a small and open-source C++ toolkit for image processing
    GreycLab logo
  • Magick++

    6.3 2.5 Video++ VS Magick++
    Go binding to ImageMagick's MagickWand C API
    gographics logo
  • GD

    5.7 9.2 L2 Video++ VS GD
    GD Graphics Library
    libgd logo
  • VIGRA

    4.6 6.2 L1 Video++ VS VIGRA
    a generic C++ library for image analysis
    ukoethe logo
  • hiptext

    4.5 0.0 L3 Video++ VS hiptext
    Turn images into text better than caca/aalib
    jart logo
  • GDCM

    4.4 9.2 L1 Video++ VS GDCM
    Grassroots DICOM read-only mirror. Only for Pull Request. Please report bug at http://sf.net/p/gdcm
    malaterre logo
  • SVG++

    4.4 5.4 L3 Video++ VS SVG++
    C++ SVG library
    svgpp logo
  • AVIR

    4.0 1.7 Video++ VS AVIR
    High-quality pro HDR image resizing / scaling C++ library, including a very fast, precise, SIMD Lanczos resizer (header-only C++)
    avaneev logo
  • Boost.GIL

    3.8 8.2 L3 Video++ VS Boost.GIL
    Boost.GIL - Generic Image Library | Requires C++14 since Boost 1.80
    boostorg logo
  • SAIL

    3.5 9.5 Video++ VS SAIL
    ⛵The missing fast imaging library for humans (not for machines).
    HappySeaFox logo
  • CxImage

    3.2 0.0 L1 Video++ VS CxImage
    DISCONTINUED. An image processing and conversion library to load, save, display, transform BMP, JPEG, GIF, PNG, TIFF, MNG, ICO, PCX, TGA, WMF, WBMP, JBG, J2K images. [zlib]
  • FreeImage

    2.5 0.0 L2 Video++ VS FreeImage
    A custom distribution of FreeImage, with a CMake-based build system. Used by the Athena Game Framework.
    Kanma logo
  • FLOP

    2.0 0.0 Video++ VS FLOP
    FLOꟼ - An MIT-licensed image viewer equipped with a GPU-accelerated perceptual image diffing algorithm based on ꟻLIP
    jeremyong logo
  • ULIS

    1.8 6.7 Video++ VS ULIS
    DISCONTINUED. Utility Library for Imaging Systems
    Praxinos logo
  • DCMTK

    - Video++ VS DCMTK
    DICOM Toolkit.

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.

Do you think we are missing an alternative of Video++ or a related project?

Add another 'Image Processing' Library

Popular Comparisons

  • Video++
    vs
    VTK
  • Video++
    vs
    OpenImageIO
  • Video++
    vs
    GDCM
  • Video++
    vs
    CImg
  • Video++
    vs
    DCMTK

README

Travis build status

Video++

Video++ is a video and image processing library taking advantage of the C++14 standard to ease the writing of fast video and image processing applications. The idea behind Video++ performance is to generate via meta-programming code that the compiler can easily optimize. Its main features are:

  • Generic N-dimensional image containers.
  • A growing set of image processing algorithms.
  • Zero-cost abstractions to easily write image processing algorithms for multicore SIMD processors.
  • An embedded language to evaluate image expressions.

Tested compilers: G++6, Clang++ 3.8.0 Dependencies:

  • C++14
  • Eigen 3
  • Boost
  • the iod library installed by the install.sh script

Video++ is free of use (BSD). If you you are using Video++ in research related work, you are welcome to cite us :

@inproceedings{garrigues2014video++,
  title={Video++, a modern image and video processing C++ framework},
  author={Garrigues, Matthieu and Manzanera, Antoine},
  booktitle={Design and Architectures for Signal and Image Processing (DASIP), 2014 Conference on},
  pages={1--6},
  year={2014},
  organization={IEEE}
}

Getting Started

Installation

Before installing Video++, you need to get Eigen3 and Boost on your system. Your package managers will probably help you to install these libraries. Then, use the install.sh script to install iod and vpp :

git clone https://github.com/matt-42/vpp.git
cd vpp
./install.sh your_install_prefix # Install iod and vpp in a given prefix

Video++ is a header-only library, so you just need include the vpp.hh header to access all the basic features of the library:

#include <vpp/vpp.hh>

If you use the parallel constructs of Video++ and need to target multiple cores, activate the OpenMP optimizations:

g++ -I __your_isntall_prefix__ main.cc -fopenmp -lgomp

Image Containers

The generic container imageNd represents a dense N-dimensional rectangle set of pixels with values of type V. For convenience, image1d, image2d, image3d are respectively aliases to imageNd, imageNd, and imageNd.

// Allocates a 100 rows x 200 columns 2d image of integers.
image2d<int> A(100, 200);

These types provide accesses to the pixel buffer and to other piece of information useful to process the image. In contrast to std::vector, assigning an image to the other does not copy the data, but share them so no accidental expensive deep copy happen.

image2d<int> B = A; // B now points to A's data.

Image options

_border and _aligned

Image constructors also take special image options. _border (default: 0) set the border surrounding the pixels so filter accessing neighborhood access to valid pixels when traversing image borders. _aligned (default: 16 bytes) set the alignment in bytes of the beginning of the first pixel of each row (border excluded) to enable aligned SIMD memory instructions.

// Allocates a 100x100 image with a border of 3 pixels
// and rows aligned on 32 bytes (best for 256 bits SIMD
// units like AVX2).
image2d<int> C(100, 100, _border = 3, _aligned = 32);
_data and _pitch

To use image buffers allocated by external libraries, the _data and _pitch options respectively pass the pointer to the first pixel of the image and the distance in bytes between the first pixels of two consecutive rows. When setting these options, video++ is not responsible of freeing the data buffer.

// Wraps an external images of 100x100 pixels, with a pitch
// of 1000 bytes.
image2d<int> C(100, 100, _data = my_data_ptr, _pitch = 1000);

OpenCV interoperability

The header vpp/utils/opencv_bridge.hh (not included by vpp/vpp.hh) provides explicit conversions to and from OpenCV image types. It allows running video++ algorithms on OpenCV images and to run OpenCV algorithms on video++ images, without cloning the pixel buffer. Ownership of the buffer will switch to OpenCV or Video++ depending of the order of the destructor calls.

// Load JPG image in a vpp image using OpenCV imread.
image2d<vuchar3> img = from_opencv<vuchar3>(cv::imread("image.jpg"));

// Write a vpp image using OpenCV imwrite.
cv::imwrite("in.jpg", to_opencv(img));

Note: Since it is not possible to opencv to free video++ images, an OpenCV image must not be the last one to hold a video++ image.

Vector Types

Video++ vector types are aliases to eigen3 vectors, providing fast linear algebra. The syntax is v{T}{N} such as

  • T is one the following : char, short, int, float, double, uchar, ushort, uint.
  • N is an integer in [0, 4].

For example, the type image2d<vuchar4> can handle an image of RGBA 8-bit.

Pixel Wise Kernels

The pixel_wise construct allows to easily and efficiently map simple kernel functions on all the pixels of a set of images. It relies on OpenMP to spread the processing on all the available cores, and SIMD-vectorize the processing of rows when possible. If the kernel function returns a value, pixel_wise will return a newly allocated image filled with the results of the kernel. Given A and B two 2d images of integers:

// Compute C, the parallel pixel wise sum of A and B.
auto C = pixel_wise(A, B) | [] (int& a, int& b) { return a + b; };

// Compute the average of the c4 neighborhood.
pixel_wise(relative_access(A), B) | [] (auto a, int& b) {
  b = (a(-1, 0) + a(1, 0) + a(0, 1) + a(0, -1)) / 4;
};

Kernel arguments

Given pixel_wise(I_0, ..., I_N) | my_kernel, pixel_wise will traverse the domain of I_0 and for every pixel location P call my_kernel(I_0(P), ..., I_N(P)) with I_N(P) a reference to the pixel of I_N located at location P.

Parallelism and traversal directions

By default, pixel_wise traverses the image from left to right and top to bottom and spread the processing of different row on different cores. The following options allow to change this defaut behavior:

  • _no_thread: disable the parallelism.

  • _left_to_right: Traverse each row from left to right.

  • _right_to_left: Traverse each row from right to left.

  • _top_to_bottom: Traverse the rows from top to bottom.

  • _bottom_to_top: Traverse the rows from bottom to top.

Accessing Neighborhood

Video++ provides fast access to rectangular pixel neighbors inside pixel_wise kernels. The speed of access mainly comes from the direct 2d indexing of the neighborhood, and the ability of the compiler to vectorize these accesses using SIMD vector extensions. To stay portable, no explicit SIMD optimization is done by video++. On the other hand, the generated code was designed to be trivial for the compiler to vectorize if the kernel does not contain conditional branching.

The accesses are expressed in relative coordinates. For example, nbh(1,1) accesses the bottom right neighbor of the current pixel, and nbh(0,0) refers to the current pixel.

// Define a 3x3 neighborhood accessor on image B.
// Note that for performance reasons, the boundaries
// of the neighborhood are static.

pixel_wise(S, relative_access(B)) | [&] (auto& s, auto b) {

  // Average the pixels in the c4 neighborhood.
  s = (b(-1,0) + b(0, -1) +
      b(1,0) + b(0,1)) / 4;
};

Block Wise Kernels

Theblock_wise construct allows to map a function on every cell of a given grid. This construct is similar to pixel_wise, but instead of processing one pixel, the block_wise kernel processes a given cell.

// Given a grid with cell of size 10x10 pixels.
block_wise(vint2{10, 10}, A, B, C, A.domain()) |
  [] (auto a, auto b, auto c, box2d box)
  {

    // a, b and c are sub images representing A, B
    // and C at the current cell.
    // All the algorithms of the library work on sub images.

    // The box argument is the cell representation of A.domain() and holds
    // the coordinates of the current cell. box.p1() and box.p2() are
    // respectively the first and the last pixel of the cell.
};

Row Wise and Col Wise Kernels

row_wise and col_wise are shortcuts to process the image by row or by column. For example, the following compute row wise sums of a given image:

std::vector<int> sums(A.nrows(), 0);
row_wise(A, A.domain()) | [] (auto& a, vint2 coord)
{
  sums[coord[0]] += a;
};

Contributing

Contributions are welcome. Do not hesitate to fill issues, send pull requests, or send me emails at [email protected].

Do not miss the trending, libraries, news and articles with our weekly report.

Awesome C++ is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
Spin The Wheel Of Names for a cryptographically secure random name picker.
Schedule a when to meet poll.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.