Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa | ||
|
wiki2:opencv [2015/10/18 09:06] alfred [Others] |
wiki2:opencv [2020/05/09 09:25] (actual) |
||
|---|---|---|---|
| Línea 71: | Línea 71: | ||
| <code python> | <code python> | ||
| color = np.mean(m_roi, axis=0) | color = np.mean(m_roi, axis=0) | ||
| + | </code> | ||
| + | |||
| + | ==== Draw figures ==== | ||
| + | <code python> | ||
| + | cv2.rectangle(black_image, (pos_x, pos_y), (pos_x + size_x, pos_y + size_y), (255, 255, 255)) | ||
| </code> | </code> | ||
| ===== Video Capture ===== | ===== Video Capture ===== | ||
| Línea 87: | Línea 92: | ||
| sample = colorset[idx_y, idx_x, :] | sample = colorset[idx_y, idx_x, :] | ||
| </code> | </code> | ||
| + | |||
| + | ==== Change the shape of a num.array ==== | ||
| + | Use ''reshape''. | ||