Not (~) operation of binary image after subtracting double data type of binary images. Could I have the explaination of this?

4 ビュー (過去 30 日間)
I have 2 binary images. I substracted it, then I did logical operation of not (~)
im1=imread('im1.jpeg');
im2=imread('im2.jpeg');
im3=(double(im1)-double(im2));
im4=~im3;
This is the image after subtracting the binary images which are not double data type.
After subtracting the images, I do logical operation of not (~).
im3=im1-im2;%without double data type
im4=~im3;
This is the result without double data type
Please, give me an explaination. Thank you!

採用された回答

Matt J
Matt J 2019 年 12 月 11 日
編集済み: Matt J 2019 年 12 月 11 日
If im1 and im2 start off as uint8, then subtraction operations 0-1 will yield zero values,
>> uint8(0)-uint8(1)
ans =
uint8
0
unlike when they are doubles.
  1 件のコメント
Aaron Abel
Aaron Abel 2019 年 12 月 11 日
Thanks, I have analyzed. There are -255 intensity of the pixels that is changed to 0 by not operation.

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by