Tag: histogram

OpenCV C ++ calcHist到Java

我正在尝试在我的Android设备上运行一些c ++代码; 但是,我遇到了一个我正在使用的Mat类型的小问题。 我试图转换的代码如下(第二个函数调用第一个): static Mat histc_(const Mat& src, int minVal=0, int maxVal=255, bool normed=false) { Mat result; // Establish the number of bins. int histSize = maxVal-minVal+1; // Set the ranges. float range[] = { static_cast(minVal), static_cast(maxVal+1) }; const float* histRange = { range }; // calc histogram calcHist(&src, 1, 0, Mat(), result, 1, […]

使用Chart2D的直方图

我想绘制JPEG的系数直方图。 我在谷歌上搜索了几个小时才知道如何使用Chart2D库,但是没有带有示例的教程。 我想要绘制的数组是hist[] 。 我创建了一个LBChart2D的对象,但我不知道如何将数组设置为数据集。 //coeff[] is the coefficients array for(int i=0;i<coeff.length;i++) hist[coeff[i]]++; LBChart2D lbChart2D = new LBChart2D(); 编辑:这是我正在尝试的: Object2DProperties object2DProps = new Object2DProperties(); object2DProps.setObjectTitleText (“Title “); Chart2DProperties chart2DProps = new Chart2DProperties(); chart2DProps.setChartBetweenChartAndLegendGapThicknessModel(5); LegendProperties legendProps = new LegendProperties(); legendProps .setLegendBorderThicknessModel(5); legendProps.setLegendBackgroundColor(Color.yellow); legendProps.setLegendExistence (false); GraphChart2DProperties graph2DProps = new GraphChart2DProperties(); GraphProperties graphProps = new GraphProperties(); object2DProps .setObjectTitleFontName(“test”); […]

在JFreeChart中设置直方图中断

我正在使用JFreeChart通过使用我的数据填充HistogramDataset对象并使用ChartFactory.createHistogram()来绘制直方图。 但是,到目前为止,我还没有在文档中找到有关如何设置直方图中断的任何内容。 我错过了什么,或者JFreeChart nog是否提供此function? 为了说明我对中断的意思,请参阅以下两个直方图,这些直方图是从具有相同数量的箱子但具有不同中断的相同数据生成的。 注意两个直方图之间的分布形状是如何非常不同的,因此能够控制断裂是很重要的。

显示图像数据的直方图

我有时需要以直方图的forms显示图像数据的表示。 我对访问图像数据的方式特别感兴趣。 我熟悉JFreeChart ,其中包括直方图支持,但我会考虑其他方法。