#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <QDebug>
int main()
{
// Read input image
cv::Mat img= cv::imread("D:\\extra\\Procesare de imagine\\altele\\images\\group.jpg");
if (!img.data)
{
qDebug("no image");
return 0;
}
// Display the image
cv::namedWindow("Image");
cv::imshow("Image",img);
// Erode the image
cv::Mat eroded;
cv::erode(img,eroded,cv::Mat());
cv::waitKey();
return 0;
}
Hi, I have the following problem with opencv (in Qt) function erode() and dilate(). I use the msvc10 compiler. I try to run a simple code , but at the line cv::erode(img,eroded,cv::Mat()) it crashes. I don't get any error message, just a dialog with "program.exe has stopped working". I go to "Debug the program" and I get Call Stack tbb.dll ([Frames below may be incorrect and/or missing, no symbols loaded for tbb.dll] : ). I mention that from start I had problems with building in Debug mode (imread does not work in Debug, only cvLoadImage), and the function cv::threshold() crashes in the same way, with very simple code. I read that it's possible to solve by copying the tbb.pdb next to tbb.dll, but it doesn't work.