Last active
May 1, 2019 10:18
-
-
Save awesomebytes/51a607a8ce4ae195bd106a65941bd188 to your computer and use it in GitHub Desktop.
This file contains 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 characters
#!/usr/bin/env python | |
import numpy as np | |
height = 100 | |
width = 100 | |
blank_image = np.zeros((height, width, 3), np.uint8) | |
from IPython import embed; embed() | |
# Check what variables are around | |
dir() | |
# Print anything | |
blank_image | |
print(blank_image) | |
import pprint | |
pprint(blank_image) | |
# Show an image maybe? (1) | |
from matplotlib import pyplot as plt | |
plt.imshow(blank_image) | |
plt.show() | |
# Show an image maybe? (2) | |
import cv2 | |
cv2.imshow('test', blank_image) | |
cv2.waitKey(5) | |
cv2.destroyAllWindows() | |
# Dump data to debug in isolation | |
import cPickle | |
cPickle.dump(blank_image, open("blank_image.pickle", 'w')) | |
# Load some data you know it's correct/conflicting into the running process | |
import cPickle | |
debug_image = cPickle.load(open("blank_image.pickle", 'r')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment