Mat estimateRigidTransform(const Mat& srcpt, const Mat& dstpt, bool fullAffine)¶ Computes optimal affine transformation between two 2D point sets Parameters: * srcpt – The first input 2D point set * dst – The second input 2D point set of the same size and the same type as A * fullAffine – If true, the function finds the optimal affine transformation with no any additional resrictions (i.e. there are 6 degrees of freedom); otherwise, the class of transformations to choose from is limited to combinations of translation, rotation and uniform scaling (i.e. there are 5 degrees of freedom) The function finds the optimal affine transform [A|b] (a 2 \times 3 floating-point matrix) that approximates best the transformation from \texttt{srcpt}_i to \texttt{dstpt}_i : [A^*|b^*] = arg \min _{[A|b]} \sum _i \| \texttt{dstpt} _i - A { \texttt{srcpt} _i}^T - b \| ^2 where [A|b] can be either arbitrary (when fullAffine=true ) or have form
We propose a joint optical flow and principal component analysis (PCA) method for motion detection. PCA is used to analyze optical flows so that major optical flows corresponding to moving objects in a local window can be better extracted. This joint approach can efficiently detect moving objects and more successfully suppress small turbulence. It is particularly useful for motion detection from outdoor videos with low quality. It can also effectively delineate moving objects in both static and dynamic background. Experimental results demonstrate that this approach outperforms other existing methods by extracting the moving objects more completely with lower false alarms.