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

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

QA

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

본문

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'

깔건 다 깔았는데 

이 질문에 댓글 쓰기 :

답변을 작성하시기 전에 로그인 해주세요.
전체 208
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT