OpenCV for Robotics Get link Facebook X Pinterest Email Other Apps March 24, 2019 Object tracking Robot navigation Face detection Get link Facebook X Pinterest Email Other Apps Comments
OpenCV C++: Example December 26, 2017 enum { /* 8bit, color or not */ CV_LOAD_IMAGE_UNCHANGED =-1, /* 8bit, gray */ CV_LOAD_IMAGE_GRAYSCALE =0, /* ?, color */ CV_LOAD_IMAGE_COLOR =1, /* any depth, ? */ CV_LOAD_IMAGE_ANYDEPTH =2, /* ?, any color */ CV_LOAD_IMAGE_ANYCOLOR =4, /* ?, no rotate */ CV_LOAD_IMAGE_IGNORE_ORIENTATION =128 }; Load and Display Image Read more
Opencv Drawing Functions July 07, 2019 Drawing Functions https://docs.opencv.org/3.0-beta/modules/imgproc/doc/drawing_functions.html header for Drawing functions: imgproc.hpp Mat image(200, 200, CV_8UC3, Scalar(0)); RotatedRect rRect = RotatedRect(Point2f(100, 100), Size2f(100, 50), 30); Point2f vertices[4]; rRect.points(vertices); for (int i = 0; i < 4; i++) line(image, vertices[i], vertices[(i + 1) % 4], Scalar(0, 255, 0),1); Rect brect = rRect.boundingRect(); rectangle(image, brect, Scalar(255, 0, 0)); imshow("rectangles", image); waitKey(0); Read more
Example Intro 100: Display image. July 03, 2019 #include "pch.h" #include <opencv2/highgui/highgui.hpp> #include <iostream> using namespace cv; using namespace std; int main(int argc, char** argv) { if (argc != 2) { cout << " Usage: display_image ImageToLoadAndDisplay" << endl; return -1; } Mat image; String value = argv[1]; image = imread(argv[1], IMREAD_COLOR); // Read the file if (!image.data) // Check for invalid input { cout << "Could not open or find the image" << std::endl; return -1; } namedWindow("Display window", WINDOW_AUTOSIZE);// Create a window for display. imshow("Display window", image); // Show our image inside it. waitKey(0); ... Read more
Comments
Post a Comment