To Opencv: Marvin Smith
To Opencv: Marvin Smith
to OpenCV
Introduction
• OpenCV is an Image Processing library created by Intel
and maintained by Willow Garage.
• It is version 1.2.
RECT
• 2D Rectangle Structure
- int x, y, width, height;
• Functions
- Point.tl() - return top left point
- Point.br() - return bottom right point
• The primary data structure in
OpenCV is the Mat object. It
cv::Mat
stores images and their
components.
• Main items
• channels - 1: grayscale, 3:
BGR
• depth: CV_<depth>C<num
chan>
• Iterator Usage
- Mat.begin() - moves Mat iterator to beginning of image
- Mat.end() - moves Mat iterator to end of image
Image TYPES
• The TYPE is a very important aspect of OpenCV
namedWindow(“Sample Window”);
imshow(“Sample Window”,image);
waitKey(0);
return 0;
}
Starting Out in OpenCV
• OpenCV uses the cv namespace.
• Edge Detection
void cv::Sobel(image in, image out, CV_DEPTH, dx, dy);
•Beware!
Linear Algebra
• OpenCV contains many • Operators
useful and simple functions
for applying linear algebra on
images. • given: Mat image;