int sz[] = { 1, 2, 128, 128}; cv::Mat blob = Mat(4, sz, CV_32F);
cv::Mat img1 = cv::imread("left_img.jpg", IMREAD_GRAYSCALE); cv::Mat img2 = cv::imread("right_img.jpg", IMREAD_GRAYSCALE); img1.copyTo(Mat(img.rows, img.cols, CV_32F, blob.ptr((0, 0)))); img2.copyTo(Mat(img.rows, img.cols, CV_32F, blob.ptr((0, 1)))); net.setInput(blob, "input"); //set the network input Mat result = net.forward(); //compute output
However, this give me error
tensorflow_model_loader': malloc():
What is the correct way of passing two channels blob into dnn::Net?
smallbin double linked list corrupted: 0x00000000024d1490 *