code

binary_mask = (im_array[:,:,0] == 255) & (im_array[:,:,1] == 255) & (im_array[:,:,2] == 0)

 

参考

1. convert-rgb-image-to-index-image

相关文章: