Results 1 to 3 of 3

Thread: calculating the Rotation of Images

  1. #1
    Join Date
    Jun 2013
    Posts
    46
    Thanks
    24
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Windows

    Default calculating the Rotation of Images

    There are 2 images loaded into 2 seperate labels
    The user identifies(clicks) 3 points in the 1st image
    and identifies 3 points in the second image similar to the 1st image.

    I want to calculate the amount of rotation needed and translation needed for the points to be alligned
    (I'll probably have to calculate the average rotation of each point before i rotate image 2 to allign with image 1) ->ideas

    I know more or less how to do it using matrices and some functionaltiy in opencv...
    But since I cant get opencv to operate in my windows qt environment

    Is there a way around it?
    Other Ideas on this matter

    Thank you

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,640
    Thanks
    13
    Thanked 1,592 Times in 1,520 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: calculating the Rotation of Images

    Unless the triangles formed by the three points in each image have identical internal angles then rotate, translate and scale will not be adequate to align the points. If the images were taken from different viewpoints then you might have perspective corrections to make. In most cases you would be looking for a closest match for some definition of closest.

    Quote Originally Posted by 2lights View Post
    I know more or less how to do it using matrices and some functionaltiy in opencv...
    But since I cant get opencv to operate in my windows qt environment
    If you can do it this way why not work the OpenCV problem.

    You could attack this another way. Have the user select three points in the first image. Generate a congruent triangle over the second image and give the user controls to rotate, scale, and translate the triangle to match three points in the second image. Then you have the transforamtion required.

  3. The following user says thank you to ChrisW67 for this useful post:

    2lights (6th August 2013)

  4. #3
    Join Date
    Jun 2013
    Posts
    46
    Thanks
    24
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Windows

    Smile Re: calculating the Rotation of Images

    Thanks, got opencv working

    My new Problem:
    Once i calculated the orientation needed, i need to:
    http://www.qtcentre.org/threads/5567...ages-in-QLabel

    Kind Regards

Similar Threads

  1. QPixmapCache calculating needed cache
    By franki in forum Qt Programming
    Replies: 1
    Last Post: 20th April 2013, 19:00
  2. Calculating the column width in a wiew
    By lotek in forum Newbie
    Replies: 0
    Last Post: 9th November 2011, 18:50
  3. Calculating button width
    By Skizmo in forum Qt Programming
    Replies: 6
    Last Post: 17th February 2011, 15:12
  4. Calculating best bounding box for text
    By xtal256 in forum Qt Programming
    Replies: 2
    Last Post: 1st October 2010, 07:38
  5. calculating checksum in serialcommunication
    By jjbabu in forum Qt Programming
    Replies: 5
    Last Post: 12th October 2007, 12:43

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.