FL-Essentials

Version 1.2.0 (2014-04-08)

Author: Dr. Furqan Ullah

Copyright: All rights reserved.

 

REAL3D.PK

INSTALLATION

SCREENSHOT

DOWNLOAD

FORUM

 

Introduction:

FL-Essentials is a FLTK and OpenCV based software system which provides extreme easiness in image processing with FLTK GUI. It consists of C++ class library and gives parallel processing support. It makes FLTK functionality easier, faster, and lighter. It works fine as a static or shared library.

I wrote this library to make FLTK a lot easier for real-time image and camera handlings.

 

Requirements:

1.       FLTK 1.3.x

2.       OpenCV 2.x.x

3.       Visual Studio 2008, 2010, 2012

4.       Windows Platform

   

Example: Load and show an Image in FLTK GUI:

#include "FLE_HeaderFiles.h"

int main(int argc, char** argv)

{

       FurApp::ImageBox *b = new FurApp::ImageBox(0, 0, 300, 300, "Load and Show an Image");

       b->SetImageFitToImageBoxSize(true);

       b->LoadImg("F:\\2.png");

       b->Show();

       return Fl::run();

}

 

Example: Load an image using OpenCV and display inside of a FLTK window:

#include "FLE_HeaderFiles.h"

int main(int argc, char** argv)

{

    cv::Mat image = cv::imread("F:\\2.png", CV_LOAD_IMAGE_UNCHANGED);

    if(!image.data) return 0;

 

    FurApp::ImageBox *b = new FurApp::ImageBox(0, 0, image.cols, image.rows, "OpenCV 1.x or 2.x.x");

    b->SetImage(image);

    b->Show();

    return Fl::run();

}

 

Example: Capture video from a camera and display in FLTK GUI on a parallel thread:

#include "FLE_HeaderFiles.h"

int main(int argc, char** argv)

{

    FurApp::ImageBox *p = new FurApp::ImageBox(0, 0, 640, 480, "Live Video – FL-Essentials Viewer");

    p->Show();

 

    FurApp::CamDev *cap = new FurApp::CamDev(0);

    if(cap->isInitialized())

    {

       cap->SetImageBox(p);

       cap->Start();

    }

    return Fl::run();

}

 

Installation Instructions for Windows:

return to top ↑

 

I am assuming that you have the basic knowledge of Visual Studio C++. This installation tutorial is for VS2008, VS2010, VS2012.

1.       First of all download the OpenCV 2.4.x from OpenCV download website which is http://opencv.org/downloads.html

2.       Install OpenCV to C:\\ drive.

3.       Download FLTK from the download page of fltk.org http://www.fltk.org/software.php

4.       Build FLTK, go to \fltk-1.3.2\ide\VisualC2010\fltk.sln and open fltk.sln. Build with debug and release.

5.       Copy FL-Essentials library folder to C:\\ drive.

6.       Create a new empty project in Visual Studio C++.

7.       Create a new main.cpp file or add any of the examples provided with FL-Essentials Library.

8.       Right click on the Project and go to project Properties

9.       Click on the C/C++ => General and add Addition Include Directories. You need to include FL-Essentials FLTK, and OpenCV (total 3) include folders.  

1)      C:\Mylibs\FLE-1.2.0\include

2)      C:\Mylibs\FLTK-1.3.x \include

3)      C:\Mylibs\OpenCV-246\include  

10.   Click on Linker => General and add Addition Libraries Directories folders. You need to add FL-Essentials, FLTK, and OpenCV (total 3) library folders.  

1)      C:\Mylibs\FLE-1.2.0\libs

2)      C:\Mylibs\FLTK-1.3.x \lib

3)      C:\Mylibs\ OpenCV-246 \lib\Release  

11.   Finally, input the OpenCV, FLTK, and FL-Essentials libraries (*.lib files) into the linker. Click on Linker => Input and add the name of lib files into the Additional Dependencies.

Input following libraries:

fltk.lib

fltkimages.lib

fltkjpeg.lib

fltkpng.lib

fltkzlib.lib

opencv_core246.lib

opencv_imgproc246.lib

opencv_highgui246.lib

libjpeg.lib

libpng.lib

libtiff.lib

libjasper.lib

IlmImf.lib

zlib.lib

comctl32.lib

ws2_32.lib

vfw32.lib

FL_EssentialsLib_120_vs2010_x86_MD.lib

 

 

12.   Done. Now build and run your test project…

 

Important Note for OpenCV Dynamic Linking Libraries:

return to top ↑

 

1.       Link with these libraries:

FL_EssentialsLib_120_vs2010_x86_MD.lib (For Release)

FL_EssentialsLib_120_vs2010_x86_MDd.lib (For Debug)

 

2.       You should notice that C:\opencv246\opencv\build\x86\vc10\lib folder does not contain image libraries;

libjpeg.lib           -              libjpegd.lib

libpng.lib            -              libpngd.lib

libtiff.lib              -              libtiffd.lib

libjasper.lib       -              libjasperd.lib

IlmImf.lib            -              IlmImfd.lib

zlib.lib                  -              zlibd.lib

just copy these image libraries from C:\opencv\build\x86\vc10\staticlib folder to C:\opencv246\opencv\build\x86\vc10\lib folder.

 

3.       You should check that your project settings are correct. For this go to Project Properties => C/C++ => Code Generation => Runtime Library =>

Multi-threaded DLL (/MD) (for Release)

Multi-threaded Debug DLL (/MDd) (for Debug)

 

4.       You need three DLL files in order to run your application.

opencv_core246.dll                        -              opencv_core246d.dll

opencv_highgui246.dll                 -              opencv_highgui246d.dll

opencv_imgproc246.dll                -              opencv_imgproc246d.dll

 

5.       Copy these three DLL files from C:\opencv\build\x86\vc10\bin to your project folder where your *.exe is generated, usually Debug and Release folders contains your application *.exe file.

 

Important Note for OpenCV Static Linking Libraries:

return to top ↑

 

1.       Link with these libraries:

FL_EssentialsLib_120_vs2010_x86_MT.lib (Release)

FL_EssentialsLib_120_vs2010_x86_MTd.lib (Debug)

 

2.       Add this this folder C:\opencv\build\x86\vc10\staticlib to Linker => General => Addition Libraries Directories.

 

3.       Change your settings to Project Properties => C/C++ => Code Generation => Runtime Library =>

Multi-threaded (/MT) (for Release)

Multi-threaded Debug (/MTd) (for Debug)

 

4.       You don’t need any DLL file in order to run your application in case of static linking.

 

return to top ↑

   

Output of Examples

 

FLE_Essentials_Example-3

Output of FLE_Image Example # 3:

Multiple Still Images Inside of a FLTK Window: 3rd picture represents the green color intensity of the 2nd picture, 6th picture shows the RGB color plot of the 5th picture.

 

 

FLE_Essentials_Example-4

Output of FLE_Camera Example # 4:

Live stream of a camera is being running along with its real-time RGB color intensity plot.

 

FLE_Essentials_Example-5

Output of FLE_Camera Example # 5:

Live stream (with smoothing filter) of a camera is being running along with its real-time RGB color intensity plot.

 

 

FLE_Essentials_Example-6

Output of FLE_Camera Example # 6:

Live stream of a camera is being displaying in 6 windows with different image processing effects and filters such as zooming, rotating, dots, smoothing, feature detection, RGB plot, etc. The background image is on a separate thread and being updating in real-time.

 

 

 

return to top ↑