图片用CV_8U,BGR格式计算,片段代码
Mat a = this.r["测试.历史表"].BgrImage.Cut(rect).Mat; // 获取,裁剪名字“测试.历史表”图片的矩阵
int[] v1 = { 0, 1, 2 }, v3 = { 8, 8, 8 };
float[] v4 = { 0f, 256f, 0f, 256f, 0f, 256f };
Mat v2 = new Mat();
Mat cv = new Mat(); //输出矩阵
CvInvoke.CalcHist(a, v1, v2, cv, v3, v4, false);
引发了异常: Emgu.CV.World.dll 中的“Emgu.CV.Util.CvException”(“OpenCV: 0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows”)
Mat a = this.r["测试.历史表"].BgrImage.Cut(rect).Mat; // 获取,裁剪名字“测试.历史表”图片的矩阵
int[] v1 = { 0, 1, 2 }, v3 = { 8, 8, 8 };
float[] v4 = { 0f, 256f, 0f, 256f, 0f, 256f };
Mat v2 = new Mat();
Mat cv = new Mat(); //输出矩阵
CvInvoke.CalcHist(a, v1, v2, cv, v3, v4, false);
引发了异常: Emgu.CV.World.dll 中的“Emgu.CV.Util.CvException”(“OpenCV: 0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows”)