Checking for corrupted JPEG files
조회 수: 10 (최근 30일)
이전 댓글 표시
When reading JPEG files using imread, I sometimes get the warning
Warning: JPEG library error (8 bit), "Corrupt JPEG data: premature end of data segment".
I get an image that has correct size, but its content is messed up and causes trouble down the line, when it gets processed. I need to weed out these images automatically. Is there any way to get instead of the displayed warning some flag that could be used for logical operations? Imread help does not mention anything of that sort. :-(
댓글 수: 0
채택된 답변
KSSV
2021년 2월 10일
You may capture the warning and skip the processing, if you get warning. Refer on how to capture the warning.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio and Video Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!