refactor processing image, add webcam button