title: Transforming between Image coordinate space and screen coordinate space iOS
body: <p>I'm trying to build a document scanning feature. I'm using CIRectangleDetector to detect the edges of my document and then I pass the coordinates received from there to do Perspective Correction. I wanted to allow the user to edit the custom crop boundaries of the document. The issue that I'm running into is that my image is of size ~ (2448x3264) and my screen is of size ~ (375x575). As CIRectangleDetector returns the coordinates in the image space (i.e. relative to size 2448x3264). Does anybody know a way how I can convert the coordinates from image space to screen space and vice-versa?</p>
  
  <p>I have already tried using ratios i.e. from image -> screen i.e if my topLeft corner is (450, 1065), then the corresponding coordinate on my screen would be (450 * 375/2448, 1065 * 575/3264). </p>
  
  <p>Any advice would be much appreciated!!</p>