[ad_1]
Which native iOS framework is greatest used to eradicate this cpu hog written in OpenCV?
/// Cut back the channel components of given Mat to a single channel
static func scale back(enter: Mat) throws -> Mat {
let output = Mat(rows: enter.rows(), cols: enter.cols(), sort: CvType.CV_8UC1)
for x in 0 ..< enter.rows() {
for y in 0 ..< enter.cols() {
let worth = enter.get(row: x, col: y)
let dataValue = worth.scale back(0, +)
strive output.put(row: x, col: y, information: [dataValue])
}
}
return output
}
takes about 20+ seconds to do these will get and places on actual world information I put this code by.
[ad_2]
