Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: PDL: Looking for efficient way to extract sub-images, by finding bounding boxes of "objects" (BAD is good for you!)

by vr (Curate)
on Sep 26, 2017 at 00:09 UTC ( [id://1200080]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    pdl> p $im
    
    ...
    [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
    
    pdl>
    
  2. or download this
    use strict;
    use warnings;
    ...
             [ $y( $start:$stop )-> minmax ]]
        } 1 .. $runs-> nelem - 1 ]
    }
    
  3. or download this
              s/iter pdl_naive     regex       pdl
    pdl_naive   5.53        --      -73%      -81%
    regex       1.51      266%        --      -29%
    pdl         1.07      417%       41%        --
    
  4. or download this
    use strict;
    use warnings;
    ...
        zeroes => sub { $zeroes-> qsort },
        bads   => sub { $bads->   qsort },
    });
    
  5. or download this
             Rate zeroes   bads
    zeroes 2.81/s     --   -67%
    bads   8.42/s   200%     --
    
  6. or download this
    sub get_bboxes_pdl_bad {
        my $flat      = $sgm-> flat-> setvaltobad( 0 );
    ...
             [ $y( $start:$stop )-> minmax ]]
        } $runs-> list ]
    }
    
  7. or download this
            s/iter   regex     pdl pdl_bad
    regex     1.51      --    -30%    -87%
    pdl       1.06     42%      --    -81%
    pdl_bad  0.203    641%    421%      --
    
  8. or download this
    my $idx = $flat-> qsorti-> slice([ 0, $flat-> ngood - 1 ]);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1200080]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2024-04-25 00:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found