[Bug 1055270] [KK Only][Flame][Camera] Face detection coordinates are in...

...verted
rotateCoordinate() expects the x coordinate first, but it looks like you're passing the y coordinate first!
If that is intentional, then you should totally comment it.  But I suspect it is an error.

Also, I found it confusing at first that you still had to rotate the coordinates after the various cases above.  Haven't you already swapped x and y coordinates with what you're doing above in the 90 and 180 case?  So swapping them again in rotateCoordinate would be redundant.  (Though rotateCoordinate does change some signs)

Ah ha! Mabybe that is why you have to swap top and left in the call to rotateCoordinate, to undo the swap above? So I'm guessing that this code works for 90 and 270 but does not work for 0 and 180.

I'd suggest that you create a version that integrates the coordinate rotation into the cases above so you don't need to call rotateCoordinate.  Alternatively, consider adding a comment to explain why the second rotation step is necessary.