English 中文(简体)
1D 具有两倍价值
原标题:1D histogram opencv with double values

我试图用开放式录像制作一张血像。 我的图像(32比方)来自混合作业,因此,我只知道这些数值在[-0.5;0.5]之间,但我对起点数据没有任何了解。

the problem is that I don t understand how to set the parameters to compute such histogram. the code I wrote is:

int numbins=1000;
float range[]={-0.5, 0.5};
float *ranges[]={range};
CvHistogram *hist=cvCreateHist(1, &numbins, CV_HIST_ARRAY, ranges, 1);
cvCalcHist(&img, hist);

我想要获得他的图象是成像。 如果我试图印刷他的图象一,我只看到黑色照片,而用同样的功能,如果使用8轨图像,我就会得到正确的图表。

问题回答

http://opencv.itseez.com/modules/imgproc/doc/histograms.html?highlight=createhist#ave%20cvCalcHist%28IplImage%2a%2a%20image,%20CvHistogram%2a%20hist,%20int%20accumulate,%20const%20CvArr%2a%20mask%29”,rel=“nofollow”>calcHist 。 另外,camgiademo 大量使用其图表。

在显示之前(运动表明如何做到这一点)你是否将他的图形产出与的热量()相平? 当显示时,接近0的数值将显得黑白,但是如果在0到255之间实现正常化,就会 n然。





相关问题
Calculate the gradient for an histogram in c++

I calculated the histogram(a simple 1d array) for an 3D grayscale Image. Now I would like to calculate the gradient for the this histogram at each point. So this would actually mean I have to ...

How to smooth a histogram?

I want to smooth a histogram. Therefore I tried to smooth the internal matrix of cvHistogram. typedef struct CvHistogram { int type; CvArr* bins; float thresh[CV_MAX_DIM][2]; /* ...

Getting data for histogram plot

Is there a way to specify bin sizes in MySQL? Right now, I am trying the following SQL query: select total, count(total) from faults GROUP BY total; The data that is being generated is good enough ...

Generate random number histogram using java

Histogram -------------------------------------------------------- 1 ****(4) 2 ******(6) 3 ***********(11) 4 *****************(17) 5 **************************(26) 6 **********************...

Howto bin series of float values into histogram in Python?

I have set of value in float (always less than 0). Which I want to bin into histogram, i,e. each bar in histogram contain range of value [0,0.150) The data I have looks like this: 0.000 0.005 0.124 ...

热门标签