### Question:
LaneManager { public static int[] histogramArray(opencv_core.Mat image) { final int[] result = new int[HISTOGRAM_BINS]; final double binSize = image.size().width() / HISTOGRAM_BINS; UByteRawIndexer binaryIndex = image.createIndexer(); for (int col = 0; col < image.cols(); col++) { int bin = (int) (col / binSize); for (int row = 0; row < image.rows(); row++) { int value = binaryIndex.get(row, col); if (value > 0) { result[bin]++; } } } return result; }  static opencv_core.Mat readImage(String filename); static boolean writeImage(String filename, opencv_core.Mat img); static opencv_core.Mat doGrayscale(opencv_core.Mat src); static opencv_core.Mat doCanny(
      opencv_core.Mat image, double lowThreshold, double highThreshold); static opencv_core.Mat doGaussianBlur(opencv_core.Mat src, int kernelSize); static opencv_core.Mat doHoughLines(
      opencv_core.Mat image, double rho, double theta, int threshold,
      double minLineLength, double maxLineGap); static opencv_core.Mat applyMask(opencv_core.Mat image, int[] points); static opencv_core.Mat perspectiveTransform(
      opencv_core.Mat image, float[] fromPoints, float[] toPoints); static float[] getToPoints(int width, int height); static opencv_core.Mat imageToHsv(opencv_core.Mat image); static opencv_core.Mat getSaturationChannel(opencv_core.Mat image); static opencv_core.Mat getYuvChannel(opencv_core.Mat image); static opencv_core.Mat threshold(opencv_core.Mat image, double minValue); static opencv_core.Mat threshold(opencv_core.Mat image, double minValue, double maxValue); static opencv_core.Mat thresholdColor(opencv_core.Mat image); static opencv_core.Mat thresholdColor(opencv_core.Mat image, opencv_core.Scalar tapeColorMin, opencv_core.Scalar tapeColorMax); static int[] histogramArray(opencv_core.Mat image); static opencv_core.Mat histogram(opencv_core.Mat image); static HistogramPosition getMaxPosition(opencv_core.Mat histogram); static HistogramPosition getMaxPosition(int[] histogram); static HistogramPosition findLane(opencv_core.Mat src ); static void drawLine(
      opencv_core.Mat image, opencv_core.Point from, opencv_core.Point to,
      opencv_core.Scalar color, int thickness); static void drawFilledRectangle(
      opencv_core.Mat image, opencv_core.Point from, opencv_core.Point to,
      opencv_core.Scalar color); static opencv_core.Mat crop(opencv_core.Mat image, int x, int y, int width, int height); static final int HISTOGRAM_BINS; static final float[] SOURCE_POINTS; }### Answer:
@Test public void testHistogramArray() { opencv_core.Mat src = LaneManager.readImage(getResourcePath(TEST_IMAGE)); opencv_core.Mat saturationChannel = LaneManager.getSaturationChannel(src); opencv_core.Mat thresholdBinary = LaneManager.threshold(saturationChannel, 150); int[] histogram = LaneManager.histogramArray(thresholdBinary); assertEquals(histogram.length, LaneManager.HISTOGRAM_BINS); drawHistogram(histogram, thresholdBinary, "/tmp/robocar_histogramArray.jpg"); }