2017-07-04 20 views
0

我在java中创建OMR扫描器。 我有列表中包含图像的轮廓。 我想创建List的数组。我怎么能做到这一点?Android中<MatofPoints>数组的列表

这就是我现在所拥有的

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

我想要做什么是

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

,这样我可以存储countours()对每个问题的阵列。 像

[1] contour1,轮廓2,contour3,contour4,contour5

[2] contour1,轮廓2,contour3,contour4,contour5

[3] contour1,轮廓2,contour3,contour4,contour5

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

+0

什么似乎是这个问题? – Lemonov

+0

为什么不列出清单? –

回答

0

只使用列表列表可能会更好。但你可以这样做:

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

工作!感谢您帮助我特德! – Abhishek