Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
double to image?

Subject: double to image?

From: Aron Sceidt

Date: 16 Nov, 2010 21:05:28

Message: 1 of 4

After you convert an image to double precision, is there a way to convert it back to a typical image format and still show it using imshow? i tried multiplying by 255, but imshow (and assuming other techniques) fails from working

Subject: double to image?

From: Walter Roberson

Date: 16 Nov, 2010 21:13:35

Message: 2 of 4

On 10-11-16 03:05 PM, Aron Sceidt wrote:
> After you convert an image to double precision, is there a way to
> convert it back to a typical image format and still show it using
> imshow? i tried multiplying by 255, but imshow (and assuming other
> techniques) fails from working

uint8() after multiplying by 255.

Subject: double to image?

From: Sean de

Date: 16 Nov, 2010 21:15:07

Message: 3 of 4

"Aron Sceidt" <sigarru87@gmail.com> wrote in message <iburmo$1di$1@fred.mathworks.com>...
> After you convert an image to double precision, is there a way to convert it back to a typical image format and still show it using imshow? i tried multiplying by 255, but imshow (and assuming other techniques) fails from working

uint8(doubleI)

or imshow(doubleI,[0 255]) %constrain it to that range rather than the default range of [0 1]

Subject: double to image?

From: Aron Sceidt

Date: 16 Nov, 2010 21:18:03

Message: 4 of 4

Walter Roberson <roberson@hushmail.com> wrote in message <ibus61$7bg$2@canopus.cc.umanitoba.ca>...
> On 10-11-16 03:05 PM, Aron Sceidt wrote:
> > After you convert an image to double precision, is there a way to
> > convert it back to a typical image format and still show it using
> > imshow? i tried multiplying by 255, but imshow (and assuming other
> > techniques) fails from working
>
> uint8() after multiplying by 255.

thanks a lot :-)

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us