Get blurring working again
This commit is contained in:
@@ -54,9 +54,14 @@ export class BlurBackgroundTransformer extends BackgroundTransformer {
|
|||||||
delegate: "GPU",
|
delegate: "GPU",
|
||||||
...this.options.segmenterOptions,
|
...this.options.segmenterOptions,
|
||||||
},
|
},
|
||||||
|
canvas: this.canvas,
|
||||||
runningMode: "VIDEO",
|
runningMode: "VIDEO",
|
||||||
outputCategoryMask: true,
|
outputCategoryMask: true,
|
||||||
outputConfidenceMasks: false,
|
outputConfidenceMasks: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this.options.blurRadius) {
|
||||||
|
this.gl?.setBlurRadius(this.options.blurRadius);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export const ProcessorProvider: FC<Props> = ({ children }) => {
|
|||||||
try {
|
try {
|
||||||
if (!blur.current) {
|
if (!blur.current) {
|
||||||
blur.current = new ProcessorWrapper(
|
blur.current = new ProcessorWrapper(
|
||||||
new BlurBackgroundTransformer({}),
|
new BlurBackgroundTransformer({ blurRadius: 15 }),
|
||||||
"background-blur",
|
"background-blur",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user