Skip to content

Error in Cells #6 #30

@tempaccountforissue

Description

@tempaccountforissue

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()`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions