error using fread
조회 수: 5 (최근 30일)
이전 댓글 표시
hye..i have a problem when run coding in matlab. it will give output like this
??? Error using ==> fread Invalid file identifier. Use fopen to generate a valid file identifier.
the fid value is -1.
i'm doing a final year project about image steganography. the problem is, when i use an image named 'baboon' with dimension 512x512, it run successfully. but when i use image named 'baboon1' with the same dimension and image, it will give error.
could anyone please tell me why?
댓글 수: 1
Jan
2012년 5월 12일
It is recommended to post the code, which causes the error. The size of the image is not helpful.
답변 (2개)
Image Analyst
2012년 5월 12일
What do you mean by " use"? Did you read in (or try to read in) either one of both images using imread()? Or did you try to use fread() for some reason?
댓글 수: 0
Walter Roberson
2012년 5월 12일
You are not testing the result of fopen() in order to determine whether the open succeeded or not. fid of -1 means that the open failed. The second output from fopen() will tell you the reason why.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Low-Level File I/O에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!