Image processing help. Multiplication of Images gives different results at Unit16, unit 32, unit 8.
古いコメントを表示
[EDIT: 20110611 23:32 CDT - reformat - WDR]
Codes :
a=imread('b.jpg');b=imread('c.jpg');c=a.*b;imshow(c)
a1=uint16(a);b1=uint16(b);c1=a1.*b1;imshow(c1)
a2=uint32(a);b2=uint32(b);c2=a2.*b2;imshow(c2)
I am not sure how to upload the picture I am using. I will let you know the problem now.
I am trying to 2 images. a and b.
1) Using unit 8 , I get some distortions.
2) Using unit 16, I am getting the required image.
3) Using unit 32, I am getting a complete black image.
Please let me know the problem. My friend needs this for her project. She asked me, I am not sure what is the problem. Please reply. Thank you.
採用された回答
その他の回答 (1 件)
Alex Taylor
2011 年 6 月 13 日
Hi Vijay,
Walter's answer is accurate. I just wanted to add that since you have the Image Processing Toolbox, you might look at the Image Processing functions im2uint16 and im2uint32.
Unlike the MATLAB casting functions Walter used, the Image Processing Toolbox conversion functions manage both the casting and rescaling of your data when moving to other datatypes.
doc im2uint16
カテゴリ
ヘルプ センター および File Exchange で Images についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!