Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

is there a way to read an image directly from a directory (not passing arguments)?

HI all I have been trying ro read an image: see theses 2 lines. But I just don get it. If I use arguments then I can, but, what I need is to get it directly from the folder. Please your adivise Thanks

include <opencv2 core.hpp="">

using namespace cv;

include <iostream>

using namespace std;

int main() { //Mat left = imread("C:\Users\Fcastro\source\repos\pose\cbimages\0_degrees.pgm"); Mat left = imread("C:/Users/Fcastro/source/repos/pose/cbimages/0_degrees.pgm"); imshow("Left Image View", left); getchar(); }

is there a way to read an image directly from a directory (not passing arguments)?

HI all I have been trying ro read an image: see theses 2 lines. But I just don get it. If I use arguments then I can, but, what I need is to get it directly from the folder. Please your adivise ThanksThanks.

include <opencv2 core.hpp="">

#include <opencv2/core.hpp>
using namespace cv;

cv;

include <iostream>

#include <iostream> using namespace std;

std;

int main() { //Mat left = imread("C:\Users\Fcastro\source\repos\pose\cbimages\0_degrees.pgm"); imread("C:\\Users\\Fcastro\\source\\repos\\pose\\cbimages\\0_degrees.pgm"); Mat left = imread("C:/Users/Fcastro/source/repos/pose/cbimages/0_degrees.pgm"); imshow("Left Image View", left); getchar(); }

}