fixed bug in algorithm. Now algorithm for converting do gray scale image, binary image, int double array and the erosion of the image works perfectly. Actually its seems that my custom algorithms works better then the built in methods. Changed the form so one can switch between all the different filters and process methods.