Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

if you do like :

ArrayList a = new ArrayList(); // wrong

you have a list of Object , so get(0) returns an Object , which has no size() member.

you need to declare vImg as an ArrayList<Mat> , to achieve the correct type resolution, like:

ArrayList<Mat> a = new ArrayList(); // correct

if you do like :

ArrayList a vImg = new ArrayList(); // wrong

you have a list of Object , so get(0) returns an Object , which has no size() member.

you need to declare vImg as an ArrayList<Mat> , to achieve the correct type resolution, like:

ArrayList<Mat> a vImg = new ArrayList(); // correct