mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-12 21:21:42 +08:00
Updated to 0.10.0
This commit is contained in:
+10458
-11106
File diff suppressed because one or more lines are too long
Vendored
+3
-3
File diff suppressed because one or more lines are too long
@@ -70,8 +70,7 @@ $(function() {
|
||||
var values = value.split('x');
|
||||
return {
|
||||
width: parseInt(values[0]),
|
||||
height: parseInt(values[1]),
|
||||
facing: "environment"
|
||||
height: parseInt(values[1])
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -90,7 +89,7 @@ $(function() {
|
||||
constraints: {
|
||||
width: 640,
|
||||
height: 480,
|
||||
facing: "environment" // or user
|
||||
facingMode: "environment" // or user
|
||||
}
|
||||
},
|
||||
locator: {
|
||||
|
||||
@@ -7,7 +7,7 @@ showInMenu: true
|
||||
quaggaJS
|
||||
========
|
||||
|
||||
- [Changelog](#changelog) (2016-02-15)
|
||||
- [Changelog](#changelog) (2016-03-31)
|
||||
- [Installing](#installing)
|
||||
- [Getting Started](#gettingstarted)
|
||||
- [API](#api)
|
||||
@@ -67,7 +67,8 @@ the __script__ tag.
|
||||
And then import it as dependency in your project:
|
||||
|
||||
```javascript
|
||||
var Quagga = require('quagga');
|
||||
import Quagga from 'quagga'; // ES6
|
||||
const Quagga = require('quagga').default; // Common JS (important: default)
|
||||
```
|
||||
|
||||
Currently, the full functionality is only available through the browser. When
|
||||
@@ -85,7 +86,8 @@ You can also install QuaggaJS through __bower__:
|
||||
### Script-Tag Anno 1998
|
||||
|
||||
You can simply include `dist/quagga.min.js` in your project and you are ready
|
||||
to go.
|
||||
to go. The script exposes the library on the global namespace under `Quagga`.
|
||||
|
||||
|
||||
## <a name="gettingstarted">Getting Started</a>
|
||||
|
||||
@@ -283,6 +285,7 @@ high-level properties:
|
||||
numOfWorkers: 4,
|
||||
locate: true,
|
||||
inputStream: {...},
|
||||
frequency: 10,
|
||||
decoder:{...},
|
||||
locator: {...},
|
||||
debug: false,
|
||||
@@ -328,7 +331,8 @@ The `inputStream` property defines the sources of images/videos within QuaggaJS.
|
||||
constraints: {
|
||||
width: 640,
|
||||
height: 480,
|
||||
facing: "environment"
|
||||
facingMode: "environment",
|
||||
deviceId: "7832475934759384534"
|
||||
},
|
||||
area: { // defines rectangle of the detection/localization area
|
||||
top: "0%", // top offset
|
||||
@@ -345,8 +349,11 @@ First, the `type` property can be set to three different values:
|
||||
depending on the use-case. Most probably, the default value is sufficient.
|
||||
|
||||
Second, the `constraint` key defines the physical dimensions of the input image
|
||||
and additional properties, such as `facing` which sets the source of the user's
|
||||
camera in case of multiple attached devices.
|
||||
and additional properties, such as `facingMode` which sets the source of the
|
||||
user's camera in case of multiple attached devices. Additionally, if required,
|
||||
the `deviceId` can be set if the selection of the camera is given to the user.
|
||||
This can be easily achieved via
|
||||
[MediaDevices.enumerateDevices()][enumerateDevices]
|
||||
|
||||
Thirdly, the `area` prop restricts the decoding area of the image. The values
|
||||
are given in percentage, similar to the CSS style property when using
|
||||
@@ -359,6 +366,13 @@ color-channel is read instead of calculating the gray-scale values of the
|
||||
source's RGB. This is useful in combination with the `ResultCollector` where
|
||||
the gray-scale representations of the wrongly identified images are saved.
|
||||
|
||||
### frequency
|
||||
|
||||
This top-level property controls the scan-frequency of the video-stream. It's
|
||||
optional and defines the maximum number of scans per second. This renders
|
||||
useful for cases where the scan-session is long-running and resources such as
|
||||
CPU power are of concern.
|
||||
|
||||
### decoder
|
||||
|
||||
QuaggaJS usually runs in a two-stage manner (`locate` is set to `true`) where,
|
||||
@@ -556,15 +570,20 @@ on the ``singleChannel`` flag in the configuration when using ``decodeSingle``.
|
||||
|
||||
## <a name="changelog">Changelog</a>
|
||||
|
||||
### 2016-03-31
|
||||
Take a look at the release-notes (
|
||||
[0.10.0](https://github.com/serratus/quaggaJS/releases/tag/v0.10.0))
|
||||
|
||||
### 2016-02-18
|
||||
|
||||
- Internal Changes
|
||||
- Restructuring into meaningful folders
|
||||
- Removing debug-code in production build
|
||||
|
||||
|
||||
### 2016-02-15
|
||||
Take a look at the release-notes ([0.9.0]
|
||||
(https://github.com/serratus/quaggaJS/releases/tag/v0.9.0))
|
||||
Take a look at the release-notes (
|
||||
[0.9.0](https://github.com/serratus/quaggaJS/releases/tag/v0.9.0))
|
||||
|
||||
### 2015-11-22
|
||||
|
||||
@@ -719,3 +738,4 @@ introduced to the API.
|
||||
[oberhofer_co_how]: http://www.oberhofer.co/how-barcode-localization-works-in-quaggajs/
|
||||
[github_examples]: https://serratus.github.io/quaggaJS/examples
|
||||
[i2of5_wiki]: https://en.wikipedia.org/wiki/Interleaved_2_of_5
|
||||
[enumerateDevices]: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices
|
||||
|
||||
Reference in New Issue
Block a user