Created
August 11, 2020 14:12
-
-
Save muthuspark/f8afe3f56a9a6ea70a0e043db6a6db47 to your computer and use it in GitHub Desktop.
Revisions
-
muthuspark created this gist
Aug 11, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ from skimage import color from skimage.io import imsave lab_img = color.rgb2lab(cimage) copy_img = np.copy(cimage) L_img = lab_img[:, :, 0] A_img = lab_img[:, :, 1] B_img = lab_img[:, :, 2] x,y,z = lab_img.shape for xi in range(x): for yi in range(y): if lab_img[xi,yi][1] > -35: copy_img[xi, yi] = [255,255,255] fig, ax = plt.subplots(figsize=(20,20)) ax.imshow(copy_img)