Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg\"");

this probably did not work, imageGray is empty `

Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg\"");

this probably did not work, imageGray is empty `empty

the last \" should go (else it is not a valid filename), how does this even compile, given unmatched " ?

Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg\"");

this probably did not work, imageGray is empty

the last your filename is already invalid, since \" should go (else it is not will resolve to a valid filename), how does this even compile, given unmatched trailing "\ ?

try:

 Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg");

Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg\"");

this probably did not work, imageGray is emptyempty.

your filename is already invalid, since \" will resolve to a trailing \

try:

 Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg");

Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg\"");

this did not work, imageGray is empty.

your filename is already invalid, since \" will resolve to a trailing \

try:

 Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg");

tips for the future:

  • ALWAYS check like if (image.empty()) when using imread(), using VideoCapture, etc.
  • if you get an assertion, follow it upwards in yo, b r code, use a lot of print statements, Mat.dump(),...
  • never use your native language for variable names, comments and such, stick with (whatever broken, it does not matter !!) english, the day will come, when you will need help from the internet community...

Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg\"");

this did not work, imageGray is empty.

your filename is already invalid, since \" will resolve to a trailing \

try:

 Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg");

tips for the future:

  • ALWAYS check like if (image.empty()) when using imread(), using VideoCapture, etc.etc. IO can never be trusted
  • if you get an assertion, follow it upwards in yo, b r code, use a lot of print statements, Mat.dump(),...
  • never use your native language for variable names, comments and such, stick with (whatever broken, it does not matter !!) english, the day will come, when you will need help from the internet community...

Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg\"");

this did not work, imageGray is empty.

your filename is already invalid, since \" will resolve to a trailing \

try:

 Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg");

tips for the future:

  • ALWAYS check like if (image.empty()) when using imread(), using VideoCapture, etc. IO can never be trusted
  • if you get an assertion, follow it upwards in yo, b r your code, use a lot of print statements, Mat.dump(),...
  • never use your native language for variable names, comments and such, stick with (whatever broken, it does not matter !!) english, the day will come, when you will need help from the internet community...

Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg\"");

this did not work, imageGray is empty.

your filename is already invalid, since \" will resolve to a trailing \

try:

 Mat imageGray = Imgcodecs.imread("C:\\Users\\PC\\Desktop\\placa.jpg");

tips for the future:

  • ALWAYS check like if (image.empty()) when using imread(), using VideoCapture, etc. IO can never be trusted
  • if you get an assertion, follow it upwards in your code, use a lot of print statements, Mat.dump(),...Mat.dump(),... the actual reason for your problem is mostly a few layers up, not where the assert happens
  • never use your native language for variable names, comments and such, stick with (whatever broken, it does not matter !!) english, the day will come, when you will need help from the internet community...