Best way to store image into container #3053
Unanswered
UlrichVonRekkenin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
As we know
array2dis a basic image object. But this one has deleted constructor and operator.So you can not do this one:
dlib::array2d<dlib::rgb_pixel> source; dlib::load_image(source, path); std::vector frames2(10, source); // <- compile errorBut there is
matrixwhich allows to do this:dlib::matrix<dlib::rgb_pixel> image; dlib::load_image(image, path); std::vector frames1(10, image); // <- OkSolution for first one is allocate vector through resize or constructor then
assign_imageinto loop.Beta Was this translation helpful? Give feedback.
All reactions