Converts and image to matrix (one pixel per line)
(img)
| 102 | |
| 103 | |
| 104 | def im2mat(img): |
| 105 | """Converts and image to matrix (one pixel per line)""" |
| 106 | return img.reshape((img.shape[0] * img.shape[1], img.shape[2])) |
| 107 | |
| 108 | |
| 109 | def mat2im(X, shape): |
no test coverage detected