Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg version #37

Open
Tong-Hao741 opened this issue Dec 24, 2023 · 4 comments
Open

ffmpeg version #37

Tong-Hao741 opened this issue Dec 24, 2023 · 4 comments

Comments

@Tong-Hao741
Copy link

作者您好,请问您使用ffmpeg的版本是多少呢?

@Tong-Hao741
Copy link
Author

ffmpeg的问题已经解决,现在遇到这个问题
data = np.array(imageio.mimread(path, memtest=False), dtype=object)[..., :3]
ValueError: could not broadcast input array from shape (280,260,3) into shape (280,260)
请问这个是要改为灰度图嘛?

@Tong-Hao741
Copy link
Author

给出的错误是数据不规范,我又试着遍历发现第一帧的形状是 (280, 260, 3),但是后面的形状都是 (280, 260, 4)就很奇怪
image

@Tong-Hao741
Copy link
Author

问题都已经解决,对于论文中源代码
data = np.array(imageio.mimread(path, memtest=False), dtype=object)[..., :3]
我修改为:
data = np.array(imageio.mimread(path, memtest=False,format='GIF-PIL'), dtype=object)[..., :3]
就能够正确的读取GIF图片的通道数(280,260,1)

@Tong-Hao741
Copy link
Author

image
还有一点很奇怪,最后的输出结果是这样的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant