cvbook
cvbook copied to clipboard
Notes for Jan Erik Solem's "Programming Computer Vision with Python" book
I noticed that in `sfm_test.py`, calls to `compute_fundamental()` and `compute_fundamental_normalized()` have their input variables reversed (x2 then x, instead of x then x2): `E = sfm.compute_fundamental(self.x2[:, :8], self.x[:, :8])` `E...
https://github.com/nico/cvbook/blob/613f9059354147955334767148a559d6da8d0155/sfm.py#L56 I suspect this line should be instead: ` F = numpy.dot(T2.T, numpy.dot(F, T1))`
out_ch4pics/h_template.jpg out_ch4pics/h_image.jpg
https://github.com/nico/cvbook/blob/613f9059354147955334767148a559d6da8d0155/ocr.py#L23 In the line: `im = numpy.array(Image.open(imname).convert('L')) ` it is recommended to use numpy.asarray() instead of numpy.array(). While both methods convert a PIL image to a NumPy array, numpy.array() always...
Use numpy.asarray instead of numpy.array for better performance in normalization matrix construction
https://github.com/nico/cvbook/blob/613f9059354147955334767148a559d6da8d0155/sfm.py#L48 In the code below: `T2 = numpy.array([ [S2, 0, -S2 * mean_2[0]], [0, S2, -S2 * mean_2[1]], [0, 0, 1] ]) ` it is recommended to replace numpy.array() with...