mask.at<uchar>(j,i) directly