/******************************** Author: Sravanthi Kota Venkata ********************************/ #include "tracking.h" /** Computes lambda matrix, strength at each pixel det = determinant( [ IverticalEdgeSq IhorzVertEdge; IhorzVertEdge IhorizontalEdgeSq] ) ; tr = IverticalEdgeSq + IhorizontalEdgeSq; lamdba = det/tr; Lambda is the measure of the strength of pixel neighborhood. By strength we mean the amount of edge information it has, which translates to sharp features in the image. Input: Edge images - vertical and horizontal Window size (neighborhood size) Output: Lambda, strength of pixel neighborhood Given the edge images, we compute strength based on how strong the edges are within each neighborhood. **/ F2D* calcGoodFeature(F2D* verticalEdgeImage, F2D* horizontalEdgeImage, int cols, int rows, int winSize) { int i, j, k, ind; F2D *verticalEdgeSq, *horizontalEdgeSq, *horzVertEdge; F2D *tr, *det, *lambda; F2D *cummulative_verticalEdgeSq, *cummulative_horzVertEdge, *cummulative_horizontalEdgeSq; verticalEdgeSq = fMallocHandle(rows, cols); horzVertEdge = fMallocHandle(rows, cols); horizontalEdgeSq = fMallocHandle(rows, cols); for( i=0; i