如何查看opencv里面函数的源代码??????比如setMouseCallback这个函数是怎么定义的?
opencv不是开源的吗?怎么在我的opencv目录里面找不到里面函数的定义代码啊?有木有啊?大侠们指点一二啊!谢谢...
opencv不是开源的吗?怎么在我的opencv目录里面找不到里面函数的定义代码啊?有木有啊?大侠们指点一二啊!谢谢
展开
1个回答
展开全部
用CMake导出opencv 源码,生成VC++项目,然后用vs打开工程,去里面搜索整个工程
#define CV_EXTERN_C extern "C"
#define CV_IMPL void CV_EXTERN_C
CV_IMPL void
cvSetMouseCallback( const char* window_name, CvMouseCallback on_mouse, void* param )
{
CV_FUNCNAME( "cvSetMouseCallback" );
__BEGIN__;
CvWindow* window = 0;
if( !window_name )
CV_ERROR( CV_StsNullPtr, "NULL window name" );
window = icvFindWindowByName(window_name);
if( !window )
EXIT;
window->on_mouse = on_mouse;
window->on_mouse_param = param;
__END__;
}
#define CV_EXTERN_C extern "C"
#define CV_IMPL void CV_EXTERN_C
CV_IMPL void
cvSetMouseCallback( const char* window_name, CvMouseCallback on_mouse, void* param )
{
CV_FUNCNAME( "cvSetMouseCallback" );
__BEGIN__;
CvWindow* window = 0;
if( !window_name )
CV_ERROR( CV_StsNullPtr, "NULL window name" );
window = icvFindWindowByName(window_name);
if( !window )
EXIT;
window->on_mouse = on_mouse;
window->on_mouse_param = param;
__END__;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询