Faking your webcam background under GNU/Linux, now supports background blurring, animated background, colour map effect, hologram effect and on-demand processing.
When I run lfbw with --cmap-bg, with each new frame the color map is applied recursively on the background image. For most color maps (for all except grey, I believe) this results in a single color background after less than 10 frames. The problem is solved by changing line 256
@@ -256,8 +256,7 @@
# Apply colour map to the background
if self.cmap_bg:
- cv2.applyColorMap(background_frame, cmap(self.cmap_bg),
- dst=background_frame)
+ background_frame = cv2.applyColorMap(background_frame, cmap(self.cmap_bg))
# Selfie processing
for [k, *v] in self.selfie_effects:
The difference seems to be something like assignation by reference vs value, but I do not really know how dst works.
When I run lfbw with --cmap-bg, with each new frame the color map is applied recursively on the background image. For most color maps (for all except grey, I believe) this results in a single color background after less than 10 frames. The problem is solved by changing line 256
The difference seems to be something like assignation by reference vs value, but I do not really know how dst works.
This is with opencv-python in version 4.10.0.84.