Last active
November 30, 2020 19:18
-
-
Save yektasarioglu/aa635b8fb6cdde43d22384113accf106 to your computer and use it in GitHub Desktop.
Initialize Analyzer for camera stream mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun initializeAnalyzer() { | |
val setting = MLImageSegmentationSetting.Factory() // Set whether to support fine segmentation. The value true indicates fine segmentation, and the value false indicates fast segmentation. | |
.setExact(false) | |
.setAnalyzerType(MLImageSegmentationSetting.BODY_SEG) | |
.setScene(MLImageSegmentationScene.FOREGROUND_ONLY) | |
.create() | |
analyzer = MLAnalyzerFactory.getInstance().getImageSegmentationAnalyzer(setting) | |
analyzer?.setTransactor(ImageSegmentAnalyzerTransactor(binding?.graphic ?: return)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment