Skip to content

Commit

Permalink
Fix the rectangle place
Browse files Browse the repository at this point in the history
  • Loading branch information
omarahmed1111 committed May 7, 2020
1 parent 69b7a3f commit 54adcd2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Assets/scripts/CameraController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ private void Start()
draw = new OpenCvSharp.Mat(backCam.height, backCam.width, MatType.CV_8UC3, new Scalar(0, 0, 0));
// Initialize level 3 part 3 screen with a rectangle.
level3part3Screen = new OpenCvSharp.Mat(backCam.height, backCam.width, MatType.CV_8UC3, new Scalar(0, 0, 0));
Cv2.Line(level3part3Screen,new Point(backCam.width/2,backCam.height/2) ,new Point(backCam.width/2,backCam.height/2+300) , new Scalar(255, 0, 0), 10, LineTypes.Filled);
Cv2.Line(level3part3Screen, new Point(backCam.width/2, backCam.height/2+300), new Point(backCam.width/2+300, backCam.height/2+300), new Scalar(255, 0, 0), 10, LineTypes.Filled);
Cv2.Line(level3part3Screen, new Point(backCam.width/2+300, backCam.height+300), new Point(backCam.width/2+300, backCam.height/2), new Scalar(255, 0, 0), 10, LineTypes.Filled);
Cv2.Line(level3part3Screen, new Point(backCam.width/2+300, backCam.height/2), new Point(backCam.width/2,backCam.height/2), new Scalar(255, 0, 0), 10, LineTypes.Filled);
Cv2.Line(level3part3Screen,new Point(backCam.width/2-100,backCam.height/2-100) ,new Point(backCam.width/2-100,backCam.height/2+100) , new Scalar(255, 0, 0), 10, LineTypes.Filled);
Cv2.Line(level3part3Screen, new Point(backCam.width/2-100, backCam.height/2+100), new Point(backCam.width/2+100, backCam.height/2+100), new Scalar(255, 0, 0), 10, LineTypes.Filled);
Cv2.Line(level3part3Screen, new Point(backCam.width/2+100, backCam.height/2+100), new Point(backCam.width/2+100, backCam.height/2-100), new Scalar(255, 0, 0), 10, LineTypes.Filled);
Cv2.Line(level3part3Screen, new Point(backCam.width/2+100, backCam.height/2-100), new Point(backCam.width/2-100,backCam.height/2-100), new Scalar(255, 0, 0), 10, LineTypes.Filled);

// Get the initial contour of the rectangle in level 3 part 3.
Point[][] contors = new Point[1][];
Expand Down

0 comments on commit 54adcd2

Please sign in to comment.