hi,
what is instead of below code in opencv .net wrapper :
this is my code in C++ native :
hist = cvcreateHist(. . .);
my problem : cvSetReal1D(hist->bins,0,0);
my problom : cvSetReal1D(hist->bins,0,255);
what method is instead of below code in opencv .net wrapper
Re: what method is instead of below code in opencv .net wrapper
I just wrapped the cvSetReal1D in SVN.
If you got a MCvHistogram object cvHist , you can do the following:
CvInvoke.cvSetReal1D(CvHist->bins, 0, 0);
In C#, if you have a IntPtr, you can convert it to MCvHistogram by calling:
MCvHistogram cvHist = (MCvHistogram) Marshal.PtrToStructure(ptr, typeof(MCvHistogram));
If you are using the managed histogram class, just use its MCvHistorgram prperty.
If you are developping managed C++ functions, you can keep your existing code, take a look at the CPlusPlus example in the 1.3.0.0 source release.
If you got a MCvHistogram object cvHist , you can do the following:
CvInvoke.cvSetReal1D(CvHist->bins, 0, 0);
In C#, if you have a IntPtr, you can convert it to MCvHistogram by calling:
MCvHistogram cvHist = (MCvHistogram) Marshal.PtrToStructure(ptr, typeof(MCvHistogram));
If you are using the managed histogram class, just use its MCvHistorgram prperty.
If you are developping managed C++ functions, you can keep your existing code, take a look at the CPlusPlus example in the 1.3.0.0 source release.
Re: what method is instead of below code in opencv .net wrapper
hi and so thanks for your help,
but i can not find and method with this name (cvSetReal1D) in cvInvoke class ? also i can not see any information
on its document , do you realy certain for existence of this method ? (i am using v 1.3)
in vc++ , i can access to pointer of my MCvhistogram variable by marshal class but my problem is , that type of ( bins ) field on my variable is IntPtr too and i can not access to this field to modify it, please send too me an example of this , such as your previous reply .
so thanks
but i can not find and method with this name (cvSetReal1D) in cvInvoke class ? also i can not see any information
on its document , do you realy certain for existence of this method ? (i am using v 1.3)
in vc++ , i can access to pointer of my MCvhistogram variable by marshal class but my problem is , that type of ( bins ) field on my variable is IntPtr too and i can not access to this field to modify it, please send too me an example of this , such as your previous reply .
so thanks
Re: what method is instead of below code in opencv .net wrapper
The latest change is available from SVN only.
For information on how to check out code from SVN, take a look at the following page:
http://sourceforge.net/svn/?group_id=216500
A very good client to access SVN from windows can be found here
http://tortoisesvn.tigris.org/
In VC++, if you have a MCvHistogram structure hist , you can do the following:
cvSetReal1D(hist->bin.ToPointer(), .., ..);
Cheers,
Canming
For information on how to check out code from SVN, take a look at the following page:
http://sourceforge.net/svn/?group_id=216500
A very good client to access SVN from windows can be found here
http://tortoisesvn.tigris.org/
In VC++, if you have a MCvHistogram structure hist , you can do the following:
cvSetReal1D(hist->bin.ToPointer(), .., ..);
Cheers,
Canming