Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

it should not be:

Mat vectMat;

but :

vector<Mat> vectMat;

then, you should not call SobelDirections twice (it's quite expensive !)

std::vector<cv::Mat> sd = SobelDirections(image);
imshow("x", mat2gray(sd.at(0)));
imshow("y", mat2gray(sd.at(1)));
waitKey();

it should not be:

Mat vectMat;

vectMat;

but :

vector<Mat> vectMat;

then, you should not call SobelDirections twice (it's quite expensive !)

std::vector<cv::Mat> sd = SobelDirections(image);
imshow("x", mat2gray(sd.at(0)));
imshow("y", mat2gray(sd.at(1)));
waitKey();

in your SobelDirections() it should not be:

Mat vectMat;

but :

vector<Mat> vectMat;

then, you should not call SobelDirections twice (it's quite expensive !)

std::vector<cv::Mat> sd = SobelDirections(image);
imshow("x", mat2gray(sd.at(0)));
imshow("y", mat2gray(sd.at(1)));
waitKey();