# Intel® Threading Building Blocks.
Stereo sample

The Stereo example is an implementation of the algorithm that applies stereoscopic 3D effect on two input images and achieved by means of encoding each eye's image using filters of different colors: red and blue - Anaglyph effect.
The example uses the flow graph interface and can be executed both on CPU and GPU for image processing. The output of this application is a PNG image with the anaglyph effect applied.
This example includes software developed by Lode Vandevenne. See here for copyright information.
It exemplifies the opencl_node usage in the flow graph interface in context of creating a stereo image from two input images.
This example uses C++11 lambda expressions. Specifying a compiler option such as -std=c++11 or similar might be necessary in order to build the example. For more information please refer to the documentation for the compiler you use.

System Requirements

For the most up to date system requirements, see the release notes.

Additionally, you have to install OpenCL™ version 1.2 or higher in order to run this example. See the OpenCL™ Drivers and Runtimes for Intel® Architecture.

Files

stereo.cpp
  The implementation of stereo image creation algorithm based on the flow graph interface.
lodepng.cpp
  Library for reading and writing png images.
lodepng.h
  Public header file for the lodepng library.
utils.h
  Support functions for this example.
imageEffects.cl
  OpenCL kernel file with image effects algorithms.
Makefile
  Makefile for building the example.

Directories

msvs
  Contains Microsoft* Visual Studio* workspace for building and running the example (Windows* systems only).
xcode
  Contains Xcode* IDE workspace for building and running the example (macOS* systems only).

For information about the minimum supported version of IDE, see release notes.

Build instructions

General build directions can be found here.

Usage

`stereo -h`
  Prints the help for command line options
`stereo [-v] [-alg=value] [first_filename] [second_filename]`
  -v print diagnostic output to screen
  -alg name of the used pipeline realization - can be host, target (default) or host_target
  first_filename first input file name
  second_filename second input file name

Up to parent directory

Legal Information

Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.
* Other names and brands may be claimed as the property of others.
© 2020, Intel Corporation

LodePNG version 20160409 Copyright (c) 2005-2016 Lode Vandevenne

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.