Opencv
Opencv
Submitted By,
R.Rajeswari-2015504571
B.Merlin Mercy-2015504563
A.Azarudeen-2015504017
Submitted to,
Mrs.G.Sumithra,
Asst.Professor,
Department of Electronics Engineering
Submission Date:24/12/2018
Introduction:
OpenCV is a cross-platform library using which we can develop real-
time computer vision applications. It mainly focuses on image processing, video
capture and analysis including features like face detection and object detection.
Computer Vision can be defined as a discipline that explains how to reconstruct,
interrupt, and understand a 3D scene from its 2D images, in terms of the
properties of the structure present in the scene. It deals with modeling and
replicating human vision using computer software and hardware.
Computer Vision overlaps significantly with the following fields −
Image Processing − It focuses on image manipulation.
Pattern Recognition − It explains various techniques to classify patterns.
Photogrammetry − It is concerned with obtaining accurate measurements
from images.
int main()
{
Mat image;
image = imread("croc1.png", CV_LOAD_IMAGE_COLOR);
if (!image.data)
{
cout << "Could not open or find the image" << std::endl;
return -1;
}
Mat dst;
// Binary Threshold
threshold(gray, dst, thresh, maxValue, THRESH_BINARY);
//threshold(gray , dst, thresh, maxValue, THRESH_BINARY_INV);
namedWindow("Result window", CV_WINDOW_AUTOSIZE);
imshow("Result window", dst);
waitKey(0);
return 0;
}
Code Explanation:
The input image is red using imread function and stored in a Matrix called
image.
Then the image is converted to Gray scale using cvtColor function and it is
stored in gray Matrix.
Then the Gray image is converted to Binary image by setting appropriate
threshold based on image.
Display the Input and Output images.
0
Conclusion:
In this short time period,We learnt about characteristics ,behaviour and
features of the crocodile,Human-crocodile conflict,a lot of algorithms used in
image processing for edge detection ,edge linking,corner detector etc,a lot of new
concepts like feature extraction,classifier,pattern recognition,support vector
machines,fuzzy logic,neural networks etc.We got introduced to the new
environment –Open CV and learnt and installed Open CV and done some small
programs in that and got familiar with that platform.