tippy.statistics
index
/home/jlengrand/git/Tippy/tippy/statistics.py

Contains functions related to statistics processing. 
 
Created on Dec 11, 2011
 
@author: Julien Lengrand-Lambert
@email: julien@lengrand.fr

 
Modules
       
cv
sys

 
Classes
       
Histogram

 
class Histogram
    This class is designed to contain an openCV class plus some more information
to ease further operations.
 
NOTE : Supports only 8 bits images for now. 
More should be added soon.
 
  Methods defined here:
__init__(self, img, bin_fact=8L, min_range=0)
channel_to_image(self, chan, scale_x=3, scale_y=3, y_range=64)
Creates an iplimage displaying histogram results after its computation
compute_histogram(self, img, bin_fact=8L, min_range=0)
Creates the histogram of the input image
 
Returns a Tippy histogram, with one item by channel of input image.
The number of bins is 2^bin_fact (256 by default)
min_range is the value of the lowest bin
max_range is automatically calculated using the input image depth. 
max_range = (2^img_depth)
 
NOTE : Supports only 8 bits images for now. 
More should be added soon.
to_images(self, scale_x=3, scale_y=3, y_range=64)
Creates a graphical representation of an histogram.
Outputs a list of nChannels iplimages, one for each channel of the 
histogram. 
The images should have the same depth as the image used to create the 
histogram.
to_tables(self)
Transforms an histogram into a list of values.
This way, it is easier to process for calculations.
 
Returns a list of nChannels items.
 
NOTE : Supports only 8 bits images for now. 
More should be added soon.