function CROP = apply_mask_and_crop(IMG, MASK, center)
    card_size = [420, 280];
    
    WHT = uint8(ones(size(IMG)) * 255);
    
    WHT_masked = WHT .* uint8(~MASK);
    IMG_masked = IMG .* uint8(MASK);
    CROP = WHT_masked + IMG_masked;
    CROP = imcrop(CROP, [center(1)-140, center(2)- 210, 280, 420]);
    
end