Fixed bugs in ImageSensor and SPRegion

Image sensor - binary images were not outputting pure 0/1 images

SPRegion logging bug - variable names for rarely used logging was incorrect.

Some minor cleanup.