Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is a perspective transform problem. In this case they are plotting a 3D projection in a 2D plane.</p> <p>As, the first image has selection corners in quadrilateral shape and when you transform it in a rectangular shape, then you will either need to add more pixel information(<a href="http://en.wikipedia.org/wiki/Interpolation" rel="nofollow">interpolation</a>) or remove some pixels.</p> <p>So now actual problem is to add additional pixel information to cropped image and project it to generate second image. It can be implemented in various ways:</p> <p>&lt;> you can implement it by your own by applying perspective tranformation matrix with interpolation.</p> <p>&lt;> you can use <a href="http://www.songho.ca/opengl/gl_projectionmatrix.html#perspective" rel="nofollow">OpenGL</a> .</p> <p>&lt;> you can use <a href="http://opencv.willowgarage.com/documentation/geometric_image_transformations.html" rel="nofollow">OpenCV</a>. .. and there are many more ways to implement it.</p> <p>I had solved this problem using OpenCV. Following functions in OpenCV will help you to achieve this.</p> <ol> <li><p><a href="http://opencv.willowgarage.com/documentation/operations_on_arrays.html#perspectivetransform" rel="nofollow">cvPerspectiveTransform</a></p></li> <li><p><a href="http://opencv.willowgarage.com/documentation/geometric_image_transformations.html#warpperspective" rel="nofollow">cvWarpPerspective</a></p></li> </ol> <p>First function will calculate transformation matrix using source and destination projection coordinates. In your case src array will have values from CGPoint for all the corners. And dest will have rectangular projection points for example {(0,0)(200,0)(200,150)(0,150)}.</p> <p>Once you get transformation matrix you will need to pass it to second function. you can visit this <a href="http://nuigroup.com/forums/viewthread/3414/" rel="nofollow"><strong>thread</strong></a>.</p> <p>There may be few other alternatives to OpenCV library, but it has good collection of image processing algorithms.</p> <p>iOS application with opencv library is available at <a href="http://www.eosgarden.com/en/opensource/opencv-ios/overview/" rel="nofollow">eosgarden</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload