解决ModuleNotFoundError: No module named ‘skvideo‘问题,以及skvideo的说明

1.问题描述

from skimage import io
ModuleNotFoundError: No module named 'skvideo'

2.解决方案

pip install scikit-video

3.skvideo.io读写图片

import skvideo.io

# a frame from the bigbuckbunny sequence
vid = skvideo.io.vread('fire1.jpg')
T, M, N, C = vid.shape

print("Number of frames: %d" % (T,))
print("Number of rows: %d" % (M,))
print("Number of cols: %d" % (N,))
print("Number of channels: %d" % (C,))

# upsacle by a factor of 2
vid = skvideo.io.vread(
    'fire1.jpg', outputdict={
        "-sws_flags": "bilinear",
        "-s": "2560x1440"
    })
T, M, N, C = vid.shape

print("Number of frames: %d" % (T,))
print("Number of rows: %d" % (M,))
print("Number of cols: %d" % (N,))
print("Number of channels: %d" % (C,))

skvideo.io.vwrite("outputplus.png", vid)

 

 

 

 

参考网址

  1. https://blog.csdn.net/baidu_39629638/article/details/107332916?utm_medium=distribute.pc_relevant.none-task-blog-baidulandingword-2&spm=1001.2101.3001.4242
  2. https://blog.csdn.net/nima1994/article/details/90170904
  3. https://blog.csdn.net/jacke121/article/details/81485209?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.channel_param

你可能感兴趣的:(Python)