테스트 사이트 - 개발 중인 베타 버전입니다

파이썬인데 이게 뭐가 오류가 난거죠...

파이썬어렵 4년 전 조회 2,587

import cv2 import numpy as np

# open video file video_path = 'running.mp4' cap = cv2.VideoCapture(video_path)

# check file is opened if not cap.isOpened():   exit()

tracker = cv2.TrackerCSRT_create()

ret, img = cap.read()

cv2.namedWindow('term project') cv2.imshow('term project',img)

#select ROI rect = cv2.selectROI('term project', img, fromCenter=False, showCrosshair=True) cv2.destoryWindow('term project')

#intitialize tracker tracker.init(img, rect) 

while True:   ret, img = cap.read()

  if not ret:     exit()

  success, box = tracker.update(img)

  left, top, w, h = [int(v) for v in box]

  cv2.rectangle(img, pt1=(left, top), pt2=(left + w, top + h), color=(255, 255, 255),   thickness=3) 

  cv2.imshow('img', img)   if cv2.waitKey(1) == ord('q'):     break           

이거 돌리면

AttributeError: module 'cv2.cv2' has no attribute 'destoryWindow'

깔건 다 깔았는데 

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인