title: Rotating matrix that represents bounding box by X degrees
body: <p>I have image, that is rotated by 30deg.
  However i need to rotate the bounding box too. The coordinations of bounding box are <code>[xmin,ymin,xmax,ymax] = [101,27,270,388]</code> (xmin,ymin) = top left corner , (xmax,ymax) = bottom right corner.</p>
  
  <p>Now i wanted to rotate this matrix by running it over rotations matrix</p>
  
  <pre><code>theta = np.radians(30)
  c, s = np.cos(theta), np.sin(theta)
  r = np.array(((c,-s), (s, c)))
  </code></pre>
  
  <p>Using</p>
  
  <pre><code>labels = np.array([[101,270],[27,388]])
  print(np.dot(r,labels))
  </code></pre>
  
  <p>But this trows incorrect values. If i am not mistaken the linear transformation should be correct did i overlook something or i made mistake somewhere? THanks for help.</p>
  
  <p><a href="https://i.stack.imgur.com/cvL1m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cvL1m.png" alt="enter image description here"></a></p>