Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 face tracking using optical flow method using python+opencv
Hello Folks..

I want to track the face in motion. Suppose if i move the face in different directions, then the camera should track that face in that direction and vice versa.
Now this code track faces , if the face is exactly in front of camera. But i want to track faces in motion . How could i do this using optical flow method .. Please help me.

My code is below:
This code is simple using Cascades method
import cv2
import numpy as np

        faces=faceDetect.detectMultiScale(gray, 1.3,5);
        for(x,y,w,h) in faces:
              cv2.rectangle(img,(x,y),(x+w,y+h), (0,0,255),2)
                  id="Aftab Ahmed"
              elif (id==2):
        cv2.imshow("Face", img);

A little googling
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Install tensor flow for Python 2.7 in Windows 10 ErnestTBass 4 203 Jul-26-2019, 02:11 PM
Last Post: ThomasL
  Tracking Object Help Algorithm afyaldiz 0 251 Apr-14-2019, 11:28 PM
Last Post: afyaldiz
  for loop problem with opencv Miradox 1 390 Dec-23-2018, 10:39 PM
Last Post: stullis
  OpenCV - extract 1st frame out of a video file kerzol81 2 1,415 Nov-12-2018, 09:12 AM
Last Post: kerzol81
  How to create mask for different types of images using opencv Prince_Bhatia 0 3,211 Apr-26-2018, 07:38 AM
Last Post: Prince_Bhatia
  Attribute Error while using tensor flow pratheep 2 3,149 Mar-16-2018, 10:50 AM
Last Post: pratheep
  Model.predict() always returning the same value of 1 for opencv nastyheatnor 0 1,815 Dec-14-2017, 08:20 AM
Last Post: nastyheatnor
  Heuns method in Python auting82 0 1,192 Oct-18-2017, 01:46 PM
Last Post: auting82
  OpenCV installation issue NOOBscripts 8 2,948 Aug-17-2017, 03:09 PM
Last Post: snippsat
  Project using Python and Opencv trabis03 7 4,218 Apr-29-2017, 10:09 AM
Last Post: trabis03

Forum Jump:

Users browsing this thread: 1 Guest(s)