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.
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.
Forums > MaxMSP