[Top][All Lists]

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

imshow: flicker and superposition problem (re-post)

From: jmb
Subject: imshow: flicker and superposition problem (re-post)
Date: Mon, 14 Jul 2014 20:13:06 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0


Some time ago I had posted the following in this forum, but did not get
any responses, which why I am re-posting.  My apologies for the
repetition, but I would appreciate any suggestions anybody can offer!

Thanks, JMB

I am trying to use something like the following code to superimpose a
displayed value over a static image.

I am running into 2 problems with octave 3.2.4 (in Ubuntu12.04.4 32bit)

a) A flickering that I would like to suppress as the image is erased and
redisplayed within each cycle of the 'while' loop.

b) If I comment out the imshow(I) inside the 'while' loop then the value
of P_{amb} overwrites the previously displayed value and soon I get one
black mass of lettering that one cannot read.

I have tried some methods that have failed.  Can anybody suggest a fix?


Errata: The following (corrected) code will run.  Just use any *.png
file of your liking placed in the same subdirectory where this code is
run from.

pkg load image;
I = imread ("Schematic.png");
imshow (I);


function Display_Value(Label, Units, Value, X, Y)
        Output = strcat(Label, num2str(Value), Units );

DisplayPres = true;
while true
#       imshow (I);

        if DisplayPres == true
                Display_Value("P_{amb}=", "bar", P, 0, 0);
                P = P + 0.001;

reply via email to

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