Upload imageProcessor.js
Browse files
src/lib/imageProcessor.js
CHANGED
|
@@ -15,9 +15,9 @@ class ImageProcessor {
|
|
| 15 |
this.DEFAULT_OVERLAP = 75
|
| 16 |
|
| 17 |
// 智能切割参数 - 针对模型识别效果优化
|
| 18 |
-
this.OPTIMAL_SEGMENT_HEIGHT =
|
| 19 |
-
this.MAX_SEGMENT_HEIGHT =
|
| 20 |
-
this.MIN_SEGMENT_HEIGHT =
|
| 21 |
}
|
| 22 |
|
| 23 |
/**
|
|
@@ -319,7 +319,7 @@ class ImageProcessor {
|
|
| 319 |
}
|
| 320 |
})
|
| 321 |
|
| 322 |
-
const heightStatus = region.height <=
|
| 323 |
console.log(`生成片段 ${region.segmentIndex + 1}/${regions.length}: ${region.width}x${region.height} (${heightStatus}) [${region.top}-${region.top + region.height}]`)
|
| 324 |
}
|
| 325 |
|
|
|
|
| 15 |
this.DEFAULT_OVERLAP = 75
|
| 16 |
|
| 17 |
// 智能切割参数 - 针对模型识别效果优化
|
| 18 |
+
this.OPTIMAL_SEGMENT_HEIGHT = 2500 // 理想片段高度
|
| 19 |
+
this.MAX_SEGMENT_HEIGHT = 3000 // 最大片段高度
|
| 20 |
+
this.MIN_SEGMENT_HEIGHT = 2000 // 最小片段高度
|
| 21 |
}
|
| 22 |
|
| 23 |
/**
|
|
|
|
| 319 |
}
|
| 320 |
})
|
| 321 |
|
| 322 |
+
const heightStatus = region.height <= 2500 ? '✓理想' : region.height <= 3000 ? '✓良好' : '⚠超限'
|
| 323 |
console.log(`生成片段 ${region.segmentIndex + 1}/${regions.length}: ${region.width}x${region.height} (${heightStatus}) [${region.top}-${region.top + region.height}]`)
|
| 324 |
}
|
| 325 |
|