MLKitSegmentationCommon 框架参考
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
MLKSegmentationMask
@interface MLKSegmentationMask : NSObject
细分器操作的结果。
-
掩码的分割缓冲区。
缓冲区将采用 kCVPixelFormatType_OneComponent32Float
格式类型。每个像素
值的范围为 [0.0f, 1.0f],其中 1 表示像素位于
0 表示像素位于分段区域之外。来电者
可以查询掩码以获取每像素区域值估算值,但负责定义
设置自己的中间值阈值缓冲区归 SegmentationMask
所有
并且会在容器释放时释放,除非调用方明确维护
通过 CVPixelBufferRetain()
对其进行引用。
声明
Objective-C
@property (nonatomic, readonly) CVPixelBufferRef _Nonnull buffer;
-
声明
Objective-C
- (nonnull instancetype)init;
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-25。"],[[["`MLKSegmentationMask` represents the result of a segmentation operation, providing a mask to identify segmented regions within an image."],["The `buffer` property offers a `CVPixelBuffer` containing per-pixel region values ranging from 0.0 to 1.0, where 1.0 signifies inclusion within the segmented area."],["While the `MLKSegmentationMask` owns and manages the lifecycle of the buffer, external users can retain it using `CVPixelBufferRetain()` for extended usage."]]],[]]