Skip to main content


Showing posts from February, 2016

Opencv 3.1 Tutorial Optical flow (calcOpticalFlowFarneback)

Farneback Optical flow Opencv simple C++ tutorial and code to achieve optical flow and farneback optical flow of moving an object in OpenCV video. Let's check the video example and the achieved result on my blog. Working and well describe code is included.  Optical Flow Farneback parameters remarks You need 2 images at least to calculate optical flow, the previous image (prevgray) and the current image (img).  !! The previous image must be initialized first !! Both images have to be grayscale.  The result is stored in flowUmat which has the same size as inputs but the format is CV_32FC2 calcOpticalFlowFarneback (prevgray, img, flowUmat,  0.4 ,  1 ,  12 ,  2 ,  8 ,  1.2 ,  0 ); 0.4- image pyramid or simple image scale 1 is the number of pyramid layers. 1 means that flow is calculated only from the previous image.  12 is window size. Flow is computed over the window larger value is more robust to the noise.  2 mean number of iteration of the algorithm 8 is polyn

Microsoft Project oxford computer vision

Research AI and Computer vision There is some demo. Actually it works. I am younger and good thing is that gender is right. Project oxford This is great project from Microsoft research.. The computer vision SDK and API of a state-of-the-art image algorithms. Gender classification optical letter Recognition and many more. Check all the demos of this great project Face Detection Face Verification Emotion Recognition Face Tracking Motion Detection Stabilization Speech to Text Text to Speech Speaker Identification Speaker Verification Spell Check Word Breaking More information about microsoft computer vision research you can find here  research microsoft There are project for images understanding like  microsoft Coco i mentioned in some    pervious   articles  ( More about Coco ). Another projects like Human behavior and video understanding, also 3D modelling and machine learning optimization and many more articles, source code and ideas. The lots of informations are

Opencv tutorial, VideoCapture playback, frame skip

Opencv VideoCapture playback, fast frame replay Opencv C++ tutorial how to playback video frames and video loaded into memory, Fast video replay by slider. Simple described and working tutorial working in Visual studio 2015 with simple installation by Nugets  Here  or also with classical one..  This is not something special, but useful. Few days earlier, I post in memory video access by vector<Mat>. Great, fast approach but the short video fills RAM memory and crash the program even if you have 8 GB available. Maybe It is to danger and i decided to cancel this article.  In this example, i want to access GOPRO HD faster and skipped frames video and in memory is pure fantasy over minute video length.  Opencv VideoCapture property  CV_CAP_PROP_POS_FRAMES I don't add extra comments. The code is pretty simple. I only highlights the important parts by RED font color.  This is only important part. By the slider_position value set the  CV_CAP_PROP_POS_FRAM

Computer vision in mobile apps.

Computer vision mobile apps The biggest piece of computer vision apps are related to fun. I am not talking about image processing but about computer vision. Look at these apps. Fun Morph apps  Fun applications are mainly focus on augmented reality and Face Substitution or replacement. This 10 minutes of fun applications are great instead of youtube. You can create your child looks with your gf with 2 photos and one click. This is great valuable tool in movie and TV insdustry. Smart film effects in future mobile phones will be scary tool. Imagine 2000 video of Leonardo Dicaprio at the same time on difference place on the earth.  This apps are for fun and definitelly for short period Sport computer vision apps The profesional footbal player uses smart tracking belts. Or some kind of computer vision tracking apps. All this apps in Hockey, Ragby and American fotbal focus on strategy. This is professional usage of computer vision and system like this for his price

Install opencv with ffmpeg Debian Jessie linux

FFMPEG Debian Jessie and Opencv instalation Share this for more tutorials and computer vision post from me.. Thanks best Vladimir   + // Just update and upgrade your system sudo apt-get update sudo apt-get -y upgrade //Install basic staff in any case you dont have this packages sudo apt-get -y install build-essential sudo apt-get -y install cmake sudo apt-get -y install pkg-config Install opencv dependencies sudo apt-get -y install libgtk2.0-dev python-dev python-numpy libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libunicap2 libunicap2-dev libdc1394-22-dev libdc1394-22 libdc1394-utils libv4l-0 libv4l-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libdc1394-utils libjpeg-dev libpng-dev libtiff-devlibjasper-dev libtiff5 libtiff5-dev libopenexr-dev libjasper-dev Install FFMPEG sudo apt-get -y install git make nasm pkg-config libx264-dev libxext-dev libxfixes-dev zlib1g-dev sud

Opencv tutorial, Read all images withim a folder (Windows) and Labeled Data

Load all pictures inside the Folder into Opencv Mat This is example how to load all images inside the folder on the Windows system. I use this to collect vector<Mat> to train classificator for image recognition. Collect positive and negative pictures Basically, I load all positive samples from one Folder and negative samples from another Folder into one vector<Mat>. Code show only reading from one folder. Label positive and negative data in Opencv Also It is easy to count files (images) in one folder and another folder and label the images in your vector in sense that the first part contains only positive samples and when Iterator is greater than Num of positive samples rest we can labeled as negative.  Mat of labels 1 for positive and - 1 for negative you can create like that This is vector  with POSITIVE | NEGATIVE image samples inside The number of positive images and negative images is count in code at the end of this article.  vecto