×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    12

    Imaging SDK to crop out and resize trapezoid regions of interest

    Hi guys,

    Basically, I would like to "cut out" a trapezoid portion of an original image (having the same image with only the trapezoid portion remaining and the rest of it being filled with black would also work for me), and then have it shrunk so that the trapezoid portion fits into a much smaller rectangle image (in essence, just have it resized so that the wider trapezoid part of the image is shrunk more than narrower one) and have that applied to a real-time camera feed...
    Since I'm a newbie to image processing on Windows Phone, but having read and heard the Nokia Imaging SDK is greatly optimized, I thought I'd use that instead of trying to access the image and its particular pixels (if that's even possible with the plain WP8 SDK) instead...that's in case the described amount of processing could be done on a regular Windows Phone device with at least 10fps..could you give your opinions? How to best do this? I'm thinking of some rotation filters applied and then cropping the results successively (XY degrees to the left, crop rectangle of orifginal size, rotate back to right by 2*XY degrees and crop again, and then just rotate back to right by XY degrees to get the trapeziod - if the rotation and cropping fills out the missing parts with empty fills).

    TIA

    P.S.
    I'm attaching the illustration I made of what I'd like to do if it helps better explain what I'd like to do.



    Hope it helps

  2. #2
    Regular Contributor
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    481

    Re: Imaging SDK to crop out and resize trapezoid regions of interest

    Hi.
    If i understand you want warp a trapezoid to a rectangle?
    Windows 8, Windows phone 8 or Nokia Asha developer? Go to DVLUP

  3. #3
    Registered User
    Join Date
    Aug 2012
    Posts
    12

    Re: Imaging SDK to crop out and resize trapezoid regions of interest

    Hi Yan_, (thanks for the repeated undoubtedly tiresome replies)
    and yes please
    I'd like to know if what's the best way to do it on top of a live real-time video from the camera so as to get at least 10fps.

  4. #4
    Regular Contributor
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    481

    Re: Imaging SDK to crop out and resize trapezoid regions of interest

    Hi
    SDK doesn't have this feature type.
    For your problem, for me, it's a problem of textured triangle:
    * you cut a rectangle in triangle
    * you compute theirs texture coordinate to warp your trapezoid to the rectangle.

    Its' something you can do easily with directx. If you don't want use C++, look DXSharp.

    Like you need few triangles(i thinks 3 is good), you can do it with Canvas and polygon. When i've begin my application MonsterCam, i've code textured triangle for Canvas. But With a lot of triangles, display become too slow.
    I'll check the code. It could help you.

    Yan
    Windows 8, Windows phone 8 or Nokia Asha developer? Go to DVLUP

  5. #5
    Regular Contributor
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    481

    Re: Imaging SDK to crop out and resize trapezoid regions of interest

    I've find my textured triangle and make a quick sample. In the sample i've cut a rectangle in tree triangles. I thinks it could be a good begin to test few things and understand how works text coord. But i thinks you should switch to directx (or dxsharp) to speedup.

    PhoneAppWarping.zip
    Windows 8, Windows phone 8 or Nokia Asha developer? Go to DVLUP

Similar Threads

  1. How to activate device camera and detect the face , crop it
    By hari21.mca@gmail.com in forum Mobile Java General
    Replies: 1
    Last Post: 2012-03-01, 07:52
  2. How to crop an image and save it as pdf
    By prashant.sharma in forum Symbian Media (Closed)
    Replies: 5
    Last Post: 2012-02-24, 11:59
  3. Enabling label crop text from resources
    By lenclud in forum Symbian
    Replies: 1
    Last Post: 2009-06-30, 05:50
  4. Crop It Pys60
    By sh_teta in forum Symbian
    Replies: 1
    Last Post: 2009-06-23, 16:33
  5. Overlapping Regions
    By florian_gollob in forum General Messaging
    Replies: 0
    Last Post: 2005-01-25, 15:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×