Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

accessing cameras- abort() call

Hi, I've this simple code which worked fine for my 2 U.S.B webcams, but now for some strange reasons it sometimes stuck and it shows Runtime library error "R6010 abort() has been called". Detaching one of the camera, running the code again makes everything fine and sometimes just closing VS13 repairs it. I find it really absurd pls give any solution.

include "opencv2/opencv.hpp"

using namespace cv;

int main(int argc, char** argv) {

VideoCapture cap(1);
VideoCapture cap2(0);

if (!cap.open(1) || !cap2.open(0))
{
    std::cout << " --(!) Error reading images " << std::endl;
    return -1;
}

Mat frame;
Mat frame2;

cap >> frame;
cap2 >> frame2;

if (!frame.empty() || !frame2.empty())
{
    imshow("Frame of Device 0", frame);
    imshow("Frame of Device 1", frame2);
    //imwrite("imageold.jpeg", frame);
    //imwrite("imagenew.jpeg", frame2);
}
waitKey();
return 0;

}

accessing cameras- abort() call

Hi, I've this simple code which worked fine for my 2 U.S.B webcams, but now for some strange reasons it sometimes stuck and it shows Runtime library error "R6010 abort() has been called". Detaching one of the camera, running the code again makes everything fine and sometimes just closing VS13 repairs it. I find it really absurd pls give any solution.

include "opencv2/opencv.hpp"

#include "opencv2/opencv.hpp"
  

using namespace cv;

cv;

int main(int argc, char** argv) {

{
VideoCapture cap(1);
VideoCapture cap2(0);

if (!cap.open(1) || !cap2.open(0))
{
    std::cout << " --(!) Error reading images " << std::endl;
    return -1;
}

Mat frame;
Mat frame2;

cap >> frame;
cap2 >> frame2;

if (!frame.empty() || !frame2.empty())
{
    imshow("Frame of Device 0", frame);
    imshow("Frame of Device 1", frame2);
    //imwrite("imageold.jpeg", frame);
    //imwrite("imagenew.jpeg", frame2);
}
waitKey();
return 0;

}

click to hide/show revision 3
retagged

accessing cameras- abort() call

Hi, I've this simple code which worked fine for my 2 U.S.B webcams, but now for some strange reasons it sometimes stuck and it shows Runtime library error "R6010 abort() has been called". Detaching one of the camera, running the code again makes everything fine and sometimes just closing VS13 repairs it. I find it really absurd pls give any solution.

#include "opencv2/opencv.hpp"

using namespace cv;

int main(int argc, char** argv)
{
VideoCapture cap(1);
VideoCapture cap2(0);

if (!cap.open(1) || !cap2.open(0))
{
    std::cout << " --(!) Error reading images " << std::endl;
    return -1;
}

Mat frame;
Mat frame2;

cap >> frame;
cap2 >> frame2;

if (!frame.empty() || !frame2.empty())
{
    imshow("Frame of Device 0", frame);
    imshow("Frame of Device 1", frame2);
    //imwrite("imageold.jpeg", frame);
    //imwrite("imagenew.jpeg", frame2);
}
waitKey();
return 0;

}