I have a two 256*256 double images and i want to apply bitand operation but when i apply it shows this error' Double inputs must have integer values in the range of ASSUMEDTYPE' How to sort this thing.

댓글 수: 2

Guillaume
Guillaume 2016년 2월 10일
Your 'reply asap' is counterproductive. Ordering us to help you is more likely to result in you not getting any help.
Guillaume
Guillaume 2016년 2월 10일
What's not clear about the error message?

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2016년 2월 10일
편집: Jan 2016년 2월 14일

0 개 추천

BITAND performs an AND operation on the bits. This is defined for integer types only in a strict sense, but Matlab offers the method for double arrays also, if they have integer values. Exactly as the error message explains.
[EDITED] You can solve this by converting the image to an UINT8 type:
imageD = rand(256, 256); % Test data
image8 = uint8(image * 255);
Now bitand should work.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

질문:

2016년 2월 10일

편집:

Jan
2016년 2월 14일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by