2012-06-21 12:19:55 -04:00
|
|
|
/*
|
|
|
|
* =====================================================================================
|
|
|
|
*
|
2012-06-26 14:07:03 -04:00
|
|
|
* Filename: libcvautomation-xlib.h
|
2012-06-21 12:19:55 -04:00
|
|
|
*
|
|
|
|
* Description: Function definitions for X11 operations
|
|
|
|
*
|
|
|
|
* Created: 06/21/2012 08:34:21 AM
|
|
|
|
* Revision: none
|
|
|
|
* Compiler: gcc
|
|
|
|
*
|
|
|
|
* Author: Bradlee Speice, bspeice@uncc.edu
|
|
|
|
* Organization: MOSAIC at University of North Carolina at Charlotte
|
|
|
|
*
|
|
|
|
* =====================================================================================
|
|
|
|
*/
|
|
|
|
|
2012-06-26 14:07:03 -04:00
|
|
|
#ifndef LIBCVAUTOMATION_XLIB_H
|
|
|
|
#define LIBCVAUTOMATION_XLIB_H
|
2012-06-21 12:19:55 -04:00
|
|
|
|
2012-06-22 13:22:16 -04:00
|
|
|
#include <libcvautomation/libcvautomation.h>
|
2012-06-21 12:19:55 -04:00
|
|
|
|
2012-06-26 14:07:03 -04:00
|
|
|
/* Custom wrapper for XOpenDisplay function */
|
|
|
|
Display* cvaOpenDisplay ( char *displayName );
|
|
|
|
|
|
|
|
/* Custom wrapper for XCloseDisplay funtion */
|
|
|
|
void cvaCloseDisplay ( Display *displayLocation );
|
|
|
|
|
2012-06-22 15:38:41 -04:00
|
|
|
/* Match a sub image using the X11 root window as root */
|
2012-07-20 10:20:51 -04:00
|
|
|
cvaPoint matchSubImage_X11( Display *displayLocation, IplImage *subImage, int searchMethod, int tolerance );
|
2012-06-22 15:38:41 -04:00
|
|
|
|
|
|
|
/* Match a sub image using the X11 root window as root, return the center */
|
2012-07-20 10:20:51 -04:00
|
|
|
cvaPoint matchSubImage_X11_center( Display *displayLocation, IplImage *subImage, int searchMethod, int tolerance );
|
2012-06-22 15:38:41 -04:00
|
|
|
|
|
|
|
/* Match a sub image using X11 as root, from filename */
|
2012-07-20 10:20:51 -04:00
|
|
|
cvaPoint matchSubImage_X11_location( Display *displayLocation, const char *subImage_location, int search_method, int tolerance );
|
2012-06-22 15:38:41 -04:00
|
|
|
|
|
|
|
/* Match a sub image using X11 as root, from filename, return the center */
|
2012-07-20 10:20:51 -04:00
|
|
|
cvaPoint matchSubImage_X11_location_center( Display *displayLocation, const char *subImage_location, int search_method, int tolerance );
|
2012-06-21 12:19:55 -04:00
|
|
|
|
2012-06-26 14:07:03 -04:00
|
|
|
#endif /* LIBCVAUTOMATION_XLIB_H */
|
2012-07-10 16:32:42 -04:00
|
|
|
|
|
|
|
/* Doxygen information */
|
|
|
|
/** \file libcvautomation-xlib.h
|
|
|
|
* \brief The source code to access Xlib from inside libcvautomation
|
2012-07-18 10:46:22 -04:00
|
|
|
* \details This source file builds in the necessary functionality to use xlib functions inside libcvautomation.
|
2012-07-10 16:32:42 -04:00
|
|
|
* \author Bradlee Speice
|
2012-07-18 13:54:26 -04:00
|
|
|
* \date 7/18/2012
|
2012-07-10 16:32:42 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
/** \fn Display* cvaOpenDisplay ( char *displayName );
|
|
|
|
* \brief Simple wrapper for XOpenDisplay
|
|
|
|
* \details Currently this function literally just passes off to XOpenDisplay, but is designed to be used in the future if extra functionality is needed.
|
|
|
|
* \param displayName The name of the display to open - '' is a valid name
|
|
|
|
* \returns Pointer to the opened X11 Display
|
2012-07-18 10:01:00 -04:00
|
|
|
* \warning You must open a display to use any functions.
|
|
|
|
* \warning The program using this library is responsible to close the display as well.
|
2012-07-10 16:32:42 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
/** \fn void cvaCloseDisplay ( Display *displayLocation );
|
|
|
|
* \brief Simple wrapper for XCloseDisplay
|
|
|
|
* \details Currently this function literally just passes off to XCloseDisplay, but is designed to be used in the future if extra functionality is needed.
|
|
|
|
* \param displayLocation Pointer to the display to close
|
|
|
|
* \returns Nothing
|
|
|
|
*/
|
|
|
|
|
2012-07-20 10:20:51 -04:00
|
|
|
/** \fn cvaPoint matchSubImage_X11( Display *displayLocation, IplImage *subImage, int searchMethod, int tolerance );
|
2012-07-10 16:32:42 -04:00
|
|
|
* \brief Return the location of a sub image in the X11 root window
|
|
|
|
* \details This function wraps grabbing the X11 root window, converting it to IplImage format, and then giving this to matchSubImage()
|
|
|
|
* \param displayLocation Pointer to the currently open X11 Display
|
|
|
|
* \param subImage The sub image (in IplImage format) to search for in the root X11 window
|
|
|
|
* \param searchMethod The search method to use when searching for \c subImage in the root X11 window
|
|
|
|
* \param tolerance The tolerance to use when searching for \c subImage in the root X11 window
|
2012-07-20 09:14:25 -04:00
|
|
|
* \see \ref libcvautomation_search_methods
|
2012-07-10 16:32:42 -04:00
|
|
|
* \returns The location of the sub image in root X11 window
|
|
|
|
*/
|
|
|
|
|
2012-07-20 10:20:51 -04:00
|
|
|
/** \fn cvaPoint matchSubImage_X11_center( Display *displayLocation, IplImage *subImage, int searchMethod, int tolerance );
|
2012-07-10 16:32:42 -04:00
|
|
|
* \brief Return the center of a sub image in root X11 window, rather than the top-left corner
|
|
|
|
* \details This function wraps grabbing the X11 root window, converting it to IplImage format, and then giving this to matchSubImage_center()
|
|
|
|
* \param displayLocation Pointer to the currently open X11 Display
|
|
|
|
* \param subImage The sub image (in IplImage format) to search for in the root X11 window
|
|
|
|
* \param searchMethod The search method to use when searching for \c subImage in the root X11 window
|
|
|
|
* \param tolerance The tolerance to use when searching for \c subImage in the root X11 window
|
2012-07-20 09:14:25 -04:00
|
|
|
* \see \ref libcvautomation_search_methods
|
2012-07-10 16:32:42 -04:00
|
|
|
* \returns The center location of the sub image in the root X11 window
|
|
|
|
*/
|
|
|
|
|
2012-07-20 10:20:51 -04:00
|
|
|
/** \fn cvaPoint matchSubImage_X11_location( Display *displayLocation, const char *subImage_location, int searchMethod, int tolerance );
|
2012-07-10 16:32:42 -04:00
|
|
|
* \brief Return the location of a sub image in the X11 root window
|
|
|
|
* \details This function wraps grabbing the X11 root window, converting it to IplImage format, and then giving this to matchSubImage_location()
|
|
|
|
* \param displayLocation Pointer to the currently open X11 Display
|
|
|
|
* \param subImage_location The location of the sub image to search for in the root X11 window
|
|
|
|
* \param searchMethod The search method to use when searching for \c subImage in the root X11 window
|
|
|
|
* \param tolerance The tolerance to use when searching for \c subImage in the root X11 window
|
2012-07-20 09:14:25 -04:00
|
|
|
* \see \ref libcvautomation_search_methods
|
2012-07-10 16:32:42 -04:00
|
|
|
* \returns The center location of the sub image in the root X11 window
|
|
|
|
*/
|
|
|
|
|
2012-07-20 10:20:51 -04:00
|
|
|
/** \fn cvaPoint matchSubImage_X11_location_center( Display *displayLocation, const char *subImage_location, int searchMethod, int tolerance );
|
2012-07-10 16:32:42 -04:00
|
|
|
* \brief Return the center of a sub image in the root X11 window, rather than the top-left corner
|
|
|
|
* \details This function wraps grabbing the X11 root window, converting it to IplImage format, and then giving this to matchSubImage_location_center()
|
|
|
|
* \param displayLocation Pointer to the currently open X11 Display
|
|
|
|
* \param subImage_location The location of the sub image to search for in the root X11 window
|
|
|
|
* \param searchMethod The search method to use when searching for \c subImage in the root X11 window
|
|
|
|
* \param tolerance The tolerance to use when searching for \c subImage in the root X11 window
|
2012-07-20 09:14:25 -04:00
|
|
|
* \see \ref libcvautomation_search_methods
|
2012-07-10 16:32:42 -04:00
|
|
|
* \returns The center location of the sub image in the root X11 window
|
|
|
|
*/
|
|
|
|
|