Yes, remove it. Some of such macros are used for automatic python and java wrappers generation. But don't forget about CV_EXPORTS. Please read about this here http://code.opencv.org/projects/opencv/wiki/Coding_Style_Guide (useful link) and be sure that you follow this coding style.