Tire & Automotive

Tire Size

Preset Config

// init the Anyline SDK with a preset config
anyline = window.anylinejs.init({
    preset: 'tire_size',
    license: demoLicense,
    element: root,
    anylinePath: '../anylinejs',
});

Example Config

config: {
  tirePlugin: {
    "tireSizeConfig":{
      upsideDownMode: 'auto',
    }
  }
}

Config Parameters

  • minConfidence

    Results with lower confidence than minConfidence get rejected automatically. This value is a number between 0 and 100. The default is 60.

Tire Size Result

With release 42 the result format for tire size changed from an array to a dictionary. To access the "text" element of the result you can use result.text instead of result[1].text. Now you can also get other tire properties individually by key, for example result.width or result.speedRating.

For more information, see Tire Size Documentation.

Tire ID

Preset Config

// init the Anyline SDK with a preset config
anyline = window.anylinejs.init({
    preset: 'tire_id',
    license: demoLicense,
    element: root,
    anylinePath: '../anylinejs',
});

Example Config

config: {
  tirePlugin: {
    commercialTireIdConfig: {
      upsideDownMode: 'auto',
    }
  }
}

Config Parameters

  • minConfidence

    Results with lower confidence than minConfidence get rejected automatically. This value is a number between 0 and 100. The default is 60.

Tire ID Result

[{
"confidence": {
  "confidence": 82,
  "identifier": "text",
  "text": "196022173"
}]

For more information, see Tire Commercial ID Documentation.

Tire Identification Number

Preset Config

// init the Anyline SDK with a preset config
anyline = window.anylinejs.init({
    preset: 'tin',
    license: demoLicense,
    element: root,
    anylinePath: '../anylinejs',
});

Example Config

config: {
  tirePlugin: {
    tinConfig: {
      upsideDownMode: 'auto',
      scanMode: 'universal',
    },
  },
},

Config Parameters

  • validationRegex

    Sets a regular expression which the TIN text needs to match in order to trigger a scan result. Note that this option is ignored if validateProductionDate is true.

  • validateProductionDate

    Sets wether the production date validation is enabled. If it is set to false the scan result is also returned for invalid and missing dates. Defaults to true.

  • minConfidence

    Results with lower confidence than minConfidence get rejected automatically. This value is a number between 0 and 100. The default is 60.

  • upsideDownMode

    • auto

      Will automatically detect if the tire is upside down or not.

    • enabled

      Will always scan the tire upside down.

    • disabled

      Will always scan the tire right side up.

  • scanMode

    • universal

    • dot

  • horizontalAlignmentRatio

    Ensures that detected TIN text starts near the left edge of the cutout (or right edge when upside-down) to prevent partial captures. The parameter is a ratio relative to the image width. Lower values are more restrictive.

    • Default: 1.0 (disabled)

    • Suggested: 0.11

  • detectionMinHeightRatio

    Ensures the device is close enough to the tire by requiring detected text to meet a minimum height ratio relative to the image height. Higher values are more restrictive.

    • Default: 0.26

Tire Identification Number Result

[{
"confidence": {
  "confidence": 99,
  "identifier": "text",
  "text": "DOTY9RYFPUFJP2618
}]

For more information, see Tire Identification Number Documentation.

VIN

The Vehicle Identification Number (VIN) scanner supports scanning 17-character VINs from vehicles. The Web SDK offers two scanning approaches:

  • vin_with_user_guidance - Advanced scanning with dynamic UI feedback for improved accuracy

  • vin - VIN scanning for faster, scanning without UI guidance

Preset Config (VIN with User Guidance)

// init the Anyline SDK with a preset config
anyline = window.anylinejs.init({
    preset: 'vin_with_user_guidance',
    license: demoLicense,
    element: root,
    anylinePath: '../anylinejs',
});

The vin_with_user_guidance preset provides dynamic UI feedback including:

  • Real-time lighting and distance guidance

  • Custom instruction text above the cutout

  • Enhanced accuracy through optimal camera positioning

Preset Config (VIN)

// init the Anyline SDK with a preset config
anyline = window.anylinejs.init({
    preset: 'vin',
    license: demoLicense,
    element: root,
    anylinePath: '../anylinejs',
});

The vin preset offers faster, simpler scanning without UI guidance.

Example Config

config: {
  vinConfig: {
    validateCheckDigit: true,
    charWhitelist: 'ABCDEFGHJKLMNPRSTUVWXYZ0123456789'
  }
}

Example Config with UI Feedback

import { init, uiFeedbackPresets } from '@anyline/anyline-js';

const anyline = init({
  preset: 'vin_with_user_guidance',
  license: demoLicense,
  element: root,
  viewConfig: {
    uiFeedback: {
      dynamic: uiFeedbackPresets.vin,  // Enables lighting & distance feedback
      static: {
        instructionText: "Scan the 17-character VIN"
      }
    }
  },
  anylinePath: '../anylinejs'
});

Config Parameters

  • validateCheckDigit

    Enables ISO 3779 check digit validation (position 9 of the VIN). When enabled, only VINs with a correct check digit will be accepted. This provides higher accuracy by validating the mathematical correctness of the VIN.

  • validationRegex

    We internally check if the scan result conforms to the VIN specifications, but if you would like to use your custom check you can set here a regex. An alphanumeric string that has to conform to ECMAScript regex.

  • charWhitelist

    We internally set the character whitelist according to VIN specifications, but if needed you can customize it here as an alphanumeric string.

License Plate

Preset Config

// init the Anyline SDK with a preset config
anyline = window.anylinejs.init({
    preset: 'lpt',
    license: demoLicense,
    element: root,
    anylinePath: '../anylinejs',
});

Example Config

config: {
    licensePlateConfig: {
      scanMode: 'auto',
      minConfidence: 50,
    }
}

Example Config for US License Plates

config: {
    licensePlateConfig: {
      scanMode: "unitedstates"
    },
}

Config Parameters

  • scanMode

    • auto

      Will automatically detect the European country

    • (individual country)
      • austria

      • unitedkingdom

      • ireland

      • poland

      • norway

      • norwayspecial

      • germany

      • czech

      • finland

      • france

      • croatia

      • slovakia

      • slovenia

      • albania

      • andorra

      • armenia

      • azerbaijan

      • belarus

      • belgium

      • bosniaandherzegovina

      • bulgaria

      • cyprus

      • denmark

      • estonia

      • georgia

      • greece

      • hungary

      • iceland

      • italy

      • latvia

      • liechtenstein

      • lithuania

      • luxembourg

      • malta

      • moldova

      • monaco

      • montenegro

      • netherlands

      • northmacedonia

      • portugal

      • romania

      • russia

      • serbia

      • spain

      • sweden

      • switzerland

      • turkey

      • ukraine

      • unitedstates

  • minConfidence

    Results with lower confidence than minConfidence get rejected automatically. This value is a number between 0 and 100. The default is 60.