Advanced Imaging

AdvancedImagingPro.com

   

Industry News

Updated: July 8th, 2008 05:26 PM CDT

Ch and OpenCV: An Open Relationship With Vision

Advertisement

Install Ch OpenCV on your computer using the instructions below. Here, we assume <CHHOME> is the directory where Ch is installed, though if Ch is installed in C:/Ch, then C:/Ch should be used for all instructions. We also assume <OPENCV_HOME> is the directory where OpenCV is installed, but if OpenCV is installed in C:/Program Files/OpenCV, then use that directory instead.

(1) If Ch has not been installed in your computer, download and install Ch from www.softintegration.com.

(2) Move directory /OpenCV to <CHHOME>/package/opencv, which becomes the home directory of CHOPENCV_HOME for Ch OpenCV. If you do not want to move the directory, add a new path to the system variable _ppath for package path by adding the following statement in system startup file: <CHHOME>/config/chrc or individual user's startup file _chrc in the user's home directory _ppath = stradd(_ppath,"<OPENCV_HOME>/interfaces/ch;nbsp"); <OPENCV_HOME>/interfaces/ch/opencv becomes the home directory CHOPENCV_HOME for Ch OpenCV package.

(3) Add system variable _ipath in system startup file, indicated in the previous step by adding the following statement: _ipath = stradd(_ipath, "<CHOPENCV_HOME>/include;nbsp"). This step will not be necessary if the following code fragment is in application programs:

#ifdef _CH_
#pragma package <opencv>
#endif

To run demo programs in directory demos:
(1) start ch
(2) type program name, such as "delaunay.c"

Figure 5. The histogram of the gray image.Application Examples
Example 1

Below is an example called morphology.c. In this example, functions cvErode() and cvDilate() are called.


Subscribe to our RSS Feeds