opencv

15小时前 (07:10:40)阅读1回复0
wsygfsj
wsygfsj
  • 管理员
  • 注册排名5
  • 经验值118175
  • 级别管理员
  • 主题23635
  • 回复0
楼主

  #include "cv。h"

#include "highgui。h"

#define HDIM 256

int main( int argc, char** argv )

IplImage *src = 0, *dst = 0;

CvHistogram *hist = 0;

int n = HDIM;

double nn[HDIM];

uchar T[HDIM];

CvMat *T_mat;

int x;

int sum = 0;

double val = 0;

src = cvLoadImage( "03。

  jpg",-1); // force to gray image cvNamedWindow( "source", 1 );

cvNamedWindow( "result", 1 );

hist = cvCreateHist( 1, n, CV_HIST_ARRAY, 0, 1 );

cvCalcHist( src, hist, 0, 0 );

val = 0;

for ( x = 0; x bins, x);

nn[x] = val;

sum = src-height * src-width;

for( x = 0; x   

0
回帖

opencv 期待您的回复!

取消