Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Is it always necessary to convert image to double type before further execution?
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi,
I want to threshold an image. I can read the image and it is a byte type (UINT 8). I want to pass this image to another function as it is but it asks me to convert to double before I can pass to another function where threshold is performed via MEX MATLAB. How can I pass the image as the same data type? Thanks in advance.
댓글 수: 0
답변 (2개)
Walter Roberson
2013년 10월 2일
We don't know. You will need to tell us which function you are trying to pass it to.
댓글 수: 1
Image Analyst
2013년 10월 2일
Well apparently you can't. It said so. It said it wanted double and rejected your call when you tried to pass in uint8(). I don't know why, but that's the way it is. It seems like it could just cast it to double internally, but, for whatever reason, it doesn't. So I guess you have to live with it. Either use double() if it can take whatever range you have, or use im2double() if it wants it in the 0-1 range.
댓글 수: 6
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!