Thursday, November 23, 2017

OpenCV with wxWidgets

  1. Introduction
  2. Linux
  3. Windows
  4. References

Introduction

In this article, using OpenCV with wxWidgets is discussed with examples. For that, OpenCV and wxWidgets need to be installed in your system. Installing and using them on Linux and Windows platforms can be found at the following links.

Linux

Building an application using OpenCV and wxWidgets in Linux terminal is simple. As an example, a simple program called wxcvsimple.cpp (online) is discussed below. At the start of the program, in OnInit() method of the Application,
wxInitAllImageHandlers();
is called. Then, wxStaticBitmap variables are declared in MyFrame class, a derived class of wxFrame, to display images. The following code can be used to initialize wxStaticBitmap in the constructor of MyFrame class.

Monday, November 20, 2017

OpenCV on Linux using g++, CMake, Qt, Code::Blocks

  1. Introduction
  2. Using GCC ၊ CMake
  3. Using Qt
  4. Using Code::Blocks
  5. References

Introduction

To install OpenCV on your Linux machine, you need to have the following packages as prerequisites [Ope17g].
  • GCC 4.4.x or later
  • CMake 2.6 or higher
  • Git
  • GTK+2.x or higher, including headers (libgtk2.0-dev)
  • pkg-config
  • Python 2.6 or later and Numpy 1.5 or later with developer packages (python-dev, python-numpy)
  • ffmpeg or libav development packages: libavcodec-dev, libavformat-dev, libswscale-dev
  • [optional] libtbb2 libtbb-dev
  • [optional] libdc1394 2.x
  • [optional] libjpeg-dev, libpng-dev, libtiff-dev, libjasper-dev, libdc1394-22-dev
To install the required packages, you can enter the following commands in terminal.