Package pyvision :: Package other :: Module color
[hide private]
[frames] | no frames]

Module color

source code

Created on Jan 11, 2011


Author: bolme

Classes [hide private]
  Histogram
Basically a wrapper around an OpenCV histogram.
  ColorTest
Functions [hide private]
pv.Histogram
HSHist(im, h_bins=32, s_bins=32, mask=None, normalize=True)
Compute the hue saturation histogram of an image.
source code
pv.Histogram
RGBHist(im, r_bins=8, g_bins=8, b_bins=8, mask=None, normalize=True)
Compute the rgb saturation histogram of an image.
source code
pv.Image
hsBackProjectHist(im, fg_hist, bg_hist=None)
Compute the hue saturation histogram of an image.
source code
pv.Image
rgbBackProjectHist(im, fg_hist, bg_hist=None)
Compute the hue saturation histogram of an image.
source code
Variables [hide private]
  HIST_HS = 'HIST_HS'
  HIST_RGB = 'HIST_RGB'
  __package__ = 'pyvision.other'
Function Details [hide private]

HSHist(im, h_bins=32, s_bins=32, mask=None, normalize=True)

source code 

Compute the hue saturation histogram of an image. (Based on OpenCV example code).

Parameters:
  • im (pv.Image) - the image
  • h_bins (int) - the number of bins for hue.
  • s_bins (int) - the number of bins for saturation.
  • mask (cv.Image or np.array(dtype=np.bool)) - an image containing a mask
Returns: pv.Histogram
an OpenCV histogram

RGBHist(im, r_bins=8, g_bins=8, b_bins=8, mask=None, normalize=True)

source code 

Compute the rgb saturation histogram of an image. (Based on OpenCV example code).

Parameters:
  • im (pv.Image) - the image
  • r_bins (int) - the number of bins for hue.
  • g_bins (int) - the number of bins for hue.
  • b_bins (int) - the number of bins for hue.
  • mask (cv.Image or np.array(dtype=np.bool)) - an image containing a mask
Returns: pv.Histogram
an OpenCV histogram

hsBackProjectHist(im, fg_hist, bg_hist=None)

source code 

Compute the hue saturation histogram of an image. (Based on OpenCV example code).

Parameters:
  • im (pv.Image) - the image
  • fg_hist (pv.Histogram) - the histogram
  • bg_hist (pv.Histogram)
Returns: pv.Image
an OpenCV histogram

rgbBackProjectHist(im, fg_hist, bg_hist=None)

source code 

Compute the hue saturation histogram of an image. (Based on OpenCV example code).

Parameters:
  • im (pv.Image) - the image
  • fg_hist (pv.Histogram) - the histogram
  • bg_hist (pv.Histogram)
Returns: pv.Image
an OpenCV histogram