Last active
August 1, 2016 18:19
-
-
Save bigsnarfdude/38c2a214fbc6369d5b697df63c93171c to your computer and use it in GitHub Desktop.
[self-driving-car] greyscale
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
# label pixel0 pixel1 pixel2 pixel3 pixel4 pixel5 pixel6 pixel7 pixel8 | |
# 1 0 0 0 0 0 0 0 0 0 | |
# 0 0 0 0 0 0 0 0 0 0 | |
from skimage import color | |
from skimage import io | |
img = color.rgb2gray(io.imread('001.jpg')) | |
img | |
x1 = 0 | |
x2 = 240 | |
y1 = 0 | |
y2 = 240 | |
cropped = img[x1:x2,y1:y2] | |
io.imsave("/Users/benchemployee/Desktop/kaggle/selfDriving/cropped.jpg", cropped) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment