- Candy algorithm
- Sobel algorithm

cv::Mat edges;
cv::GaussianBlur( frame, edges, cv::Size(3,3), 0, 0, cv::BORDER_DEFAULT );
cv::cvtColor( edges, edges, CV_RGB2GRAY );
cv::Mat grad_x, grad_y;
cv::Mat abs_grad_x, abs_grad_y;
cv::Sobel( edges, grad_x, CV_16S, 1, 0, 3, 1, 0, cv::BORDER_DEFAULT );
cv::Sobel( edges, grad_y, CV_16S, 0, 1, 3, 1, 0, cv::BORDER_DEFAULT );
cv::convertScaleAbs( grad_x, abs_grad_x );
cv::convertScaleAbs( grad_y, abs_grad_y );
cv::addWeighted( abs_grad_x, 0.5, abs_grad_y, 0.5, 0, edges );
cv::imshow( windowName, edges );
cv::Mat edges;
cv::GaussianBlur( frame, edges, cv::Size(3,3), 0, 0, cv::BORDER_DEFAULT );
cv::cvtColor( edges, edges, CV_RGB2GRAY );
cv::Mat grad_x, grad_y;
cv::Mat abs_grad_x, abs_grad_y;
cv::Sobel( edges, grad_x, CV_16S, 1, 0, 3, 1, 0, cv::BORDER_DEFAULT );
cv::Sobel( edges, grad_y, CV_16S, 0, 1, 3, 1, 0, cv::BORDER_DEFAULT );
cv::convertScaleAbs( grad_x, abs_grad_x );
cv::convertScaleAbs( grad_y, abs_grad_y );
cv::addWeighted( abs_grad_x, 0.5, abs_grad_y, 0.5, 0, edges );
cv::imshow( windowName, edges );
cv::Mat edges; cv::GaussianBlur( frame, edges, cv::Size(3,3), 0, 0, cv::BORDER_DEFAULT ); cv::cvtColor( edges, edges, CV_RGB2GRAY ); cv::Mat grad_x, grad_y; cv::Mat abs_grad_x, abs_grad_y; cv::Sobel( edges, grad_x, CV_16S, 1, 0, 3, 1, 0, cv::BORDER_DEFAULT ); cv::Sobel( edges, grad_y, CV_16S, 0, 1, 3, 1, 0, cv::BORDER_DEFAULT ); cv::convertScaleAbs( grad_x, abs_grad_x ); cv::convertScaleAbs( grad_y, abs_grad_y ); cv::addWeighted( abs_grad_x, 0.5, abs_grad_y, 0.5, 0, edges ); cv::imshow( windowName, edges );Video Analysis 2.zip Download