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

Error in Cells #6 #30

Open
tempaccountforissue opened this issue Jan 17, 2023 · 0 comments
Open

Error in Cells #6 #30

tempaccountforissue opened this issue Jan 17, 2023 · 0 comments

Comments

@tempaccountforissue
Copy link

I keep getting these errors

`error Traceback (most recent call last)
Cell In[6], line 16
14 plt.figure(figsize=(20, 4))
15 plt.axis("off")
---> 16 plt.imshow(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
17 plt.show()

error: OpenCV(4.6.0) C:\b\abs_74oeeuevib\croots\recipe\opencv-suite_1664548340488\work\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'`

from this section of code

`#@title export the results
import matplotlib.pyplot as plt
import importlib
import PIL
importlib.reload(PIL.TiffTags)
import cv2
import os

frames = []
for i in range(0, n_iter, 100):
img = cv2.imread(os.path.join(output_dir, f"iter_{i}.jpg"))
frames.append(img)
plt.figure(figsize=(20, 4))
plt.axis("off")
plt.imshow(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
plt.show()`

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