i need an example of cvCreateHist() method

Ask questions on using Emgu CV with C++
Post Reply
iman_kh
Posts: 11
Joined: Tue Sep 09, 2008 1:46 am

i need an example of cvCreateHist() method

Post by iman_kh » Sun Sep 14, 2008 9:51 pm

hi,
i have a problem with third parameter of cvCreateHist() , (intptr[] ranges)
can i have an example of this method
thanks,bye

canming
Site Admin
Posts: 1038
Joined: Thu Feb 28, 2008 4:16 pm

Re: i need an example of cvCreateHist() method

Post by canming » Tue Sep 16, 2008 8:23 am

Take a look at the Histogram class in the source.

100014652
Posts: 5
Joined: Wed Feb 18, 2009 3:08 am

Re: i need an example of cvCreateHist() method

Post by 100014652 » Wed Mar 25, 2009 8:31 am

If it could help you, the way I defined "ranges" when "dims" parameter is 1:

float[] range_aux = {0, 256}; //define your own array
IntPtr[] ranges = new IntPtr[1]; //dims==1
ranges[0] = System.Runtime.InteropServices.Marshal.AllocHGlobal(2*sizeof(float));
System.Runtime.InteropServices.Marshal.Copy(range_aux, 0, ranges[0], 2);
.
.
.
.
System.Runtime.InteropServices.Marshal.FreeHGlobal(ranges[0]);

Post Reply