Nosmai  Effects Nosmai  Moderation Nosmai Try-ons coming soon
Docs menu Android
How-to guide

Blur the background in Android

Enable subject segmentation and adjust background blur strength in a Nosmai Android preview.

Platform Android SDK version 3.0.4 Updated Aug 22, 2026 Time 4 min

Prerequisites

Enable blur

NosmaiBackgroundSegmentationConfig config =
    new NosmaiBackgroundSegmentationConfig(
        NosmaiBackgroundSegmentationConfig.Mode.BLUR
    );
config.blurStrength = 55.0f;

NosmaiEffects.setBackgroundSegmentation(config);

blurStrength uses 0 through 100. Update the configuration from the main thread when a slider changes.

Disable blur

NosmaiEffects.clearBackgroundSegmentation();

Verify it worked

The subject should remain visible and sharp while the scene behind it is blurred.

Common errors

SymptomFix
No blurConfirm the pipeline is ready and advanced filters are enabled
Edge quality changes during motionImprove lighting and reduce camera motion
Lower frame rateUse 30 FPS, lower input resolution, and profile a Release build

Next steps

References

Was this page helpful?

Your response helps us prioritize documentation improvements.

Nosmai

An AR and AI company. Founded on the idea that the next decade of software will be visual, and that the tools for it should be within reach of anyone building.

Newsletter

Product updates and release notes. No spam.

© 2026 nosmai, inc · all rights reserved