无法解析名称 'vision.MeanShiftTracker'。 出错 li9 (第 43 行) tracker = vision.MeanShiftTracker;
时间: 2024-01-26 12:04:08 浏览: 69
MHT.zip_22664O.com.mht_MHT tracking_MHT Tracker_multi hipothesi
这个错误很可能是因为你没有正确导入`vision`模块。你需要在代码开头添加以下导入语句:
```python
from cv2 import cv2
from matplotlib import pyplot as plt
from skimage import io
from skimage import feature
from skimage import data
from skimage import transform
from skimage import util
from skimage import filters
from skimage import color
from skimage import morphology
from skimage import measure
from skimage import segmentation
from skimage import draw
from skimage import exposure
from skimage import feature
from skimage import restoration
from skimage import viewer
from skimage import util
from skimage import measure
from skimage import transform
from skimage import data
from skimage import img_as_float
from skimage import img_as_ubyte
from skimage import img_as_uint
from skimage import img_as_int
from skimage import img_as_bool
from skimage import img_as_float32
from skimage import img_as_int16
from skimage import img_as_uint16
from skimage import img_as_uint32
from skimage import img_as_int64
from skimage import img_as_uint64
from skimage import segmentation
from skimage import io, color
from skimage import morphology
from skimage import exposure
from skimage import filters
from skimage import draw
from skimage import transform
from skimage import util
from skimage import feature
from skimage import measure
from skimage import restoration
from skimage import viewer
from skimage import segmentation
from skimage import exposure
from skimage import transform
from skimage import data
from skimage import img_as_float
from skimage import img_as_ubyte
from skimage import img_as_uint
from skimage import img_as_int
from skimage import img_as_bool
from skimage import img_as_float32
from skimage import img_as_int16
from skimage import img_as_uint16
from skimage import img_as_uint32
from skimage import img_as_int64
from skimage import img_as_uint64
from skimage import segmentation
from skimage import filters
from skimage import feature
from skimage import measure
from skimage import transform
from skimage import img_as_ubyte
from skimage import morphology
from skimage import segmentation
from skimage import exposure
from skimage import io
from skimage import util
from skimage import draw
from skimage import restoration
from skimage import viewer
from skimage import color
from skimage import data
from skimage import io
from skimage.filters import threshold_otsu
from skimage.morphology import closing, square, opening
from skimage.measure import label, regionprops
from skimage.color import label2rgb
from sklearn.cluster import KMeans
from scipy import ndimage
from scipy.spatial import distance as dist
from scipy.signal import find_peaks
from scipy.interpolate import CubicSpline
from imutils import contours
from imutils import perspective
import imutils
import numpy as np
import math
import time
import sys
import os
```
如果你已经导入了`vision`模块,那么很可能是版本问题。你可以尝试更新`vision`模块的版本,或者使用其他的目标跟踪算法替代`MeanShiftTracker`。
阅读全文