draw bounding box on image python cv2

Solutions on MaxInterview for draw bounding box on image python cv2 by the best coders in the world

showing results for - "draw bounding box on image python cv2"
Giada
22 May 2017
1# cv2.rectangle(img, pt1, pt2, color, thickness, lineType, shift)
2cv2.rectangle(img, (x1, y1), (x2, y2), (255,0,0), 2)
3
4"""
5x1,y1 ------
6|          |
7|          |
8|          |
9--------x2,y2
10"""
Nathan
04 Oct 2019
1## drawing b.box for given coutour
2
3
4contours, _ = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
5for c in contours:
6    rect = cv2.boundingRect(c)
7    if rect[2] < 100 or rect[3] < 100: continue
8    print cv2.contourArea(c)
9    x,y,w,h = rect
10    cv2.rectangle(im,(x,y),(x+w,y+h),(0,255,0),2)
11    cv2.putText(im,'Moth Detected',(x+w+10,y+h),0,0.3,(0,255,0))
12cv2.imshow("Show",im)
13cv2.waitKey()  
14cv2.destroyAllWindows()
15
queries leading to this page
opencv draw bounding boxdraw bounding box on image python opencvdraw bounding box on image pythonhow to draw the bounding boxes on images using open cvdraw bounding box and text on image python opencvopencv draw bounding box pythondraw bounding box opencv pythondraw bounding box cv2opencv draw bounding box without overwriting original imagedraw bounding box on image python from computer visiondraw bounding boxes on image pythonplot bounding box on image pythonhow to draw a bounding box in opencv pythondraw bounding box on image python opencv pascalvocdraw bounding box on image opencvget bounding box around image opencvdraw bounding box opencvopencv bounding box on an image objectopencv images bounding boxinsert image into bounding box in open cvcv2 draw bounding boxdraw bounding box on image python cv2draw bounding box on image python from apidraw bounding boxes on image python matplotlibopencv bounding box drawopencv image bounding boxopencv bounding box print on imagedraw bounding boxes open cv2imshow bounding box opencv pythonpython cv2 draw bounding boxopencv python draw bounding boxadd image in bounding box opencv show image in opencv with bounding boxhow to draw bounding box on image pythoncv2 draw bounding box around alldraw bounding box on image python pildraw a bounding box using cv2cv2 draw bounding box on imagedraw bounding box on image python opencv from metadatacv2 draw bounding box on image with changing fcolorcv2 draw bounding box and labeluse bounding box to extract image cv2image bounding box to character opencvhow to draw bounding box in opencv pythonpython bounding box on imagedraw bounding box on image python cv2