Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import org.appdevforall.codeonthego.computervision.utils.BitmapUtils.calculateVe
object SmartBoundaryDetector {

private const val DEFAULT_EDGE_IGNORE_PERCENT = 0.05f
private const val LEFT_ZONE_END_PERCENT = 0.4f
private const val RIGHT_ZONE_START_PERCENT = 0.6f
private const val LEFT_ZONE_END_PERCENT = 0.5f
private const val RIGHT_ZONE_START_PERCENT = 0.5f
private const val MIN_GAP_WIDTH_PERCENT = 0.02
private const val PRIMARY_ACTIVITY_THRESHOLD = 0.05f
private const val FALLBACK_ACTIVITY_THRESHOLD = 0.01f
Expand Down Expand Up @@ -77,7 +77,7 @@ object SmartBoundaryDetector {
var maxGapLength = 0
var maxGapMidpoint: Int? = null
var currentGapStart = -1
var previousIsActive = false
var previousIsActive = true

signal.forEachIndexed { index, value ->
val isActive = value > threshold
Expand Down
Loading