Things to remember while using OpenCV

It supports the following important OpenCV header files for C++ interface:

#include “opencv2/core/core.hpp”
#include “opencv2/flann/miniflann.hpp”
#include “opencv2/imgproc/imgproc.hpp”
#include “opencv2/photo/photo.hpp”
#include “opencv2/video/video.hpp”
#include “opencv2/features2d/features2d.hpp”
#include “opencv2/objdetect/objdetect.hpp”
#include “opencv2/calib3d/calib3d.hpp”
#include “opencv2/ml/ml.hpp”
#include “opencv2/highgui/highgui.hpp”
#include “opencv2/contrib/contrib.hpp”
#include “opencv2/core/core_c.h”
#include “opencv2/highgui/highgui_c.h”
#include “opencv2/imgproc/imgproc_c.h”

All openCv classes and functions are in cv namespace, so you have to add cv namespace. It supports following data types for arrays:

For single channel arrays :

CV_8U (8 bit unsigned integer)
CV_8S (8 bit signed integer)
CV_16U (16 bit unsigned integer)
CV_16S (16 bit signed integer)
CV_32S (32 bit signed integer)
CV_32F (32 bit floating point number)
CV_64F (64 bit float floating point number)

For multi channel arrays :

CV_8UC1 (single channel array with 8 bit unsigned integers)
CV_8UC2 (2 channel array with 8 bit unsigned integers)
CV_8UC3 (3 channel array with 8 bit unsigned integers)
CV_8UC4 (4 channel array with 8 bit unsigned integers)
CV_8UC(n) (n channel array with 8 bit unsigned integers (n can be from 1 to 512) )

Here possible values for <bit_depth> are 1,8,16,32 and 64

Advertisements

Published by

kaurdavinder

I am the one who discover myself daily through reading, writing, interacting with people and expressing my thoughts to inspire them if I would be able to bring a little change to the society through my work. I write blogs, participate in various social activities and want to be a Professional Speaker. Currently, I am pursuing my post graduation in Computer Applications from Guru Nanak Dev Engineering College, Ludhiana and I’m very much active in many technical & social communities.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s