I used the Scharr filter and I have the x and y gradients from here. May I know how I can plot the orientation map from here? Here's the picture of my Scharr filter result. It's a fingerprint image.
And this is the code i used.
Mat src,grad;
Mat grad_x,grad_y;
Mat abs_grad_x,abs_grad_y;
int scale=1;
int delta=0;
int ddepth=CV_16S;
int c;
src=cv::imread("remove_noise.bmp",CV_LOAD_IMAGE_UNCHANGED);
Scharr(src,grad_x,ddepth,1,0,scale,delta,BORDER_DEFAULT);
convertScaleAbs(grad_x,abs_grad_x);
Scharr( src, grad_y, ddepth, 0, 1, scale, delta, BORDER_DEFAULT );
convertScaleAbs(grad_y,abs_grad_y);
addWeighted(abs_grad_x,0.5,abs_grad_y,0.5,0,grad);
cv::imwrite("SobelScharr.bmp",grad);