Ask Your Question


asked 2013-01-26 14:08:48 -0500

ethanjyx gravatar image

What's the meaning of these two keywords?

An example:

struct CV_EXPORTS_W HOGDescriptor { public: enum { L2Hys=0 }; enum { DEFAULT_NLEVELS=64 };

CV_WRAP HOGDescriptor() : winSize(64,128), blockSize(16,16), blockStride(8,8),
    cellSize(8,8), nbins(9), derivAperture(1), winSigma(-1),
    histogramNormType(HOGDescriptor::L2Hys), L2HysThreshold(0.2), gammaCorrection(true),
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-01-26 15:03:25 -0500

AlexanderShishkov gravatar image

updated 2013-01-26 15:09:40 -0500

CV_EXPORTS_W is defined in modules/core/include/opencv2/core/types_c.h as alias for CV_EXPORTS, CV_EXPORTS is defined as:

#if (defined WIN32 || defined _WIN32 || defined WINCE) && defined CVAPI_EXPORTS
# define CV_EXPORTS __declspec(dllexport)
# define CV_EXPORTS

So it's alias for __declspec(dllexport) on Windows platform where CVAPI_EXPORTS is defined, otherwise it's empty.

CV_WARP is used as flag for scripts to create wrappers of the function or method. It is used for creation Python or Java wrappers.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2013-01-26 14:08:48 -0500

Seen: 5,468 times

Last updated: Jan 26 '13