Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Boolean math: Fill in the blanks.

by repellent (Priest)
on Oct 12, 2008 at 01:55 UTC ( #716647=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    n  = total # bits per sample
    L1 = # bits   set on average on  left-side of AND/OR
    L0 = # bits unset on average on  left-side of AND/OR
       = n - L1
    R1 = # bits   set on average on right-side of AND/OR
  2. or download this
    AND : L1 * R1 / n
    OR  : L1 + L0 * R1 / n = L1 + (n - L1) * R1 / n
                           = L1 + R1 - L1  * R1 / n
                           = L1 * ( 1 - R1 / n ) + R1

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://716647]
[dazz]: Hi I have grabbed an image from an IP camera with Image::Grab. I then want to pass that image object to a subroutine where I do a read-only test on the image with Image:Magick.
[dazz]: How do I pass an image object to a subroutine and then apply a Image::Magick a read-only method to the image object???
[dazz]: Also, I want to use Image::Magick to annotate and composite (not in a sub). How do I take a Image::Grab object and apply Image::Magick write methods to it??
[dazz]: At present, I am saving the Image::Grab image to disk, then creating a new Image::Magick object that reads the disk file.
[dazz]: .

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2017-03-27 07:40 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (317 votes). Check out past polls.