It seems the default filters for images (filter.boxMedian for example) doesn’t accept f32bpp images such as obtained as heightmaps. How would one filter heightmap images obtained from cvb? Of course the crude approach would be to convert the data type, but this results in the loss of a lot of information, which I’d like to avoid if at all possible.
the support for floating-point valued images in the CVFoundation.dll functions unfortunately is a fairly jagged terrain. I’ll add a rough list of functions that support this data format to the bottom of this post.
Where support for floating point valued input is not given, I fear that you’ll either need to go through a different data format (accepting that there might be some information loss, but the extent to which this hurts greatly depends on the range of values in the floating point image) or try to build the missing link with what is there (which might be possible e.g. for some of the simpler filter operations).
The functions that - according to a look at the sources - support 32 bit floating point images are:
(note: this list is based on the input checks in the source code - assuming that these are written correctly these functions should support 32 bit floating point images…)
Hmm, I found a working solution but it feels kind of hack-y. Being the duct-tape engineer that I am, I tried to get the color median filter to work since this one does accept floating point values. It worked after I copied the first plane two times to create an RGB encoded image. Strange that the original median doesn’t work though.