changed logic in ocr
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user