Results 1 to 2 of 2

Thread: pattern [image] matching

  1. #1
    Join Date
    Jan 2007
    Posts
    13
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default pattern [image] matching

    Hi all,

    I am implmenting puzzle application & I have basic shapes written using the QGraphicsItem (like square, parallelogram,circle,triangle etc). User will starts
    arranging the items in order to meet the target puzzle which I have drawn in
    the side using QImage.

    Is there any way using which I can compare the QGraphicItems and target pattern
    and see whether its arranged properly?

    Can some body explain how to do it?

    Thanks in advance,
    Rachana

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: pattern [image] matching

    You want to compare a set of graphics items with a QImage? A trivial approach would be to render the scene to an image and compare pixel by pixel. If enough pixels match, you can assume the order is fine. But this way may fail very easily. The proper way to do it would be to apply image recognition techniques - edge detecting and segmentation. Then you can assemble the order and compare with the order of items.

Similar Threads

  1. Qt, Databases & the DAO Pattern
    By Paul Drummond in forum Qt Programming
    Replies: 1
    Last Post: 22nd February 2006, 16:13

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.