Ask Your Question

nsm's profile - activity

2014-02-27 23:29:05 -0500 asked a question Histogram Equalization of color image Open CV SDK for java!

Dear Folks, I am working on an image processing app in android and I am trying to achieve Histogram equalization for color image. I could able to get it done for grey scale image since it has only one channel . Now I need to do it for color image where number of channel is more! Some one please guide me how do I proceed and I want to do in '.java' file using opencv sdk api, Imgproc.equalizeHist(src, dst) since few of the method in native is not working for me ! Thats why I am shifting to java !

Thanks in advance NSM

2014-02-26 08:21:59 -0500 commented question calcHist method Inavalid Arguments.

@berak I agree. But compiler for 32 bit and compiler for 64 bit would be different right . So you mean to say the 32 bit compiler only throwing this error ? Do I need to check with different compiler combination for 32 bit ? Am I missing any configuration changes ? Please guide me!

2014-02-26 08:10:46 -0500 commented question calcHist method Inavalid Arguments.

@berak if I run the same code in 64 bit machine , it compiles without error! I am wondering what I may be missing!

2014-02-26 07:42:09 -0500 commented question calcHist method Inavalid Arguments.

@berak . I have edited my post! Please see! Thanks

2014-02-26 07:39:20 -0500 received badge  Editor (source)
2014-02-26 07:19:42 -0500 asked a question calcHist method Inavalid Arguments.

Dear Folks,

I am trying to find histogram in the image and I am trying to use calcHist method like below

calcHist( &bgr_planes[0], 1, 0, Mat(), b_hist, 1, &histSize, &histRange, uniform, accumulate );

I am trying this example from the link http://docs.opencv.org/doc/tutorials/imgproc/histograms/histogram_calculation/histogram_calculation.html

All the time I am getting this error and I am not able to compile the code

"Invalid arguments ' Candidates are: void calcHist(const cv::Mat *, int, const int *, const cv::_InputArray &, cv::SparseMat &, int, const int *, const float * *, bool, bool) void calcHist(const cv::Mat *, int, const int *, const cv::_InputArray &, const cv::_OutputArray &, int, const int *, const float * *, bool, bool) void calcHist(const cv::_InputArray &, const std::vector<int,std::allocator<int>> &, const cv::_InputArray &, const cv::_OutputArray &, const std::vector<int,std::allocator<int>> &, const std::vector<float,std::allocator<float>> &, bool) '"

I have configured my build c/c++ build path with the required includes image description

I am working on 32 bit system and have set up appropriate NDK for windows 32 bit system. Same code when I run on 64 bit system where the method compiles without any issue!

Really Banging my head since morning . Some one pleeeeaaase help :(:)

Edited:

Mat imagMat=cvLoadImageM("/sdcard/ImageProcessing/TestImage.png"); LOGD("Number Of Rows = %d",imagMat.rows);

  /// Separate the image in 3 places ( B, G and R )
  vector<Mat> bgr_planes;
  split( imagMat, bgr_planes );

  /// Establish the number of bins
  int histSize = 256;

  /// Set the ranges ( for B,G,R) )
  float range[] = { 0, 256 } ;
  const float* histRange = { range };

  bool uniform = true;

  bool accumulate = false;

  Mat b_hist, g_hist, r_hist;

  const int* channel=0;

  calcHist( &bgr_planes[0], 1, 0, Mat(), b_hist, 1, &histSize, &histRange, uniform, accumulate );

Thanks in Advance

NSM