Android 中的 <MatofPoints> 数组列表

List of <MatofPoints> array in Android

我正在 java 中创建 OMR 扫描仪。 我有一个包含图像轮廓的列表。 我想创建列表数组。我怎样才能完成它?

这就是我现在拥有的

List<MatOfPoint> questions = new ArrayList<MatOfPoint>();

我想做的是

List<MatOfPoint>[] questions = new ArrayList<MatOfPoint>[];

这样我就可以为每个问题存储 countours() 数组。 喜欢

[1] 轮廓 1、轮廓 2、轮廓 3、轮廓 4、轮廓 5

[2] 轮廓 1、轮廓 2、轮廓 3、轮廓 4、轮廓 5

[3] 轮廓 1、轮廓 2、轮廓 3、轮廓 4、轮廓 5

.......................

最好只使用列表的列表。但是你可以这样做:

List<MatOfPoint>[] questions = (ArrayList<MatOfPoint>[]) new ArrayList[n];