gradient of an image
Which function can be used to find the gradient of the gray scale image in openCV?
Which function can be used to find the gradient of the gray scale image in openCV?
Maybe you could use Sobel derivatives
/// Gradient X
//Scharr( src_gray, grad_x, ddepth, 1, 0, scale, delta, BORDER_DEFAULT );
Sobel( src_gray, grad_x, ddepth, 1, 0, 3, scale, delta, BORDER_DEFAULT );
convertScaleAbs( grad_x, abs_grad_x );
/// Gradient Y
//Scharr( src_gray, grad_y, ddepth, 0, 1, scale, delta, BORDER_DEFAULT );
Sobel( src_gray, grad_y, ddepth, 0, 1, 3, scale, delta, BORDER_DEFAULT );
convertScaleAbs( grad_y, abs_grad_y );
You could use the official tutorial on using Sobel operators to get some more explanation about how it is working.
Asked: 2014-08-26 04:44:25 -0600
Seen: 218 times
Last updated: Aug 26 '14
count only the black pixels inside the contour. [closed]
OpenCV Matrix memory release after imread command
SolvePnP returns wrong rotation
Draw the lines detected by cv::HoughLines
Stretch all of the image rows in order to make them of constant length
How to use opencv to find circles
How to use PCA SIFT in opencv ?
Adjust the rotation of car plate
Is there a 2.0 series version of the HDR tutorial? Currently broken.
Here is an example of Sobel operator which computes an approximation of the gradient of an image intensity function. http://docs.opencv.org/2.4.4/doc/tutorials/imgproc/imgtrans/sobel_derivatives/sobel_derivatives.html?highlight=sobel