|
@@ -26,6 +26,7 @@ import com.ys.imageProcess.ui.work.minZoom
|
|
import com.ys.imageProcess.ui.work.zoomStep
|
|
import com.ys.imageProcess.ui.work.zoomStep
|
|
import com.ys.imageProcess.utils.fileSizeString
|
|
import com.ys.imageProcess.utils.fileSizeString
|
|
import com.ys.imageProcess.utils.formatDate
|
|
import com.ys.imageProcess.utils.formatDate
|
|
|
|
+import com.ys.imageProcess.utils.scaleLength
|
|
import com.ys.imageProcess.utils.uriToBitmap
|
|
import com.ys.imageProcess.utils.uriToBitmap
|
|
import com.ys.imageProcess.utils.zoomToFit
|
|
import com.ys.imageProcess.utils.zoomToFit
|
|
import kotlinx.coroutines.CoroutineScope
|
|
import kotlinx.coroutines.CoroutineScope
|
|
@@ -134,10 +135,10 @@ class WorkViewModel : ViewModel() {
|
|
isAlgRunning = true
|
|
isAlgRunning = true
|
|
updateInfoMap()
|
|
updateInfoMap()
|
|
val ocrRes = OCRModelLoader.runModel(it)
|
|
val ocrRes = OCRModelLoader.runModel(it)
|
|
- var ocrStr = ""
|
|
|
|
|
|
+ var ocrStr = 100
|
|
val ocrPos = mutableListOf<Int>()
|
|
val ocrPos = mutableListOf<Int>()
|
|
if (ocrRes.isNotEmpty()) {
|
|
if (ocrRes.isNotEmpty()) {
|
|
- ocrStr = ocrRes.first().label
|
|
|
|
|
|
+ ocrStr = scaleLength(ocrRes.first().label)
|
|
for (point in ocrRes.first().points) {
|
|
for (point in ocrRes.first().points) {
|
|
ocrPos.add(point.x)
|
|
ocrPos.add(point.x)
|
|
ocrPos.add(point.y)
|
|
ocrPos.add(point.y)
|