Groups
Groups
Sign in
Groups
Groups
CS498 CP UIUC
Conversations
About
Send feedback
Help
Displaying 3d matrix as image
30 views
Skip to first unread message
Arun Mallya
unread,
Sep 19, 2012, 7:57:55 PM
9/19/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cs498-...@googlegroups.com
Hi,
I have a 3d matrix (the output texture) which I want to interpret as RGB channels and display it as an image.
imshow(image) displays a white image
imagesc() gives out of range error
imshow(mat2gray()) gives the proper image but with colors distorted as compared to original sample texture image.
I checked the values in the output texture image and they correspond to those in the input texture image. Still, it cannot be displayed.
What do I do !?
Xing Li
unread,
Sep 19, 2012, 8:02:00 PM
9/19/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cs498-...@googlegroups.com
try abs(cat(3, im(:,:,1), im(:,:,2), im(:,:,3)));
then, use imshow again?
Not sure, you can have a try
> --
>
>
--
Xing Li
University of Illinois - Urbana Champaign
College of Electrical and Computer Engineering
Arun Mallya
unread,
Sep 19, 2012, 8:03:12 PM
9/19/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cs498-...@googlegroups.com
Nope, I found the reason.
You have to typecast the matrix to uint8, uint16, or the like.
out = uint8(out);
Ut now works.
Reply all
Reply to author
Forward
0 new messages