image-rs / imageproc

Image processing operations
MIT License
757 stars 149 forks source link

Add bilateral filter #217

Closed theotherphil closed 5 months ago

theotherphil commented 7 years ago

Possibly the fast version here: http://www.shellandslate.com/download/fastmedian_5506.pdf

csheaff commented 3 years ago

Hi, may I presume no one is working on this currently? If not, might there be any new thoughts on an implementation?

theotherphil commented 3 years ago

I’m not working on this, and I’m not aware of anyone else working on it either.

csheaff commented 3 years ago

Thanks, I'm giving it a shot. I've taken a cursory look at the above approach and am curious if this was singled out for a particular reason. As mentioned in A Concise Review of Fast Bilateral Filtering (Das et al., 2017), going with a fast method typically involves some kind of trade off with accuracy. I hesitate to choose for the user what kind of trade off is acceptable and am curious if some other kind of module should be reserved for "fast" algorithms, such as OpenCV's ximgproc. Thoughts?

theotherphil commented 3 years ago

Great! Providing the option to the user seems ideal, but an implementation of either approach would be a valuable addition to this library.

csheaff commented 3 years ago

I believe I've successfully implemented a version for grayscale images, so feel free to assign this ticket to me. I figure the next step would be getting it to work for color images. If you have any broad suggestions for adjustments (where the function belongs, testing, benchmarking, etc), they would be most welcome.

csheaff commented 3 years ago

Getting ready to submit a pull request for a grayscale implementation. Question: would you prefer that I commit a truth image to the repo with test function? I have created a test function using compare_to_truth_with_tolerance with a truth image generated by skimage.restoration.denoise_bilateral and it passes using a tolerance of 1 pixel. However, I imagine that having a truth image for every function won't be sustainable without blowing up the size of the repo. Thoughts?

csheaff commented 3 years ago

I submitted a pull request with the truth image. Feel free to chime in there regarding the above question.

ripytide commented 6 months ago

Can this issue be closed since it was added in #462?

theotherphil commented 6 months ago

I plan on leaving this open until we have a version that works on colour images

theotherphil commented 5 months ago

Colour support added in https://github.com/image-rs/imageproc/pull/606