A good method to check whether your this step right or not is to return it back, comparing.
Just like we need a video which comes from images for next process. The method is make the video back to image comparing with previous one.
img->vid->img