In [55]:
import numpy as np
import scipy
import matplotlib.pyplot as plt

In [85]:
im = scipy.misc.imread("test.png")
im = scipy.misc.imresize(im, (25, 25))
V_im = np.zeros((im.shape[0], im.shape[1]))
for i in range(0, im.shape[0]):
    for j in range(0, im.shape[1]):
        if im[i,j,0] < 50:
            V_im[i,j] = 1
        if im[i,j,1] < 50:
            V_im[i,j] = 2

In [ ]: