Efficient Image Processing In Resource-Constrained Visual Sensor Networks