Monday, December 19, 2011

User Selection

So I finally got user selection working, of a sense.
Brings up a copy of the image at actual size and reads in three selection points. 
However, it does not apply these 3 selection points, but instead only puts the base red on the face. 
Wonderfully enough, it does show the image when called from within maya, although does not automatically exit from the image after hitting enter (as it does when you call it from the command line). As it still lacks any visual feedback this doesn't make it very intuitive. 
It also remains to be seen if it's reading in the selection points properly as it does not print out the positions.

[EDIT]
So issue. The cv window does not show the entire image, only what fits on the rectangular screen. However, the bottom corner still reads as the max height and width of the image. And as the window is supposed to autosize to the image I have no definite ratio to convert the coordinates...

[EDIT 10:45pm]
Got resizing working! Now I have a definite ratio to work with.

[EDIT 10:50pm]
generated by user selection! (not from within maya though, let's check that from maya too!)
note: delighted that the cv display works when called from within maya
however, if you write to a text file from the c++ code that does not work called from maya
(not necessary for this project so that's okay, but just a note)

References:
http://nashruddin.com/eyetracking-track-user-eye.html
http://linuxconfig.org/resize-an-image-with-opencv-cvresize-function

Today's show:
[19 Dec 2011] 3rd Rock from the Sun (Season 1)

No comments:

Post a Comment