Will have to create a separate method for this, and replace the original getDepth and calcLocation methods:
|
// FIXME: Use something like trimmed mean to eliminate outliers, instead of the normal mean |
|
func getDepth(sharedImageData: SharedImageData, index: Int) { |
|
let objectSegmentation = sharedImageData.classImages[index] |
|
let mask = createMask(from: objectSegmentation) |
|
guard let depthMap = sharedImageData.depthData else { return } |
|
// var distanceSum: Float = 0 |