Given an image, we'll replace each pixel intensity with minimum value from its neighbouring pixels, where order of neighbourhood can be variable X ( > 0).
- Prior to this writing, I wrote concurrent MinFilter implementation where each pixel was getting processed in different worker thread ( depending upon availability in thread pool ).
- Now implementation has been improved by processing each row of image matrix concurrently.
- Previously each thread was doing little work, but for large images ( & for higher order filtering ) communication cost ( work distribution ) was too high due to presence of large number of pixels in image.
- So, I considered reducing number of works created, by processing each row concurrently on possibly different worker threads.
- Check below for performance improvement, due to updating implementation
I applied both MinFilter implementations on sample of dimension 2560 x 1440, with order value set to 5.
Source | Sink |
---|---|
All filters applied on order-0 image.
Order | Image |
---|---|
0 | |
1 | |
2 | |
3 | |
4 | |
5 |
Thanking you 😊