i'am trying to write many functions computing gradient with deferent kernels which return a vector of Mat object here one exemple :
std::vector<cv::Mat> histogram::SobelDirections(cv::Mat &frame){
Mat vectMat;
Mat Sx;
cv::Sobel(frame, Sx, CV_32F, 1, 0, 3);
Mat Sy;
cv::Sobel(frame, Sy, CV_32F, 0, 1, 3);
imshow("x", mat2gray(Sx));
imshow("y", mat2gray(Sy));
vectMat.push_back(Sx);
vectMat.push_back(Sy);
return vectMat;
}
i get this , any help would be appreciated
Program: C Windows system321MSVCP110D. dll
File: C:\Program Files icrosoft Visual Studio Include Vector Line: 1124
Expression: vector subscript out of range