I have a project which needs image thresholding. What's more, I have found some math method such as Otsu's method(https://en.wikipedia.org/wiki/Otsu%27s_method) for this.
I knew that in C# I can use GDI+ to do it by setting each pixel. Although WPF can reference the GDI+ also, I don't want to use it.
One of the reason is WPF using the DirectX to render but not GDI+. DirectX may be the best choice but it seems DirectX can't do this.
The other reason is the original GDI+ will cost a long time in image thresholding. Although someone said it can use some C++ code to make it much faster, I don't want to use the unsafe code such as C++ pointer in WPF.
I am trying to find a way to do it, but I know maybe I can't. If there is a better way, would you please tell me?