Hi,1) Please run the opencv code included in "lecture 2.pdf". It has five options of creating an image. You need to make some simple changes in code to generate different effects. For example adjust...

Hi,1) Please run the opencv code included in "lecture 2.pdf". It has five options of creating an image. You need to make some simple changes in code to generate different effects. For example adjust the image size, image color. This assignment does not need you do any code by yourself but just get familiar with creating images in OpenCV.
2) You just need to turn in a word or pdf document with the running results of the example code (snapshot). Make sure, you at least make "TWO" simple changes on the demo code.Instrruction from Professor:You need to read it through and run the example code and know the different ways to create an image in opencv.




After you run the code successfully, try to manipulate the code to generate different effects. For example, you can change the image size or color. Then run the code again and take a few snapshots and put them together in a word or pdf file and submit them
--------------The code is availbale in lecture 2 and it just needs to be executed and manipulated and the results are to be captured, for your reference I have attached lecture 1 and slides documents as well.
I hope you can offer your best price as this is a simple assignment and there are other assignments I will need your help in completing throughout the semester if this goes fine.


Microsoft Word - Lecture 02.docx CPS 499/567 Computer Vision Summer 2019 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. Using OpenCV library, you can − • Read and write images • Capture and save videos • Process images (filter, transform) • Perform feature detection • Detect specific objects such as faces, eyes, cars, in the videos or images. • Analyze the video, i.e., estimate the motion in it, subtract the background, and track objects in it. OpenCV was originally developed in C++. In addition to it, Python and Java bindings were provided. OpenCV runs on various Operating Systems such as windows, Linux, OSx, FreeBSD, Net BSD, Open BSD, etc. OpenCV Library Modules Following are the main library modules of the OpenCV library. Core Functionality This module covers the basic data structures such as Scalar, Point, Range, etc., that are used to build OpenCV applications. In addition to these, it also includes the multidimensional array Mat, which is used to store the images. In the Java library of OpenCV, this module is included as a package with the name org.opencv.core. Image Processing This module covers various image processing operations such as image filtering, geometrical image transformations, color space conversion, histograms, etc. In the Java library of OpenCV, this module is included as a package with the name org.opencv.imgproc. Video This module covers the video analysis concepts such as motion estimation, background subtraction, and object tracking. In the Java library of OpenCV, this module is included as a package with the name org.opencv.video. Video I/O This module explains the video capturing and video codecs using OpenCV library. In the Java library of OpenCV, this module is included as a package with the name org.opencv.videoio. calib3d This module includes algorithms regarding basic multiple-view geometry algorithms, single and stereo camera calibration, object pose estimation, stereo correspondence and elements of 3D reconstruction. In the Java library of OpenCV, this module is included as a package with the name org.opencv.calib3d. features2d This module includes the concepts of feature detection and description. In the Java library of OpenCV, this module is included as a package with the name org.opencv.features2d. Objdetect This module includes the detection of objects and instances of the predefined classes such as faces, eyes, mugs, people, cars, etc. In the Java library of OpenCV, this module is included as a package with the name org.opencv.objdetect. Highgui This is an easy-to-use interface with simple UI capabilities. In the Java library of OpenCV, the features of this module is included in two different packages namely, org.opencv.imgcodecs and org.opencv.videoio. Read an image from a local file: Mat img = imread(“test.jpg”); //read an image from the file “test.jpg” in the local folder of the project Or Mat img = imread(“C:/folder/test.jpg”); //read an image from an arbitrary folder In OpenCV, all types of images are declared as “Mat”, which is the short form of matrix. However, you can NOT use it without creating it. For example, Mat img; imshow(“window”, img); //a run-time error will occur because img is just declared but not created However, if you use “imread(…)”, then img is created by loading an image from a file, as below: Mat img; img = imread(“test.jpg”) ; //make sure “test.jpg” exist in the local folder. imshow(“window”, img); //it works successfully In OpenCV, there are many different ways of creating an image. “imread()” is just one of them. The demo code below represent different ways of creating an image. Please run the code by yourself and read the comments and send me a result of “img, img2, img3, img4, img5”. Take a screenshot of them and put the results in a word document or pdf file and submit it to the Isidore. #include //create a file, this is a default library #include //system library //Below are the three important OpenCV library header files #include //the very basics tool for image processing #include //for input/output, e.g. load the image into RAM //show the image to the screen #include //some advanced tool for image processing using namespace cv; //tell the compiler all the types involved are from OpenCV library int main(int argc, char** argv) { Mat img; //declare an empty Mat variable //option 1: creating the image by loading from a file img = imread("test.jpg"); //load the image file "test.jpg" into RAM and store it to the img variable //Option 2: create the image manually Mat img2; //color image uchar Mat img3; //single channel, float type img2.create(500, 500, CV_8UC3); //8U - 8 bits uchar //C3 - 3 channels img3.create(5, 5, CV_32FC1); //32F - float //C1 - 1 channel img2 = Scalar(125, 100, 250); //Option 3: create the image by using "copyTo()" Mat img4; img.copyTo(img4); //Option 4: load the image from the camera (put it into a loop) VideoCapture vc(0); //vc is handle for the first camera Mat img5; resize(img, img, Size(img.cols * 0.5, img.rows * 0.5)); while(1) { vc >> img5; //dynamically grab a frame from the camera resize(img5, img5, Size(img5.cols / 2, img5.rows / 2)); char c = waitKey(1); //opencv will keep checking the keyboard event if(c == 27) //user can decide when to stop the loop, i.e. 27 is the "ESc" key break; imshow("test_window", img); //show the image on the screen from the RAM imshow("test_window2", img2); //show the image on the screen from the RAM imshow("test_window3", img3); imshow("test_window4", img4); imshow("test_window5", img5); } }
Jun 05, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here