active live face tracking box coordinates
조회 수: 1 (최근 30일)
이전 댓글 표시
so, i'm trying to modify the FaceTrackingWebcamExample file to create a face tracker that runs on a gimbal and when i move my face from the center of the frame, the gimbal tries to compensate and change where the camera is looking. i'm using an EV3 as my gimbal. i'm fairly new to matlab so i don't really know too much about all this. i just want to get the tracker to follow my face as i walk around the room. i have 2 cameras set up so i can monitor through both cameras at the same time to let the computer determine distance but that comes later. any ideas on what i can do to find the coordinates of the box and adjust the gimbal to recenter?
댓글 수: 0
답변 (1개)
NISARGA G K
2018년 6월 14일
I understand that you would like to find the coordinates of the box around the face detected and adjust the gimbal to recenter.
As discussed in FaceTrackingWebcamExample, in detection mode position the gimbal using 'bboxPoints' as initial reference coordinates and during tracking mode 'bboxPoints' (after tranformation to bounding box) can be used to recenter the gimbal. Here bboxpoints refers to coordinates of the box around the face detected and is of the form M-by-2 matrix of [x,y] i.e [x1,y1;x2,y2;x3,y3;x4,y4]
midX = (x1 + x3) / 2;
midY = (y1 + y3) / 2;
Gives the center of the box which can used to rotate the gimbal.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!