Save the converted image to a file
Advertisements After converting the original *.jpg file, using the "reference white color" method (the idea is from here) def whitepatch_balancing(image, from_row, from_column, row_width, column_width): fig, ax = plt.subplots(1,2, figsize=(10,5)) ax[0].imshow(image) ax[0].add_patch(Circle((from_column, from_row), linewidth=3, edgecolor=’r’, facecolor=’none’)); ax[0].set_title(‘Original image’) image_patch = image[from_row:from_row+row_width, from_column:from_column+column_width] image_max = (image*1.0 / image_patch.max(axis=(0, 1))).clip(0, 1) ax[1].imshow(image_max); ax[1].set_title(‘Whitebalanced Image with MAX value of… Read More Save the converted image to a file