+ Reply to Thread
Results 1 to 1 of 1

Thread: Comparing object class results?

  1. #1
    learning_brain is offline x10 Sophmore learning_brain is an unknown quantity at this point
    Join Date
    Apr 2010
    Location
    UK, Midlands
    Posts
    170

    Comparing object class results?

    I don't know if I'm barking up the wrong tree here but I am new to OOP so need a bit of guidance...


    I'm writing an image analysis page, which attempts to identify the image type.

    Initially, I set "Zones".... i.e.

    ...main central section where a portrait would be.
    ...top half where the sky would be
    ...bottom half where trees might be

    etc. etc.

    I have then written a class to go through each zone, defined by it's pixel co-ordinates.

    The class extracts the RGB values and assigns a colour type to each pixel (skin, sky, greens etc,) Then, each pixel colour type is assigned to an array. The class then calculate %'s of each colour type within that array. - great - it works a treat... on its own.

    My problem is....

    I need to compare the %'s returned from each class for each zone (or class instance).

    For instance, for a portrait photo, it is very likely that the central zone will contain high proportions of skin.

    Another example.. A scenery shot will have high proportions of sky colours in the upper half and high percentages of greenery in the lower half.

    ...so....

    in order to work out if it's a scenery photo, I need to compare the % sky results from the upper half class instance to the % greenery results from the bottom half class instance.

    I can output the values from within a function in the class (echo $this->percentagewhatever), but in order to do this, I need to extract the value from the class so I can compare with another instance.

    Does this make sense?

    ______EDIT________________

    Never mind - I've cracked it now... a stupid syntax error.
    Last edited by learning_brain; 10-24-2010 at 04:22 PM.

+ Reply to Thread

Similar Threads

  1. Clearing Dom Object
    By learning_brain in forum Programming Help
    Replies: 6
    Last Post: 06-07-2010, 02:00 PM
  2. SWF Object not working
    By noaruhikari in forum Free Hosting
    Replies: 3
    Last Post: 04-11-2010, 06:50 AM
  3. Load Object Last (using JS)
    By diabolo in forum Tutorials
    Replies: 7
    Last Post: 07-27-2009, 12:57 AM
  4. Trying to get property of non-object
    By slpixe in forum Programming Help
    Replies: 4
    Last Post: 08-28-2008, 06:20 PM
  5. The Streaking Object
    By Brandon in forum Crossfire
    Replies: 8
    Last Post: 01-03-2006, 09:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers