I’m trying to convert a grayscale image to pure black and white in PHP using the GD library. The purpose would be to detect the cervical cells within the image. I’ll leave the PHP code and a MatLab one (I wrote this code in MatLab and I’m trying to obtain the same result in PHP). Basically, I’m having trouble accessing