void Sobel(InputArray src, OutputArray dst, int ddepth, int dx, int dy, int ksize=3, double scale=1, double delta=0, int borderType=BORDER_DEFAULT )
Parameters:
This is a code from OpenCV documentation. I have made some changes to it.
Result:
Parameters:
- src – input image.
- dst – output image of the same size and the same number of channels as src .
- ddepth –
- output image depth; the following combinations of src.depth() and ddepth are supported:
- src.depth() = CV_8U, ddepth = -1/CV_16S/CV_32F/CV_64F
- src.depth() = CV_16U/CV_16S, ddepth = -1/CV_32F/CV_64F
- src.depth() = CV_32F, ddepth = -1/CV_32F/CV_64F
- src.depth() = CV_64F, ddepth = -1/CV_64F
- xorder – order of the derivative x.
- yorder – order of the derivative y.
- ksize – size of the extended Sobel kernel; it must be 1, 3, 5, or 7.
- scale – optional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels() for details).
- delta – optional delta value that is added to the results prior to storing them in dst.
- borderType – pixel extrapolation method (see borderInterpolate() for details).
Functions:
Example:
--------------#include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "iostream" using namespace cv; using namespace std; int main( ) { Mat src1; src1 = imread("lena.jpg", CV_LOAD_IMAGE_COLOR); namedWindow( "Original image", CV_WINDOW_AUTOSIZE ); imshow( "Original image", src1 ); Mat grey; cvtColor(src1, grey, CV_BGR2GRAY); Mat sobelx; Sobel(grey, sobelx, CV_32F, 1, 0); double minVal, maxVal; minMaxLoc(sobelx, &minVal, &maxVal); //find minimum and maximum intensities cout << "minVal : " << minVal << endl << "maxVal : " << maxVal << endl; Mat draw; sobelx.convertTo(draw, CV_8U, 255.0/(maxVal - minVal), -minVal * 255.0/(maxVal - minVal)); namedWindow("image", CV_WINDOW_AUTOSIZE); imshow("image", draw); waitKey(0); return 0; }--------------
Result:
Hi do you have any tutorials regarding how to detect tables and crop and save those tables as images?
ReplyDeleteExcellent !
ReplyDeleteHow can I do a YUV444 to YUV422 resampling and vice versa using an opencv function?
ReplyDeleteI did not find this function.
Affordable research paper writing services
ReplyDeleteare very difficult to complete because they require extensive research and most students lack the appropriate skills of researching,thats why students opt to find help from writing companies.
Having such countless fascinating points on your site is exceptionally amazing. It is exceptionally valuable to me. For more data about the various sorts of click counters, if it's not too much trouble, visit the Online tally counter profile there you will get free internet based click counter software.
ReplyDeleteI value this article's depth and clarity. You've succeeded in providing clear and insightful explanations of concepts. Do you want some fascinating facts? Examine this profile Mental Age Test . Though not always accurate, it can be enlightening.
ReplyDelete