Get blurring working again

This commit is contained in:
Robin
2025-04-22 18:32:01 +02:00
parent 7142122a74
commit 63ad4a3ad3
2 changed files with 6 additions and 1 deletions

View File

@@ -54,9 +54,14 @@ export class BlurBackgroundTransformer extends BackgroundTransformer {
delegate: "GPU",
...this.options.segmenterOptions,
},
canvas: this.canvas,
runningMode: "VIDEO",
outputCategoryMask: true,
outputConfidenceMasks: false,
});
if (this.options.blurRadius) {
this.gl?.setBlurRadius(this.options.blurRadius);
}
}
}

View File

@@ -90,7 +90,7 @@ export const ProcessorProvider: FC<Props> = ({ children }) => {
try {
if (!blur.current) {
blur.current = new ProcessorWrapper(
new BlurBackgroundTransformer({}),
new BlurBackgroundTransformer({ blurRadius: 15 }),
"background-blur",
);
}