hi,
i have a problem with third parameter of cvCreateHist() , (intptr[] ranges)
can i have an example of this method
thanks,bye
i need an example of cvCreateHist() method
Re: i need an example of cvCreateHist() method
Take a look at the Histogram class in the source.
Re: i need an example of cvCreateHist() method
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]);
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]);