changed logic in ocr

This commit is contained in:
dhanabalan
2025-10-30 14:54:11 +05:30
parent 58951dcdc4
commit 0845b90985

View File

@@ -741,7 +741,9 @@ function cameraCapture() {
</div> </div>
<!-- Scripts --> <!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/tesseract.js@2.1.5/dist/tesseract.min.js"></script> {{-- <script src="https://cdn.jsdelivr.net/npm/tesseract.js@2.1.5/dist/tesseract.min.js"></script> --}}
<script src="https://cdn.jsdelivr.net/npm/tesseract.js@4/dist/tesseract.min.js"></script>
<script> <script>
function cameraCapture() { function cameraCapture() {
@@ -751,6 +753,8 @@ function cameraCapture() {
textDetectionInterval: null, textDetectionInterval: null,
capturedPhoto: null, // store captured image capturedPhoto: null, // store captured image
serialNumbers: [], serialNumbers: [],
ocrWorker: null,
isWorkerReady: false,
async initCamera() { async initCamera() {
try { try {