image processing for pem images