'**SUMMARY**
This method performs hue histogram back projection on the image. This is a very
quick and easy way of matching objects based on color. Given a hue histogram
taken from another image or an roi within the image we attempt to find all
pixels that are similar to the colors inside the histogram. The result can
either be a grayscale image that shows the matches or a color image.
**PARAMETERS**
* *model* - The histogram to use for pack projection. This can either be
a histogram, anything that can be converted into an ROI for the image (like
an x,y,w,h tuple or a feature, or another image.
* *smooth* - A bool, True means apply a smoothing operation after doing the
back project to improve the results.
* *fullColor* - return the results as a color image where pixels included
in the back projection are rendered as their source colro.
* *threshold* - If this value is not None, we apply a threshold to the
result of back projection to yield a binary image. Valid values are from
1 to 255.
**RETURNS**
A SimpleCV Image rendered according to the parameters provided.
**EXAMPLE**
>>>> img = Image(\'lenna\')
>>>> hist = img.getNormalizedHueHistogram((0,0,50,50)) # generate a hist
>>>> a = img.backProjectHueHistogram(hist)
>>>> b = img.backProjectHueHistogram((0,0,50,50) # same result
>>>> c = img.backProjectHueHistogram(Image(\'lyle\'))
**SEE ALSO**
ImageClass.getNormalizedHueHistogram()
ImageClass.findBlobsFromHueHistogram()'

def backProjectHueHistogram(self, model, smooth=True, fullColor=False, threshold=None):

    try:
        import cv2
    except ImportError:
        warnings.warn('OpenCV    >=    2.3    required    to    use    this.')
        return None
    if (model is None):
        warnings.warn('Backproject    requires    a    model')
        return None
    if isinstance(model, Image):
        model = model.getNormalizedHueHistogram()
    if ((not isinstance(model, np.ndarray)) or (model.shape != (180, 256))):
        model = self.getNormalizedHueHistogram(model)
    if (isinstance(model, np.ndarray) and (model.shape == (180, 256))):
        hsv = self.toHSV().getNumpyCv2()
        dst = cv2.calcBackProject([hsv], [0, 1], model, [0, 180, 0, 256], 1)
        if smooth:
            disc = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (5, 5))
            cv2.filter2D(dst, (-1), disc, dst)
        result = Image(dst, cv2image=True)
        result = result.toBGR()
        if threshold:
            result = result.threshold(threshold)
        if fullColor:
            temp = Image((self.width, self.height))
            result = temp.blit(self, alphaMask=result)
        return result
    else:
        warnings.warn('Backproject    model    does    not    appear    to    be    valid')
        return None
