Java OpenCV inputting triangle on stream

Does anyone know how to use Imgproc.rectangle() to put a rectangle over the camera stream?

Do you just want to draw a rectangle on a given point, around a vision target?

More information is going to be needed to help you on that one. Here is a link to the docs on the drawing function:
https://docs.opencv.org/3.0-beta/modules/imgproc/doc/drawing_functions.html

Looking at that link, you can see that there are several parameters needed. Here is a snippet of basic code that will draw a rectangle with the vertices (130, 50) and (300, 280):

Imgproc.rectangle (
         matrix,                    //Matrix obj of the image on to which you're drawing
         new Point(130, 50),        //p1
         new Point(300, 280),       //p2
         new Scalar(0, 0, 255),     //Scalar object for color (RGB Values)
         5                          //Thickness of the line
      );