SKB-Explorer / src /tools /process_image.py
zsyJosh
feat: ✨ SKB explorer
0c3992e
raw
history blame contribute delete
170 Bytes
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
def extract_patch(image, box):
x1, y1, x2, y2 = box
return image.crop((x1, y1, x2, y2))