OpenCV support about 3 types subtraction algorithm.
Those are MOG, MOG2, GMG algorithms.
Detailed algorithm explain is, please refer to opencv documnet.
In this post, just introduce source code and result of background subtraction.
firstly, see the results of 3 algorithms.
origin imageMOG resultMOG2 resultCMG result Especially, in MOG2 result, we can see the gray pixel color, that means shadow.This is result video of the source code.source code is here-> #include < stdio.h>
#include < iostream>
#include < opencv2\opencv.hpp>
#include < opencv2/core/core.hpp>
#include < opencv2/highgui/highgui.hpp>
#include < opencv2/video/background_segm.hpp>
#pragma comment(lib, "opencv_core247d.lib")
#pragma comment(lib, "opencv_imgproc247d.lib") //MAT processing
#pragma comment(lib, "opencv_objdetect247d.lib") //HOGDescriptor
//#pragma comment(lib, "opencv…
AMP is abbreviation of Accelerated Massive Parallelism.
It is maintained by Microsoft and it run based on DirectX 11.
So as I know, AMP works in windows only, but there seems to be an attempt to run on other os.
Basically, AMP run on these environment Windows 7, Windows 8, Windows Server 2008 R2, or Windows Server 2012 DirectX 11 Feature Level 11.0 or later hardware For debugging on the software emulator, Windows 8 or Windows Server 2012 is required. For debugging on the hardware, you must install the drivers for your graphics card.
And no need to install for AMP, If you use Visual Studio.
So let's check your computer condition for parallel programming.
< code start >
< code end >
This is my condition.
We can check whether run or not by this.
if, accs.size() == 0, then there is no parallel machine.
I think AMP is easy and usefull to use parallel GPU programming.
This is useful for creating Windows applications.
Created Date : 2011.8Language : MatlabTool : Matlab 2010 Library & Utilized : - Reference : Multiple View Geometry (Hartly and Zisserman) etc. : Intrinsic Parameter, 2 adjacent images, matching points
This code is 8 point algorithm.
If we know over 8 corresponding points between two images, we can know Rotation and Translation of camera movement using 8 point algorithm.
The 8 point algorithm is well known in the vision major field.
The algorihtm is introduced at the Multiple View Geometry Book and many websites.
Have you ever listened Fundamental matrix song? The song is very cheerful. ^^
You can download 8 point algorithm at the Peter Covesi homepage.
My code is very simple. so I believe my code will be useful to you.
I will upload RANSAC version later.
So, as the above equation, H matrix convert A matrix to B matrix.In here, A is left, B is right 4 points in fig 1. In OpenCV function, findHomography function gives H matrix.Input parameter is findHomography(A, B). Do not confuse. After get H matrix, we can warp image using various transform functions in opencv.In this example, I use warpPerspective function, because rectangle shape is a trapezoidal model.Input parameter is warpPerspective(Origin_mage, warped_image, H, cv::Size(cols, rows)); see the test video of this example source code in herehttps://www.youtube.com/watch?v=UszvePGFuMQ
Firstly, to obtain 2 adjacent images
extract good feature to track.
Match each features between 2 images
Get Homography matrix
Warp current image to old image by using H.
However, H is multiplied by cumulatively.