implement basic OCRMask functions