Hello,

I have a question regarding the FractionRgbData class of neuroph ImageRecognition. I do not fully understand the implementation of the static FractionRgbData.convertRgbInputToBinaryBlackAndWhite(double inputRGB) method (see a copy of the method below). More specifically, I do not understand why the length of the input array is divided by 3 in the for-loop condition and the for-loop variable **i** is also incremented with 3 every iteration? I would think dividing the input array by 3 should be enough. Note that the input double array comes from the FractionRgbData.getFlattenedRgbValues() method.

Hopefully someone can shed some light on this implementation!

Thanks in advance,

Barry NL

/** * Converts image rgb data to binary black and white data * @param inputRGB flatten rgb data * @return binary black and white representation of image */ public static double[] convertRgbInputToBinaryBlackAndWhite(double[] inputRGB) { double inputBinary[]= new double[inputRGB.length/3]; for(int i=0; i<inputRGB.length/3; i+=3) { if (inputRGB[i]>0) inputBinary[i] = 0; else inputBinary[i] = 1; } return inputBinary; }