I am currently working with ridge detection filters such as frangi(), sato() and hessian() within the python skimage package. In my project, I am using the hessian() filter to detect river-like structures in an image. Since the those filte types make use of the Hessian matrix (which applies 2nd order spatial derivatives), I would expect the result 0 for image regions, where all pixel values are constant.
In the following, I am referring to line 432 in the skimage source code for hessian()
filtered[filtered <= 0] = 1
In my images I have areas, where all pixel values are equal. But instead of 0 (what I would expect, because when all pixels are constant there can not be any vessel-like structures and the hessian() should give back the "vesselness" of the image), the hessian() filter gives me ones. Of course, this results from line 432 in the skimage source code:
So my question is: WHY should this be useful? Why is it not acceptable to have filter results = 0 ? Which potential problems could arise if I create my own custom filter which would not have this line of code applied to my results?