I have a List variable 'l' which has values like this:
List<Point> l = new ArrayList<Point>();
Imgproc.convexHull(contours,hull);
for (int j = 0; j < intlist.length; j++) {
l.add(contours.toList().get(hull.toList().get(j)));
}
After this I am getting following values of l:
l = [{1,2}, {3,4}, {5,6}]
and so on. How to find the average of 1st and 2nd values in l.get(i) for all i, as an array. For example, for the above I want the following:
x = 3
y = 4
>`. Please show the "some processing" in your question.
– RealSkeptic Jun 19 '17 at 06:37>` so you only have ONE `Point` per index. So you already have the average value in this case ;) During the population, you need to iterate also on the `contours` length to get every value and add them in a `Collection`, that `Collection` will be added in your `List`