Frame/Mat and image size constraints implemented.