octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #45447] image package: strel decomposition doe


From: H. G.
Subject: [Octave-bug-tracker] [bug #45447] image package: strel decomposition does not speed things up
Date: Tue, 30 Jun 2015 19:52:38 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0

URL:
  <http://savannah.gnu.org/bugs/?45447>

                 Summary: image package: strel decomposition does not speed
things up
                 Project: GNU Octave
            Submitted by: hardy
            Submitted on: Di 30 Jun 2015 19:52:36 GMT
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Performance
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: Any

    _______________________________________________________

Details:

Here is a little script to show the behavior. It is mostly taken from the
example code for "strel decomposition" that you can find in the help text of
strel.m :


clear
pkg load image

im = randp (5, 2000) > 15;
n=20;
se = strel ("square", n);

% test the speed with imdilate:
t = cputime ();
imdilate (im, se);
cputime () - t

se = strel (ones (n));
t = cputime ();
imdilate (im, se); 
cputime () - t

% make sure that the se can be decomposed at all:
se
seq = getsequence(se);
number_of_decomps = max(size((seq))) % returns 2*1 = YES


The help text of strel.m states that there should be a significant difference
in executioin time (0.77 s versus 2.9 s is written there). But if I do this
with Octave-4.0.0 and image-2.4.0. then I see hardyl any differenc in
execution time (mostly around 1.13s versus 1.12s on my elderly laptop).

The last lines of the script tell me, that this se can be decomposed,
getsequence returns 2 parts. But I am not sure that imdilate uses this
decomposition at all.

Note: I had to use "size(se)" in the script, because "length(se)" did not
work, it returned the value 1 instead of 2. Is this a bug on its own, or
intenional?




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45447>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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