Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VINScanner/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<meta name="keywords" content="vin, scan vin, read vin, ocr, barcode, camera, capture vision" />
<title>VIN Scanner</title>
<link rel="stylesheet" href="./css/index.css" />
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-bundle@2.4.2100/dist/dcv.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-bundle@3.2.5000/dist/dcv.bundle.min.js"></script>
</head>
<body>
<div class="home-page">
Expand Down
7 changes: 4 additions & 3 deletions VINScanner/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ let init = (async function initCVR() {

/* Defines the result receiver for the solution.*/
const resultReceiver = new Dynamsoft.CVR.CapturedResultReceiver();

resultReceiver.onCapturedResultReceived = (result) => {
const textLineResult = result.textLineResultItems;
const barcodeResult = result.barcodeResultItems;
const parsedResults = result.parsedResultItems;
const textLineResult = result.recognizedTextLinesResult?.textLineResultItems;
const barcodeResult = result.decodedBarcodesResult?.barcodeResultItems;
const parsedResults = result.parsedResult?.parsedResultItems;

if (textLineResult?.length || barcodeResult?.length) {
// Play sound feedback if enabled
Expand Down
2 changes: 1 addition & 1 deletion VINScanner/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function extractVinDetails(result) {
if (!result.exception) {
parseResultInfo["Region"] = result.getFieldValue("region");
parseResultInfo["Check Digit"] = result.getFieldValue("checkDigit");
parseResultInfo["Model Year"] = undefined?.split(",")?.join(" | ");
parseResultInfo["Model Year"] = result.getFieldValue("modelYear")?.split(",")?.join(" | ");
parseResultInfo["Plant Code"] = result.getFieldValue("plantCode");
parseResultInfo["VIS"] = result.getFieldValue("VIS");
}
Expand Down
8 changes: 4 additions & 4 deletions VINScanner/minimum-elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h3 id="scan-title"></h3>
Results:
<div id="result-image-container"></div>
<div id="results"></div>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-bundle@2.4.2100/dist/dcv.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-bundle@3.2.5000/dist/dcv.bundle.min.js"></script>
<script>
/** LICENSE ALERT - README
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
Expand Down Expand Up @@ -76,9 +76,9 @@ <h3 id="scan-title"></h3>
// Define the result receiver for the solution
const resultReceiver = new Dynamsoft.CVR.CapturedResultReceiver();
resultReceiver.onCapturedResultReceived = (result) => {
const textLineResult = result.textLineResultItems;
const barcodeResult = result.barcodeResultItems;
const parsedResults = result.parsedResultItems;
const textLineResult = result.recognizedTextLinesResult?.textLineResultItems;
const barcodeResult = result.decodedBarcodesResult?.barcodeResultItems;
const parsedResults = result.parsedResult?.parsedResultItems;

if (textLineResult?.length || barcodeResult?.length) {
// Reset results
Expand Down
34 changes: 17 additions & 17 deletions VINScanner/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@
"GrayscaleEnhancementModesIndex": -1,
"Mode": "BM_LOCAL_BLOCK",
"MorphOperation": "Close",
"MorphOperationKernelSizeX": -1,
"MorphOperationKernelSizeY": -1,
"MorphOperationKernelSizeX": 0,
"MorphOperationKernelSizeY": 0,
"MorphShape": "Rectangle",
"ThresholdCompensation": 10
},
Expand Down Expand Up @@ -338,7 +338,7 @@
"ExcludeChars": ["O", "Q", "I"]
},
"DirectoryPath": "",
"Name": "VIN"
"Name": "VINCharRecognition"
}
],
"CodeParserTaskSettingOptions": [
Expand All @@ -363,8 +363,8 @@
"GrayscaleEnhancementModesIndex": -1,
"Mode": "BM_LOCAL_BLOCK",
"MorphOperation": "Erode",
"MorphOperationKernelSizeX": -1,
"MorphOperationKernelSizeY": -1,
"MorphOperationKernelSizeX": 0,
"MorphOperationKernelSizeY": 0,
"MorphShape": "Rectangle",
"ThresholdCompensation": 10
}
Expand Down Expand Up @@ -451,8 +451,8 @@
"GrayscaleEnhancementModesIndex": -1,
"Mode": "BM_LOCAL_BLOCK",
"MorphOperation": "Close",
"MorphOperationKernelSizeX": -1,
"MorphOperationKernelSizeY": -1,
"MorphOperationKernelSizeX": 0,
"MorphOperationKernelSizeY": 0,
"MorphShape": "Rectangle",
"ThresholdCompensation": 10
}
Expand Down Expand Up @@ -536,8 +536,8 @@
"GrayscaleEnhancementModesIndex": -1,
"Mode": "BM_LOCAL_BLOCK",
"MorphOperation": "Close",
"MorphOperationKernelSizeX": -1,
"MorphOperationKernelSizeY": -1,
"MorphOperationKernelSizeX": 0,
"MorphOperationKernelSizeY": 0,
"MorphShape": "Rectangle",
"ThresholdCompensation": 10
}
Expand Down Expand Up @@ -738,14 +738,14 @@
"GrayscaleEnhancementModesIndex": -1,
"Mode": "BM_LOCAL_BLOCK",
"MorphOperation": "Erode",
"MorphOperationKernelSizeX": -1,
"MorphOperationKernelSizeY": -1,
"MorphOperationKernelSizeX": 0,
"MorphOperationKernelSizeY": 0,
"MorphShape": "Rectangle",
"ThresholdCompensation": 10
}
],
"CharHeightRange": [5, 1000, 1],
"CharacterModelName": "VIN",
"CharacterModelName": "VINCharRecognition",
"CharacterNormalizationModes": [
{
"Mode": "CNM_AUTO",
Expand All @@ -760,11 +760,11 @@
"GrayscaleEnhancementModes": [
{
"Mode": "GEM_GENERAL",
"Sensitivity": -1,
"SharpenBlockSizeX": -1,
"SharpenBlockSizeY": -1,
"SmoothBlockSizeX": -1,
"SmoothBlockSizeY": -1
"Sensitivity": 5,
"SharpenBlockSizeX": 3,
"SharpenBlockSizeY": 3,
"SmoothBlockSizeX": 3,
"SmoothBlockSizeY": 3
}
],
"Name": "tls_vin_text",
Expand Down
Loading