Skip to content

Commit

Permalink
fix webcam for changing background scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
plemeri committed Nov 29, 2022
1 parent 17165b3 commit c5dce40
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="transparent-background",
version="1.1.1",
version="1.1.2",
author="Taehun Kim",
author_email="[email protected]",
description="Make images with transparent background",
Expand Down
3 changes: 1 addition & 2 deletions transparent_background/Remover.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,5 @@ def console():
elif _format == 'Video' and writer is not None:
writer.write(cv2.cvtColor(out, cv2.COLOR_BGR2RGB))
elif _format == 'Webcam':
# cv2.imshow('InSPyReNet', cv2.cvtColor(out, cv2.COLOR_BGR2RGB))
vcam.send(cv2.cvtColor(out, cv2.COLOR_BGR2RGB))
vcam.send(out)
vcam.sleep_until_next_frame()
1 change: 1 addition & 0 deletions transparent_background/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def __next__(self):
raise StopIteration

else:
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
frame = Image.fromarray(frame).convert('RGB')

del self.imgs[:-1]
Expand Down

0 comments on commit c5dce40

Please sign in to comment.