help-octave
[Top][All Lists]
Advanced

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

Re: Simulating data smoothing on a 2D matrix. New to Octave/Matlab plat


From: macy
Subject: Re: Simulating data smoothing on a 2D matrix. New to Octave/Matlab platforms
Date: Wed, 1 Jul 2009 07:40:50 -0700 (PDT)
User-agent: SquirrelMail/1.4.13

How big is the matrix?  Very important

If it's more than 50 by 50, I could never get mesh to display within my
lifetime.  Maybe the newer plot versions work better now.

I used an old version of octave [2.1.50a] and its deprecated gnuplot
function, called gsplot.  It allowed me to display larger than 500 by 500
fast enough that I could even use my mouse to rotate the display.

I also tried using octave to create greyscale/color images, but that
process *and* the eye just preprocessed too much, and the technique was
interesting, but did not have the resolution that gsplot had with its
vertical scale and ability to set the zrange to enhance certain regions.

Interestingly, as you smooth you must consider whether you're simply
making the display "pretty" by distorting the original data [adding noise
to the data], or whether you're truly enhancing the information and
lowering the noise floor.  For me, I knew I was destroying the data, but
did find the patterns I was looking for.  Patterns especially emerged as
the display rotated and the display would make visual artifacts,
flickering and overlapping.

Also, for me the matrix was 'flat' in one direction and always had some
slope in the other.  Normal linear smoothing kept flattening the edges, so
I wrote a special linear smoothing with special treatment at the edges to
preserve the slopes.  Then I found out that even this flattened the
'curvature', or slope of the slope.  Luckily for me the matrix tended to
have flat slope of the slope so the matrix did not distort too much.

Simple linear filtering which preserved the integral applied 1/4, 1/2, and
1/4 to the new matrix center value. To smooth more, I simply ran the
smoothing function, say 100 times.  The effect of multiple runs looked
like convolving a cos^2 shape.  This smoothing function is fast, leaves
the matrix the same size, and can be adjusted until you're satisfied with
the 'view'.

I also found that increasing the size of the matrix with linear
interpolation to increase the size of the matrix helped the smoothing
functions.  For example a 25 by 25 became 51 by 51 and so on. But again,
all this smoothing only made the displays look good and did not add any
real value to the original data.

Send me a sample matrix [if under 1meg] and I'll send you some displays
showing what I'm talking about.

Robert


> Hi,
>
> I knew about Octave because I was looking for an open source utility to
> make the same as Matlab.
>
> I need to simulate data smoothing on a matrix before actually coding an
> algorithm to avoid the time cost of implementing thing without knowing
> the results.
>
> First I would like to see the 2D matrix drawn on a 3D graphic, where
> each value of the 2D matrix is a Z value on the 3D graphic.
>
> Then I would like to apply several smoothing function (and if anyone
> could point me some functions), to the data in order to visually see the
> results.
>
> I know these are two question with a huge scope of Octave knowledge. I'm
> not explictly asking for an answer, but some info on how to get there
> without stumble on things that I don't need.
>
> With my best regards,
>
> Nuno
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>




reply via email to

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