Add documentation for cva-input and cva-match

This commit is contained in:
Bradlee Speice 2012-07-11 15:59:06 -04:00
parent ed121d4ec5
commit 5150b2d7e4
5 changed files with 138 additions and 5 deletions

View File

@ -32,12 +32,12 @@ AC_PATH_X
PKG_CHECK_MODULES([OpenCV], [opencv >= 2.0.0], [use_opencv2=true], [use_opencv1=true])
AM_CONDITIONAL(USEOPENCV2, [test "$use_opencv2" != ""])
#Let doxygen know where our headers are at
AC_SUBST(INPUT_PATH, "../include/opencv2")
AC_SUBST(INPUT_PATH, "../include/opencv2 ../examples")
if test "$use_opencv1" != ""; then
echo "could not find OpenCV version 2.0.0 or higher, checking for 1.0.0 or higher..."
PKG_CHECK_MODULES([OpenCV], [opencv >= 1.0.0])
#Update doxygen on where our headers are at
AC_SUBST(INPUT_PATH, "../include/opencv1")
AC_SUBST(INPUT_PATH, "../include/opencv1 ../examples")
fi
PKG_CHECK_MODULES([X11], [x11 >= 1.0.3])

View File

@ -468,7 +468,7 @@ INPUT = @INPUT_PATH@
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
FILE_PATTERNS = *.h
FILE_PATTERNS =
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.

View File

@ -26,7 +26,7 @@ endif
if BUILD_MAN
directory = $(top_srcdir)/docs/man/man3
dist_man_MANS = $(directory)/cvaPoint.3 $(directory)/libcvautomation.h.3 $(directory)/libcvautomation-xlib.h.3 $(directory)/libcv_search_methods.3 $(directory)/XTest_key_strings.3 $(directory)/cvautomationList.3 $(directory)/libcvautomation-opencv.h.3 $(directory)/libcvautomation-xtest.h.3 $(directory)/XTest_command_strings.3 $(directory)/libcvautomation.3 $(directory)/writing_app_tests.3
dist_man_MANS = $(directory)/cvaPoint.3 $(directory)/libcvautomation.h.3 $(directory)/libcvautomation-xlib.h.3 $(directory)/libcv_search_methods.3 $(directory)/XTest_key_strings.3 $(directory)/cvautomationList.3 $(directory)/libcvautomation-opencv.h.3 $(directory)/libcvautomation-xtest.h.3 $(directory)/XTest_command_strings.3 $(directory)/libcvautomation.3 $(directory)/writing_app_tests.3 $(directory)/cva-match.3 $(directory)/cva-input.3
$(directory)/cvaPoint.3: doxyfile.stamp
$(directory)/libcvautomation.h.3: doxyfile.stamp
@ -39,6 +39,8 @@ $(directory)/libcvautomation-xtest.h.3: doxyfile.stamp
$(directory)/XTest_command_strings.3: doxyfile.stamp
$(directory)/libcvautomation.3: doxyfile.stamp
$(directory)/writing_app_tests.3: doxyfile.stamp
$(directory)/cva-match.3: doxyfile.stamp
$(directory)/cva-input.3: doxyfile.stamp
endif

View File

