Code: Select all
import cv2
from patchify import patchify
import numpy as np
img = cv2.imread('path/to/image.tif')
patches = patchify(img, (224,224,3), step=(224,224,3))
def is_blank(img, threashold=1):
return np.std(img)
Code: Select all
import cv2
from patchify import patchify
import numpy as np
img = cv2.imread('path/to/image.tif')
patches = patchify(img, (224,224,3), step=(224,224,3))
def is_blank(img, threashold=1):
return np.std(img)