In [35]:
import cv2
In [36]:
im = cv2.imread('20190826_143107.jpg')
im.shape
cv2.imwrite('foo2.png',im)
Out[36]:
True
In [7]:
im.shape
Out[7]:
(2268, 4032, 3)
In [8]:
out = im[1000:,:,:]
cv2.imwrite('foo2.jpg',out)
Out[8]:
True
In [9]:
im[1000:,:,:] = 255
cv2.imwrite('foo2.jpg',im)
Out[9]:
True

Small examples of broadcasting

In [11]:
import numpy as np
a = np.ones((2,1,3))
b = 2*np.ones((3,1))
(a + b).shape
Out[11]:
(2, 3, 3)
In [12]:
'abcd'[::-1]
Out[12]:
'dcba'
In [13]:
[1,3,6,9][::-1]
Out[13]:
[9, 6, 3, 1]

This is my report

This is my story $$\int_0^\infty e^{-x} dx$$

In [42]:
im = cv2.imread('20190826_143107.jpg')
cv2.imwrite('foo2.png',im[::,::,:])
Out[42]:
True
In [40]:
from IPython.display import Image
In [41]:
Image('20190826_143107.jpg')
Out[41]: