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

Blur the background in iOS

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

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

Prerequisites

Enable blur

NosmaiBackgroundSegmentationConfig *config =
    [[NosmaiBackgroundSegmentationConfig alloc] init];
config.mode = NosmaiBackgroundSegmentationModeBlur;
config.blurStrength = 50.0f;

[[NosmaiCore shared].effects setBackgroundSegmentation:config];

blurStrength uses 0 through 100. Apply an updated configuration when the user changes the slider.

Disable blur

[[NosmaiCore shared].effects clearBackgroundSegmentation];

Verify it worked

The subject should stay sharp while the scene behind it becomes blurred.

Common errors

SymptomFix
Blur covers the subject edgeImprove lighting and reduce fast motion
Preview slowsStart at 720p and test the Release build on the lowest supported device
No blurCheck advanced-filter capability and camera readiness

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