// just some valid rectangle arguments
int x = 0;
int y = 0;
int width = 10;
int height = 20;
// our rectangle...
cv::Rect rect(x, y, width, height);
// and its top left corner...
cv::Point pt1(x, y);
// and its bottom right corner.
cv::Point pt2(x + width, y + height);
// These two calls...
cv::rectangle(img, pt1, pt2, cv::Scalar(0, 255, 0));
// essentially do the same thing
cv::rectangle(img, rect, cv::Scalar(0, 255, 0))
Code Example |
---|
Cpp :: how to find last character of string in c++ |
Cpp :: remove specific element from vector c++ |
Cpp :: How to write into files in C++ |
Cpp :: sina + sinb formula |
Cpp :: c++ average |
Cpp :: power of two c++ |
Cpp :: cpp absolute value |
Cpp :: how to set a variable to infinity in c++ |
Cpp :: panic: assignment to entry in nil map |
Cpp :: getline(cin string) not working |
Cpp :: c++ vs g++ |
Cpp :: C++ Limit of Integer |
Cpp :: c++ cout without include iostream |
Cpp :: cpp class constructor |
Cpp :: c++ builder |
Cpp :: c++ hash combine |
Cpp :: c++ random generator |
Cpp :: demonstrate constructor |
Cpp :: joining two vectors in c++ |
Cpp :: cpp map insert |
Cpp :: cpp #include "" < |
Cpp :: explicit c++ |
Cpp :: is anagram c++ |
Cpp :: opencv c++ feature detection |
Cpp :: Bucket and Water Flow codechef solution in c++ |
Cpp :: C++ fibo |
Cpp :: C++ program to sizes of data types |
Cpp :: set size of a vector c++ |
Cpp :: age in days in c++ |
Cpp :: Abstract factory C++ code |