cv.jit.faces rotate detection
Hello, i’m trying to use cv.jit.faces to detect faces and attach movie objects to it for my augmented reality project. I managed to do this but the only problem I have now is that the webcams on my vr glasses are rotated 90degrees. When I rotate the output 90 degrees of the faces object it cant detect faces anymore :( any idea’s of how to rotate the jit.face.draw output?
cv.jit.faces.draw (and all of the cv.jit.xxx.draw objects) are actually patchers that you can edit. Double click the cv.jit.faces.draw and put a jit.rota object right before its outlet. Save as something else (e.g. cv.jit.faces.drawROTATE) and re-name the cv.jit.faces.draw object (patcher) in your patch to whatever you saved the modified code as.
thanks for the suggestion but I tried it but it did not seem to work. maybe you could take a look at it?
I guess I sent you down the wrong path. If all you want to do is rotate 90 degrees, the easier objects to use are jit.transpose or jit.dimmap. jit.transpose will appear to rotate the image 90 degrees counter-clockwise. jit.dimmap will allow you to flip the image along either axis, which can simulate a clockwise rotation. To make your corner pin object line up correctly, you will have to reorder its coordinates to match the rotation.
nice I realy appreciate that, but it did not rotate the detection maganism itself it still only can detect my head in the normal mode. and fais if you rotate the webcam
put the jit.dimmap or jit.transpose BEFORE the cv.jit.faces. That is what is detecting the face, and the haar cascade training file it using to detect faces only works when the face is oriented with the top of the face up. You will have to rotate the image so it appears properly before it hits the cv.jit.faces. Put a jit.pwindow in temporarily in line before the civ.jit.faces to check that the orientation is correct. Delete it when you are done to improve performance.
Ah yes it does detect the face now! but the mechanism did not go with the rotation correctly. when I move my face from left to right the detection goes up down…..