Image construction given the Vertex point of the Image

I want to know how we can construct the image if we know the vertex points(top, bottom, left, right) of the rectangle in which face is present in frame. Currently, I am using this code frame[top:left, bottom:right] where frame is the whole frame and top, bottom, left, right are the vertex point. But this code does not give the right image always.
On the other hand cv2.rectangle() uses the same code to construct the rectangle on the image, can some body help me what should be the exact use of these vertices.

Thanks .

that’s wrong. (and even a numpy, not an opencv problem)
a numpy 2d slice is:

frame[top : bottom, left : right]
        ^^ y-axis     ^^ x-axis
1 Like

Thanks alot @berak it helped.