Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <opencv2/opencv.hpp>
- using namespace cv;
- int main(){
- //Zeichenfläche
- Mat image(240, 320,CV_8UC3, Scalar(255,255,255));
- //Rechteck zeichnen
- Scalar color (255,0,0); //Rahmenfarbe
- int thickness = 3;//Stiftstärke
- Point upperLeft (100,100);
- Point lowerRight (120,200);
- Point upperLeft2 (160,100);
- Point lowerRight2 (180,200);
- rectangle(image, upperLeft, lowerRight, color, CV_FILLED);//Rechteck einfügen
- rectangle(image, upperLeft2, lowerRight2, color, CV_FILLED);//Rechteck einfügen
- //Fenster erzeugen
- namedWindow("opencv");
- //Bild im Fenster darstellen
- imshow("opencv", image);
- waitKey(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment