File size: 493 Bytes
5f25ffa
 
3c628b4
5f25ffa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from .bg_removal import remove_background_and_crop
from .upscale import upscale_image


def run_card_pipeline(image_bytes: bytes):
    """

    Executes the full image processing pipeline.

    1. Background Removal & Tight Crop

    2. AI Upscaling

    Returns the final processed OpenCV BGR image.

    """
    # 1. Background removal and tight crop
    img = remove_background_and_crop(image_bytes)
    
    # 2. Upscale image
    img = upscale_image(img)
    
    return img