Gave numpy_image a (rows,cols) constructor.

This commit is contained in:
Davis King 2018-05-31 22:15:13 -04:00
parent d6b1f69b57
commit 0d6f1f75db
1 changed files with 8 additions and 0 deletions

View File

@ -146,6 +146,14 @@ namespace dlib
assert_is_image<pixel_type>(img);
}
numpy_image (
long rows,
long cols
)
{
set_size(rows,cols);
}
numpy_image (
const py::object& img
) : numpy_image(img.cast<py::array>()) {}