MCPcopy Index your code
hub / github.com/makelove/OpenCV-Python-Tutorial / mosaic

Function mosaic

官方samples/common.py:211–225  ·  view source on GitHub ↗

Make a grid from images. w -- number of grid columns imgs -- images (must have same size and format)

(w, imgs)

Source from the content-addressed store, hash-verified

209 return output
210
211def mosaic(w, imgs):
212 '''Make a grid from images.
213
214 w -- number of grid columns
215 imgs -- images (must have same size and format)
216 '''
217 imgs = iter(imgs)
218 if PY3:
219 img0 = next(imgs)
220 else:
221 img0 = imgs.next()
222 pad = np.zeros_like(img0)
223 imgs = it.chain([img0], imgs)
224 rows = grouper(w, imgs, pad)
225 return np.vstack(map(np.hstack, rows))
226
227def getsize(img):
228 h, w = img.shape[:2]

Callers 2

evaluate_modelFunction · 0.90
digits.pyFile · 0.90

Calls 1

grouperFunction · 0.85

Tested by

no test coverage detected