Can't read header

asked 2020-01-09 04:35:54 -0500

rdoyle gravatar image

I am new to OpenCV and not sure what this error means or where I should start debugging it.

imdecode_('/tmp/__opencv_temp.OurYMr'): can't read header: OpenCV(4.1.2) /io/opencv/modules/imgcodecs/src/grfmt_jpeg2000.cpp:196: error: (-215:Assertion failed) depth == 8 || depth == 16 in function 'readHeader'

Any help would be appreciated.

edit retag flag offensive close merge delete


I'm not sure that opencv can solve your problem. Can you read file with an another lib?

LBerger gravatar imageLBerger ( 2020-01-09 07:04:22 -0500 )edit

Jpeg 2000 supports bit depths other than 8 or 16 - but OpenCV's codec _perhaps_ not. So, I'd check that your file is ok

mvuori gravatar imagemvuori ( 2020-01-09 07:10:15 -0500 )edit