SarowarSaurav commited on
Commit
8309108
·
verified ·
1 Parent(s): 474a754

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +39 -68
index.html CHANGED
@@ -1,69 +1,40 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Barcode Scanner</title>
7
- <link rel="stylesheet" href="styles.css">
8
- </head>
9
- <body>
10
- <div class="container">
11
- <h1>Barcode Scanner</h1>
12
- <div class="upload-section">
13
- <label for="imageUpload" class="upload-label">
14
- <span>Upload Image with Barcode</span>
15
- <input type="file" id="imageUpload" accept="image/*">
16
- </label>
17
- </div>
18
-
19
- <div class="preview-section">
20
- <div class="image-preview">
21
- <h2>Image Preview</h2>
22
- <div id="scanner-container">
23
- <img id="preview" src="#" alt="Preview" style="display: none;">
24
- <canvas id="scanCanvas"></canvas>
25
- </div>
26
- </div>
27
-
28
- <div class="result-section">
29
- <h2>Recognition Result</h2>
30
- <div id="status">Upload an image or use camera to start recognition</div>
31
- <div id="result"></div>
32
- </div>
33
- </div>
34
-
35
- <div class="info-section">
36
- <h3>How It Works</h3>
37
- <p>This application uses ZXing (Zebra Crossing), a powerful barcode scanning library, to detect and decode barcodes from images or your device camera.</p>
38
- <p>For best results:</p>
39
- <ul>
40
- <li>Use clear, well-lit images or good lighting when using camera</li>
41
- <li>Ensure the barcode is in focus</li>
42
- <li>Position the barcode to be as straight as possible</li>
43
- <li>Hold the camera steady when scanning with device camera</li>
44
- <li>Supported formats: QR Code, Data Matrix, UPC, EAN, Code 128, Code 39, ITF, and more</li>
45
- </ul>
46
- </div>
47
-
48
- <div class="troubleshooting-section">
49
- <h3>Troubleshooting</h3>
50
- <p>If you're having trouble with barcode recognition:</p>
51
- <ol>
52
- <li><strong>Image Quality:</strong> Make sure your image is clear, well-lit, and the barcode is in focus.</li>
53
- <li><strong>Camera Position:</strong> When using the camera, hold it steady and ensure good lighting.</li>
54
- <li><strong>Barcode Type:</strong> This scanner supports both 1D barcodes (EAN, UPC, Code128, etc.) and 2D barcodes (QR Code, Data Matrix).</li>
55
- <li><strong>Orientation:</strong> ZXing can detect barcodes in various orientations, but straight alignment may improve results.</li>
56
- <li><strong>Contrast:</strong> Ensure there's good contrast between the barcode and background.</li>
57
- <li><strong>Size:</strong> The barcode should be a reasonable size in the image - not too small or too large.</li>
58
- <li><strong>Different Image:</strong> If all else fails, try a different image of the barcode.</li>
59
- <li><strong>Camera Permissions:</strong> Make sure you've granted camera permissions if using the camera feature.</li>
60
- </ol>
61
- <p>Red boxes indicate detected barcode areas.</p>
62
- </div>
63
- </div>
64
-
65
- <!-- Load ZXing library -->
66
- <script src="https://unpkg.com/@zxing/library@latest"></script>
67
- <script src="app.js"></script>
68
- </body>
69
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Barcode Scanner</title>
7
+ <link rel="stylesheet" href="styles.css">
8
+ </head>
9
+ <body>
10
+ <div class="container">
11
+ <h1>Barcode Scanner</h1>
12
+ <div class="upload-section">
13
+ <label for="imageUpload" class="upload-label">
14
+ <span>Upload Image with Barcode</span>
15
+ <input type="file" id="imageUpload" accept="image/*">
16
+ </label>
17
+ </div>
18
+
19
+ <div class="preview-section">
20
+ <div class="image-preview">
21
+ <h2>Image Preview</h2>
22
+ <div id="scanner-container">
23
+ <img id="preview" src="#" alt="Preview" style="display: none;">
24
+ <canvas id="scanCanvas"></canvas>
25
+ </div>
26
+ </div>
27
+
28
+ <div class="result-section">
29
+ <h2>Recognition Result</h2>
30
+ <div id="status">Upload an image or use camera to start recognition</div>
31
+ <div id="result"></div>
32
+ </div>
33
+ </div>
34
+
35
+
36
+ <!-- Load ZXing library -->
37
+ <script src="https://unpkg.com/@zxing/library@latest"></script>
38
+ <script src="app.js"></script>
39
+ </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  </html>