2017-07-04 3 views
0

私はJavaでOMRスキャナを作成しています。 私は画像の輪郭を含むリストを持っています。 私はリストの配列を作成したい。どのように私はそれを達成することができますか?<MatofPoints> Androidの配列のリスト

これは私が何をしたいのか

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

今持っているものです私は各質問に対するcountoursの配列を()を格納することができるよう

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

です。

同様に[1] contour1、contour2、関数contour3、contour4、contour5

[2] contour1、contour2、関数contour3、contour4、contour5

[3] contour1、contour2、関数contour3、contour4、contour5

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

+0

そして、何の問題のようです。しかし、あなたはこのような何かを行うことができますか? – Lemonov

+0

なぜリストのリストではないですか? –

答えて

0

リストのリストを使用するほうがよいでしょう。

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

それは働いた! Tedを助けてくれてありがとう! – Abhishek