help-octave
[Top][All Lists]
Advanced

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

Re: matrix to image to file


From: davidg
Subject: Re: matrix to image to file
Date: Thu, 08 Sep 2011 17:40:16 +0200
User-agent: Internet Messaging Program (IMP) 3.2.8

Quoting Luiz Portella <address@hidden>:

> 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?
>


This is a known problem.  Your GraphicsMagick library isn't compatible with your
installation of Octave.  The library wants a call to a init function, which
Octave isn't doing properly.  You should be able to find a reference to this
problem in the mailing list archive, about one year ago.

Oh, yes, it was fixed here:

http://savannah.gnu.org/bugs/?30952

hth,
David


reply via email to

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