Improved image processor. Fixed bug in capture image.