help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

matrix to image to file


From: Luiz Portella
Subject: matrix to image to file
Date: Thu, 8 Sep 2011 09:31:00 -0300

Hello,

I have
a = zeros(7,7); # faz uma matriz 7x7 cheia de zeros
a(3,3) = 1; a(5,3) = 1; a(5,4) = 1; a(5,5) = 1; # monta a imagem

   0   0   0   0   0   0   0
   0   0   0   0   0   0   0
   0   0   1   0   0   0   0
   0   0   0   0   0   0   0
   0   0   1   1   1   0   0
   0   0   0   0   0   0   0
   0   0   0   0   0   0   0

How  can I create a image?

the code:
img01 = imagesc(a);
imwrite(img01, 'img01.gif', "gif"); #imprime a imagem original

don't works:
octave: magick/semaphore.c:525: LockSemaphoreInfo: Assertion
`semaphore_info != (SemaphoreInfo *) ((void *)0)' failed.
panic: Aborted -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete
Abortado

I dont know how create a map for gray scale where 0 is white and 1 is
black, with gray scale from 0 untill 1.
In terminal can I print image? Can I only save file?

Thanks a lot!
-- 
Luiz Portella address@hidden


reply via email to

[Prev in Thread] Current Thread [Next in Thread]