Rect roi(minx, miny, lenx, leny);
cs_mask(roi).copyTo(src(roi), gray);