@ -24,7 +24,7 @@
#include <libcvautomation/libcvautomation.h>
void usage ();
void checkXTEEnabled ();
void checkXTEEnabled (Display *display);
int main( int argc, char** argv )
{
@ -201,3 +201,78 @@ void checkXTEEnabled ( Display *display )
exit(255);
}
}
/* Doxygen Information */
/** \file cva-input.c
* \brief The cva-input program to demonstrate Libcvautomation's XTest functionality
* \author Bradlee Speice <bspeice@uncc.edu>
* \date 7/11/2012
*/
/* The biggest purpose of documenting this code is to trick doxygen into making a man page for it. */
/** \page cva-input
*
* \author Bradlee Speice <bspeice@uncc.edu>
* \date 7/11/2012
* \section usage Usage:
* This program works kind of like a mini-language. All options are parsed left-to-right, and executed right there. Thus, specifying "--display" at different places in the options will cause this program to use the most recent given display.
* \section example Example Usage:
* Click the mouse:
*
* cva-input -s 'click 1'
*
* Press key 'a':
*
* cva-input -s 'keyclick a'
*
* \section options Full Options:
*
* -h, --help: Display this usage message.
*
* -u, --usage: Display this usage message.
*
* -d, --display: Specify the X display to use.
*
* -m, --search-method: Specify a method to search by. See <tt>cva-match --help</tt> for more information on this.
*
* -t, --tolerance: Specify how strict the match is.
*
* -b, --button: Specify the mouse button to press (default 1).
*
* -c, --center: Instead of matching the top-left corner of an image, match the center of the image.
*
* -s, --string: Command string - see below.
*
*
* \section commands Full Command List:
* mouseclick: Click the mouse in-place.
*
* imouseclick: Click the mouse at an image's top-left corner.
*
* icmouseclick: Click the mouse at an image's center.
*
* mousexy: Move the mouse to the given coordinate.
*
* mouserxy: Move the mouse by the given x and y values (relative motion).
*
* mouseimage: Move the mouse to an image's top-left corner.
*
* cmouseimage: Move the mouse to an image's center.
*
* mousedown: Push and leave down a mouse button.
*
* mouseup: Release a mouse button.
*
* mousejiggle: Jiggle the mouse (helps to activate some widgets).
*
* keyclick: Click a keyboard button.
*
* keydown: Push and leave down a keyboard button.
*
* keyup: Release a keyboard button.
*
* keystring: Input a string of keys to X11.
*
* \section contact Contact Information:
* Questions? Comments? Concerns? Suggestions? Send all feedback to Bradlee Speice at <bspeice@uncc.edu>
*/

View File

@ -256,3 +256,59 @@ If you have any questions, comments, concerns, email <%s>\n", LIBCVAUTOMATION_VE
} /* ----- end of function usage ----- */
/* Doxygen Information */
/** \file cva-match.c
* \brief The cva-input program to demonstrate Libcvautomation's XTest functionality
* \author Bradlee Speice <bspeice@uncc.edu>
* \date 7/11/2012
*/
/* The biggest purpose of documenting this code is to trick doxygen into making a man page for it. */
/** \page cva-match
*
* \author Bradlee Speice <bspeice@uncc.edu>
* \date 7/11/2012
* \section usage Usage:
* This program uses OpenCV in order to recognize an image within an image. The return code is how many matches were found - return 0 for no matches, 1 for one match, etc.
*
* \section example Example Usage:
* Match two images against the root X11 window:
*
* cva-match --x-root -s "<image_name>" -s "<image_name_2>"
*
* Match a root and sub image with a custom tolerance and search method
*
* cva-match -r "<root_image>" -s "<image_name>" -o 75 -m 1
*
* \section options Full Options:
* -h, --help: Display this usage message.
*
* -u, --usage: Display this usage message.
*
* -r, --root-image: Location of the root image to compare against.
*
* -s, --sub-image: Location of the sub-image to find in root.
*
* -p, --separator: Separator of the X and Y coordinates.
*
* -t, --tolerance: Set how strict the match is - 100 is recommended lowest value.
*
* \note When using CCORR or CCOEFF tolerance works in opposite direction, so -50 is recommended highest value.
*
* -m, --search-method: Set which method is used to search for sub-images.
*
* \note Search Methods: CV_TM_SQDIFF = 0, CV_TM_SQDIFF_NORMED = 1, CV_TM_CCORR = 2, CV_TM_CCORR_NORMED = 3, CV_TM_CCOEFF = 4, CV_TM_COEFF_NORMED = 5
*
* -x, --x-root[=DISPLAY]: Set the root image to come from X11
*
* \note The DISPLAY variable is optional, not specifying it will cause X to use the default display (not specifically :0.0)
*
* -c, --center: The output points should be centered on the sub-image, rather than the top-left corner.
*
* -o, --sane-tolerance: Set the tolerance using a scale of 1-100, rather than INT_MIN to INT_MAX (100 ~= INT_MAX)
*
*
* \section contact Contact Information:
* Questions? Comments? Concerns? Suggestions? Send all feedback to Bradlee Speice at <bspeice@uncc.edu>
*/