supported returning a list from a callback for multiple windows again.
This commit is contained in:
@ -54,7 +54,11 @@ class FrameUpdater(threading.Thread):
|
||||
frame_c = c(frame)
|
||||
if frame_c is not None:
|
||||
frame = frame_c
|
||||
if frame.shape[-1] not in [1, 3] and len(frame.shape) != 2:
|
||||
if (
|
||||
isinstance(frame, np.ndarray)
|
||||
and frame.shape[-1] not in [1, 3]
|
||||
and len(frame.shape) != 2
|
||||
):
|
||||
print(
|
||||
f"Too many channels in output. (Got {frame.shape[-1]} instead of 1 or 3.) "
|
||||
f"Frame selection callback added."
|
||||
|
@ -146,7 +146,8 @@ class SubscriberWindows(object):
|
||||
if isinstance(self.frames[f], Exception):
|
||||
raise self.frames[f]
|
||||
if (
|
||||
self.frames[f].shape[-1] not in [1, 3]
|
||||
isinstance(self.frames[f], np.ndarray)
|
||||
and self.frames[f].shape[-1] not in [1, 3]
|
||||
and len(self.frames[f].shape) != 2
|
||||
):
|
||||
print(
|
||||
|
Reference in New Issue
Block a user