Hi following is the code example. Please suggest what should I do to call c++ written function to a c# function.
Thank you in advance
c++ code
#define BYTE_IMAGE
#ifdef BYTE_IMAGE
typedef unsigned char kz_pixel_t;
#define uiNR_OF_GREY (256)
#else
typedef unsigned short kz_pixel_t;
# define uiNR_OF_GREY (4096)
#endif
static int CLAHE (kz_pixel_t* pImage, unsigned int uiXRes, unsigned int uiYRes,
kz_pixel_t Min, kz_pixel_t Max, unsigned int uiNrX, unsigned int uiNrY,
unsigned int uiNrBins, float fCliplimit)
{
...
...
}
c# calling code
csharpfunction()
{
CLAHE((byte*)im, 0, 0, 0, 0, 0, 0, 0, 0.02);
}
im is image instance. the c++ code gets the pointer in byte formate. how can I convert the referece to my image object to pass in the function as byte*.
Please help will be very thankful to you.