Академический Документы
Профессиональный Документы
Культура Документы
Outline
Image enhancement
Overview: Capabilities
Overview: License
Overview: Patents
Overview: Users
Overview: Environment
Overview: Environment
Primary API
is C++
Leverages
ARM NEON
Overview: Installation
Ubuntu VM:
Windows:
hello.cpp
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
int main()
{
cv::Mat image = cv::imread("lena.bmp");
if (image.empty())
{
std::cerr << "Could not load image";
return 1;
}
%.o: %.cpp
$(CC) -c $(CFLAGS) $<
all: $(PROG)
clean:
rm -f $(OBJS) $(PROG)
cv::namedWindow("Image");
cv::imshow("Image", image);
cv::waitKey();
return 0;
hello.cpp
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
int main()
{
cv::Mat image = cv::imread("lena.bmp");
if (image.empty())
{
std::cerr << "Could not load image";
return 1;
}
%.o: %.cpp
$(CC) -c $(CFLAGS) $<
all: $(PROG)
clean:
rm -f $(OBJS) $(PROG)
cv::namedWindow("Image");
cv::imshow("Image", image);
cv::waitKey();
return 0;
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
int main()
{
cv::Mat image = cv::imread("lena.bmp");
if (image.empty())
{
std::cerr << "Could not load image";
return 1;
}
cv::namedWindow("Image");
cv::imshow("Image", image);
cv::waitKey();
return 0;
#include
#include
#include
#include
<opencv2/core/core.hpp>
<opencv2/imgproc/imgproc.hpp>
<opencv2/highgui/highgui.hpp>
<iostream>
int main()
{
cv::Mat image = cv::imread("lena.bmp");
if (image.empty())
{
std::cerr << "Could not load image";
return 1;
}
cv::blur(image, image, cv::Size(10, 10));
cv::namedWindow("Image");
cv::imshow("Image", image);
cv::waitKey();
return 0;
#include
#include
#include
#include
<opencv2/core/core.hpp>
<opencv2/imgproc/imgproc.hpp>
<opencv2/highgui/highgui.hpp>
<iostream>
int main()
{
cv::Mat image = cv::imread("lena.bmp");
if (image.empty())
{
std::cerr << "Could not load image";
return 1;
}
cv::blur(image, image, cv::Size(10, 10));
cv::namedWindow("Image");
cv::imshow("Image", image);
cv::waitKey();
return 0;
Similar structure
and naming as C++
version means
Python is good for
prototyping.
Network comm.,
RTSP protocol, etc.
is all handled for you
so all you have to do
is process each
frame as an image
(a cv::Mat object).
A Selection of Functionality
Image enhancement
Image Enhancement
Many many algorithms. Here are a few:
/opencv/samples/python2/deconvolution.py
Image Enhancement
out)
Image Enhancement
Increases the
range of intensities
in an image, thereby
increasing contrast.
out)
Foreground/background segmentation
identify objects moving in a scene.
cv::BackgroundSubtractorMOG2
cv::calcBackProject()
cv::CamShift
Detection:
cv::CascadeClassifier
Recognition:
cv::FaceRecognizer
cv::rectangle(foundFacesImage, *rect,
cv::Scalar(0, 0, 255), 3);
cv::namedWindow("Faces");
cv::imshow("Faces", foundFacesImage);
cv::waitKey();
Face detection
Face detection
Conclusion
More Information
Tutorials: http://docs.opencv.org/doc/tutorials/tutorials.html
Books: