Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The list format is an STL container, meaning that you've got some things to keep in mind to work with it. <code>push_back()</code> is the preferred method of adding instances to the container, much like using an iterator is the preferred method of accessing the elements of the list. If you try to directly set an element of the list to a <code>cv::Mat()</code> you're working on, then a) you need to know exactly what sort of wrapping the list is doing to each instance, so you can do it properly yourself, and b) you're defeating the purpose of using an STL container in the first place, which is to abstract away the details of the list. </p> <p>You don't necessarily need to use the <code>frame.clone()</code> call in your code, as this creates a deep copy of the image and takes up precious resources. I know that I've used <code>std::vector&lt;cv::Mat&gt;</code> in the past without having to make deep copies for each element in the vector, so I assume that you should be able to pass the Mat itself to a list. Consult <a href="http://www.cplusplus.com/reference/stl/list/" rel="nofollow">the C++ documentation on STL lists</a>.</p> <p>Another thing you might consider, if low memory usage and speed of access through the list is a concern, and your number of images is low, is a list of image pointers. Keep your images stored as individual <code>cv::Mat</code> instances, and make your list of type <code>std::list&lt;cv::Mat*&gt;</code>, passing the handle of the image to the <code>push_back()</code> call. Of course, with this method, your images will not be 'thread safe' because they will be stored in one place, but called and worked on from another. I hope this shed a little light on your inquiry. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload