本文整理汇总了C++中icvFindWindowByName函数的典型用法代码示例。如果您正苦于以下问题:C++ icvFindWindowByName函数的具体用法?C++ icvFindWindowByName怎么用?C++ icvFindWindowByName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了icvFindWindowByName函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: cvSetTrackbarPos
CV_IMPL void cvSetTrackbarPos( const char* trackbar_name, const char* window_name, int pos )
{
CV_FUNCNAME( "cvSetTrackbarPos" );
__BEGIN__;
CvWindow* window;
CvTrackbar* trackbar = 0;
if( trackbar_name == 0 || window_name == 0 )
CV_ERROR( CV_StsNullPtr, "NULL trackbar or window name" );
window = icvFindWindowByName( window_name );
if( window )
trackbar = icvFindTrackbarByName( window, trackbar_name );
if( trackbar )
{
if( pos < 0 )
pos = 0;
if( pos > trackbar->maxval )
pos = trackbar->maxval;
}
CV_LOCK_MUTEX();
gtk_range_set_value( GTK_RANGE(trackbar->widget), pos );
CV_UNLOCK_MUTEX();
__END__;
}
开发者ID:gotomypc,项目名称:eyepatch,代码行数:33,代码来源:window_gtk.cpp
示例2: cvResizeWindow
CV_IMPL void cvResizeWindow(const char* name, int width, int height )
{
CV_FUNCNAME( "cvResizeWindow" );
__BEGIN__;
CvWindow* window;
CvImageWidget * image_widget;
if( !name )
CV_ERROR( CV_StsNullPtr, "NULL name" );
window = icvFindWindowByName(name);
if(!window)
EXIT;
image_widget = CV_IMAGE_WIDGET( window->widget );
if(image_widget->flags & CV_WINDOW_AUTOSIZE)
EXIT;
CV_LOCK_MUTEX();
gtk_window_set_resizable( GTK_WINDOW(window->frame), 1 );
gtk_window_resize( GTK_WINDOW(window->frame), width, height );
// disable initial resize since presumably user wants to keep
// this window size
image_widget->flags &= ~CV_WINDOW_NO_IMAGE;
CV_UNLOCK_MUTEX();
__END__;
}
开发者ID:gotomypc,项目名称:eyepatch,代码行数:33,代码来源:window_gtk.cpp
示例3: cvGetTrackbarPos
CV_IMPL int cvGetTrackbarPos( const char* trackbar_name, const char* window_name )
{
int pos = -1;
CV_FUNCNAME( "cvGetTrackbarPos" );
__BEGIN__;
CvWindow* window;
CvTrackbar* trackbar = 0;
if( trackbar_name == 0 || window_name == 0 )
CV_ERROR( CV_StsNullPtr, "NULL trackbar or window name" );
window = icvFindWindowByName( window_name );
if( window )
trackbar = icvFindTrackbarByName( window, trackbar_name );
if( trackbar )
pos = trackbar->pos;
__END__;
return pos;
}
开发者ID:gotomypc,项目名称:eyepatch,代码行数:25,代码来源:window_gtk.cpp
示例4: cvDestroyWindow
CV_IMPL void cvDestroyWindow( const char* name )
{
CV_FUNCNAME( "cvDestroyWindow" );
__BEGIN__;
CvWindow* window;
if(!name)
CV_ERROR( CV_StsNullPtr, "NULL name string" );
window = icvFindWindowByName( name );
if( !window )
EXIT;
// note that it is possible for the update thread to run this function
// if there is a call to cvShowImage in a mouse callback
// (this would produce a deadlock on window_mutex)
CV_LOCK_MUTEX();
icvDeleteWindow( window );
CV_UNLOCK_MUTEX();
__END__;
}
开发者ID:gotomypc,项目名称:eyepatch,代码行数:26,代码来源:window_gtk.cpp
示例5: cvShowImage
CV_IMPL void
cvShowImage( const char* name, const CvArr* arr )
{
CV_FUNCNAME( "cvShowImage" );
__BEGIN__;
CvWindow* window;
if( !name )
CV_ERROR( CV_StsNullPtr, "NULL name" );
CV_LOCK_MUTEX();
window = icvFindWindowByName(name);
if(!window)
{
cvNamedWindow(name, 1);
window = icvFindWindowByName(name);
}
if( window && arr )
{
#ifdef HAVE_OPENGL
if (window->useGl)
{
CvMat stub;
CvMat* mat = cvGetMat(arr, &stub);
cv::Mat im(mat);
cv::imshow(name, im);
return;
}
#endif
CvImageWidget * image_widget = CV_IMAGE_WIDGET( window->widget );
cvImageWidgetSetImage( image_widget, arr );
}
CV_UNLOCK_MUTEX();
__END__;
}
开发者ID:4auka,项目名称:opencv,代码行数:42,代码来源:window_gtk.cpp
示例6: cvSetModeWindow_CARBON
void cvSetModeWindow_CARBON( const char* name, double prop_value)//Yannick Verdie
{
OSStatus err = noErr;
CV_FUNCNAME( "cvSetModeWindow_QT" );
__BEGIN__;
CvWindow* window;
if(!name)
CV_ERROR( CV_StsNullPtr, "NULL name string" );
window = icvFindWindowByName( name );
if( !window )
CV_ERROR( CV_StsNullPtr, "NULL window" );
if(window->flags & CV_WINDOW_AUTOSIZE)//if the flag CV_WINDOW_AUTOSIZE is set
EXIT;
if (window->status==CV_WINDOW_FULLSCREEN && prop_value==CV_WINDOW_NORMAL)
{
err = EndFullScreen(window->restoreState,0);
if (err != noErr)
fprintf(stdout,"Error EndFullScreen\n");
window->window = window->oldwindow;
ShowWindow( window->window );
window->status=CV_WINDOW_NORMAL;
EXIT;
}
if (window->status==CV_WINDOW_NORMAL && prop_value==CV_WINDOW_FULLSCREEN)
{
GDHandle device;
err = GetWindowGreatestAreaDevice(window->window, kWindowTitleBarRgn, &device, NULL);
if (err != noErr)
fprintf(stdout,"Error GetWindowGreatestAreaDevice\n");
HideWindow(window->window);
window->oldwindow = window->window;
err = BeginFullScreen(&(window->restoreState), device, 0, 0, &window->window, 0, fullScreenAllowEvents | fullScreenDontSwitchMonitorResolution);
if (err != noErr)
fprintf(stdout,"Error BeginFullScreen\n");
window->status=CV_WINDOW_FULLSCREEN;
EXIT;
}
__END__;
}
开发者ID:ElenaGvozdeva,项目名称:opencv,代码行数:52,代码来源:window_carbon.cpp
示例7: cvSetMouseCallback
CV_IMPL void
cvSetMouseCallback( const char* name, CvMouseCallback function, void* info)
{
CvWindow* window = icvFindWindowByName( name );
if (window != NULL)
{
window->on_mouse = function;
window->on_mouse_param = info;
}
else
{
fprintf(stdout,"Error with cvSetMouseCallback. Window not found : %s\n",name);
}
}
开发者ID:ElenaGvozdeva,项目名称:opencv,代码行数:14,代码来源:window_carbon.cpp
示例8: cvSetMouseCallback
CV_IMPL void
cvSetMouseCallback( const char* name, CvMouseCallback function, void* info)
{
CvWindow* window = icvFindWindowByName( name );
if (window != NULL)
{
window->on_mouse = function;
window->on_mouse_param = info;
}
else
{
fprintf(stdout,"Une erreur lors de cvSetMouseCallback, window nom trouvee : %s",name);
}
}
开发者ID:DORARA29,项目名称:AtomManipulator,代码行数:14,代码来源:window_carbon.cpp
示例9: cvShowImage
CV_IMPL void cvShowImage( const char* name, const CvArr* arr)
{
CV_FUNCNAME( "cvShowImage" );
__BEGIN__;
CvWindow* window;
int origin = 0;
int resize = 0;
CvMat stub, *image;
if( !name )
CV_ERROR( CV_StsNullPtr, "NULL name" );
window = icvFindWindowByName(name);
if( !window || !arr )
EXIT; // keep silence here.
if( CV_IS_IMAGE_HDR( arr ))
origin = ((IplImage*)arr)->origin;
CV_CALL( image = cvGetMat( arr, &stub ));
/*
if( !window->image )
cvResizeWindow( name, image->cols, image->rows );
*/
if( window->image &&
!CV_ARE_SIZES_EQ(window->image, image) ) {
if ( ! (window->flags & CV_WINDOW_AUTOSIZE) )//FD
resize = 1;
cvReleaseMat( &window->image );
}
if( !window->image ) {
resize = 1;//FD
window->image = cvCreateMat( image->rows, image->cols, CV_8UC3 );
}
cvConvertImage( image, window->image, (origin != 0 ? CV_CVTIMG_FLIP : 0) + CV_CVTIMG_SWAP_RB );
icvPutImage( window );
if ( resize )//FD
icvUpdateWindowSize( window );
__END__;
}
开发者ID:DORARA29,项目名称:AtomManipulator,代码行数:47,代码来源:window_carbon.cpp
示例10: cvDestroyWindow
CV_IMPL void cvDestroyWindow( const char* name )
{
CV_FUNCNAME( "cvDestroyWindow" );
__BEGIN__;
CvWindow* window;
if(!name)
CV_ERROR( CV_StsNullPtr, "NULL name string" );
window = icvFindWindowByName(name);
if( !window )
EXIT;
__END__;
}
开发者ID:FanChao90,项目名称:opencv,代码行数:17,代码来源:window_winrt.cpp
示例11: cvGetWindowHandle
CV_IMPL void* cvGetWindowHandle( const char* name )
{
WindowRef result = 0;
__BEGIN__;
CvWindow* window;
window = icvFindWindowByName( name );
if (window != NULL)
result = window->window;
else
result = NULL;
__END__;
return result;
}
开发者ID:ElenaGvozdeva,项目名称:opencv,代码行数:17,代码来源:window_carbon.cpp
示例12: cvResizeWindow
CV_IMPL void cvResizeWindow(const char* name, int width, int height )
{
CV_FUNCNAME( "cvResizeWindow" );
__BEGIN__;
CvWindow* window;
if( !name )
CV_ERROR( CV_StsNullPtr, "NULL name" );
window = icvFindWindowByName(name);
if(!window)
EXIT;
// TODO: implement appropriate logic here
__END__;
}
开发者ID:FanChao90,项目名称:opencv,代码行数:19,代码来源:window_winrt.cpp
示例13: cvUpdateWindow
CV_IMPL void cvUpdateWindow(const char* name)
{
CV_FUNCNAME( "cvUpdateWindow" );
__BEGIN__;
CvWindow* window;
if (!name)
CV_ERROR( CV_StsNullPtr, "NULL name string" );
window = icvFindWindowByName( name );
if (!window)
EXIT;
// window does not refresh without this
gtk_widget_queue_draw( GTK_WIDGET(window->widget) );
__END__;
}
开发者ID:4auka,项目名称:opencv,代码行数:20,代码来源:window_gtk.cpp
示例14: cvMoveWindow
CV_IMPL void cvMoveWindow( const char* name, int x, int y)
{
CV_FUNCNAME( "cvMoveWindow" );
__BEGIN__;
CvWindow* window;
//CvTrackbar* trackbar;
if( !name )
CV_ERROR( CV_StsNullPtr, "NULL name" );
window = icvFindWindowByName(name);
if(!window)
EXIT;
MoveWindow(window->window, x, y, true);
__END__;
}
开发者ID:DORARA29,项目名称:AtomManipulator,代码行数:20,代码来源:window_carbon.cpp
示例15: cvResizeWindow
CV_IMPL void cvResizeWindow( const char* name, int width, int height)
{
CV_FUNCNAME( "cvResizeWindow" );
__BEGIN__;
CvWindow* window;
//CvTrackbar* trackbar;
if( !name )
CV_ERROR( CV_StsNullPtr, "NULL name" );
window = icvFindWindowByName(name);
if(!window)
EXIT;
SizeWindow(window->window, width, height, true);
__END__;
}
开发者ID:DORARA29,项目名称:AtomManipulator,代码行数:20,代码来源:window_carbon.cpp
示例16: cvSetMouseCallback
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;
// TODO: implement appropriate logic here
__END__;
}
开发者ID:FanChao90,项目名称:opencv,代码行数:20,代码来源:window_winrt.cpp
示例17: cvChangeMode_GTK
void cvChangeMode_GTK( const char* name, double prop_value)//Yannick Verdie
{
CV_FUNCNAME( "cvChangeMode_GTK" );
__BEGIN__;
CvWindow* window;
if(!name)
CV_ERROR( CV_StsNullPtr, "NULL name string" );
window = icvFindWindowByName( name );
if( !window )
CV_ERROR( CV_StsNullPtr, "NULL window" );
if(window->flags & CV_WINDOW_AUTOSIZE)//if the flag CV_WINDOW_AUTOSIZE is set
EXIT;
//so easy to do fullscreen here, Linux rocks !
if (window->status==CV_WINDOW_FULLSCREEN && prop_value==CV_WINDOW_NORMAL)
{
CV_LOCK_MUTEX();
gtk_window_unfullscreen(GTK_WINDOW(window->frame));
window->status=CV_WINDOW_NORMAL;
CV_UNLOCK_MUTEX();
EXIT;
}
if (window->status==CV_WINDOW_NORMAL && prop_value==CV_WINDOW_FULLSCREEN)
{
CV_LOCK_MUTEX();
gtk_window_fullscreen(GTK_WINDOW(window->frame));
window->status=CV_WINDOW_FULLSCREEN;
CV_UNLOCK_MUTEX();
EXIT;
}
__END__;
}
开发者ID:AlexandreFreitas,项目名称:danfreve-blinkdetection,代码行数:41,代码来源:window_gtk.cpp
示例18: cvMoveWindow
CV_IMPL void cvMoveWindow( const char* name, int x, int y )
{
CV_FUNCNAME( "cvMoveWindow" );
__BEGIN__;
CvWindow* window;
RECT rect;
if( !name )
CV_ERROR( CV_StsNullPtr, "NULL name" );
window = icvFindWindowByName(name);
if(!window)
EXIT;
GetWindowRect( window->frame, &rect );
MoveWindow( window->frame, x, y, rect.right - rect.left, rect.bottom - rect.top, TRUE);
__END__;
}
开发者ID:SCS-B3C,项目名称:OpenCV2-2,代码行数:21,代码来源:window_w32.cpp
示例19: cvGetWindowHandle
CV_IMPL void* cvGetWindowHandle( const char* window_name )
{
void* hwnd = 0;
CV_FUNCNAME( "cvGetWindowHandle" );
__BEGIN__;
CvWindow* window;
if( window_name == 0 )
CV_ERROR( CV_StsNullPtr, "NULL window name" );
window = icvFindWindowByName( window_name );
if( window )
hwnd = (void*)window->hwnd;
__END__;
return hwnd;
}
开发者ID:SCS-B3C,项目名称:OpenCV2-2,代码行数:21,代码来源:window_w32.cpp
示例20: cvSetMouseCallback
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__;
}
开发者ID:SCS-B3C,项目名称:OpenCV2-2,代码行数:21,代码来源:window_w32.cpp
注:本文中的icvFindWindowByName函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论