【问题标题】:Does Neuroph Image Recognition Plugin correctly convert RGB images to Black/White?Neuroph 图像识别插件是否正确地将 RGB 图像转换为黑白图像?
【发布时间】:2012-05-15 00:38:54
【问题描述】:

我对 Neuroph 2.6 的 Neuroph ImageRecognition 的 FractionRgbData 类有疑问。我不完全理解静态FractionRgbData.convertRgbInputToBinaryBlackAndWhite(double[] inputRGB) 方法的实现(请参阅下面的方法副本)。更具体地说,我不明白为什么在for循环条件下输入数组的长度除以3,而for循环变量i每次迭代也增加3?我认为将输入数组除以 3 就足够了。

请注意,此方法在ImageRecognitionHelper 类中使用,并且该类显示inputRGB 双精度来自FractionRgbData.getFlattenedRgbValues(),可以看到here。据我了解,inputRGB double 数组依次包含图像的红色、绿色和蓝色通道。

希望有人可以对此实现有所了解!

提前致谢,

巴里荷兰

/**
 * 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>0) inputBinary = 0;
            else inputBinary = 1;
    }

    return inputBinary;
}

【问题讨论】:

    标签: java image-processing artificial-intelligence neural-network


    【解决方案1】:

    一位 Neuroph 开发人员在 Neuroph 的支持论坛上回答了上述问题。可以找到here

    简而言之,开发人员说实现不正确,无法正确转换为黑白。

    【讨论】:

      猜你喜欢
      • 2020-01-22
      • 2013-03-17
      • 2018-07-11
      • 2011-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-17
      • 1970-01-01
      相关资源
      最近更新 更多