This article is for reference only. The configuration varies with the installation path of opencv and codeblocks. 1. Install CodeBlocks to install codeblocks [plain] viewplaincopyprint? # Apt-getinstallcodeblocks-contrib # wxWidgets # apt-getinstalllibwxbase2.8-dev #
This article is for reference only. The configuration varies with the installation path of opencv and codeblocks. 1. Install CodeBlocks to install codeblocks [plain] view plaincopyprint? # Apt-getinstallcodeblocks-contrib # wxWidgets # apt-getinstalllibwxbase2.8-dev #
This article is for reference only. The configuration varies with the installation path of opencv and codeblocks.
1. Install CodeBlocks
Install codeblocks
[Plain]View plaincopyprint?
- # Apt-get install codeblocks
- # Apt-get install codeblocks-contrib # wxWidgets seems to be used
- # Apt-get install libwxbase2.8-dev # Or wxWidgets stuff
Ii. Install opencv
1. First query opencv:
[Plain]View plaincopyprint?
- ~ # Apt-cache search opencv
- Libcv-dev-Translation package for libcv-dev
- Libcv2.3-computer vision library-libcv * translation package
- Libcvaux-dev-Translation package for libcvaux-dev
- Libcvaux2.3-computer vision library-libcvaux translation package
- Libhighgui-dev-Translation package for libhighgui-dev
- Libhighgui2.3-computer vision library-libhighgui translation package
- Libopencv-calib3d-dev-development files for libopencv-calib3d
- Libopencv-calib3d2.3-computer vision Camera Calibration library
- Libopencv-contrib-dev-development files for libopencv-contrib
- Libopencv-contrib2.3-computer vision contrib library
- Libopencv-core-dev-development files for libopencv-core
- Libopencv-core2.3-computer vision core library
- Libopencv-dev-development files for opencv
- Libopencv-features2d-dev-development files for libopencv-features2d
- Libopencv-features2d2.3-computer vision Feature Detection and Descriptor Extraction library
- Libopencv-flann-dev-development files for libopencv-flann
- Libopencv-flann2.3-computer vision Clustering and Search in Multi-dimenstmspaces library
- Libopencv-gpu-dev-development files for libopencv-gpu
- Libopencv-gpu2.3-computer vision GPU Processing library
- Libopencv-highgui-dev-development files for libopencv-highgui
- Libopencv-highgui2.3-computer vision High-level GUI and Media I/O library
- Libopencv-imgproc-dev-development files for libopencv-imgproc
- Libopencv-imgproc2.3-computer vision Image Processing library
- Libopencv-legacy-dev-development files for libopencv-legacy
- Libopencv-legacy2.3-computer vision legacy library
- Libopencv-ml-dev-development files for libopencv-ml
- Libopencv-ml2.3-computer vision Machine Learning library
- Libopencv-objdetect-dev-development files for libopencv-objdetect
- Libopencv-objdetect2.3-computer vision Object Detection library
- Libopencv-video-dev-development files for libopencv-video
- Libopencv-video2.3-computer vision Video analysis library
- Opencv-doc-OpenCV documentation and examples
- Python-opencv-Python bindings for the computer vision library
2. Install the SDK Based on the query results.
[Plain]View plaincopyprint?
- # Apt-get install libcv2.3 libcvaux2.3 libhighgui2.3
- # Apt-get install libcv-dev libcvaux-dev libhighgui-dev
3. codeblocks + opencv Configuration
1. Related File Location
~ # Pkg-config -- cflags opencv # location of the opencv header file (. h)
-I/usr/include/opencv
~ # Pkg-config -- libs opencv # opencv Library File
-Lopencv_core-lower-lopencv_highgui-lopencv_ml-lopencv_video-lower-lopencv_calib3d-lopencv_objdetect-lopencv_contrib-lopencv_legacy-lopencv_flann
2. codeBlocks Link Library configuration: Project-> Build Options, for example:
3. codeBlocks header file directory configuration (pkg-config -- cflags opencv result)
4. CodeBlocks path file directory Configuration
5. Test Results
4. Program demonstration
Not yet... (the picture cannot be displayed. Sorry to post it. Sorry ...)
After trying to find the Encoding Error, the result is obtained (the result is finally displayed by ainemo ):
V. Sample Code
[Cpp]View plaincopyprint?
- # Include "cv. h"
- # Include "highgui. h"
- Int main ()
- {
- IplImage * pImg;
- PImg = cvLoadImage ("/home/nehc/fish.jpg", 1 );
- CvNamedWindow ("Image", 1 );
- CvShowImage ("Image", pImg );
- CvWaitKey (0 );
- CvDestroyWindow ("Image ");
- CvReleaseImage (& pImg );
- Return 0;
- }