'**SUMMARY**
The stretch filter works on a greyscale image, if the image
is color, it returns a greyscale image.  The filter works by
taking in a lower and upper threshold.  Anything below the lower
threshold is pushed to black (0) and anything above the upper
threshold is pushed to white (255)
**PARAMETERS**
* *thresh_low* - The lower threshold for the stretch operation.
This should be a value between 0 and 255.
* *thresh_high* - The upper threshold for the stretch operation.
This should be a value between 0 and 255.
**RETURNS**
A gray scale version of the image with the appropriate histogram stretching.
**EXAMPLE**
>>> img = Image("orson_welles.jpg")
>>> img2 = img.stretch(56.200)
>>> img2.show()
**NOTES**
TODO - make this work on RGB images with thresholds for each channel.
**SEE ALSO**
:py:meth:`binarize`
:py:meth:`equalize`'

def stretch(self, thresh_low=0, thresh_high=255):

    try:
        newimg = self.getEmpty(1)
        cv.Threshold(self._getGrayscaleBitmap(), newimg, thresh_low, 255, cv.CV_THRESH_TOZERO)
        cv.Not(newimg, newimg)
        cv.Threshold(newimg, newimg, (255 - thresh_high), 255, cv.CV_THRESH_TOZERO)
        cv.Not(newimg, newimg)
        return Image(newimg)
    except:
        return None
