I am new to Programming using Visual Studio and openCv. I wrote a simple program to display the red channel of an image, but every time i run the code it throws "DEBUG ASSERTION FAILED" error.
#include
#include
#include
using namespace std;
using namespace cv;
int main() {
Mat image;
image = imread("C:/Users/siddartha/Pictures/sample.jpg");
if (!image.data) {
cout = 3) {
vector rgb;
split(image, rgb);
namedWindow("r");
imshow("r", rgb[0]);
}
}
while (1);
return 0;
}
Error:
Debug Assertion Failed!
Program: ...sual Studio 2015\Projects\sampleOpenCV\Debug\sampleOpenCV.exe
File: minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp
Line: 892
Expression: is_block_type_valid(header->_block_use)
