TRACKING OBJECT AND DETECT X,Y COORDINATE USING OPENCV WITH PYTHON

This code you can get it. Any problem please contact to me : (VN) 0327085425 by zalo app. wish you success with your project. import numpy as np def drawBox(img, bbox): x,y,w,h = int(bbox[0]),int(bbox[1]),int(bbox[2]),int(bbox[3]) (img,(x,y),((x w),(y h)),(0,0,255),3,1) (img,“Tracking“, (50,80),,0.7,(0,255,0),1) # show x,y coordinate: (img,“X =“, (0,30),,0.7,(0,255,0),1) (img,str(int(x)), (40,30),,0.7,(0,255,0),1) (img,“Y =“, (100,30),,0.7,(0,255,0),1) (img,str(int(y)), (140,30),,0.7,(0,255,0),1)
Back to Top