image-js 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts
CHANGED
|
@@ -196,7 +196,11 @@ export declare class Image {
|
|
|
196
196
|
options?: { border?: Array<number> },
|
|
197
197
|
): Array<number>;
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
cannyEdge(options?: {
|
|
200
|
+
gaussianBlur?: number;
|
|
201
|
+
lowThreshold?: number;
|
|
202
|
+
highThreshold?: number;
|
|
203
|
+
}): Image;
|
|
200
204
|
convolution(kernel: Kernel, options?: ConvolutionOptions): Image;
|
|
201
205
|
extract(
|
|
202
206
|
mask: Image,
|
|
@@ -497,6 +501,9 @@ export declare class Roi {
|
|
|
497
501
|
height: number;
|
|
498
502
|
width: number;
|
|
499
503
|
surface: number;
|
|
504
|
+
filledSurface: number;
|
|
505
|
+
hullSurface: number;
|
|
506
|
+
hullPerimeter: number;
|
|
500
507
|
mbrWidth: number;
|
|
501
508
|
mbrHeight: number;
|
|
502
509
|
mbrSurface: number;
|
|
@@ -10,6 +10,9 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
10
10
|
* @memberof Image
|
|
11
11
|
* @instance
|
|
12
12
|
* @param {object} [options]
|
|
13
|
+
* @param {number} [options.gaussianBlur=1.1] - Sigma parameter for the gaussian filter step
|
|
14
|
+
* @param {number} [options.lowThreshold=10] - Low threshold for the hysteresis procedure
|
|
15
|
+
* @param {number} [options.highThreshold=30] - High threshold for the hysteresis procedure
|
|
13
16
|
* @return {Image}
|
|
14
17
|
*/
|
|
15
18
|
function cannyEdge(options) {
|
package/lib/image/roi/Roi.js
CHANGED
|
@@ -453,6 +453,9 @@ class Roi {
|
|
|
453
453
|
}
|
|
454
454
|
return this.computed.mbr;
|
|
455
455
|
}
|
|
456
|
+
get filledSurface() {
|
|
457
|
+
return this.surface + this.holesInfo.surface;
|
|
458
|
+
}
|
|
456
459
|
get fillRatio() {
|
|
457
460
|
return this.surface / (this.surface + this.holesInfo.surface);
|
|
458
461
|
}
|
|
@@ -634,7 +637,10 @@ class Roi {
|
|
|
634
637
|
meanY: this.meanY,
|
|
635
638
|
height: this.height,
|
|
636
639
|
width: this.width,
|
|
640
|
+
filledSurface: this.filledSurface,
|
|
637
641
|
surface: this.surface,
|
|
642
|
+
hullSurface: this.convexHull.surface,
|
|
643
|
+
hullPerimeter: this.convexHull.perimeter,
|
|
638
644
|
mbrWidth: this.mbr.width,
|
|
639
645
|
mbrHeight: this.mbr.height,
|
|
640
646
|
mbrSurface: this.mbr.surface,
|
package/package.json
CHANGED
|
@@ -4,6 +4,9 @@ import cannyEdgeDetector from 'canny-edge-detector';
|
|
|
4
4
|
* @memberof Image
|
|
5
5
|
* @instance
|
|
6
6
|
* @param {object} [options]
|
|
7
|
+
* @param {number} [options.gaussianBlur=1.1] - Sigma parameter for the gaussian filter step
|
|
8
|
+
* @param {number} [options.lowThreshold=10] - Low threshold for the hysteresis procedure
|
|
9
|
+
* @param {number} [options.highThreshold=30] - High threshold for the hysteresis procedure
|
|
7
10
|
* @return {Image}
|
|
8
11
|
*/
|
|
9
12
|
export default function cannyEdge(options) {
|
package/src/image/roi/Roi.js
CHANGED
|
@@ -524,6 +524,10 @@ export default class Roi {
|
|
|
524
524
|
return this.computed.mbr;
|
|
525
525
|
}
|
|
526
526
|
|
|
527
|
+
get filledSurface() {
|
|
528
|
+
return this.surface + this.holesInfo.surface;
|
|
529
|
+
}
|
|
530
|
+
|
|
527
531
|
get fillRatio() {
|
|
528
532
|
return this.surface / (this.surface + this.holesInfo.surface);
|
|
529
533
|
}
|
|
@@ -740,7 +744,10 @@ export default class Roi {
|
|
|
740
744
|
meanY: this.meanY,
|
|
741
745
|
height: this.height,
|
|
742
746
|
width: this.width,
|
|
747
|
+
filledSurface: this.filledSurface,
|
|
743
748
|
surface: this.surface,
|
|
749
|
+
hullSurface: this.convexHull.surface,
|
|
750
|
+
hullPerimeter: this.convexHull.perimeter,
|
|
744
751
|
mbrWidth: this.mbr.width,
|
|
745
752
|
mbrHeight: this.mbr.height,
|
|
746
753
|
mbrSurface: this.mbr.surface,
|