Closed svanschalkwyk closed 8 years ago
function cv.adaptiveThreshold(t) local argRules = { {"src", required = true}, {"dst", default = nil}, {"maxValue", required = true}, {"adaptiveMethod", required = true}, {"thresholdType", required = true}, {"blockSize", required = true}, {"c", required = true} } local src, dst, maxValue, adaptiveMethod, thresholdType, blockSize, c= cv.argcheck(t, argRules) if dst then assert(dst:type() == src:type() and src:isSameSizeAs(dst)) end return cv.unwrap_tensors( C.adaptiveThreshold( cv.wrap_tensor(src), cv.wrap_tensor(dst), maxValue, adaptiveMethod, thresholdType, blockSize,c)) end
Thanks!
function cv.adaptiveThreshold(t) local argRules = { {"src", required = true}, {"dst", default = nil}, {"maxValue", required = true}, {"adaptiveMethod", required = true}, {"thresholdType", required = true}, {"blockSize", required = true}, {"c", required = true} } local src, dst, maxValue, adaptiveMethod, thresholdType, blockSize, c= cv.argcheck(t, argRules) if dst then assert(dst:type() == src:type() and src:isSameSizeAs(dst)) end return cv.unwrap_tensors( C.adaptiveThreshold( cv.wrap_tensor(src), cv.wrap_tensor(dst), maxValue, adaptiveMethod, thresholdType, blockSize,c)) end