Skip to content

Instantly share code, notes, and snippets.

@dipanjanS
Created August 16, 2019 12:10
Show Gist options
  • Save dipanjanS/ba86579d8785c59499790a94e24ec6e4 to your computer and use it in GitHub Desktop.
Save dipanjanS/ba86579d8785c59499790a94e24ec6e4 to your computer and use it in GitHub Desktop.
import cv2
img_arr_bgr = cv2.imread(sample_files[2])
img_arr_rgb = cv2.cvtColor(img_arr_bgr, cv2.COLOR_BGR2RGB)
print('Image Shape:', img_arr.shape)
fig, ax = plt.subplots(1, 2, figsize=(10, 4))
p1 = ax[0].imshow(img_arr_bgr, aspect='auto')
t1 = ax[0].set_title('BGR spectrogram')
p2 = ax[1].imshow(img_arr_rgb, aspect='auto')
t1 = ax[1].set_title('RGB spectrogram')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment