Ask Your Question

Revision history [back]

c++ imread filepath in windows

Greetings,

I've tried to google this to no avail. Please help me understand what is wrong with this file path:

Mat lena = imread("C:\Users\dasboomer\Desktop\Building-Computer-Vision-Projects-with-OpenCV4-and-CPlusPlus-master\Chapter03/lena.jpg");

I've tried double \, changing the last \ to a / , tried and failed on a bouquet of options.

Thank you for your assistance

c++ imread filepath in windows

Greetings,

I've tried to google this to no avail. Please help me understand what is wrong with this file path:

Mat lena = imread("C:\Users\dasboomer\Desktop\Building-Computer-Vision-Projects-with-OpenCV4-and-CPlusPlus-master\Chapter03/lena.jpg");

I've tried changing:

  • backslash to double \, changing the last \ backslash
  • backslash to a / , tried and failed on a bouquet of options.

    forward slash backslash
  • to double forward slash

Thank you for your assistance

c++ imread filepath in windows

Greetings,

I've tried to google this to no avail. Please help me understand what is wrong with this file path:

Mat lena = imread("C:\Users\dasboomer\Desktop\Building-Computer-Vision-Projects-with-OpenCV4-and-CPlusPlus-master\Chapter03/lena.jpg");

imread("C:\\Users\dasboomer\Desktop\Building-Computer-Vision-Projects-with-OpenCV4-and-CPlusPlus-master\Chapter03/lena.jpg");

I've tried changing:

  • backslash to double backslash
  • backslash to forward slash backslash
  • to double forward slash

Thank you for your assistance