I'm new to OpenCV. Took an example from official documentation. When I try to run the code, an error pops up. When you try to run the code, an error pops up when you call the function detectMultiScale ()
Mat image;
image = imread("1.jpg", CV_LOAD_IMAGE_COLOR);
imshow("cam", image);
// Load Face cascade (.xml file)
CascadeClassifier face_cascade;
face_cascade.load("C:/opencv/sources/data/haarcascades/haarcascade_frontalface_alt2.xml");
// Detect faces
std::vector<Rect> faces;
Mat frame_gray;
cvtColor(image, frame_gray, COLOR_BGR2GRAY);
equalizeHist(frame_gray, frame_gray);
face_cascade.detectMultiScale(frame_gray, faces, 1.1, 2, 0 | CV_HAAR_SCALE_IMAGE, Size(30, 30));
Tell me how to solve this problem?