dsp-collection 0.2.5 → 0.2.6
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/README.md +5 -2
- package/filter/SpecFilt.d.ts +10 -10
- package/filter/SpecFilt.js +98 -99
- package/math/Complex.d.ts +42 -42
- package/math/Complex.js +130 -130
- package/math/ComplexArray.d.ts +36 -36
- package/math/ComplexArray.js +170 -171
- package/math/MathUtils.d.ts +9 -7
- package/math/MathUtils.js +116 -82
- package/math/MutableComplex.d.ts +22 -22
- package/math/MutableComplex.js +64 -65
- package/math/NumApprox.d.ts +3 -3
- package/math/NumApprox.js +67 -68
- package/math/PolyReal.d.ts +13 -13
- package/math/PolyReal.js +226 -227
- package/package.json +11 -3
- package/signal/AdaptiveStft.d.ts +12 -12
- package/signal/AdaptiveStft.js +57 -58
- package/signal/Autocorrelation.d.ts +5 -5
- package/signal/Autocorrelation.js +53 -54
- package/signal/Dft.d.ts +9 -9
- package/signal/Dft.js +87 -88
- package/signal/EnvelopeDetection.d.ts +1 -1
- package/signal/EnvelopeDetection.js +9 -10
- package/signal/Fft.d.ts +9 -9
- package/signal/Fft.js +275 -276
- package/signal/Goertzel.d.ts +5 -5
- package/signal/Goertzel.js +48 -49
- package/signal/InstFreq.d.ts +8 -8
- package/signal/InstFreq.js +26 -27
- package/signal/PitchDetectionHarm.d.ts +26 -26
- package/signal/PitchDetectionHarm.js +68 -69
- package/signal/Resampling.d.ts +7 -7
- package/signal/Resampling.js +218 -219
- package/signal/WindowFunctions.d.ts +40 -40
- package/signal/WindowFunctions.js +194 -195
- package/utils/ArrayUtils.d.ts +9 -9
- package/utils/ArrayUtils.js +68 -69
- package/utils/DspUtils.d.ts +4 -2
- package/utils/DspUtils.js +12 -7
- package/utils/MiscUtils.d.ts +6 -6
- package/utils/MiscUtils.js +20 -21
- package/filter/SpecFilt.js.map +0 -1
- package/math/Complex.js.map +0 -1
- package/math/ComplexArray.js.map +0 -1
- package/math/MathUtils.js.map +0 -1
- package/math/MutableComplex.js.map +0 -1
- package/math/NumApprox.js.map +0 -1
- package/math/PolyReal.js.map +0 -1
- package/signal/AdaptiveStft.js.map +0 -1
- package/signal/Autocorrelation.js.map +0 -1
- package/signal/Dft.js.map +0 -1
- package/signal/EnvelopeDetection.js.map +0 -1
- package/signal/Fft.js.map +0 -1
- package/signal/Goertzel.js.map +0 -1
- package/signal/InstFreq.js.map +0 -1
- package/signal/PitchDetectionHarm.js.map +0 -1
- package/signal/Resampling.js.map +0 -1
- package/signal/WindowFunctions.js.map +0 -1
- package/utils/ArrayUtils.js.map +0 -1
- package/utils/DspUtils.js.map +0 -1
- package/utils/MiscUtils.js.map +0 -1
package/signal/InstFreq.js
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import * as AdaptiveStft from "./AdaptiveStft.js";
|
|
2
|
-
export function instFreqSingle_relWindow(samples, position, roughtMeasuringFrequency, shiftFactor, relWindowWidth, windowFunction) {
|
|
3
|
-
const shiftDistance = Math.max(1, shiftFactor / roughtMeasuringFrequency);
|
|
4
|
-
const pos1 = position - shiftDistance / 2;
|
|
5
|
-
const pos2 = position + shiftDistance / 2;
|
|
6
|
-
const r1 = AdaptiveStft.getSingle_relWindow(samples, roughtMeasuringFrequency, pos1, relWindowWidth, windowFunction);
|
|
7
|
-
const r2 = AdaptiveStft.getSingle_relWindow(samples, roughtMeasuringFrequency, pos2, relWindowWidth, windowFunction);
|
|
8
|
-
if (!r1 || !r2) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
if (r1.frequency != r2.frequency || r1.windowStartPosition >= r2.windowStartPosition || r1.windowWidth != r2.windowWidth) {
|
|
12
|
-
throw new Error();
|
|
13
|
-
}
|
|
14
|
-
const measuringFrequency = r1.frequency;
|
|
15
|
-
const realShiftDistance = r2.windowStartPosition - r1.windowStartPosition;
|
|
16
|
-
const phase1 = r1.component.arg();
|
|
17
|
-
const phase2 = r2.component.arg();
|
|
18
|
-
const phaseDelta = (phase2 + 2 * Math.PI - phase1) % (2 * Math.PI);
|
|
19
|
-
const instFrequency = phaseDelta / (2 * Math.PI) / realShiftDistance;
|
|
20
|
-
const amplitude = (r1.component.abs() + r2.component.abs()) / 2;
|
|
21
|
-
return { instFrequency, measuringFrequency, amplitude };
|
|
22
|
-
}
|
|
23
|
-
export function instFreqSingle_maxWindow(samples, position, roughtMeasuringFrequency, shiftFactor, maxWindowWidth, windowFunction) {
|
|
24
|
-
const relWindowWidth = Math.floor(maxWindowWidth * roughtMeasuringFrequency);
|
|
25
|
-
return instFreqSingle_relWindow(samples, position, roughtMeasuringFrequency, shiftFactor, relWindowWidth, windowFunction);
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=InstFreq.js.map
|
|
1
|
+
import * as AdaptiveStft from "./AdaptiveStft.js";
|
|
2
|
+
export function instFreqSingle_relWindow(samples, position, roughtMeasuringFrequency, shiftFactor, relWindowWidth, windowFunction) {
|
|
3
|
+
const shiftDistance = Math.max(1, shiftFactor / roughtMeasuringFrequency);
|
|
4
|
+
const pos1 = position - shiftDistance / 2;
|
|
5
|
+
const pos2 = position + shiftDistance / 2;
|
|
6
|
+
const r1 = AdaptiveStft.getSingle_relWindow(samples, roughtMeasuringFrequency, pos1, relWindowWidth, windowFunction);
|
|
7
|
+
const r2 = AdaptiveStft.getSingle_relWindow(samples, roughtMeasuringFrequency, pos2, relWindowWidth, windowFunction);
|
|
8
|
+
if (!r1 || !r2) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (r1.frequency != r2.frequency || r1.windowStartPosition >= r2.windowStartPosition || r1.windowWidth != r2.windowWidth) {
|
|
12
|
+
throw new Error();
|
|
13
|
+
}
|
|
14
|
+
const measuringFrequency = r1.frequency;
|
|
15
|
+
const realShiftDistance = r2.windowStartPosition - r1.windowStartPosition;
|
|
16
|
+
const phase1 = r1.component.arg();
|
|
17
|
+
const phase2 = r2.component.arg();
|
|
18
|
+
const phaseDelta = (phase2 + 2 * Math.PI - phase1) % (2 * Math.PI);
|
|
19
|
+
const instFrequency = phaseDelta / (2 * Math.PI) / realShiftDistance;
|
|
20
|
+
const amplitude = (r1.component.abs() + r2.component.abs()) / 2;
|
|
21
|
+
return { instFrequency, measuringFrequency, amplitude };
|
|
22
|
+
}
|
|
23
|
+
export function instFreqSingle_maxWindow(samples, position, roughtMeasuringFrequency, shiftFactor, maxWindowWidth, windowFunction) {
|
|
24
|
+
const relWindowWidth = Math.floor(maxWindowWidth * roughtMeasuringFrequency);
|
|
25
|
+
return instFreqSingle_relWindow(samples, position, roughtMeasuringFrequency, shiftFactor, relWindowWidth, windowFunction);
|
|
26
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import * as WindowFunctions from "./WindowFunctions.
|
|
2
|
-
export interface HarmonicAmplitudeEvaluationParms {
|
|
3
|
-
amplitudeCompressionExponent: number;
|
|
4
|
-
harmonicsDeclineRate: number;
|
|
5
|
-
harmonicsDeclineExponent: number;
|
|
6
|
-
}
|
|
7
|
-
export interface HarmonicSumParms extends HarmonicAmplitudeEvaluationParms {
|
|
8
|
-
fCutoff: number;
|
|
9
|
-
relWindowWidth: number;
|
|
10
|
-
windowFunction: WindowFunctions.WindowFunction | undefined;
|
|
11
|
-
}
|
|
12
|
-
export interface HarmonicInstSumParms extends HarmonicSumParms {
|
|
13
|
-
shiftFactor: number;
|
|
14
|
-
peakWidthFactor: number;
|
|
15
|
-
}
|
|
16
|
-
export declare function getDefaultHarmonicSumParms(): HarmonicSumParms;
|
|
17
|
-
export declare function getDefaultHarmonicInstSumParms(): HarmonicInstSumParms;
|
|
18
|
-
export declare function harmonicSum(samples: Float64Array | Float32Array, sampleRate: number, position: number, f0: number, parms?: HarmonicSumParms): number;
|
|
19
|
-
export declare function harmonicInstSum(samples: Float64Array | Float32Array, sampleRate: number, position: number, f0: number, parms?: HarmonicInstSumParms): number;
|
|
20
|
-
export declare function evaluateHarmonicAmplitude(amplitude: number, harmonic: number, parms: HarmonicAmplitudeEvaluationParms): number;
|
|
21
|
-
export declare function findPitchSalienceFunctionArgMax(salienceFunction: (f0: number) => number, f0Min: number, f0Max: number, { scanFactor, relTolerance, absTolerance }?: {
|
|
22
|
-
scanFactor?: number | undefined;
|
|
23
|
-
relTolerance?: number | undefined;
|
|
24
|
-
absTolerance?: number | undefined;
|
|
25
|
-
}): number;
|
|
26
|
-
export declare function estimatePitch_harmonicSum(samples: Float64Array | Float32Array, sampleRate: number, position: number, f0Min?: number, f0Max?: number, parms?: HarmonicSumParms): number;
|
|
1
|
+
import * as WindowFunctions from "./WindowFunctions.ts";
|
|
2
|
+
export interface HarmonicAmplitudeEvaluationParms {
|
|
3
|
+
amplitudeCompressionExponent: number;
|
|
4
|
+
harmonicsDeclineRate: number;
|
|
5
|
+
harmonicsDeclineExponent: number;
|
|
6
|
+
}
|
|
7
|
+
export interface HarmonicSumParms extends HarmonicAmplitudeEvaluationParms {
|
|
8
|
+
fCutoff: number;
|
|
9
|
+
relWindowWidth: number;
|
|
10
|
+
windowFunction: WindowFunctions.WindowFunction | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface HarmonicInstSumParms extends HarmonicSumParms {
|
|
13
|
+
shiftFactor: number;
|
|
14
|
+
peakWidthFactor: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function getDefaultHarmonicSumParms(): HarmonicSumParms;
|
|
17
|
+
export declare function getDefaultHarmonicInstSumParms(): HarmonicInstSumParms;
|
|
18
|
+
export declare function harmonicSum(samples: Float64Array | Float32Array, sampleRate: number, position: number, f0: number, parms?: HarmonicSumParms): number;
|
|
19
|
+
export declare function harmonicInstSum(samples: Float64Array | Float32Array, sampleRate: number, position: number, f0: number, parms?: HarmonicInstSumParms): number;
|
|
20
|
+
export declare function evaluateHarmonicAmplitude(amplitude: number, harmonic: number, parms: HarmonicAmplitudeEvaluationParms): number;
|
|
21
|
+
export declare function findPitchSalienceFunctionArgMax(salienceFunction: (f0: number) => number, f0Min: number, f0Max: number, { scanFactor, relTolerance, absTolerance }?: {
|
|
22
|
+
scanFactor?: number | undefined;
|
|
23
|
+
relTolerance?: number | undefined;
|
|
24
|
+
absTolerance?: number | undefined;
|
|
25
|
+
}): number;
|
|
26
|
+
export declare function estimatePitch_harmonicSum(samples: Float64Array | Float32Array, sampleRate: number, position: number, f0Min?: number, f0Max?: number, parms?: HarmonicSumParms): number;
|
|
@@ -1,69 +1,68 @@
|
|
|
1
|
-
import * as MathUtils from "../math/MathUtils.js";
|
|
2
|
-
import * as NumApprox from "../math/NumApprox.js";
|
|
3
|
-
import * as WindowFunctions from "./WindowFunctions.js";
|
|
4
|
-
import * as AdaptiveStft from "./AdaptiveStft.js";
|
|
5
|
-
import * as InstFreq from "./InstFreq.js";
|
|
6
|
-
export function getDefaultHarmonicSumParms() {
|
|
7
|
-
return {
|
|
8
|
-
amplitudeCompressionExponent: 0.5,
|
|
9
|
-
harmonicsDeclineRate: 0.2,
|
|
10
|
-
harmonicsDeclineExponent: 0,
|
|
11
|
-
fCutoff: 5000,
|
|
12
|
-
relWindowWidth: 16,
|
|
13
|
-
windowFunction: WindowFunctions.getFunctionbyId("hann", { tableCacheCostLimit: 1 })
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export function getDefaultHarmonicInstSumParms() {
|
|
17
|
-
return Object.assign(Object.assign({}, getDefaultHarmonicSumParms()), { shiftFactor: 0.25, peakWidthFactor: 0.2 });
|
|
18
|
-
}
|
|
19
|
-
export function harmonicSum(samples, sampleRate, position, f0, parms = getDefaultHarmonicSumParms()) {
|
|
20
|
-
const n = Math.floor(parms.fCutoff / f0);
|
|
21
|
-
const a = AdaptiveStft.getHarmonicAmplitudes(samples, position * sampleRate, f0 / sampleRate, n, parms.relWindowWidth, parms.windowFunction);
|
|
22
|
-
if (!a) {
|
|
23
|
-
return NaN;
|
|
24
|
-
}
|
|
25
|
-
return evaluateHarmonicAmplitudes(a, parms);
|
|
26
|
-
}
|
|
27
|
-
export function harmonicInstSum(samples, sampleRate, position, f0, parms = getDefaultHarmonicInstSumParms()) {
|
|
28
|
-
const peakWidth = f0 * parms.peakWidthFactor / sampleRate;
|
|
29
|
-
const n = Math.floor(parms.fCutoff / f0);
|
|
30
|
-
let sum = 0;
|
|
31
|
-
let count = 0;
|
|
32
|
-
for (let harmonic = 1; harmonic <= n; harmonic++) {
|
|
33
|
-
const f = harmonic * f0 / sampleRate;
|
|
34
|
-
const r = InstFreq.instFreqSingle_relWindow(samples, position * sampleRate, f, parms.shiftFactor, parms.relWindowWidth * harmonic, parms.windowFunction);
|
|
35
|
-
if (r) {
|
|
36
|
-
const absDelta = Math.abs(r.measuringFrequency - r.instFrequency);
|
|
37
|
-
const a = r.amplitude * Math.max(0, 1 - (2 * absDelta) / peakWidth);
|
|
38
|
-
sum += evaluateHarmonicAmplitude(a, harmonic, parms);
|
|
39
|
-
count++;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return (count > 0) ? sum : NaN;
|
|
43
|
-
}
|
|
44
|
-
export function evaluateHarmonicAmplitude(amplitude, harmonic, parms) {
|
|
45
|
-
const attenuation = MathUtils.hyperbolicDecline(harmonic - 1, parms.harmonicsDeclineRate, parms.harmonicsDeclineExponent);
|
|
46
|
-
return amplitude ** parms.amplitudeCompressionExponent * attenuation;
|
|
47
|
-
}
|
|
48
|
-
function evaluateHarmonicAmplitudes(amplitudes, parms) {
|
|
49
|
-
let sum = 0;
|
|
50
|
-
for (let harmonic = 1; harmonic <= amplitudes.length; harmonic++) {
|
|
51
|
-
sum += evaluateHarmonicAmplitude(amplitudes[harmonic - 1], harmonic, parms);
|
|
52
|
-
}
|
|
53
|
-
return sum;
|
|
54
|
-
}
|
|
55
|
-
export function findPitchSalienceFunctionArgMax(salienceFunction, f0Min, f0Max, { scanFactor = 1.005, relTolerance = 1E-3, absTolerance = 0.05 } = {}) {
|
|
56
|
-
const f1 = NumApprox.argMax_scanGeom(salienceFunction, f0Min, f0Max, scanFactor);
|
|
57
|
-
if (!isFinite(f1)) {
|
|
58
|
-
return NaN;
|
|
59
|
-
}
|
|
60
|
-
const f1Lo = Math.max(f1 / scanFactor, f0Min);
|
|
61
|
-
const f1Hi = Math.min(f1 * scanFactor, f0Max);
|
|
62
|
-
const tolerance = Math.min(f1 * relTolerance, absTolerance);
|
|
63
|
-
return NumApprox.argMax_goldenSectionSearch(salienceFunction, f1Lo, f1Hi, tolerance);
|
|
64
|
-
}
|
|
65
|
-
export function estimatePitch_harmonicSum(samples, sampleRate, position, f0Min = 75, f0Max = 900, parms = getDefaultHarmonicSumParms()) {
|
|
66
|
-
const salienceFunction = (f0) => harmonicSum(samples, sampleRate, position, f0, parms);
|
|
67
|
-
return findPitchSalienceFunctionArgMax(salienceFunction, f0Min, f0Max);
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=PitchDetectionHarm.js.map
|
|
1
|
+
import * as MathUtils from "../math/MathUtils.js";
|
|
2
|
+
import * as NumApprox from "../math/NumApprox.js";
|
|
3
|
+
import * as WindowFunctions from "./WindowFunctions.js";
|
|
4
|
+
import * as AdaptiveStft from "./AdaptiveStft.js";
|
|
5
|
+
import * as InstFreq from "./InstFreq.js";
|
|
6
|
+
export function getDefaultHarmonicSumParms() {
|
|
7
|
+
return {
|
|
8
|
+
amplitudeCompressionExponent: 0.5,
|
|
9
|
+
harmonicsDeclineRate: 0.2,
|
|
10
|
+
harmonicsDeclineExponent: 0,
|
|
11
|
+
fCutoff: 5000,
|
|
12
|
+
relWindowWidth: 16,
|
|
13
|
+
windowFunction: WindowFunctions.getFunctionbyId("hann", { tableCacheCostLimit: 1 })
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export function getDefaultHarmonicInstSumParms() {
|
|
17
|
+
return Object.assign(Object.assign({}, getDefaultHarmonicSumParms()), { shiftFactor: 0.25, peakWidthFactor: 0.2 });
|
|
18
|
+
}
|
|
19
|
+
export function harmonicSum(samples, sampleRate, position, f0, parms = getDefaultHarmonicSumParms()) {
|
|
20
|
+
const n = Math.floor(parms.fCutoff / f0);
|
|
21
|
+
const a = AdaptiveStft.getHarmonicAmplitudes(samples, position * sampleRate, f0 / sampleRate, n, parms.relWindowWidth, parms.windowFunction);
|
|
22
|
+
if (!a) {
|
|
23
|
+
return NaN;
|
|
24
|
+
}
|
|
25
|
+
return evaluateHarmonicAmplitudes(a, parms);
|
|
26
|
+
}
|
|
27
|
+
export function harmonicInstSum(samples, sampleRate, position, f0, parms = getDefaultHarmonicInstSumParms()) {
|
|
28
|
+
const peakWidth = f0 * parms.peakWidthFactor / sampleRate;
|
|
29
|
+
const n = Math.floor(parms.fCutoff / f0);
|
|
30
|
+
let sum = 0;
|
|
31
|
+
let count = 0;
|
|
32
|
+
for (let harmonic = 1; harmonic <= n; harmonic++) {
|
|
33
|
+
const f = harmonic * f0 / sampleRate;
|
|
34
|
+
const r = InstFreq.instFreqSingle_relWindow(samples, position * sampleRate, f, parms.shiftFactor, parms.relWindowWidth * harmonic, parms.windowFunction);
|
|
35
|
+
if (r) {
|
|
36
|
+
const absDelta = Math.abs(r.measuringFrequency - r.instFrequency);
|
|
37
|
+
const a = r.amplitude * Math.max(0, 1 - (2 * absDelta) / peakWidth);
|
|
38
|
+
sum += evaluateHarmonicAmplitude(a, harmonic, parms);
|
|
39
|
+
count++;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return (count > 0) ? sum : NaN;
|
|
43
|
+
}
|
|
44
|
+
export function evaluateHarmonicAmplitude(amplitude, harmonic, parms) {
|
|
45
|
+
const attenuation = MathUtils.hyperbolicDecline(harmonic - 1, parms.harmonicsDeclineRate, parms.harmonicsDeclineExponent);
|
|
46
|
+
return amplitude ** parms.amplitudeCompressionExponent * attenuation;
|
|
47
|
+
}
|
|
48
|
+
function evaluateHarmonicAmplitudes(amplitudes, parms) {
|
|
49
|
+
let sum = 0;
|
|
50
|
+
for (let harmonic = 1; harmonic <= amplitudes.length; harmonic++) {
|
|
51
|
+
sum += evaluateHarmonicAmplitude(amplitudes[harmonic - 1], harmonic, parms);
|
|
52
|
+
}
|
|
53
|
+
return sum;
|
|
54
|
+
}
|
|
55
|
+
export function findPitchSalienceFunctionArgMax(salienceFunction, f0Min, f0Max, { scanFactor = 1.005, relTolerance = 1E-3, absTolerance = 0.05 } = {}) {
|
|
56
|
+
const f1 = NumApprox.argMax_scanGeom(salienceFunction, f0Min, f0Max, scanFactor);
|
|
57
|
+
if (!isFinite(f1)) {
|
|
58
|
+
return NaN;
|
|
59
|
+
}
|
|
60
|
+
const f1Lo = Math.max(f1 / scanFactor, f0Min);
|
|
61
|
+
const f1Hi = Math.min(f1 * scanFactor, f0Max);
|
|
62
|
+
const tolerance = Math.min(f1 * relTolerance, absTolerance);
|
|
63
|
+
return NumApprox.argMax_goldenSectionSearch(salienceFunction, f1Lo, f1Hi, tolerance);
|
|
64
|
+
}
|
|
65
|
+
export function estimatePitch_harmonicSum(samples, sampleRate, position, f0Min = 75, f0Max = 900, parms = getDefaultHarmonicSumParms()) {
|
|
66
|
+
const salienceFunction = (f0) => harmonicSum(samples, sampleRate, position, f0, parms);
|
|
67
|
+
return findPitchSalienceFunctionArgMax(salienceFunction, f0Min, f0Max);
|
|
68
|
+
}
|
package/signal/Resampling.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MutableArrayLike } from "../utils/MiscUtils.
|
|
2
|
-
export declare function resampleNearestNeighbor(ia: ArrayLike<number>, oa: MutableArrayLike<number>, preserveScale?: boolean, extraValues?: number): void;
|
|
3
|
-
export declare function resampleNearestNeighborRef(ia: ArrayLike<number>, oa: MutableArrayLike<number>, preserveScale?: boolean, extraValues?: number): void;
|
|
4
|
-
export declare function resampleLinear(ia: ArrayLike<number>, oa: MutableArrayLike<number>, preserveScale?: boolean, extraValues?: number): void;
|
|
5
|
-
export declare function resampleLinearRef(ia: ArrayLike<number>, oa: MutableArrayLike<number>, preserveScale?: boolean, extraValues?: number): void;
|
|
6
|
-
export declare function resampleAverage(ia: ArrayLike<number>, oa: MutableArrayLike<number>): void;
|
|
7
|
-
export declare function resampleAverageRef(ia: ArrayLike<number>, oa: MutableArrayLike<number>): void;
|
|
1
|
+
import { MutableArrayLike } from "../utils/MiscUtils.ts";
|
|
2
|
+
export declare function resampleNearestNeighbor(ia: ArrayLike<number>, oa: MutableArrayLike<number>, preserveScale?: boolean, extraValues?: number): void;
|
|
3
|
+
export declare function resampleNearestNeighborRef(ia: ArrayLike<number>, oa: MutableArrayLike<number>, preserveScale?: boolean, extraValues?: number): void;
|
|
4
|
+
export declare function resampleLinear(ia: ArrayLike<number>, oa: MutableArrayLike<number>, preserveScale?: boolean, extraValues?: number): void;
|
|
5
|
+
export declare function resampleLinearRef(ia: ArrayLike<number>, oa: MutableArrayLike<number>, preserveScale?: boolean, extraValues?: number): void;
|
|
6
|
+
export declare function resampleAverage(ia: ArrayLike<number>, oa: MutableArrayLike<number>): void;
|
|
7
|
+
export declare function resampleAverageRef(ia: ArrayLike<number>, oa: MutableArrayLike<number>): void;
|