added frame processing to the image callback