image-js 1.0.0-alpha.3 → 1.0.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/LICENSE +2 -2
- package/README.md +37 -0
- package/dist/image-js.esm.js +33179 -0
- package/dist/image-js.esm.js.map +1 -0
- package/dist/image-js.esm.min.js +3 -0
- package/dist/image-js.esm.min.js.map +1 -0
- package/dist/image-js.umd.js +33324 -0
- package/dist/image-js.umd.js.map +1 -0
- package/dist/image-js.umd.min.js +3 -0
- package/dist/image-js.umd.min.js.map +1 -0
- package/dist-types/image-js.d.ts +4260 -0
- package/lib/Image.d.ts +536 -179
- package/lib/Image.d.ts.map +1 -1
- package/lib/Image.js +867 -334
- package/lib/Image.js.map +1 -1
- package/lib/Mask.d.ts +378 -0
- package/lib/Mask.d.ts.map +1 -0
- package/lib/Mask.js +557 -0
- package/lib/Mask.js.map +1 -0
- package/lib/Stack.d.ts +127 -0
- package/lib/Stack.d.ts.map +1 -0
- package/lib/Stack.js +165 -0
- package/lib/Stack.js.map +1 -0
- package/lib/align/affineTransfrom/affineFitFunction.d.ts +10 -0
- package/lib/align/affineTransfrom/affineFitFunction.d.ts.map +1 -0
- package/lib/align/affineTransfrom/affineFitFunction.js +21 -0
- package/lib/align/affineTransfrom/affineFitFunction.js.map +1 -0
- package/lib/align/affineTransfrom/applyAffineTransform.d.ts +10 -0
- package/lib/align/affineTransfrom/applyAffineTransform.d.ts.map +1 -0
- package/lib/align/affineTransfrom/applyAffineTransform.js +19 -0
- package/lib/align/affineTransfrom/applyAffineTransform.js.map +1 -0
- package/lib/align/affineTransfrom/createAffineTransformModel.d.ts +10 -0
- package/lib/align/affineTransfrom/createAffineTransformModel.d.ts.map +1 -0
- package/lib/align/affineTransfrom/createAffineTransformModel.js +23 -0
- package/lib/align/affineTransfrom/createAffineTransformModel.js.map +1 -0
- package/lib/align/affineTransfrom/drawResult.d.ts +12 -0
- package/lib/align/affineTransfrom/drawResult.d.ts.map +1 -0
- package/lib/align/affineTransfrom/drawResult.js +38 -0
- package/lib/align/affineTransfrom/drawResult.js.map +1 -0
- package/lib/align/affineTransfrom/getAffineTransform.d.ts +97 -0
- package/lib/align/affineTransfrom/getAffineTransform.d.ts.map +1 -0
- package/lib/align/affineTransfrom/getAffineTransform.js +145 -0
- package/lib/align/affineTransfrom/getAffineTransform.js.map +1 -0
- package/lib/align/affineTransfrom/getEuclideanDistance.d.ts +9 -0
- package/lib/align/affineTransfrom/getEuclideanDistance.d.ts.map +1 -0
- package/lib/align/affineTransfrom/getEuclideanDistance.js +10 -0
- package/lib/align/affineTransfrom/getEuclideanDistance.js.map +1 -0
- package/lib/align/affineTransfrom/getMatrixFromPoints.d.ts +10 -0
- package/lib/align/affineTransfrom/getMatrixFromPoints.d.ts.map +1 -0
- package/lib/align/affineTransfrom/getMatrixFromPoints.js +17 -0
- package/lib/align/affineTransfrom/getMatrixFromPoints.js.map +1 -0
- package/lib/align/affineTransfrom/getPointsFromMatrix.d.ts +9 -0
- package/lib/align/affineTransfrom/getPointsFromMatrix.d.ts.map +1 -0
- package/lib/align/affineTransfrom/getPointsFromMatrix.js +13 -0
- package/lib/align/affineTransfrom/getPointsFromMatrix.js.map +1 -0
- package/lib/align/affineTransfrom/utils/getSourceWithoutMargins.d.ts +11 -0
- package/lib/align/affineTransfrom/utils/getSourceWithoutMargins.d.ts.map +1 -0
- package/lib/align/affineTransfrom/utils/getSourceWithoutMargins.js +17 -0
- package/lib/align/affineTransfrom/utils/getSourceWithoutMargins.js.map +1 -0
- package/lib/align/alignMinDifference.d.ts +25 -0
- package/lib/align/alignMinDifference.d.ts.map +1 -0
- package/lib/align/alignMinDifference.js +79 -0
- package/lib/align/alignMinDifference.js.map +1 -0
- package/lib/align/index.d.ts +3 -0
- package/lib/align/index.d.ts.map +1 -0
- package/lib/align/index.js +3 -0
- package/lib/align/index.js.map +1 -0
- package/lib/compare/add.d.ts +10 -0
- package/lib/compare/add.d.ts.map +1 -0
- package/lib/compare/add.js +32 -0
- package/lib/compare/add.js.map +1 -0
- package/lib/compare/computePsnr.d.ts +11 -0
- package/lib/compare/computePsnr.d.ts.map +1 -0
- package/lib/compare/computePsnr.js +14 -0
- package/lib/compare/computePsnr.js.map +1 -0
- package/lib/compare/computeRmse.d.ts +18 -0
- package/lib/compare/computeRmse.d.ts.map +1 -0
- package/lib/compare/computeRmse.js +30 -0
- package/lib/compare/computeRmse.js.map +1 -0
- package/lib/compare/divide.d.ts +22 -0
- package/lib/compare/divide.d.ts.map +1 -0
- package/lib/compare/divide.js +31 -0
- package/lib/compare/divide.js.map +1 -0
- package/lib/compare/index.d.ts +7 -0
- package/lib/compare/index.d.ts.map +1 -0
- package/lib/compare/index.js +7 -0
- package/lib/compare/index.js.map +1 -0
- package/lib/compare/multiply.d.ts +22 -0
- package/lib/compare/multiply.d.ts.map +1 -0
- package/lib/compare/multiply.js +28 -0
- package/lib/compare/multiply.js.map +1 -0
- package/lib/compare/subtract.d.ts +13 -0
- package/lib/compare/subtract.d.ts.map +1 -0
- package/lib/compare/subtract.js +58 -0
- package/lib/compare/subtract.js.map +1 -0
- package/lib/compute/getExtrema.d.ts +33 -0
- package/lib/compute/getExtrema.d.ts.map +1 -0
- package/lib/compute/getExtrema.js +72 -0
- package/lib/compute/getExtrema.js.map +1 -0
- package/lib/compute/histogram.d.ts +22 -14
- package/lib/compute/histogram.d.ts.map +1 -1
- package/lib/compute/histogram.js +29 -23
- package/lib/compute/histogram.js.map +1 -1
- package/lib/compute/index.d.ts +5 -1
- package/lib/compute/index.d.ts.map +1 -1
- package/lib/compute/index.js +5 -6
- package/lib/compute/index.js.map +1 -1
- package/lib/compute/mean.d.ts +17 -0
- package/lib/compute/mean.d.ts.map +1 -0
- package/lib/compute/mean.js +37 -0
- package/lib/compute/mean.js.map +1 -0
- package/lib/compute/median.d.ts +16 -0
- package/lib/compute/median.d.ts.map +1 -0
- package/lib/compute/median.js +37 -0
- package/lib/compute/median.js.map +1 -0
- package/lib/compute/variance.d.ts +17 -0
- package/lib/compute/variance.d.ts.map +1 -0
- package/lib/compute/variance.js +33 -0
- package/lib/compute/variance.js.map +1 -0
- package/lib/correctColor/correctColor.d.ts +22 -0
- package/lib/correctColor/correctColor.d.ts.map +1 -0
- package/lib/correctColor/correctColor.js +75 -0
- package/lib/correctColor/correctColor.js.map +1 -0
- package/lib/correctColor/index.d.ts +2 -0
- package/lib/correctColor/index.d.ts.map +1 -0
- package/lib/correctColor/index.js +2 -0
- package/lib/correctColor/index.js.map +1 -0
- package/lib/correctColor/utils/formatData.d.ts +37 -0
- package/lib/correctColor/utils/formatData.d.ts.map +1 -0
- package/lib/correctColor/utils/formatData.js +60 -0
- package/lib/correctColor/utils/formatData.js.map +1 -0
- package/lib/correctColor/utils/getImageColors.d.ts +9 -0
- package/lib/correctColor/utils/getImageColors.d.ts.map +1 -0
- package/lib/correctColor/utils/getImageColors.js +19 -0
- package/lib/correctColor/utils/getImageColors.js.map +1 -0
- package/lib/correctColor/utils/referenceColorCard.d.ts +42 -0
- package/lib/correctColor/utils/referenceColorCard.d.ts.map +1 -0
- package/lib/correctColor/utils/referenceColorCard.js +146 -0
- package/lib/correctColor/utils/referenceColorCard.js.map +1 -0
- package/lib/draw/drawCircleOnImage.d.ts +28 -0
- package/lib/draw/drawCircleOnImage.d.ts.map +1 -0
- package/lib/draw/drawCircleOnImage.js +75 -0
- package/lib/draw/drawCircleOnImage.js.map +1 -0
- package/lib/draw/drawLineOnImage.d.ts +28 -0
- package/lib/draw/drawLineOnImage.d.ts.map +1 -0
- package/lib/draw/drawLineOnImage.js +27 -0
- package/lib/draw/drawLineOnImage.js.map +1 -0
- package/lib/draw/drawLineOnMask.d.ts +23 -0
- package/lib/draw/drawLineOnMask.d.ts.map +1 -0
- package/lib/draw/drawLineOnMask.js +19 -0
- package/lib/draw/drawLineOnMask.js.map +1 -0
- package/lib/draw/drawMarker.d.ts +36 -0
- package/lib/draw/drawMarker.d.ts.map +1 -0
- package/lib/draw/drawMarker.js +62 -0
- package/lib/draw/drawMarker.js.map +1 -0
- package/lib/draw/drawMarkers.d.ts +12 -0
- package/lib/draw/drawMarkers.d.ts.map +1 -0
- package/lib/draw/drawMarkers.js +17 -0
- package/lib/draw/drawMarkers.js.map +1 -0
- package/lib/draw/drawPoints.d.ts +22 -0
- package/lib/draw/drawPoints.d.ts.map +1 -0
- package/lib/draw/drawPoints.js +32 -0
- package/lib/draw/drawPoints.js.map +1 -0
- package/lib/draw/drawPolygonOnImage.d.ts +24 -0
- package/lib/draw/drawPolygonOnImage.d.ts.map +1 -0
- package/lib/draw/drawPolygonOnImage.js +44 -0
- package/lib/draw/drawPolygonOnImage.js.map +1 -0
- package/lib/draw/drawPolygonOnMask.d.ts +23 -0
- package/lib/draw/drawPolygonOnMask.d.ts.map +1 -0
- package/lib/draw/drawPolygonOnMask.js +35 -0
- package/lib/draw/drawPolygonOnMask.js.map +1 -0
- package/lib/draw/drawPolylineOnImage.d.ts +27 -0
- package/lib/draw/drawPolylineOnImage.d.ts.map +1 -0
- package/lib/draw/drawPolylineOnImage.js +26 -0
- package/lib/draw/drawPolylineOnImage.js.map +1 -0
- package/lib/draw/drawPolylineOnMask.d.ts +22 -0
- package/lib/draw/drawPolylineOnMask.d.ts.map +1 -0
- package/lib/draw/drawPolylineOnMask.js +18 -0
- package/lib/draw/drawPolylineOnMask.js.map +1 -0
- package/lib/draw/drawRectangle.d.ts +37 -0
- package/lib/draw/drawRectangle.d.ts.map +1 -0
- package/lib/draw/drawRectangle.js +50 -0
- package/lib/draw/drawRectangle.js.map +1 -0
- package/lib/draw/index.d.ts +12 -0
- package/lib/draw/index.d.ts.map +1 -0
- package/lib/draw/index.js +12 -0
- package/lib/draw/index.js.map +1 -0
- package/lib/draw/utils/deleteDuplicates.d.ts +8 -0
- package/lib/draw/utils/deleteDuplicates.d.ts.map +1 -0
- package/lib/draw/utils/deleteDuplicates.js +19 -0
- package/lib/draw/utils/deleteDuplicates.js.map +1 -0
- package/lib/draw/utils/roundPoint.d.ts +8 -0
- package/lib/draw/utils/roundPoint.d.ts.map +1 -0
- package/lib/draw/utils/roundPoint.js +12 -0
- package/lib/draw/utils/roundPoint.js.map +1 -0
- package/lib/featureMatching/descriptors/getBrief.d.ts +15 -0
- package/lib/featureMatching/descriptors/getBrief.d.ts.map +1 -0
- package/lib/featureMatching/descriptors/getBrief.js +29 -0
- package/lib/featureMatching/descriptors/getBrief.js.map +1 -0
- package/lib/featureMatching/descriptors/getBriefDescriptors.d.ts +43 -0
- package/lib/featureMatching/descriptors/getBriefDescriptors.d.ts.map +1 -0
- package/lib/featureMatching/descriptors/getBriefDescriptors.js +58 -0
- package/lib/featureMatching/descriptors/getBriefDescriptors.js.map +1 -0
- package/lib/featureMatching/descriptors/utils/getKeypointPatch.d.ts +18 -0
- package/lib/featureMatching/descriptors/utils/getKeypointPatch.d.ts.map +1 -0
- package/lib/featureMatching/descriptors/utils/getKeypointPatch.js +32 -0
- package/lib/featureMatching/descriptors/utils/getKeypointPatch.js.map +1 -0
- package/lib/featureMatching/descriptors/utils/sliceBrief.d.ts +21 -0
- package/lib/featureMatching/descriptors/utils/sliceBrief.d.ts.map +1 -0
- package/lib/featureMatching/descriptors/utils/sliceBrief.js +17 -0
- package/lib/featureMatching/descriptors/utils/sliceBrief.js.map +1 -0
- package/lib/featureMatching/featureMatching.types.d.ts +26 -0
- package/lib/featureMatching/featureMatching.types.d.ts.map +1 -0
- package/lib/featureMatching/featureMatching.types.js +2 -0
- package/lib/featureMatching/featureMatching.types.js.map +1 -0
- package/lib/featureMatching/index.d.ts +13 -0
- package/lib/featureMatching/index.d.ts.map +1 -0
- package/lib/featureMatching/index.js +13 -0
- package/lib/featureMatching/index.js.map +1 -0
- package/lib/featureMatching/keypoints/getBestKeypointsInRadius.d.ts +9 -0
- package/lib/featureMatching/keypoints/getBestKeypointsInRadius.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getBestKeypointsInRadius.js +30 -0
- package/lib/featureMatching/keypoints/getBestKeypointsInRadius.js.map +1 -0
- package/lib/featureMatching/keypoints/getFastKeypoints.d.ts +53 -0
- package/lib/featureMatching/keypoints/getFastKeypoints.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getFastKeypoints.js +71 -0
- package/lib/featureMatching/keypoints/getFastKeypoints.js.map +1 -0
- package/lib/featureMatching/keypoints/getFastScore.d.ts +13 -0
- package/lib/featureMatching/keypoints/getFastScore.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getFastScore.js +25 -0
- package/lib/featureMatching/keypoints/getFastScore.js.map +1 -0
- package/lib/featureMatching/keypoints/getHarrisScore.d.ts +20 -0
- package/lib/featureMatching/keypoints/getHarrisScore.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getHarrisScore.js +55 -0
- package/lib/featureMatching/keypoints/getHarrisScore.js.map +1 -0
- package/lib/featureMatching/keypoints/getIntensityCentroid.d.ts +11 -0
- package/lib/featureMatching/keypoints/getIntensityCentroid.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getIntensityCentroid.js +30 -0
- package/lib/featureMatching/keypoints/getIntensityCentroid.js.map +1 -0
- package/lib/featureMatching/keypoints/getIntensityMoment.d.ts +22 -0
- package/lib/featureMatching/keypoints/getIntensityMoment.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getIntensityMoment.js +27 -0
- package/lib/featureMatching/keypoints/getIntensityMoment.js.map +1 -0
- package/lib/featureMatching/keypoints/getOrientedFastKeypoints.d.ts +26 -0
- package/lib/featureMatching/keypoints/getOrientedFastKeypoints.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getOrientedFastKeypoints.js +38 -0
- package/lib/featureMatching/keypoints/getOrientedFastKeypoints.js.map +1 -0
- package/lib/featureMatching/keypoints/getPatchIntensityCentroid.d.ts +13 -0
- package/lib/featureMatching/keypoints/getPatchIntensityCentroid.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getPatchIntensityCentroid.js +31 -0
- package/lib/featureMatching/keypoints/getPatchIntensityCentroid.js.map +1 -0
- package/lib/featureMatching/keypoints/getPatchIntensityMoment.d.ts +27 -0
- package/lib/featureMatching/keypoints/getPatchIntensityMoment.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getPatchIntensityMoment.js +29 -0
- package/lib/featureMatching/keypoints/getPatchIntensityMoment.js.map +1 -0
- package/lib/featureMatching/keypoints/isFastKeypoint.d.ts +26 -0
- package/lib/featureMatching/keypoints/isFastKeypoint.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/isFastKeypoint.js +74 -0
- package/lib/featureMatching/keypoints/isFastKeypoint.js.map +1 -0
- package/lib/featureMatching/keypoints/utils/getDistanceMatrix.d.ts +9 -0
- package/lib/featureMatching/keypoints/utils/getDistanceMatrix.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/utils/getDistanceMatrix.js +26 -0
- package/lib/featureMatching/keypoints/utils/getDistanceMatrix.js.map +1 -0
- package/lib/featureMatching/keypoints/utils/getKeypointsInRadius.d.ts +10 -0
- package/lib/featureMatching/keypoints/utils/getKeypointsInRadius.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/utils/getKeypointsInRadius.js +26 -0
- package/lib/featureMatching/keypoints/utils/getKeypointsInRadius.js.map +1 -0
- package/lib/featureMatching/matching/bruteForceMatch.d.ts +36 -0
- package/lib/featureMatching/matching/bruteForceMatch.d.ts.map +1 -0
- package/lib/featureMatching/matching/bruteForceMatch.js +33 -0
- package/lib/featureMatching/matching/bruteForceMatch.js.map +1 -0
- package/lib/featureMatching/matching/filterEuclideanDistance.d.ts +21 -0
- package/lib/featureMatching/matching/filterEuclideanDistance.d.ts.map +1 -0
- package/lib/featureMatching/matching/filterEuclideanDistance.js +43 -0
- package/lib/featureMatching/matching/filterEuclideanDistance.js.map +1 -0
- package/lib/featureMatching/matching/filterSmallestDistanceMatches.d.ts +9 -0
- package/lib/featureMatching/matching/filterSmallestDistanceMatches.d.ts.map +1 -0
- package/lib/featureMatching/matching/filterSmallestDistanceMatches.js +25 -0
- package/lib/featureMatching/matching/filterSmallestDistanceMatches.js.map +1 -0
- package/lib/featureMatching/matching/getCrosscheckMatches.d.ts +19 -0
- package/lib/featureMatching/matching/getCrosscheckMatches.d.ts.map +1 -0
- package/lib/featureMatching/matching/getCrosscheckMatches.js +55 -0
- package/lib/featureMatching/matching/getCrosscheckMatches.js.map +1 -0
- package/lib/featureMatching/matching/getHammingDistance.d.ts +10 -0
- package/lib/featureMatching/matching/getHammingDistance.d.ts.map +1 -0
- package/lib/featureMatching/matching/getHammingDistance.js +15 -0
- package/lib/featureMatching/matching/getHammingDistance.js.map +1 -0
- package/lib/featureMatching/utils/checkBorderDistance.d.ts +11 -0
- package/lib/featureMatching/utils/checkBorderDistance.d.ts.map +1 -0
- package/lib/featureMatching/utils/checkBorderDistance.js +14 -0
- package/lib/featureMatching/utils/checkBorderDistance.js.map +1 -0
- package/lib/featureMatching/utils/compareIntensity.d.ts +19 -0
- package/lib/featureMatching/utils/compareIntensity.d.ts.map +1 -0
- package/lib/featureMatching/utils/compareIntensity.js +18 -0
- package/lib/featureMatching/utils/compareIntensity.js.map +1 -0
- package/lib/featureMatching/utils/extractSquareImage.d.ts +11 -0
- package/lib/featureMatching/utils/extractSquareImage.d.ts.map +1 -0
- package/lib/featureMatching/utils/extractSquareImage.js +20 -0
- package/lib/featureMatching/utils/extractSquareImage.js.map +1 -0
- package/lib/featureMatching/utils/getColors.d.ts +11 -0
- package/lib/featureMatching/utils/getColors.d.ts.map +1 -0
- package/lib/featureMatching/utils/getColors.js +25 -0
- package/lib/featureMatching/utils/getColors.js.map +1 -0
- package/lib/featureMatching/utils/getGaussianPoints.d.ts +23 -0
- package/lib/featureMatching/utils/getGaussianPoints.d.ts.map +1 -0
- package/lib/featureMatching/utils/getGaussianPoints.js +46 -0
- package/lib/featureMatching/utils/getGaussianPoints.js.map +1 -0
- package/lib/featureMatching/utils/getKeypointColor.d.ts +11 -0
- package/lib/featureMatching/utils/getKeypointColor.d.ts.map +1 -0
- package/lib/featureMatching/utils/getKeypointColor.js +21 -0
- package/lib/featureMatching/utils/getKeypointColor.js.map +1 -0
- package/lib/featureMatching/utils/getMatchColor.d.ts +11 -0
- package/lib/featureMatching/utils/getMatchColor.d.ts.map +1 -0
- package/lib/featureMatching/utils/getMatchColor.js +20 -0
- package/lib/featureMatching/utils/getMatchColor.js.map +1 -0
- package/lib/featureMatching/utils/sortByDistance.d.ts +8 -0
- package/lib/featureMatching/utils/sortByDistance.d.ts.map +1 -0
- package/lib/featureMatching/utils/sortByDistance.js +11 -0
- package/lib/featureMatching/utils/sortByDistance.js.map +1 -0
- package/lib/featureMatching/utils/sortBySourceDest.d.ts +14 -0
- package/lib/featureMatching/utils/sortBySourceDest.d.ts.map +1 -0
- package/lib/featureMatching/utils/sortBySourceDest.js +29 -0
- package/lib/featureMatching/utils/sortBySourceDest.js.map +1 -0
- package/lib/featureMatching/visualize/Montage.d.ts +84 -0
- package/lib/featureMatching/visualize/Montage.d.ts.map +1 -0
- package/lib/featureMatching/visualize/Montage.js +113 -0
- package/lib/featureMatching/visualize/Montage.js.map +1 -0
- package/lib/featureMatching/visualize/drawKeypoints.d.ts +55 -0
- package/lib/featureMatching/visualize/drawKeypoints.d.ts.map +1 -0
- package/lib/featureMatching/visualize/drawKeypoints.js +58 -0
- package/lib/featureMatching/visualize/drawKeypoints.js.map +1 -0
- package/lib/featureMatching/visualize/drawMatches.d.ts +42 -0
- package/lib/featureMatching/visualize/drawMatches.d.ts.map +1 -0
- package/lib/featureMatching/visualize/drawMatches.js +52 -0
- package/lib/featureMatching/visualize/drawMatches.js.map +1 -0
- package/lib/featureMatching/visualize/overlapImages.d.ts +30 -0
- package/lib/featureMatching/visualize/overlapImages.d.ts.map +1 -0
- package/lib/featureMatching/visualize/overlapImages.js +35 -0
- package/lib/featureMatching/visualize/overlapImages.js.map +1 -0
- package/lib/featureMatching/visualize/scaleKeypoints.d.ts +9 -0
- package/lib/featureMatching/visualize/scaleKeypoints.d.ts.map +1 -0
- package/lib/featureMatching/visualize/scaleKeypoints.js +20 -0
- package/lib/featureMatching/visualize/scaleKeypoints.js.map +1 -0
- package/lib/filters/and.d.ts +16 -0
- package/lib/filters/and.d.ts.map +1 -0
- package/lib/filters/and.js +24 -0
- package/lib/filters/and.js.map +1 -0
- package/lib/filters/blur.d.ts +33 -10
- package/lib/filters/blur.d.ts.map +1 -1
- package/lib/filters/blur.js +22 -13
- package/lib/filters/blur.js.map +1 -1
- package/lib/filters/convolution.d.ts +71 -10
- package/lib/filters/convolution.d.ts.map +1 -1
- package/lib/filters/convolution.js +160 -128
- package/lib/filters/convolution.js.map +1 -1
- package/lib/filters/derivativeFilter.d.ts +38 -0
- package/lib/filters/derivativeFilter.d.ts.map +1 -0
- package/lib/filters/derivativeFilter.js +26 -0
- package/lib/filters/derivativeFilter.js.map +1 -0
- package/lib/filters/flip.d.ts +20 -0
- package/lib/filters/flip.d.ts.map +1 -0
- package/lib/filters/flip.js +23 -0
- package/lib/filters/flip.js.map +1 -0
- package/lib/filters/flipX.d.ts +8 -0
- package/lib/filters/flipX.d.ts.map +1 -0
- package/lib/filters/flipX.js +24 -0
- package/lib/filters/flipX.js.map +1 -0
- package/lib/filters/flipY.d.ts +8 -0
- package/lib/filters/flipY.d.ts.map +1 -0
- package/lib/filters/flipY.js +24 -0
- package/lib/filters/flipY.js.map +1 -0
- package/lib/filters/gaussianBlur.d.ts +53 -17
- package/lib/filters/gaussianBlur.d.ts.map +1 -1
- package/lib/filters/gaussianBlur.js +52 -47
- package/lib/filters/gaussianBlur.js.map +1 -1
- package/lib/filters/gradientFilter.d.ts +51 -0
- package/lib/filters/gradientFilter.d.ts.map +1 -0
- package/lib/filters/gradientFilter.js +49 -0
- package/lib/filters/gradientFilter.js.map +1 -0
- package/lib/filters/hypotenuse.d.ts +16 -0
- package/lib/filters/hypotenuse.d.ts.map +1 -0
- package/lib/filters/hypotenuse.js +36 -0
- package/lib/filters/hypotenuse.js.map +1 -0
- package/lib/filters/increaseContrast.d.ts +21 -0
- package/lib/filters/increaseContrast.d.ts.map +1 -0
- package/lib/filters/increaseContrast.js +49 -0
- package/lib/filters/increaseContrast.js.map +1 -0
- package/lib/filters/index.d.ts +14 -4
- package/lib/filters/index.d.ts.map +1 -1
- package/lib/filters/index.js +14 -9
- package/lib/filters/index.js.map +1 -1
- package/lib/filters/invert.d.ts +10 -9
- package/lib/filters/invert.d.ts.map +1 -1
- package/lib/filters/invert.js +31 -16
- package/lib/filters/invert.js.map +1 -1
- package/lib/filters/level.d.ts +46 -0
- package/lib/filters/level.d.ts.map +1 -0
- package/lib/filters/level.js +63 -0
- package/lib/filters/level.js.map +1 -0
- package/lib/filters/medianFilter.d.ts +26 -0
- package/lib/filters/medianFilter.d.ts.map +1 -0
- package/lib/filters/medianFilter.js +42 -0
- package/lib/filters/medianFilter.js.map +1 -0
- package/lib/filters/or.d.ts +16 -0
- package/lib/filters/or.d.ts.map +1 -0
- package/lib/filters/or.js +24 -0
- package/lib/filters/or.js.map +1 -0
- package/lib/filters/pixelate.d.ts +24 -0
- package/lib/filters/pixelate.d.ts.map +1 -0
- package/lib/filters/pixelate.js +105 -0
- package/lib/filters/pixelate.js.map +1 -0
- package/lib/geometry/getPerspectiveWarp.d.ts +37 -0
- package/lib/geometry/getPerspectiveWarp.d.ts.map +1 -0
- package/lib/geometry/getPerspectiveWarp.js +131 -0
- package/lib/geometry/getPerspectiveWarp.js.map +1 -0
- package/lib/geometry/index.d.ts +6 -3
- package/lib/geometry/index.d.ts.map +1 -1
- package/lib/geometry/index.js +5 -8
- package/lib/geometry/index.js.map +1 -1
- package/lib/geometry/resize.d.ts +48 -13
- package/lib/geometry/resize.d.ts.map +1 -1
- package/lib/geometry/resize.js +86 -90
- package/lib/geometry/resize.js.map +1 -1
- package/lib/geometry/rotate.d.ts +9 -13
- package/lib/geometry/rotate.d.ts.map +1 -1
- package/lib/geometry/rotate.js +46 -26
- package/lib/geometry/rotate.js.map +1 -1
- package/lib/geometry/transform.d.ts +45 -12
- package/lib/geometry/transform.d.ts.map +1 -1
- package/lib/geometry/transform.js +102 -84
- package/lib/geometry/transform.js.map +1 -1
- package/lib/geometry/transformRotate.d.ts +24 -0
- package/lib/geometry/transformRotate.d.ts.map +1 -0
- package/lib/geometry/transformRotate.js +38 -0
- package/lib/geometry/transformRotate.js.map +1 -0
- package/lib/index.d.ts +24 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +24 -13
- package/lib/index.js.map +1 -1
- package/lib/load/decode.d.ts +8 -7
- package/lib/load/decode.d.ts.map +1 -1
- package/lib/load/decode.js +22 -28
- package/lib/load/decode.js.map +1 -1
- package/lib/load/decodeJpeg.d.ts +7 -6
- package/lib/load/decodeJpeg.d.ts.map +1 -1
- package/lib/load/decodeJpeg.js +26 -16
- package/lib/load/decodeJpeg.js.map +1 -1
- package/lib/load/decodePng.d.ts +7 -6
- package/lib/load/decodePng.d.ts.map +1 -1
- package/lib/load/decodePng.js +67 -67
- package/lib/load/decodePng.js.map +1 -1
- package/lib/load/decodeTiff.d.ts +17 -0
- package/lib/load/decodeTiff.d.ts.map +1 -0
- package/lib/load/decodeTiff.js +57 -0
- package/lib/load/decodeTiff.js.map +1 -0
- package/lib/load/fetchURL.d.ts +7 -0
- package/lib/load/fetchURL.d.ts.map +1 -0
- package/lib/load/fetchURL.js +13 -0
- package/lib/load/fetchURL.js.map +1 -0
- package/lib/load/getMetadata.d.ts +16 -0
- package/lib/load/getMetadata.d.ts.map +1 -0
- package/lib/load/getMetadata.js +15 -0
- package/lib/load/getMetadata.js.map +1 -0
- package/lib/load/index.d.ts +9 -6
- package/lib/load/index.d.ts.map +1 -1
- package/lib/load/index.js +9 -11
- package/lib/load/index.js.map +1 -1
- package/lib/load/load.types.d.ts +8 -0
- package/lib/load/load.types.d.ts.map +1 -0
- package/lib/load/load.types.js +2 -0
- package/lib/load/load.types.js.map +1 -0
- package/lib/load/read.d.ts +16 -11
- package/lib/load/read.d.ts.map +1 -1
- package/lib/load/read.js +24 -23
- package/lib/load/read.js.map +1 -1
- package/lib/load/readCanvas.d.ts +7 -2
- package/lib/load/readCanvas.d.ts.map +1 -1
- package/lib/load/readCanvas.js +16 -17
- package/lib/load/readCanvas.js.map +1 -1
- package/lib/load/readImg.d.ts +7 -2
- package/lib/load/readImg.d.ts.map +1 -1
- package/lib/load/readImg.js +17 -16
- package/lib/load/readImg.js.map +1 -1
- package/lib/maskAnalysis/getBorderPoints.d.ts +12 -0
- package/lib/maskAnalysis/getBorderPoints.d.ts.map +1 -0
- package/lib/maskAnalysis/getBorderPoints.js +53 -0
- package/lib/maskAnalysis/getBorderPoints.js.map +1 -0
- package/lib/maskAnalysis/getConvexHull.d.ts +9 -0
- package/lib/maskAnalysis/getConvexHull.d.ts.map +1 -0
- package/lib/maskAnalysis/getConvexHull.js +23 -0
- package/lib/maskAnalysis/getConvexHull.js.map +1 -0
- package/lib/maskAnalysis/getFeret.d.ts +11 -0
- package/lib/maskAnalysis/getFeret.d.ts.map +1 -0
- package/lib/maskAnalysis/getFeret.js +181 -0
- package/lib/maskAnalysis/getFeret.js.map +1 -0
- package/lib/maskAnalysis/getMbr.d.ts +9 -0
- package/lib/maskAnalysis/getMbr.d.ts.map +1 -0
- package/lib/maskAnalysis/getMbr.js +13 -0
- package/lib/maskAnalysis/getMbr.js.map +1 -0
- package/lib/maskAnalysis/index.d.ts +2 -0
- package/lib/maskAnalysis/index.d.ts.map +1 -0
- package/lib/maskAnalysis/index.js +2 -0
- package/lib/maskAnalysis/index.js.map +1 -0
- package/lib/maskAnalysis/maskAnalysis.types.d.ts +97 -0
- package/lib/maskAnalysis/maskAnalysis.types.d.ts.map +1 -0
- package/lib/maskAnalysis/maskAnalysis.types.js +2 -0
- package/lib/maskAnalysis/maskAnalysis.types.js.map +1 -0
- package/lib/maskAnalysis/utils/getAngle.d.ts +19 -0
- package/lib/maskAnalysis/utils/getAngle.d.ts.map +1 -0
- package/lib/maskAnalysis/utils/getAngle.js +41 -0
- package/lib/maskAnalysis/utils/getAngle.js.map +1 -0
- package/lib/maskAnalysis/utils/getExtendedBorderPoints.d.ts +12 -0
- package/lib/maskAnalysis/utils/getExtendedBorderPoints.d.ts.map +1 -0
- package/lib/maskAnalysis/utils/getExtendedBorderPoints.js +20 -0
- package/lib/maskAnalysis/utils/getExtendedBorderPoints.js.map +1 -0
- package/lib/maskAnalysis/utils/getMbrAngle.d.ts +8 -0
- package/lib/maskAnalysis/utils/getMbrAngle.d.ts.map +1 -0
- package/lib/maskAnalysis/utils/getMbrAngle.js +20 -0
- package/lib/maskAnalysis/utils/getMbrAngle.js.map +1 -0
- package/lib/maskAnalysis/utils/getMbrFromPoints.d.ts +10 -0
- package/lib/maskAnalysis/utils/getMbrFromPoints.d.ts.map +1 -0
- package/lib/maskAnalysis/utils/getMbrFromPoints.js +102 -0
- package/lib/maskAnalysis/utils/getMbrFromPoints.js.map +1 -0
- package/lib/maskAnalysis/utils/monotoneChainConvexHull.d.ts +18 -0
- package/lib/maskAnalysis/utils/monotoneChainConvexHull.d.ts.map +1 -0
- package/lib/maskAnalysis/utils/monotoneChainConvexHull.js +44 -0
- package/lib/maskAnalysis/utils/monotoneChainConvexHull.js.map +1 -0
- package/lib/morphology/bottomHat.d.ts +18 -0
- package/lib/morphology/bottomHat.d.ts.map +1 -0
- package/lib/morphology/bottomHat.js +38 -0
- package/lib/morphology/bottomHat.js.map +1 -0
- package/lib/morphology/cannyEdgeDetector.d.ts +44 -0
- package/lib/morphology/cannyEdgeDetector.d.ts.map +1 -0
- package/lib/morphology/cannyEdgeDetector.js +146 -0
- package/lib/morphology/cannyEdgeDetector.js.map +1 -0
- package/lib/morphology/clearBorder.d.ts +26 -0
- package/lib/morphology/clearBorder.d.ts.map +1 -0
- package/lib/morphology/clearBorder.js +19 -0
- package/lib/morphology/clearBorder.js.map +1 -0
- package/lib/morphology/close.d.ts +18 -0
- package/lib/morphology/close.d.ts.map +1 -0
- package/lib/morphology/close.js +33 -0
- package/lib/morphology/close.js.map +1 -0
- package/lib/morphology/dilate.d.ts +18 -0
- package/lib/morphology/dilate.d.ts.map +1 -0
- package/lib/morphology/dilate.js +191 -0
- package/lib/morphology/dilate.js.map +1 -0
- package/lib/morphology/erode.d.ts +18 -0
- package/lib/morphology/erode.d.ts.map +1 -0
- package/lib/morphology/erode.js +191 -0
- package/lib/morphology/erode.js.map +1 -0
- package/lib/morphology/floodFill.d.ts +26 -0
- package/lib/morphology/floodFill.d.ts.map +1 -0
- package/lib/morphology/floodFill.js +18 -0
- package/lib/morphology/floodFill.js.map +1 -0
- package/lib/morphology/index.d.ts +12 -0
- package/lib/morphology/index.d.ts.map +1 -0
- package/lib/morphology/index.js +12 -0
- package/lib/morphology/index.js.map +1 -0
- package/lib/morphology/morphologicalGradient.d.ts +18 -0
- package/lib/morphology/morphologicalGradient.d.ts.map +1 -0
- package/lib/morphology/morphologicalGradient.js +34 -0
- package/lib/morphology/morphologicalGradient.js.map +1 -0
- package/lib/morphology/multipleFloodFill.d.ts +36 -0
- package/lib/morphology/multipleFloodFill.d.ts.map +1 -0
- package/lib/morphology/multipleFloodFill.js +87 -0
- package/lib/morphology/multipleFloodFill.js.map +1 -0
- package/lib/morphology/open.d.ts +18 -0
- package/lib/morphology/open.d.ts.map +1 -0
- package/lib/morphology/open.js +35 -0
- package/lib/morphology/open.js.map +1 -0
- package/lib/morphology/solidFill.d.ts +20 -0
- package/lib/morphology/solidFill.d.ts.map +1 -0
- package/lib/morphology/solidFill.js +15 -0
- package/lib/morphology/solidFill.js.map +1 -0
- package/lib/morphology/topHat.d.ts +18 -0
- package/lib/morphology/topHat.d.ts.map +1 -0
- package/lib/morphology/topHat.js +36 -0
- package/lib/morphology/topHat.js.map +1 -0
- package/lib/operations/convertBitDepth.d.ts +16 -0
- package/lib/operations/convertBitDepth.d.ts.map +1 -0
- package/lib/operations/convertBitDepth.js +56 -0
- package/lib/operations/convertBitDepth.js.map +1 -0
- package/lib/operations/convertColor.d.ts +35 -5
- package/lib/operations/convertColor.d.ts.map +1 -1
- package/lib/operations/convertColor.js +143 -75
- package/lib/operations/convertColor.js.map +1 -1
- package/lib/operations/copyTo.d.ts +17 -0
- package/lib/operations/copyTo.d.ts.map +1 -0
- package/lib/operations/copyTo.js +36 -0
- package/lib/operations/copyTo.js.map +1 -0
- package/lib/operations/correctBackground.d.ts +27 -0
- package/lib/operations/correctBackground.d.ts.map +1 -0
- package/lib/operations/correctBackground.js +44 -0
- package/lib/operations/correctBackground.js.map +1 -0
- package/lib/operations/crop.d.ts +32 -0
- package/lib/operations/crop.d.ts.map +1 -0
- package/lib/operations/crop.js +48 -0
- package/lib/operations/crop.js.map +1 -0
- package/lib/operations/cropAlpha.d.ts +11 -0
- package/lib/operations/cropAlpha.d.ts.map +1 -0
- package/lib/operations/cropAlpha.js +70 -0
- package/lib/operations/cropAlpha.js.map +1 -0
- package/lib/operations/cropRectangle.d.ts +14 -0
- package/lib/operations/cropRectangle.d.ts.map +1 -0
- package/lib/operations/cropRectangle.js +75 -0
- package/lib/operations/cropRectangle.js.map +1 -0
- package/lib/operations/extendBorders.d.ts +30 -0
- package/lib/operations/extendBorders.d.ts.map +1 -0
- package/lib/operations/extendBorders.js +61 -0
- package/lib/operations/extendBorders.js.map +1 -0
- package/lib/operations/extract.d.ts +19 -0
- package/lib/operations/extract.d.ts.map +1 -0
- package/lib/operations/extract.js +41 -0
- package/lib/operations/extract.js.map +1 -0
- package/lib/operations/getMaskFromCannyEdge.d.ts +11 -0
- package/lib/operations/getMaskFromCannyEdge.d.ts.map +1 -0
- package/lib/operations/getMaskFromCannyEdge.js +35 -0
- package/lib/operations/getMaskFromCannyEdge.js.map +1 -0
- package/lib/operations/grey.d.ts +62 -0
- package/lib/operations/grey.d.ts.map +1 -0
- package/lib/operations/grey.js +84 -0
- package/lib/operations/grey.js.map +1 -0
- package/lib/operations/greyAlgorithms.d.ts +133 -0
- package/lib/operations/greyAlgorithms.d.ts.map +1 -0
- package/lib/operations/greyAlgorithms.js +205 -0
- package/lib/operations/greyAlgorithms.js.map +1 -0
- package/lib/operations/index.d.ts +16 -5
- package/lib/operations/index.d.ts.map +1 -1
- package/lib/operations/index.js +16 -10
- package/lib/operations/index.js.map +1 -1
- package/lib/operations/merge.d.ts +7 -6
- package/lib/operations/merge.d.ts.map +1 -1
- package/lib/operations/merge.js +50 -47
- package/lib/operations/merge.js.map +1 -1
- package/lib/operations/operations.types.d.ts +7 -0
- package/lib/operations/operations.types.d.ts.map +1 -0
- package/lib/operations/operations.types.js +2 -0
- package/lib/operations/operations.types.js.map +1 -0
- package/lib/operations/paintMaskOnImage.d.ts +33 -0
- package/lib/operations/paintMaskOnImage.d.ts.map +1 -0
- package/lib/operations/paintMaskOnImage.js +53 -0
- package/lib/operations/paintMaskOnImage.js.map +1 -0
- package/lib/operations/paintMaskOnMask.d.ts +27 -0
- package/lib/operations/paintMaskOnMask.d.ts.map +1 -0
- package/lib/operations/paintMaskOnMask.js +24 -0
- package/lib/operations/paintMaskOnMask.js.map +1 -0
- package/lib/operations/split.d.ts +7 -2
- package/lib/operations/split.d.ts.map +1 -1
- package/lib/operations/split.js +19 -15
- package/lib/operations/split.js.map +1 -1
- package/lib/operations/threshold.d.ts +60 -18
- package/lib/operations/threshold.d.ts.map +1 -1
- package/lib/operations/threshold.js +90 -58
- package/lib/operations/threshold.js.map +1 -1
- package/lib/operations/thresholds/huang.d.ts +7 -0
- package/lib/operations/thresholds/huang.d.ts.map +1 -0
- package/lib/operations/thresholds/huang.js +78 -0
- package/lib/operations/thresholds/huang.js.map +1 -0
- package/lib/operations/thresholds/intermodes.d.ts +7 -0
- package/lib/operations/thresholds/intermodes.d.ts.map +1 -0
- package/lib/operations/thresholds/intermodes.js +57 -0
- package/lib/operations/thresholds/intermodes.js.map +1 -0
- package/lib/operations/thresholds/isodata.d.ts +7 -0
- package/lib/operations/thresholds/isodata.d.ts.map +1 -0
- package/lib/operations/thresholds/isodata.js +50 -0
- package/lib/operations/thresholds/isodata.js.map +1 -0
- package/lib/operations/thresholds/li.d.ts +8 -0
- package/lib/operations/thresholds/li.d.ts.map +1 -0
- package/lib/operations/thresholds/li.js +73 -0
- package/lib/operations/thresholds/li.js.map +1 -0
- package/lib/operations/thresholds/maxEntropy.d.ts +8 -0
- package/lib/operations/thresholds/maxEntropy.d.ts.map +1 -0
- package/lib/operations/thresholds/maxEntropy.js +76 -0
- package/lib/operations/thresholds/maxEntropy.js.map +1 -0
- package/lib/operations/thresholds/mean.d.ts +8 -0
- package/lib/operations/thresholds/mean.d.ts.map +1 -0
- package/lib/operations/thresholds/mean.js +22 -0
- package/lib/operations/thresholds/mean.js.map +1 -0
- package/lib/operations/thresholds/minError.d.ts +8 -0
- package/lib/operations/thresholds/minError.d.ts.map +1 -0
- package/lib/operations/thresholds/minError.js +86 -0
- package/lib/operations/thresholds/minError.js.map +1 -0
- package/lib/operations/thresholds/minimum.d.ts +7 -0
- package/lib/operations/thresholds/minimum.d.ts.map +1 -0
- package/lib/operations/thresholds/minimum.js +74 -0
- package/lib/operations/thresholds/minimum.js.map +1 -0
- package/lib/operations/thresholds/moments.d.ts +8 -0
- package/lib/operations/thresholds/moments.d.ts.map +1 -0
- package/lib/operations/thresholds/moments.js +58 -0
- package/lib/operations/thresholds/moments.js.map +1 -0
- package/lib/operations/thresholds/otsu.d.ts +7 -1
- package/lib/operations/thresholds/otsu.d.ts.map +1 -1
- package/lib/operations/thresholds/otsu.js +37 -34
- package/lib/operations/thresholds/otsu.js.map +1 -1
- package/lib/operations/thresholds/percentile.d.ts +7 -0
- package/lib/operations/thresholds/percentile.d.ts.map +1 -0
- package/lib/operations/thresholds/percentile.js +35 -0
- package/lib/operations/thresholds/percentile.js.map +1 -0
- package/lib/operations/thresholds/renyiEntropy.d.ts +8 -0
- package/lib/operations/thresholds/renyiEntropy.d.ts.map +1 -0
- package/lib/operations/thresholds/renyiEntropy.js +127 -0
- package/lib/operations/thresholds/renyiEntropy.js.map +1 -0
- package/lib/operations/thresholds/shanbhag.d.ts +8 -0
- package/lib/operations/thresholds/shanbhag.d.ts.map +1 -0
- package/lib/operations/thresholds/shanbhag.js +72 -0
- package/lib/operations/thresholds/shanbhag.js.map +1 -0
- package/lib/operations/thresholds/triangle.d.ts +6 -1
- package/lib/operations/thresholds/triangle.d.ts.map +1 -1
- package/lib/operations/thresholds/triangle.js +107 -105
- package/lib/operations/thresholds/triangle.js.map +1 -1
- package/lib/operations/thresholds/yen.d.ts +8 -0
- package/lib/operations/thresholds/yen.d.ts.map +1 -0
- package/lib/operations/thresholds/yen.js +55 -0
- package/lib/operations/thresholds/yen.js.map +1 -0
- package/lib/point/operations.d.ts +10 -0
- package/lib/point/operations.d.ts.map +1 -0
- package/lib/point/operations.js +21 -0
- package/lib/point/operations.js.map +1 -0
- package/lib/roi/Roi.d.ts +218 -0
- package/lib/roi/Roi.d.ts.map +1 -0
- package/lib/roi/Roi.js +553 -0
- package/lib/roi/Roi.js.map +1 -0
- package/lib/roi/RoiMapManager.d.ts +59 -0
- package/lib/roi/RoiMapManager.d.ts.map +1 -0
- package/lib/roi/RoiMapManager.js +51 -0
- package/lib/roi/RoiMapManager.js.map +1 -0
- package/lib/roi/colorRois.d.ts +38 -0
- package/lib/roi/colorRois.d.ts.map +1 -0
- package/lib/roi/colorRois.js +41 -0
- package/lib/roi/colorRois.js.map +1 -0
- package/lib/roi/computeRois.d.ts +7 -0
- package/lib/roi/computeRois.d.ts.map +1 -0
- package/lib/roi/computeRois.js +81 -0
- package/lib/roi/computeRois.js.map +1 -0
- package/lib/roi/fromMask.d.ts +17 -0
- package/lib/roi/fromMask.d.ts.map +1 -0
- package/lib/roi/fromMask.js +139 -0
- package/lib/roi/fromMask.js.map +1 -0
- package/lib/roi/getBorderPoints.d.ts +12 -0
- package/lib/roi/getBorderPoints.d.ts.map +1 -0
- package/lib/roi/getBorderPoints.js +12 -0
- package/lib/roi/getBorderPoints.js.map +1 -0
- package/lib/roi/getMask.d.ts +17 -0
- package/lib/roi/getMask.d.ts.map +1 -0
- package/lib/roi/getMask.js +27 -0
- package/lib/roi/getMask.js.map +1 -0
- package/lib/roi/getRois.d.ts +33 -0
- package/lib/roi/getRois.d.ts.map +1 -0
- package/lib/roi/getRois.js +27 -0
- package/lib/roi/getRois.js.map +1 -0
- package/lib/roi/index.d.ts +11 -0
- package/lib/roi/index.d.ts.map +1 -0
- package/lib/roi/index.js +11 -0
- package/lib/roi/index.js.map +1 -0
- package/lib/roi/properties/getEllipse.d.ts +9 -0
- package/lib/roi/properties/getEllipse.d.ts.map +1 -0
- package/lib/roi/properties/getEllipse.js +96 -0
- package/lib/roi/properties/getEllipse.js.map +1 -0
- package/lib/roi/roi.types.d.ts +29 -0
- package/lib/roi/roi.types.d.ts.map +1 -0
- package/lib/roi/roi.types.js +2 -0
- package/lib/roi/roi.types.js.map +1 -0
- package/lib/roi/utils/colorMaps/getBinaryMap.d.ts +33 -0
- package/lib/roi/utils/colorMaps/getBinaryMap.d.ts.map +1 -0
- package/lib/roi/utils/colorMaps/getBinaryMap.js +27 -0
- package/lib/roi/utils/colorMaps/getBinaryMap.js.map +1 -0
- package/lib/roi/utils/colorMaps/getRainbowMap.d.ts +23 -0
- package/lib/roi/utils/colorMaps/getRainbowMap.d.ts.map +1 -0
- package/lib/roi/utils/colorMaps/getRainbowMap.js +37 -0
- package/lib/roi/utils/colorMaps/getRainbowMap.js.map +1 -0
- package/lib/roi/utils/colorMaps/getSaturationMap.d.ts +33 -0
- package/lib/roi/utils/colorMaps/getSaturationMap.d.ts.map +1 -0
- package/lib/roi/utils/colorMaps/getSaturationMap.js +32 -0
- package/lib/roi/utils/colorMaps/getSaturationMap.js.map +1 -0
- package/lib/roi/utils/getColorMap.d.ts +29 -0
- package/lib/roi/utils/getColorMap.d.ts.map +1 -0
- package/lib/roi/utils/getColorMap.js +19 -0
- package/lib/roi/utils/getColorMap.js.map +1 -0
- package/lib/roi/utils/hsvToRgb.d.ts +20 -0
- package/lib/roi/utils/hsvToRgb.d.ts.map +1 -0
- package/lib/roi/utils/hsvToRgb.js +53 -0
- package/lib/roi/utils/hsvToRgb.js.map +1 -0
- package/lib/roi/utils/rgbToNumber.d.ts +7 -0
- package/lib/roi/utils/rgbToNumber.d.ts.map +1 -0
- package/lib/roi/utils/rgbToNumber.js +9 -0
- package/lib/roi/utils/rgbToNumber.js.map +1 -0
- package/lib/roi/waterShed.d.ts +36 -0
- package/lib/roi/waterShed.d.ts.map +1 -0
- package/lib/roi/waterShed.js +91 -0
- package/lib/roi/waterShed.js.map +1 -0
- package/lib/save/encode.d.ts +30 -34
- package/lib/save/encode.d.ts.map +1 -1
- package/lib/save/encode.js +24 -24
- package/lib/save/encode.js.map +1 -1
- package/lib/save/encodeBmp.d.ts +9 -0
- package/lib/save/encodeBmp.d.ts.map +1 -0
- package/lib/save/encodeBmp.js +22 -0
- package/lib/save/encodeBmp.js.map +1 -0
- package/lib/save/encodeDataURL.d.ts +10 -0
- package/lib/save/encodeDataURL.d.ts.map +1 -0
- package/lib/save/encodeDataURL.js +15 -0
- package/lib/save/encodeDataURL.js.map +1 -0
- package/lib/save/encodeJpeg.d.ts +16 -5
- package/lib/save/encodeJpeg.d.ts.map +1 -1
- package/lib/save/encodeJpeg.js +20 -18
- package/lib/save/encodeJpeg.js.map +1 -1
- package/lib/save/encodePng.d.ts +11 -4
- package/lib/save/encodePng.d.ts.map +1 -1
- package/lib/save/encodePng.js +22 -7
- package/lib/save/encodePng.js.map +1 -1
- package/lib/save/index.d.ts +6 -5
- package/lib/save/index.d.ts.map +1 -1
- package/lib/save/index.js +6 -10
- package/lib/save/index.js.map +1 -1
- package/lib/save/write.d.ts +61 -22
- package/lib/save/write.d.ts.map +1 -1
- package/lib/save/write.js +72 -49
- package/lib/save/write.js.map +1 -1
- package/lib/save/writeCanvas.d.ts +40 -14
- package/lib/save/writeCanvas.d.ts.map +1 -1
- package/lib/save/writeCanvas.js +28 -21
- package/lib/save/writeCanvas.js.map +1 -1
- package/lib/ssim/compute_dssim.d.ts +12 -0
- package/lib/ssim/compute_dssim.d.ts.map +1 -0
- package/lib/ssim/compute_dssim.js +14 -0
- package/lib/ssim/compute_dssim.js.map +1 -0
- package/lib/ssim/compute_ssim.d.ts +42 -0
- package/lib/ssim/compute_ssim.d.ts.map +1 -0
- package/lib/ssim/compute_ssim.js +56 -0
- package/lib/ssim/compute_ssim.js.map +1 -0
- package/lib/ssim/index.d.ts +3 -0
- package/lib/ssim/index.d.ts.map +1 -0
- package/lib/ssim/index.js +3 -0
- package/lib/ssim/index.js.map +1 -0
- package/lib/stack/compute/histogram.d.ts +10 -0
- package/lib/stack/compute/histogram.d.ts.map +1 -0
- package/lib/stack/compute/histogram.js +21 -0
- package/lib/stack/compute/histogram.js.map +1 -0
- package/lib/stack/compute/maxImage.d.ts +9 -0
- package/lib/stack/compute/maxImage.d.ts.map +1 -0
- package/lib/stack/compute/maxImage.js +21 -0
- package/lib/stack/compute/maxImage.js.map +1 -0
- package/lib/stack/compute/meanImage.d.ts +9 -0
- package/lib/stack/compute/meanImage.d.ts.map +1 -0
- package/lib/stack/compute/meanImage.js +29 -0
- package/lib/stack/compute/meanImage.js.map +1 -0
- package/lib/stack/compute/medianImage.d.ts +9 -0
- package/lib/stack/compute/medianImage.d.ts.map +1 -0
- package/lib/stack/compute/medianImage.js +25 -0
- package/lib/stack/compute/medianImage.js.map +1 -0
- package/lib/stack/compute/minImage.d.ts +9 -0
- package/lib/stack/compute/minImage.d.ts.map +1 -0
- package/lib/stack/compute/minImage.js +22 -0
- package/lib/stack/compute/minImage.js.map +1 -0
- package/lib/stack/compute/sum.d.ts +9 -0
- package/lib/stack/compute/sum.d.ts.map +1 -0
- package/lib/stack/compute/sum.js +30 -0
- package/lib/stack/compute/sum.js.map +1 -0
- package/lib/stack/index.d.ts +8 -0
- package/lib/stack/index.d.ts.map +1 -0
- package/lib/stack/index.js +8 -0
- package/lib/stack/index.js.map +1 -0
- package/lib/stack/load/decodeStack.d.ts +9 -0
- package/lib/stack/load/decodeStack.d.ts.map +1 -0
- package/lib/stack/load/decodeStack.js +19 -0
- package/lib/stack/load/decodeStack.js.map +1 -0
- package/lib/stack/load/decodeTiff.d.ts +8 -0
- package/lib/stack/load/decodeTiff.d.ts.map +1 -0
- package/lib/stack/load/decodeTiff.js +17 -0
- package/lib/stack/load/decodeTiff.js.map +1 -0
- package/lib/stack/utils/checkImagesValid.d.ts +13 -0
- package/lib/stack/utils/checkImagesValid.d.ts.map +1 -0
- package/lib/stack/utils/checkImagesValid.js +29 -0
- package/lib/stack/utils/checkImagesValid.js.map +1 -0
- package/lib/stack/utils/checkProcessable.d.ts +24 -0
- package/lib/stack/utils/checkProcessable.d.ts.map +1 -0
- package/lib/stack/utils/checkProcessable.js +32 -0
- package/lib/stack/utils/checkProcessable.js.map +1 -0
- package/lib/stack/utils/getStackFromFolder.d.ts +8 -0
- package/lib/stack/utils/getStackFromFolder.d.ts.map +1 -0
- package/lib/stack/utils/getStackFromFolder.js +16 -0
- package/lib/stack/utils/getStackFromFolder.js.map +1 -0
- package/lib/utils/arrayPointsToObjects.d.ts +8 -0
- package/lib/utils/arrayPointsToObjects.d.ts.map +1 -0
- package/lib/utils/arrayPointsToObjects.js +13 -0
- package/lib/utils/arrayPointsToObjects.js.map +1 -0
- package/lib/utils/boolToNumber.d.ts +8 -0
- package/lib/utils/boolToNumber.d.ts.map +1 -0
- package/lib/utils/boolToNumber.js +16 -0
- package/lib/utils/boolToNumber.js.map +1 -0
- package/lib/utils/borderIterator.d.ts +9 -0
- package/lib/utils/borderIterator.d.ts.map +1 -0
- package/lib/utils/borderIterator.js +20 -0
- package/lib/utils/borderIterator.js.map +1 -0
- package/lib/utils/clamp.d.ts +15 -3
- package/lib/utils/clamp.d.ts.map +1 -1
- package/lib/utils/clamp.js +42 -18
- package/lib/utils/clamp.js.map +1 -1
- package/lib/utils/constants/channelLabels.d.ts +8 -0
- package/lib/utils/constants/channelLabels.d.ts.map +1 -0
- package/lib/utils/constants/channelLabels.js +8 -0
- package/lib/utils/constants/channelLabels.js.map +1 -0
- package/lib/utils/constants/colorModels.d.ts +14 -0
- package/lib/utils/constants/colorModels.d.ts.map +1 -0
- package/lib/utils/constants/colorModels.js +35 -0
- package/lib/utils/constants/colorModels.js.map +1 -0
- package/lib/utils/constants/kernels.d.ts +13 -0
- package/lib/utils/constants/kernels.d.ts.map +1 -0
- package/lib/utils/constants/kernels.js +63 -0
- package/lib/utils/constants/kernels.js.map +1 -0
- package/lib/utils/constants/kinds.d.ts +7 -0
- package/lib/utils/constants/kinds.d.ts.map +1 -0
- package/lib/utils/constants/kinds.js +19 -0
- package/lib/utils/constants/kinds.js.map +1 -0
- package/lib/utils/copyData.d.ts +5 -0
- package/lib/utils/copyData.d.ts.map +1 -0
- package/lib/utils/copyData.js +15 -0
- package/lib/utils/copyData.js.map +1 -0
- package/lib/utils/cross_platform.d.ts +11 -0
- package/lib/utils/cross_platform.d.ts.map +1 -0
- package/lib/utils/cross_platform.js +17 -0
- package/lib/utils/cross_platform.js.map +1 -0
- package/lib/utils/geometry/angles.d.ts +16 -0
- package/lib/utils/geometry/angles.d.ts.map +1 -0
- package/lib/utils/geometry/angles.js +24 -0
- package/lib/utils/geometry/angles.js.map +1 -0
- package/lib/utils/geometry/getCirclePoints.d.ts +30 -0
- package/lib/utils/geometry/getCirclePoints.d.ts.map +1 -0
- package/lib/utils/geometry/getCirclePoints.js +88 -0
- package/lib/utils/geometry/getCirclePoints.js.map +1 -0
- package/lib/utils/geometry/index.d.ts +2 -0
- package/lib/utils/geometry/index.d.ts.map +1 -0
- package/lib/utils/geometry/index.js +2 -0
- package/lib/utils/geometry/index.js.map +1 -0
- package/lib/utils/geometry/lines.d.ts +23 -0
- package/lib/utils/geometry/lines.d.ts.map +1 -0
- package/lib/utils/geometry/lines.js +10 -0
- package/lib/utils/geometry/lines.js.map +1 -0
- package/lib/utils/geometry/points.d.ts +67 -0
- package/lib/utils/geometry/points.d.ts.map +1 -0
- package/lib/utils/geometry/points.js +78 -0
- package/lib/utils/geometry/points.js.map +1 -0
- package/lib/utils/geometry/polygons.d.ts +16 -0
- package/lib/utils/geometry/polygons.d.ts.map +1 -0
- package/lib/utils/geometry/polygons.js +30 -0
- package/lib/utils/geometry/polygons.js.map +1 -0
- package/lib/utils/geometry/removeClosePoints.d.ts +28 -0
- package/lib/utils/geometry/removeClosePoints.d.ts.map +1 -0
- package/lib/utils/geometry/removeClosePoints.js +43 -0
- package/lib/utils/geometry/removeClosePoints.js.map +1 -0
- package/lib/utils/getDefaultColor.d.ts +10 -0
- package/lib/utils/getDefaultColor.d.ts.map +1 -0
- package/lib/utils/getDefaultColor.js +17 -0
- package/lib/utils/getDefaultColor.js.map +1 -0
- package/lib/utils/getIndex.d.ts +5 -0
- package/lib/utils/getIndex.d.ts.map +1 -0
- package/lib/utils/getIndex.js +12 -0
- package/lib/utils/getIndex.js.map +1 -0
- package/lib/utils/getMinMax.d.ts +11 -0
- package/lib/utils/getMinMax.d.ts.map +1 -0
- package/lib/utils/getMinMax.js +24 -0
- package/lib/utils/getMinMax.js.map +1 -0
- package/lib/utils/getOutputImage.d.ts +57 -25
- package/lib/utils/getOutputImage.d.ts.map +1 -1
- package/lib/utils/getOutputImage.js +138 -37
- package/lib/utils/getOutputImage.js.map +1 -1
- package/lib/utils/getRadius.d.ts +7 -0
- package/lib/utils/getRadius.d.ts.map +1 -0
- package/lib/utils/getRadius.js +12 -0
- package/lib/utils/getRadius.js.map +1 -0
- package/lib/utils/interpolateBorder.d.ts +53 -9
- package/lib/utils/interpolateBorder.d.ts.map +1 -1
- package/lib/utils/interpolateBorder.js +136 -106
- package/lib/utils/interpolateBorder.js.map +1 -1
- package/lib/utils/interpolatePixel.d.ts +16 -7
- package/lib/utils/interpolatePixel.d.ts.map +1 -1
- package/lib/utils/interpolatePixel.js +121 -80
- package/lib/utils/interpolatePixel.js.map +1 -1
- package/lib/utils/round.d.ts +6 -1
- package/lib/utils/round.d.ts.map +1 -1
- package/lib/utils/round.js +18 -9
- package/lib/utils/round.js.map +1 -1
- package/lib/utils/sampleBackgroundPoints.d.ts +34 -0
- package/lib/utils/sampleBackgroundPoints.d.ts.map +1 -0
- package/lib/utils/sampleBackgroundPoints.js +37 -0
- package/lib/utils/sampleBackgroundPoints.js.map +1 -0
- package/lib/utils/setBlendedPixel.d.ts +11 -0
- package/lib/utils/setBlendedPixel.d.ts.map +1 -0
- package/lib/utils/setBlendedPixel.js +36 -0
- package/lib/utils/setBlendedPixel.js.map +1 -0
- package/lib/utils/setBlendedVisiblePixel.d.ts +11 -0
- package/lib/utils/setBlendedVisiblePixel.d.ts.map +1 -0
- package/lib/utils/setBlendedVisiblePixel.js +14 -0
- package/lib/utils/setBlendedVisiblePixel.js.map +1 -0
- package/lib/utils/surroundingPixels.d.ts +9 -0
- package/lib/utils/surroundingPixels.d.ts.map +1 -0
- package/lib/utils/surroundingPixels.js +15 -0
- package/lib/utils/surroundingPixels.js.map +1 -0
- package/lib/utils/utils.types.d.ts +25 -0
- package/lib/utils/utils.types.d.ts.map +1 -0
- package/lib/utils/utils.types.js +2 -0
- package/lib/utils/utils.types.js.map +1 -0
- package/lib/utils/validators/assert.d.ts +12 -0
- package/lib/utils/validators/assert.d.ts.map +1 -0
- package/lib/utils/validators/assert.js +18 -0
- package/lib/utils/validators/assert.js.map +1 -0
- package/lib/utils/validators/checkKernel.d.ts +6 -0
- package/lib/utils/validators/checkKernel.d.ts.map +1 -0
- package/lib/utils/validators/checkKernel.js +10 -0
- package/lib/utils/validators/checkKernel.js.map +1 -0
- package/lib/utils/validators/checkPointIsInteger.d.ts +8 -0
- package/lib/utils/validators/checkPointIsInteger.d.ts.map +1 -0
- package/lib/utils/validators/checkPointIsInteger.js +11 -0
- package/lib/utils/validators/checkPointIsInteger.js.map +1 -0
- package/lib/utils/validators/checkProcessable.d.ts +25 -0
- package/lib/utils/validators/checkProcessable.d.ts.map +1 -0
- package/lib/utils/validators/checkProcessable.js +64 -0
- package/lib/utils/validators/checkProcessable.js.map +1 -0
- package/lib/utils/validators/validators.d.ts +39 -0
- package/lib/utils/validators/validators.d.ts.map +1 -0
- package/lib/utils/validators/validators.js +66 -0
- package/lib/utils/validators/validators.js.map +1 -0
- package/package.json +91 -18
- package/src/Image.ts +922 -238
- package/src/Mask.ts +731 -0
- package/src/Stack.ts +204 -0
- package/src/align/affineTransfrom/affineFitFunction.ts +27 -0
- package/src/align/affineTransfrom/applyAffineTransform.ts +27 -0
- package/src/align/affineTransfrom/createAffineTransformModel.ts +31 -0
- package/src/align/affineTransfrom/drawResult.ts +56 -0
- package/src/align/affineTransfrom/getAffineTransform.ts +310 -0
- package/src/align/affineTransfrom/getEuclideanDistance.ts +11 -0
- package/src/align/affineTransfrom/getMatrixFromPoints.ts +20 -0
- package/src/align/affineTransfrom/getPointsFromMatrix.ts +17 -0
- package/src/align/affineTransfrom/utils/getSourceWithoutMargins.ts +30 -0
- package/src/align/alignMinDifference.ts +114 -0
- package/src/align/index.ts +2 -0
- package/src/compare/add.ts +34 -0
- package/src/compare/computePsnr.ts +17 -0
- package/src/compare/computeRmse.ts +33 -0
- package/src/compare/divide.ts +50 -0
- package/src/compare/index.ts +6 -0
- package/src/compare/multiply.ts +48 -0
- package/src/compare/subtract.ts +86 -0
- package/src/compute/getExtrema.ts +103 -0
- package/src/compute/histogram.ts +32 -10
- package/src/compute/index.ts +5 -1
- package/src/compute/mean.ts +48 -0
- package/src/compute/median.ts +50 -0
- package/src/compute/variance.ts +41 -0
- package/src/correctColor/correctColor.ts +109 -0
- package/src/correctColor/index.ts +1 -0
- package/src/correctColor/utils/formatData.ts +86 -0
- package/src/correctColor/utils/getImageColors.ts +23 -0
- package/src/correctColor/utils/referenceColorCard.ts +175 -0
- package/src/draw/drawCircleOnImage.ts +123 -0
- package/src/draw/drawLineOnImage.ts +64 -0
- package/src/draw/drawLineOnMask.ts +45 -0
- package/src/draw/drawMarker.ts +108 -0
- package/src/draw/drawMarkers.ts +25 -0
- package/src/draw/drawPoints.ts +74 -0
- package/src/draw/drawPolygonOnImage.ts +80 -0
- package/src/draw/drawPolygonOnMask.ts +69 -0
- package/src/draw/drawPolylineOnImage.ts +56 -0
- package/src/draw/drawPolylineOnMask.ts +37 -0
- package/src/draw/drawRectangle.ts +123 -0
- package/src/draw/index.ts +11 -0
- package/src/draw/utils/deleteDuplicates.ts +21 -0
- package/src/draw/utils/roundPoint.ts +13 -0
- package/src/featureMatching/descriptors/getBrief.ts +42 -0
- package/src/featureMatching/descriptors/getBriefDescriptors.ts +108 -0
- package/src/featureMatching/descriptors/utils/getKeypointPatch.ts +59 -0
- package/src/featureMatching/descriptors/utils/sliceBrief.ts +34 -0
- package/src/featureMatching/featureMatching.types.ts +26 -0
- package/src/featureMatching/index.ts +12 -0
- package/src/featureMatching/keypoints/getBestKeypointsInRadius.ts +39 -0
- package/src/featureMatching/keypoints/getFastKeypoints.ts +157 -0
- package/src/featureMatching/keypoints/getFastScore.ts +37 -0
- package/src/featureMatching/keypoints/getHarrisScore.ts +73 -0
- package/src/featureMatching/keypoints/getIntensityCentroid.ts +34 -0
- package/src/featureMatching/keypoints/getIntensityMoment.ts +43 -0
- package/src/featureMatching/keypoints/getOrientedFastKeypoints.ts +67 -0
- package/src/featureMatching/keypoints/getPatchIntensityCentroid.ts +39 -0
- package/src/featureMatching/keypoints/getPatchIntensityMoment.ts +56 -0
- package/src/featureMatching/keypoints/isFastKeypoint.ts +101 -0
- package/src/featureMatching/keypoints/utils/getDistanceMatrix.ts +35 -0
- package/src/featureMatching/keypoints/utils/getKeypointsInRadius.ts +34 -0
- package/src/featureMatching/matching/bruteForceMatch.ts +79 -0
- package/src/featureMatching/matching/filterEuclideanDistance.ts +71 -0
- package/src/featureMatching/matching/filterSmallestDistanceMatches.ts +33 -0
- package/src/featureMatching/matching/getCrosscheckMatches.ts +69 -0
- package/src/featureMatching/matching/getHammingDistance.ts +20 -0
- package/src/featureMatching/utils/checkBorderDistance.ts +22 -0
- package/src/featureMatching/utils/compareIntensity.ts +35 -0
- package/src/featureMatching/utils/extractSquareImage.ts +27 -0
- package/src/featureMatching/utils/getColors.ts +34 -0
- package/src/featureMatching/utils/getGaussianPoints.ts +64 -0
- package/src/featureMatching/utils/getKeypointColor.ts +29 -0
- package/src/featureMatching/utils/getMatchColor.ts +27 -0
- package/src/featureMatching/utils/sortByDistance.ts +12 -0
- package/src/featureMatching/utils/sortBySourceDest.ts +27 -0
- package/src/featureMatching/visualize/Montage.ts +165 -0
- package/src/featureMatching/visualize/drawKeypoints.ts +146 -0
- package/src/featureMatching/visualize/drawMatches.ts +107 -0
- package/src/featureMatching/visualize/overlapImages.ts +67 -0
- package/src/featureMatching/visualize/scaleKeypoints.ts +24 -0
- package/src/filters/and.ts +33 -0
- package/src/filters/blur.ts +41 -6
- package/src/filters/convolution.ts +173 -137
- package/src/filters/derivativeFilter.ts +71 -0
- package/src/filters/flip.ts +35 -0
- package/src/filters/flipX.ts +32 -0
- package/src/filters/flipY.ts +34 -0
- package/src/filters/gaussianBlur.ts +74 -27
- package/src/filters/gradientFilter.ts +103 -0
- package/src/filters/hypotenuse.ts +62 -0
- package/src/filters/increaseContrast.ts +69 -0
- package/src/filters/index.ts +14 -4
- package/src/filters/invert.ts +42 -11
- package/src/filters/level.ts +131 -0
- package/src/filters/medianFilter.ts +83 -0
- package/src/filters/or.ts +33 -0
- package/src/filters/pixelate.ts +178 -0
- package/src/geometry/getPerspectiveWarp.ts +169 -0
- package/src/geometry/index.ts +6 -3
- package/src/geometry/resize.ts +89 -57
- package/src/geometry/rotate.ts +56 -44
- package/src/geometry/transform.ts +137 -51
- package/src/geometry/transformRotate.ts +65 -0
- package/src/index.ts +24 -8
- package/src/load/decode.ts +18 -16
- package/src/load/decodeJpeg.ts +20 -4
- package/src/load/decodePng.ts +30 -27
- package/src/load/decodeTiff.ts +63 -0
- package/src/load/fetchURL.ts +13 -0
- package/src/load/getMetadata.ts +18 -0
- package/src/load/index.ts +9 -6
- package/src/load/load.types.ts +7 -0
- package/src/load/read.ts +15 -12
- package/src/load/readCanvas.ts +11 -9
- package/src/load/readImg.ts +15 -9
- package/src/maskAnalysis/getBorderPoints.ts +70 -0
- package/src/maskAnalysis/getConvexHull.ts +29 -0
- package/src/maskAnalysis/getFeret.ts +239 -0
- package/src/maskAnalysis/getMbr.ts +17 -0
- package/src/maskAnalysis/index.ts +1 -0
- package/src/maskAnalysis/maskAnalysis.types.ts +100 -0
- package/src/maskAnalysis/utils/getAngle.ts +40 -0
- package/src/maskAnalysis/utils/getExtendedBorderPoints.ts +30 -0
- package/src/maskAnalysis/utils/getMbrAngle.ts +25 -0
- package/src/maskAnalysis/utils/getMbrFromPoints.ts +112 -0
- package/src/maskAnalysis/utils/monotoneChainConvexHull.ts +65 -0
- package/src/morphology/bottomHat.ts +64 -0
- package/src/morphology/cannyEdgeDetector.ts +209 -0
- package/src/morphology/clearBorder.ts +41 -0
- package/src/morphology/close.ts +59 -0
- package/src/morphology/dilate.ts +261 -0
- package/src/morphology/erode.ts +261 -0
- package/src/morphology/floodFill.ts +38 -0
- package/src/morphology/index.ts +11 -0
- package/src/morphology/morphologicalGradient.ts +66 -0
- package/src/morphology/multipleFloodFill.ts +135 -0
- package/src/morphology/open.ts +62 -0
- package/src/morphology/solidFill.ts +29 -0
- package/src/morphology/topHat.ts +62 -0
- package/src/operations/convertBitDepth.ts +74 -0
- package/src/operations/convertColor.ts +143 -66
- package/src/operations/copyTo.ts +79 -0
- package/src/operations/correctBackground.ts +71 -0
- package/src/operations/crop.ts +94 -0
- package/src/operations/cropAlpha.ts +108 -0
- package/src/operations/cropRectangle.ts +112 -0
- package/src/operations/extendBorders.ts +119 -0
- package/src/operations/extract.ts +76 -0
- package/src/operations/getMaskFromCannyEdge.ts +41 -0
- package/src/operations/grey.ts +139 -0
- package/src/operations/greyAlgorithms.ts +248 -0
- package/src/operations/index.ts +16 -5
- package/src/operations/merge.ts +36 -20
- package/src/operations/operations.types.ts +6 -0
- package/src/operations/paintMaskOnImage.ts +111 -0
- package/src/operations/paintMaskOnMask.ts +59 -0
- package/src/operations/split.ts +11 -4
- package/src/operations/threshold.ts +111 -52
- package/src/operations/thresholds/huang.ts +84 -0
- package/src/operations/thresholds/intermodes.ts +61 -0
- package/src/operations/thresholds/isodata.ts +53 -0
- package/src/operations/thresholds/li.ts +80 -0
- package/src/operations/thresholds/maxEntropy.ts +88 -0
- package/src/operations/thresholds/mean.ts +22 -0
- package/src/operations/thresholds/minError.ts +101 -0
- package/src/operations/thresholds/minimum.ts +77 -0
- package/src/operations/thresholds/moments.ts +59 -0
- package/src/operations/thresholds/otsu.ts +7 -1
- package/src/operations/thresholds/percentile.ts +39 -0
- package/src/operations/thresholds/renyiEntropy.ts +145 -0
- package/src/operations/thresholds/shanbhag.ts +80 -0
- package/src/operations/thresholds/triangle.ts +8 -2
- package/src/operations/thresholds/yen.ts +59 -0
- package/src/point/operations.ts +29 -0
- package/src/roi/Roi.ts +661 -0
- package/src/roi/RoiMapManager.ts +97 -0
- package/src/roi/colorRois.ts +68 -0
- package/src/roi/computeRois.ts +90 -0
- package/src/roi/fromMask.ts +182 -0
- package/src/roi/getBorderPoints.ts +20 -0
- package/src/roi/getMask.ts +41 -0
- package/src/roi/getRois.ts +65 -0
- package/src/roi/index.ts +10 -0
- package/src/roi/properties/getEllipse.ts +124 -0
- package/src/roi/roi.types.ts +23 -0
- package/src/roi/utils/colorMaps/getBinaryMap.ts +67 -0
- package/src/roi/utils/colorMaps/getRainbowMap.ts +59 -0
- package/src/roi/utils/colorMaps/getSaturationMap.ts +70 -0
- package/src/roi/utils/getColorMap.ts +46 -0
- package/src/roi/utils/hsvToRgb.ts +61 -0
- package/src/roi/utils/rgbToNumber.ts +8 -0
- package/src/roi/waterShed.ts +146 -0
- package/src/save/encode.ts +41 -43
- package/src/save/encodeBmp.ts +24 -0
- package/src/save/encodeDataURL.ts +25 -0
- package/src/save/encodeJpeg.ts +22 -13
- package/src/save/encodePng.ts +30 -6
- package/src/save/index.ts +6 -5
- package/src/save/write.ts +129 -50
- package/src/save/writeCanvas.ts +45 -19
- package/src/ssim/compute_dssim.ts +21 -0
- package/src/ssim/compute_ssim.ts +94 -0
- package/src/ssim/index.ts +2 -0
- package/src/stack/compute/histogram.ts +26 -0
- package/src/stack/compute/maxImage.ts +31 -0
- package/src/stack/compute/meanImage.ts +37 -0
- package/src/stack/compute/medianImage.ts +30 -0
- package/src/stack/compute/minImage.ts +32 -0
- package/src/stack/compute/sum.ts +37 -0
- package/src/stack/index.ts +7 -0
- package/src/stack/load/decodeStack.ts +26 -0
- package/src/stack/load/decodeTiff.ts +19 -0
- package/src/stack/utils/checkImagesValid.ts +35 -0
- package/src/stack/utils/checkProcessable.ts +61 -0
- package/src/stack/utils/getStackFromFolder.ts +17 -0
- package/src/types/bresenham-zingl.d.ts +50 -0
- package/src/utils/arrayPointsToObjects.ts +15 -0
- package/src/utils/boolToNumber.ts +17 -0
- package/src/utils/borderIterator.ts +22 -0
- package/src/utils/clamp.ts +32 -5
- package/src/utils/constants/channelLabels.ts +9 -0
- package/src/utils/constants/colorModels.ts +45 -0
- package/src/utils/constants/kernels.ts +73 -0
- package/src/utils/constants/kinds.ts +26 -0
- package/src/utils/copyData.ts +21 -0
- package/src/utils/cross_platform.ts +18 -0
- package/src/utils/geometry/angles.ts +26 -0
- package/src/utils/geometry/getCirclePoints.ts +123 -0
- package/src/utils/geometry/index.ts +1 -0
- package/src/utils/geometry/lines.ts +26 -0
- package/src/utils/geometry/points.ts +102 -0
- package/src/utils/geometry/polygons.ts +32 -0
- package/src/utils/geometry/removeClosePoints.ts +82 -0
- package/src/utils/getDefaultColor.ts +20 -0
- package/src/utils/getIndex.ts +26 -0
- package/src/utils/getMinMax.ts +27 -0
- package/src/utils/getOutputImage.ts +149 -32
- package/src/utils/getRadius.ts +11 -0
- package/src/utils/interpolateBorder.ts +95 -62
- package/src/utils/interpolatePixel.ts +107 -57
- package/src/utils/round.ts +13 -3
- package/src/utils/sampleBackgroundPoints.ts +84 -0
- package/src/utils/setBlendedPixel.ts +54 -0
- package/src/utils/setBlendedVisiblePixel.ts +22 -0
- package/src/utils/surroundingPixels.ts +14 -0
- package/src/utils/utils.types.ts +32 -0
- package/src/utils/validators/assert.ts +18 -0
- package/src/utils/validators/checkKernel.ts +11 -0
- package/src/utils/validators/checkPointIsInteger.ts +12 -0
- package/src/utils/validators/checkProcessable.ts +95 -0
- package/src/utils/validators/validators.ts +82 -0
- package/lib/load/checkHeader.d.ts +0 -8
- package/lib/load/checkHeader.d.ts.map +0 -1
- package/lib/load/checkHeader.js +0 -21
- package/lib/load/checkHeader.js.map +0 -1
- package/lib/operations/convertDepth.d.ts +0 -3
- package/lib/operations/convertDepth.d.ts.map +0 -1
- package/lib/operations/convertDepth.js +0 -40
- package/lib/operations/convertDepth.js.map +0 -1
- package/lib/types.d.ts +0 -13
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -17
- package/lib/types.js.map +0 -1
- package/lib/utils/kinds.d.ts +0 -9
- package/lib/utils/kinds.d.ts.map +0 -1
- package/lib/utils/kinds.js +0 -22
- package/lib/utils/kinds.js.map +0 -1
- package/lib/utils/validators.d.ts +0 -7
- package/lib/utils/validators.d.ts.map +0 -1
- package/lib/utils/validators.js +0 -19
- package/lib/utils/validators.js.map +0 -1
- package/lib-esm/Image.d.ts +0 -180
- package/lib-esm/Image.d.ts.map +0 -1
- package/lib-esm/Image.js +0 -337
- package/lib-esm/Image.js.map +0 -1
- package/lib-esm/compute/histogram.d.ts +0 -15
- package/lib-esm/compute/histogram.d.ts.map +0 -1
- package/lib-esm/compute/histogram.js +0 -21
- package/lib-esm/compute/histogram.js.map +0 -1
- package/lib-esm/compute/index.d.ts +0 -2
- package/lib-esm/compute/index.d.ts.map +0 -1
- package/lib-esm/compute/index.js +0 -2
- package/lib-esm/compute/index.js.map +0 -1
- package/lib-esm/filters/blur.d.ts +0 -11
- package/lib-esm/filters/blur.d.ts.map +0 -1
- package/lib-esm/filters/blur.js +0 -11
- package/lib-esm/filters/blur.js.map +0 -1
- package/lib-esm/filters/convolution.d.ts +0 -11
- package/lib-esm/filters/convolution.d.ts.map +0 -1
- package/lib-esm/filters/convolution.js +0 -125
- package/lib-esm/filters/convolution.js.map +0 -1
- package/lib-esm/filters/gaussianBlur.d.ts +0 -18
- package/lib-esm/filters/gaussianBlur.d.ts.map +0 -1
- package/lib-esm/filters/gaussianBlur.js +0 -45
- package/lib-esm/filters/gaussianBlur.js.map +0 -1
- package/lib-esm/filters/index.d.ts +0 -5
- package/lib-esm/filters/index.d.ts.map +0 -1
- package/lib-esm/filters/index.js +0 -5
- package/lib-esm/filters/index.js.map +0 -1
- package/lib-esm/filters/invert.d.ts +0 -10
- package/lib-esm/filters/invert.d.ts.map +0 -1
- package/lib-esm/filters/invert.js +0 -14
- package/lib-esm/filters/invert.js.map +0 -1
- package/lib-esm/geometry/index.d.ts +0 -4
- package/lib-esm/geometry/index.d.ts.map +0 -1
- package/lib-esm/geometry/index.js +0 -4
- package/lib-esm/geometry/index.js.map +0 -1
- package/lib-esm/geometry/resize.d.ts +0 -14
- package/lib-esm/geometry/resize.d.ts.map +0 -1
- package/lib-esm/geometry/resize.js +0 -88
- package/lib-esm/geometry/resize.js.map +0 -1
- package/lib-esm/geometry/rotate.d.ts +0 -14
- package/lib-esm/geometry/rotate.d.ts.map +0 -1
- package/lib-esm/geometry/rotate.js +0 -24
- package/lib-esm/geometry/rotate.js.map +0 -1
- package/lib-esm/geometry/transform.d.ts +0 -13
- package/lib-esm/geometry/transform.d.ts.map +0 -1
- package/lib-esm/geometry/transform.js +0 -82
- package/lib-esm/geometry/transform.js.map +0 -1
- package/lib-esm/index.d.ts +0 -9
- package/lib-esm/index.d.ts.map +0 -1
- package/lib-esm/index.js +0 -9
- package/lib-esm/index.js.map +0 -1
- package/lib-esm/load/checkHeader.d.ts +0 -8
- package/lib-esm/load/checkHeader.d.ts.map +0 -1
- package/lib-esm/load/checkHeader.js +0 -18
- package/lib-esm/load/checkHeader.js.map +0 -1
- package/lib-esm/load/decode.d.ts +0 -8
- package/lib-esm/load/decode.d.ts.map +0 -1
- package/lib-esm/load/decode.js +0 -23
- package/lib-esm/load/decode.js.map +0 -1
- package/lib-esm/load/decodeJpeg.d.ts +0 -7
- package/lib-esm/load/decodeJpeg.d.ts.map +0 -1
- package/lib-esm/load/decodeJpeg.js +0 -14
- package/lib-esm/load/decodeJpeg.js.map +0 -1
- package/lib-esm/load/decodePng.d.ts +0 -7
- package/lib-esm/load/decodePng.d.ts.map +0 -1
- package/lib-esm/load/decodePng.js +0 -65
- package/lib-esm/load/decodePng.js.map +0 -1
- package/lib-esm/load/index.d.ts +0 -7
- package/lib-esm/load/index.d.ts.map +0 -1
- package/lib-esm/load/index.js +0 -7
- package/lib-esm/load/index.js.map +0 -1
- package/lib-esm/load/read.d.ts +0 -12
- package/lib-esm/load/read.d.ts.map +0 -1
- package/lib-esm/load/read.js +0 -20
- package/lib-esm/load/read.js.map +0 -1
- package/lib-esm/load/readCanvas.d.ts +0 -3
- package/lib-esm/load/readCanvas.d.ts.map +0 -1
- package/lib-esm/load/readCanvas.js +0 -15
- package/lib-esm/load/readCanvas.js.map +0 -1
- package/lib-esm/load/readImg.d.ts +0 -3
- package/lib-esm/load/readImg.d.ts.map +0 -1
- package/lib-esm/load/readImg.js +0 -14
- package/lib-esm/load/readImg.js.map +0 -1
- package/lib-esm/operations/convertColor.d.ts +0 -6
- package/lib-esm/operations/convertColor.d.ts.map +0 -1
- package/lib-esm/operations/convertColor.js +0 -73
- package/lib-esm/operations/convertColor.js.map +0 -1
- package/lib-esm/operations/convertDepth.d.ts +0 -3
- package/lib-esm/operations/convertDepth.d.ts.map +0 -1
- package/lib-esm/operations/convertDepth.js +0 -37
- package/lib-esm/operations/convertDepth.js.map +0 -1
- package/lib-esm/operations/index.d.ts +0 -6
- package/lib-esm/operations/index.d.ts.map +0 -1
- package/lib-esm/operations/index.js +0 -6
- package/lib-esm/operations/index.js.map +0 -1
- package/lib-esm/operations/merge.d.ts +0 -7
- package/lib-esm/operations/merge.d.ts.map +0 -1
- package/lib-esm/operations/merge.js +0 -45
- package/lib-esm/operations/merge.js.map +0 -1
- package/lib-esm/operations/split.d.ts +0 -3
- package/lib-esm/operations/split.d.ts.map +0 -1
- package/lib-esm/operations/split.js +0 -13
- package/lib-esm/operations/split.js.map +0 -1
- package/lib-esm/operations/threshold.d.ts +0 -19
- package/lib-esm/operations/threshold.d.ts.map +0 -1
- package/lib-esm/operations/threshold.js +0 -55
- package/lib-esm/operations/threshold.js.map +0 -1
- package/lib-esm/operations/thresholds/otsu.d.ts +0 -2
- package/lib-esm/operations/thresholds/otsu.d.ts.map +0 -1
- package/lib-esm/operations/thresholds/otsu.js +0 -32
- package/lib-esm/operations/thresholds/otsu.js.map +0 -1
- package/lib-esm/operations/thresholds/triangle.d.ts +0 -2
- package/lib-esm/operations/thresholds/triangle.d.ts.map +0 -1
- package/lib-esm/operations/thresholds/triangle.js +0 -103
- package/lib-esm/operations/thresholds/triangle.js.map +0 -1
- package/lib-esm/save/encode.d.ts +0 -35
- package/lib-esm/save/encode.d.ts.map +0 -1
- package/lib-esm/save/encode.js +0 -22
- package/lib-esm/save/encode.js.map +0 -1
- package/lib-esm/save/encodeJpeg.d.ts +0 -6
- package/lib-esm/save/encodeJpeg.d.ts.map +0 -1
- package/lib-esm/save/encodeJpeg.js +0 -16
- package/lib-esm/save/encodeJpeg.js.map +0 -1
- package/lib-esm/save/encodePng.d.ts +0 -5
- package/lib-esm/save/encodePng.d.ts.map +0 -1
- package/lib-esm/save/encodePng.js +0 -5
- package/lib-esm/save/encodePng.js.map +0 -1
- package/lib-esm/save/index.d.ts +0 -6
- package/lib-esm/save/index.d.ts.map +0 -1
- package/lib-esm/save/index.js +0 -6
- package/lib-esm/save/index.js.map +0 -1
- package/lib-esm/save/write.d.ts +0 -23
- package/lib-esm/save/write.d.ts.map +0 -1
- package/lib-esm/save/write.js +0 -46
- package/lib-esm/save/write.js.map +0 -1
- package/lib-esm/save/writeCanvas.d.ts +0 -15
- package/lib-esm/save/writeCanvas.d.ts.map +0 -1
- package/lib-esm/save/writeCanvas.js +0 -19
- package/lib-esm/save/writeCanvas.js.map +0 -1
- package/lib-esm/types.d.ts +0 -13
- package/lib-esm/types.d.ts.map +0 -1
- package/lib-esm/types.js +0 -15
- package/lib-esm/types.js.map +0 -1
- package/lib-esm/utils/clamp.d.ts +0 -4
- package/lib-esm/utils/clamp.d.ts.map +0 -1
- package/lib-esm/utils/clamp.js +0 -16
- package/lib-esm/utils/clamp.js.map +0 -1
- package/lib-esm/utils/getOutputImage.d.ts +0 -26
- package/lib-esm/utils/getOutputImage.d.ts.map +0 -1
- package/lib-esm/utils/getOutputImage.js +0 -35
- package/lib-esm/utils/getOutputImage.js.map +0 -1
- package/lib-esm/utils/interpolateBorder.d.ts +0 -10
- package/lib-esm/utils/interpolateBorder.d.ts.map +0 -1
- package/lib-esm/utils/interpolateBorder.js +0 -99
- package/lib-esm/utils/interpolateBorder.js.map +0 -1
- package/lib-esm/utils/interpolatePixel.d.ts +0 -8
- package/lib-esm/utils/interpolatePixel.d.ts.map +0 -1
- package/lib-esm/utils/interpolatePixel.js +0 -78
- package/lib-esm/utils/interpolatePixel.js.map +0 -1
- package/lib-esm/utils/kinds.d.ts +0 -9
- package/lib-esm/utils/kinds.d.ts.map +0 -1
- package/lib-esm/utils/kinds.js +0 -20
- package/lib-esm/utils/kinds.js.map +0 -1
- package/lib-esm/utils/round.d.ts +0 -2
- package/lib-esm/utils/round.d.ts.map +0 -1
- package/lib-esm/utils/round.js +0 -7
- package/lib-esm/utils/round.js.map +0 -1
- package/lib-esm/utils/validators.d.ts +0 -7
- package/lib-esm/utils/validators.d.ts.map +0 -1
- package/lib-esm/utils/validators.js +0 -15
- package/lib-esm/utils/validators.js.map +0 -1
- package/src/load/checkHeader.ts +0 -20
- package/src/operations/convertDepth.ts +0 -43
- package/src/operations/thresholds/huang.js +0 -80
- package/src/operations/thresholds/intermodes.js +0 -56
- package/src/operations/thresholds/isodata.js +0 -47
- package/src/operations/thresholds/li.js +0 -74
- package/src/operations/thresholds/maxEntropy.js +0 -79
- package/src/operations/thresholds/mean.js +0 -16
- package/src/operations/thresholds/minError.js +0 -92
- package/src/operations/thresholds/minimum.js +0 -75
- package/src/operations/thresholds/moments.js +0 -52
- package/src/operations/thresholds/percentile.js +0 -33
- package/src/operations/thresholds/renyiEntropy.js +0 -142
- package/src/operations/thresholds/shanbhag.js +0 -74
- package/src/operations/thresholds/yen.js +0 -56
- package/src/types.ts +0 -13
- package/src/utils/kinds.ts +0 -27
- package/src/utils/validators.ts +0 -23
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../src/Stack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAa3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,qBAAa,KAAK;IAChB;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAU;IACjC;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,SAAgB,KAAK,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,SAAgB,UAAU,EAAE,eAAe,CAAC;IAC5C;;OAEG;IACH,SAAgB,QAAQ,EAAE,QAAQ,CAAC;IACnC;;OAEG;IACH,SAAgB,cAAc,EAAE,OAAO,CAAC;IACxC;;OAEG;IACH,SAAgB,QAAQ,EAAE,MAAM,CAAC;IAEjC;;;;OAIG;gBACgB,MAAM,EAAE,KAAK,EAAE;IAWjC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,KAAK,CAAC;IAM7C;;;OAGG;IACI,KAAK,IAAI,KAAK;IAIrB;;;OAGG;IACI,SAAS,IAAI,KAAK,EAAE;IAI3B;;;;OAIG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK;IAIrC;;;;;;;OAOG;IACI,QAAQ,CACb,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,MAAM;IAIT;;;;;;OAMG;IACI,eAAe,CACpB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACd,MAAM;IAIT;;;;OAIG;IACI,QAAQ,IAAI,KAAK;IAIxB;;;;OAIG;IACI,QAAQ,IAAI,KAAK;IAIxB;;;;OAIG;IACI,WAAW,IAAI,KAAK;IAI3B;;;;OAIG;IACI,SAAS,IAAI,KAAK;IAIzB;;;;OAIG;IACI,GAAG,IAAI,KAAK;IAInB;;;;OAIG;IACI,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,WAAW;IAG7D;;;OAGG;IAGH;;;;OAIG;IACI,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,GAAG,KAAK;IAIpD;;;;OAIG;IACI,MAAM,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,GAAG,KAAK;CAG1D"}
|
package/lib/Stack.js
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { histogram, maxImage, meanImage, medianImage, minImage, sum, } from './stack/index.js';
|
|
2
|
+
import { checkImagesValid, verifySameDimensions, } from './stack/utils/checkImagesValid.js';
|
|
3
|
+
export class Stack {
|
|
4
|
+
/**
|
|
5
|
+
* The array of images.
|
|
6
|
+
*/
|
|
7
|
+
images;
|
|
8
|
+
/**
|
|
9
|
+
* The stack size.
|
|
10
|
+
*/
|
|
11
|
+
size;
|
|
12
|
+
/**
|
|
13
|
+
* Do the images have an alpha channel?
|
|
14
|
+
*/
|
|
15
|
+
alpha;
|
|
16
|
+
/**
|
|
17
|
+
* The color model of the images.
|
|
18
|
+
*/
|
|
19
|
+
colorModel;
|
|
20
|
+
/**
|
|
21
|
+
* The bit depth of the images.
|
|
22
|
+
*/
|
|
23
|
+
bitDepth;
|
|
24
|
+
/**
|
|
25
|
+
* Whether all the images of the stack have the same dimensions.
|
|
26
|
+
*/
|
|
27
|
+
sameDimensions;
|
|
28
|
+
/**
|
|
29
|
+
* The number of channels of the images.
|
|
30
|
+
*/
|
|
31
|
+
channels;
|
|
32
|
+
/**
|
|
33
|
+
* Create a new stack from an array of images.
|
|
34
|
+
* The images must have the same bit depth and color model.
|
|
35
|
+
* @param images - Array of images from which to create the stack.
|
|
36
|
+
*/
|
|
37
|
+
constructor(images) {
|
|
38
|
+
checkImagesValid(images);
|
|
39
|
+
this.images = images;
|
|
40
|
+
this.size = images.length;
|
|
41
|
+
this.alpha = images[0].alpha;
|
|
42
|
+
this.colorModel = images[0].colorModel;
|
|
43
|
+
this.channels = images[0].channels;
|
|
44
|
+
this.bitDepth = images[0].bitDepth;
|
|
45
|
+
this.sameDimensions = verifySameDimensions(images);
|
|
46
|
+
}
|
|
47
|
+
*[Symbol.iterator]() {
|
|
48
|
+
for (const image of this.images) {
|
|
49
|
+
yield image;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Clone a stack. The images are a copy of the original images.
|
|
54
|
+
* @returns A new stack with the same images.
|
|
55
|
+
*/
|
|
56
|
+
clone() {
|
|
57
|
+
return new Stack(this.images.map((image) => image.clone()));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get the images of the stack. Mainly for debugging purposes.
|
|
61
|
+
* @returns The images.
|
|
62
|
+
*/
|
|
63
|
+
getImages() {
|
|
64
|
+
return this.images;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get the image at the given index.
|
|
68
|
+
* @param index - The index of the image.
|
|
69
|
+
* @returns The image.
|
|
70
|
+
*/
|
|
71
|
+
getImage(index) {
|
|
72
|
+
return this.images[index];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get a value from an image of the stack.
|
|
76
|
+
* @param stackIndex - Index of the image in the stack.
|
|
77
|
+
* @param row - Row index of the pixel.
|
|
78
|
+
* @param column - Column index of the pixel.
|
|
79
|
+
* @param channel - The channel to retrieve.
|
|
80
|
+
* @returns The value at the given position.
|
|
81
|
+
*/
|
|
82
|
+
getValue(stackIndex, row, column, channel) {
|
|
83
|
+
return this.images[stackIndex].getValue(row, column, channel);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get a value from an image of the stack. Specify the pixel position using its index.
|
|
87
|
+
* @param stackIndex - Index of the image in the stack.
|
|
88
|
+
* @param index - The index of the pixel.
|
|
89
|
+
* @param channel - The channel to retrieve.
|
|
90
|
+
* @returns The value at the given position.
|
|
91
|
+
*/
|
|
92
|
+
getValueByIndex(stackIndex, index, channel) {
|
|
93
|
+
return this.images[stackIndex].getValueByIndex(index, channel);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Return the image containing the minimum values of all the images in the stack for
|
|
97
|
+
* each pixel. All the images must have the same dimensions.
|
|
98
|
+
* @returns The minimum image.
|
|
99
|
+
*/
|
|
100
|
+
minImage() {
|
|
101
|
+
return minImage(this);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Return the image containing the maximum values of all the images in the stack for
|
|
105
|
+
* each pixel. All the images must have the same dimensions.
|
|
106
|
+
* @returns The maximum image.
|
|
107
|
+
*/
|
|
108
|
+
maxImage() {
|
|
109
|
+
return maxImage(this);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Return the image containing the median values of all the images in the stack for
|
|
113
|
+
* each pixel. All the images must have the same dimensions.
|
|
114
|
+
* @returns The median image.
|
|
115
|
+
*/
|
|
116
|
+
medianImage() {
|
|
117
|
+
return medianImage(this);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Return the image containing the average values of all the images in the stack for
|
|
121
|
+
* each pixel. All the images must have the same dimensions.
|
|
122
|
+
* @returns The mean image.
|
|
123
|
+
*/
|
|
124
|
+
meanImage() {
|
|
125
|
+
return meanImage(this);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Return a 16 bits depth image containing the sum values of all the images in the stack for
|
|
129
|
+
* each pixel.
|
|
130
|
+
* @returns The sum image.
|
|
131
|
+
*/
|
|
132
|
+
sum() {
|
|
133
|
+
return sum(this);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Get the sum of all the histograms of the stack's images. If no channel is specified in the options, the images must be GREY.
|
|
137
|
+
* @param options - Histogram options.
|
|
138
|
+
* @returns The histogram of the stack.
|
|
139
|
+
*/
|
|
140
|
+
histogram(options = {}) {
|
|
141
|
+
return histogram(this, options);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Align all the images of the stack on the image at the given index.
|
|
145
|
+
* @param refIndex - The index of the reference image.
|
|
146
|
+
*/
|
|
147
|
+
// public alignImages(refIndex: number): Stack {}
|
|
148
|
+
/**
|
|
149
|
+
* Map a function on all the images of the stack.
|
|
150
|
+
* @param callback - Function to apply on each image.
|
|
151
|
+
* @returns New stack with the modified images.
|
|
152
|
+
*/
|
|
153
|
+
map(callback) {
|
|
154
|
+
return new Stack(this.images.map(callback));
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Filter the images in the stack.
|
|
158
|
+
* @param callback - Function to decide which images to keep.
|
|
159
|
+
* @returns New filtered stack.
|
|
160
|
+
*/
|
|
161
|
+
filter(callback) {
|
|
162
|
+
return new Stack(this.images.filter(callback));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=Stack.js.map
|
package/lib/Stack.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.js","sourceRoot":"","sources":["../src/Stack.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACX,QAAQ,EACR,GAAG,GACJ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,gBAAgB,EAChB,oBAAo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,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjD,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Point } from '../../geometry/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The fit function for an affine transformation.
|
|
4
|
+
* Get the best transformation parameters for the given source and destination.
|
|
5
|
+
* @param source - Source points.
|
|
6
|
+
* @param destination - Destination points.
|
|
7
|
+
* @returns The model parameters in the format [angle, xTranslation, yTranslation]
|
|
8
|
+
*/
|
|
9
|
+
export declare function affineFitFunction(source: Point[], destination: Point[]): number[];
|
|
10
|
+
//# sourceMappingURL=affineFitFunction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"affineFitFunction.d.ts","sourceRoot":"","sources":["../../../src/align/affineTransfrom/affineFitFunction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAIrD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,KAAK,EAAE,EACf,WAAW,EAAE,KAAK,EAAE,GACnB,MAAM,EAAE,CAUV"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getAffineTransform } from 'ml-affine-transform';
|
|
2
|
+
import { getMatrixFromPoints } from './getMatrixFromPoints.js';
|
|
3
|
+
/**
|
|
4
|
+
* The fit function for an affine transformation.
|
|
5
|
+
* Get the best transformation parameters for the given source and destination.
|
|
6
|
+
* @param source - Source points.
|
|
7
|
+
* @param destination - Destination points.
|
|
8
|
+
* @returns The model parameters in the format [angle, xTranslation, yTranslation]
|
|
9
|
+
*/
|
|
10
|
+
export function affineFitFunction(source, destination) {
|
|
11
|
+
const sourceMatrix = getMatrixFromPoints(source);
|
|
12
|
+
const destinationMatrix = getMatrixFromPoints(destination);
|
|
13
|
+
const result = getAffineTransform(sourceMatrix, destinationMatrix);
|
|
14
|
+
return [
|
|
15
|
+
result.rotation,
|
|
16
|
+
result.translation.x,
|
|
17
|
+
result.translation.y,
|
|
18
|
+
result.scale,
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=affineFitFunction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"affineFitFunction.js","sourceRoot":"","sources":["../../../src/align/affineTransfrom/affineFitFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAIzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAe,EACf,WAAoB;IAEpB,MAAM,YAAY,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACjD,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAC3D,MAAM,MAAM,GAAG,kBAAkB,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;IACnE,OAAO;QACL,MAAM,CAAC,QAAQ;QACf,MAAM,CAAC,WAAW,CAAC,CAAC;QACpB,MAAM,CAAC,WAAW,CAAC,CAAC;QACpB,MAAM,CAAC,KAAK;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ModelFunction } from 'ml-ransac';
|
|
2
|
+
import type { Point } from '../../geometry/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Apply a given transform to a set of points.
|
|
5
|
+
* @param points - Points to process.
|
|
6
|
+
* @param model - The transformation function.
|
|
7
|
+
* @returns The transformed points.
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyAffineTransfom(points: Point[], model: ModelFunction<Point>): Point[];
|
|
10
|
+
//# sourceMappingURL=applyAffineTransform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyAffineTransform.d.ts","sourceRoot":"","sources":["../../../src/align/affineTransfrom/applyAffineTransform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,KAAK,EAAE,EACf,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,GAC1B,KAAK,EAAE,CAaT"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apply a given transform to a set of points.
|
|
3
|
+
* @param points - Points to process.
|
|
4
|
+
* @param model - The transformation function.
|
|
5
|
+
* @returns The transformed points.
|
|
6
|
+
*/
|
|
7
|
+
export function applyAffineTransfom(points, model) {
|
|
8
|
+
const result = [];
|
|
9
|
+
for (const point of points) {
|
|
10
|
+
const transformed = model(point);
|
|
11
|
+
const roundedPoint = {
|
|
12
|
+
row: Math.round(transformed.row),
|
|
13
|
+
column: Math.round(transformed.column),
|
|
14
|
+
};
|
|
15
|
+
result.push(roundedPoint);
|
|
16
|
+
}
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=applyAffineTransform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyAffineTransform.js","sourceRoot":"","sources":["../../../src/align/affineTransfrom/applyAffineTransform.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAe,EACf,KAA2B;IAE3B,MAAM,MAAM,GAAY,EAAE,CAAC;IAE3B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QACjC,MAAM,YAAY,GAAG;YACnB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC;YAChC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC;SACvC,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ModelFunction } from 'ml-ransac';
|
|
2
|
+
import type { Point } from '../../geometry/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Generate a function that applies the given transformation parameters to a point.
|
|
5
|
+
* The transform is an array of number in the format: [angle, x, y, scale].
|
|
6
|
+
* @param transform - Transformation to apply.
|
|
7
|
+
* @returns Function to transform a point.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createAffineTransformModel(transform: number[]): ModelFunction<Point>;
|
|
10
|
+
//# sourceMappingURL=createAffineTransformModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAffineTransformModel.d.ts","sourceRoot":"","sources":["../../../src/align/affineTransfrom/createAffineTransformModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EAAE,GAClB,aAAa,CAAC,KAAK,CAAC,CAkBtB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a function that applies the given transformation parameters to a point.
|
|
3
|
+
* The transform is an array of number in the format: [angle, x, y, scale].
|
|
4
|
+
* @param transform - Transformation to apply.
|
|
5
|
+
* @returns Function to transform a point.
|
|
6
|
+
*/
|
|
7
|
+
export function createAffineTransformModel(transform) {
|
|
8
|
+
if (transform.length !== 4) {
|
|
9
|
+
throw new Error('Transform had wrong number of parameters');
|
|
10
|
+
}
|
|
11
|
+
return (point) => {
|
|
12
|
+
const angle = (transform[0] * Math.PI) / 180;
|
|
13
|
+
const xTranslation = transform[1];
|
|
14
|
+
const yTranslation = transform[2];
|
|
15
|
+
const scale = transform[3];
|
|
16
|
+
const column = scale * (Math.cos(angle) * point.column - Math.sin(angle) * point.row) +
|
|
17
|
+
xTranslation;
|
|
18
|
+
const row = scale * (Math.sin(angle) * point.column + Math.cos(angle) * point.row) +
|
|
19
|
+
yTranslation;
|
|
20
|
+
return { column, row };
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=createAffineTransformModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAffineTransformModel.js","sourceRoot":"","sources":["../../../src/align/affineTransfrom/createAffineTransformModel.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CACxC,SAAmB;IAEnB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,CAAC,KAAY,EAAE,EAAE;QACtB,MAAM,KAAK,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;QAC7C,MAAM,YAAY,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QAClC,MAAM,YAAY,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QAClC,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QAC3B,MAAM,MAAM,GACV,KAAK,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC;YACtE,YAAY,CAAC;QACf,MAAM,GAAG,GACP,KAAK,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC;YACtE,YAAY,CAAC;QAEf,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IACzB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Image } from '../../Image.js';
|
|
2
|
+
import type { Point } from '../../geometry/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Draw source, destination and transformed points on an image.
|
|
5
|
+
* @param source - Source points.
|
|
6
|
+
* @param destination - Destination points.
|
|
7
|
+
* @param result - Transformed points.
|
|
8
|
+
* @param imageSide - Dimension of the image. Should be odd integer.
|
|
9
|
+
* @returns The image with the points.
|
|
10
|
+
*/
|
|
11
|
+
export declare function drawResult(source: Point[], destination: Point[], result: Point[], imageSide?: number): Image;
|
|
12
|
+
//# sourceMappingURL=drawResult.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawResult.d.ts","sourceRoot":"","sources":["../../../src/align/affineTransfrom/drawResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGrD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,KAAK,EAAE,EACf,WAAW,EAAE,KAAK,EAAE,EACpB,MAAM,EAAE,KAAK,EAAE,EACf,SAAS,SAAK,GACb,KAAK,CAqCP"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Image } from '../../Image.js';
|
|
2
|
+
import { Mask } from '../../Mask.js';
|
|
3
|
+
import { ImageColorModel } from '../../utils/constants/colorModels.js';
|
|
4
|
+
/**
|
|
5
|
+
* Draw source, destination and transformed points on an image.
|
|
6
|
+
* @param source - Source points.
|
|
7
|
+
* @param destination - Destination points.
|
|
8
|
+
* @param result - Transformed points.
|
|
9
|
+
* @param imageSide - Dimension of the image. Should be odd integer.
|
|
10
|
+
* @returns The image with the points.
|
|
11
|
+
*/
|
|
12
|
+
export function drawResult(source, destination, result, imageSide = 21) {
|
|
13
|
+
const center = (imageSide - 1) / 2;
|
|
14
|
+
const image = new Image(imageSide, imageSide, {
|
|
15
|
+
colorModel: ImageColorModel.RGB,
|
|
16
|
+
});
|
|
17
|
+
// draw coordinates axes
|
|
18
|
+
image.drawLine({ row: center, column: 0 }, { row: center, column: imageSide }, { out: image, strokeColor: [255, 255, 255] });
|
|
19
|
+
image.drawLine({ row: 0, column: center }, { row: imageSide, column: center }, { out: image, strokeColor: [255, 255, 255] });
|
|
20
|
+
// draw points: source (green), destination (blue), result (red)
|
|
21
|
+
drawBlendedPoints(source, [null, 255, null]);
|
|
22
|
+
drawBlendedPoints(destination, [null, null, 255]);
|
|
23
|
+
drawBlendedPoints(result, [255, null, null]);
|
|
24
|
+
return image;
|
|
25
|
+
function drawBlendedPoints(points, color) {
|
|
26
|
+
const mask = new Mask(imageSide, imageSide);
|
|
27
|
+
const withPoints = mask.drawPoints(points, {
|
|
28
|
+
color: [1],
|
|
29
|
+
origin: { row: center, column: center },
|
|
30
|
+
});
|
|
31
|
+
image.paintMask(withPoints, {
|
|
32
|
+
out: image,
|
|
33
|
+
color,
|
|
34
|
+
blend: false,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=drawResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawResult.js","sourceRoot":"","sources":["../../../src/align/affineTransfrom/drawResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CACxB,MAAe,EACf,WAAoB,EACpB,MAAe,EACf,SAAS,GAAG,EAAE;IAEd,MAAM,MAAM,GAAG,CAAC,SAAS,GAAG,CAAC,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E,MAAM,EAAE,MAAM,EAAE;SACxC,CAAC,CAAC;QACH,KAAK,CAAC,SAAS,CAAC,UAAU,EAAE;YAC1B,GAAG,EAAE,KAAK;YACV,KAAK;YACL,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { Image } from '../../Image.js';
|
|
2
|
+
import type { Point } from '../../geometry/index.js';
|
|
3
|
+
export interface GetAffineTransformOptions {
|
|
4
|
+
/**
|
|
5
|
+
* @default `31`
|
|
6
|
+
*/
|
|
7
|
+
centroidPatchDiameter?: number;
|
|
8
|
+
/**
|
|
9
|
+
* @default `10`
|
|
10
|
+
*/
|
|
11
|
+
bestKeypointRadius?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Should only the crossckeck matches be considered.
|
|
14
|
+
* @default `true`
|
|
15
|
+
*/
|
|
16
|
+
crosscheck?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Should the contrast of the images be enhanced before feature matching.
|
|
19
|
+
* @default `true`
|
|
20
|
+
*/
|
|
21
|
+
enhanceContrast?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Origin of the destination image relative to the top-left corner of the source image.
|
|
24
|
+
* Roughly indicates the position of the destination image in the source image. Is used
|
|
25
|
+
* to filter matches by distance as well as to define a subarea of the source image to
|
|
26
|
+
* use for contrast enhancement.
|
|
27
|
+
* @default `{ column: 0, row: 0 }`
|
|
28
|
+
*/
|
|
29
|
+
destinationOrigin?: Point;
|
|
30
|
+
/**
|
|
31
|
+
* Max number of iterations of the ransac algorithm.
|
|
32
|
+
*/
|
|
33
|
+
maxRansacNbIterations?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Save images with matches for debugging.
|
|
36
|
+
* @default `false`
|
|
37
|
+
*/
|
|
38
|
+
debug?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Path of the debug image.
|
|
41
|
+
* @default `${import.meta.dirname}/montage.png`
|
|
42
|
+
*/
|
|
43
|
+
debugImagePath?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface AffineTransform {
|
|
46
|
+
/**
|
|
47
|
+
* Translation of source points along x and y axes.
|
|
48
|
+
*/
|
|
49
|
+
translation: Point;
|
|
50
|
+
/**
|
|
51
|
+
* Clockwise angle in degrees.
|
|
52
|
+
*/
|
|
53
|
+
rotation: number;
|
|
54
|
+
/**
|
|
55
|
+
* Scaling factor from source to destination.
|
|
56
|
+
*/
|
|
57
|
+
scale: number;
|
|
58
|
+
}
|
|
59
|
+
export interface GetAffineTransformResult {
|
|
60
|
+
/**
|
|
61
|
+
* Affine transformation from source to destination.
|
|
62
|
+
*/
|
|
63
|
+
transform: AffineTransform;
|
|
64
|
+
stats: {
|
|
65
|
+
/**
|
|
66
|
+
* Number of matches of feature matching between source and destination.
|
|
67
|
+
* The bigger this number is, the better.
|
|
68
|
+
*/
|
|
69
|
+
nbMatches: number;
|
|
70
|
+
/**
|
|
71
|
+
* Number of inliers resulting from the ransac algorithm.
|
|
72
|
+
*/
|
|
73
|
+
nbInliers: number;
|
|
74
|
+
/**
|
|
75
|
+
* Number of iterations of the RANSAC algorithm.
|
|
76
|
+
*/
|
|
77
|
+
nbRansacIterations: number;
|
|
78
|
+
/**
|
|
79
|
+
* Number of source keypoints used for matching.
|
|
80
|
+
*/
|
|
81
|
+
nbSourceKeypoints: number;
|
|
82
|
+
/**
|
|
83
|
+
* Number of destination keypoints used for matching.
|
|
84
|
+
*/
|
|
85
|
+
nbDestinationKeypoints: number;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Get the affine transformation from the source to the destination image.
|
|
90
|
+
* @param source - Source image. Should be the image to align on the reference image.
|
|
91
|
+
* It can have an additional margin, specified in the options.
|
|
92
|
+
* @param destination - Destination image. Should be the reference image.
|
|
93
|
+
* @param options - Get destination translation options.
|
|
94
|
+
* @returns The affine transformation from source to destination image.
|
|
95
|
+
*/
|
|
96
|
+
export declare function getAffineTransform(source: Image, destination: Image, options?: GetAffineTransformOptions): GetAffineTransformResult;
|
|
97
|
+
//# sourceMappingURL=getAffineTransform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAffineTransform.d.ts","sourceRoot":"","sources":["../../../src/align/affineTransfrom/getAffineTransform.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAU5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAWrD,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC;IAC1B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,SAAS,EAAE,eAAe,CAAC;IAC3B,KAAK,EAAE;QACL;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAClB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAClB;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;QAC3B;;WAEG;QACH,iBAAiB,EAAE,MAAM,CAAC;QAC1B;;WAEG;QACH,sBAAsB,EAAE,MAAM,CAAC;KAChC,CAAC;CACH;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,KAAK,EACb,WAAW,EAAE,KAAK,EAClB,OAAO,GAAE,yBAA8B,GACtC,wBAAwB,CAyL1B"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { getAffineTransform as matrixGetAffineTransform } from 'ml-affine-transform';
|
|
2
|
+
import { ransac } from 'ml-ransac';
|
|
3
|
+
import { getBrief } from '../../featureMatching/descriptors/getBrief.js';
|
|
4
|
+
import { Montage, MontageDisposition, bruteForceOneMatch, getCrosscheckMatches, } from '../../featureMatching/index.js';
|
|
5
|
+
import { filterEuclideanDistance } from '../../featureMatching/matching/filterEuclideanDistance.js';
|
|
6
|
+
import { writeSync } from '../../save/index.js';
|
|
7
|
+
import { ImageColorModel } from '../../utils/constants/colorModels.js';
|
|
8
|
+
import { getMinMax } from '../../utils/getMinMax.js';
|
|
9
|
+
import { affineFitFunction } from './affineFitFunction.js';
|
|
10
|
+
import { createAffineTransformModel } from './createAffineTransformModel.js';
|
|
11
|
+
import { getEuclideanDistance } from './getEuclideanDistance.js';
|
|
12
|
+
import { getMatrixFromPoints } from './getMatrixFromPoints.js';
|
|
13
|
+
import { getSourceWithoutMargins } from './utils/getSourceWithoutMargins.js';
|
|
14
|
+
/**
|
|
15
|
+
* Get the affine transformation from the source to the destination image.
|
|
16
|
+
* @param source - Source image. Should be the image to align on the reference image.
|
|
17
|
+
* It can have an additional margin, specified in the options.
|
|
18
|
+
* @param destination - Destination image. Should be the reference image.
|
|
19
|
+
* @param options - Get destination translation options.
|
|
20
|
+
* @returns The affine transformation from source to destination image.
|
|
21
|
+
*/
|
|
22
|
+
export function getAffineTransform(source, destination, options = {}) {
|
|
23
|
+
const { centroidPatchDiameter = 31, bestKeypointRadius = 5, enhanceContrast = true, crosscheck = true, destinationOrigin = { column: 0, row: 0 }, maxRansacNbIterations, debug = false, debugImagePath = `${import.meta.dirname}/montage.png`, } = options;
|
|
24
|
+
if (source.colorModel !== ImageColorModel.GREY) {
|
|
25
|
+
source = source.grey();
|
|
26
|
+
}
|
|
27
|
+
if (destination.colorModel !== ImageColorModel.GREY) {
|
|
28
|
+
destination = destination.grey();
|
|
29
|
+
}
|
|
30
|
+
// enhance images contrast
|
|
31
|
+
if (enhanceContrast) {
|
|
32
|
+
const sourceWithoutMargin = getSourceWithoutMargins(source, destination, destinationOrigin);
|
|
33
|
+
const sourceExtremums = getMinMax(sourceWithoutMargin);
|
|
34
|
+
source.level({
|
|
35
|
+
inputMin: sourceExtremums.min[0],
|
|
36
|
+
inputMax: sourceExtremums.max[0],
|
|
37
|
+
out: source,
|
|
38
|
+
});
|
|
39
|
+
const destinationExtremums = getMinMax(destination);
|
|
40
|
+
destination.level({
|
|
41
|
+
inputMin: destinationExtremums.min[0],
|
|
42
|
+
inputMax: destinationExtremums.max[0],
|
|
43
|
+
out: destination,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
// compute briefs
|
|
47
|
+
const sourceBrief = getBrief(source, {
|
|
48
|
+
centroidPatchDiameter,
|
|
49
|
+
bestKptRadius: bestKeypointRadius,
|
|
50
|
+
});
|
|
51
|
+
const destinationBrief = getBrief(destination, {
|
|
52
|
+
centroidPatchDiameter,
|
|
53
|
+
bestKptRadius: bestKeypointRadius,
|
|
54
|
+
});
|
|
55
|
+
const nbSourceKeypoints = sourceBrief.keypoints.length;
|
|
56
|
+
const nbDestinationKeypoints = destinationBrief.keypoints.length;
|
|
57
|
+
// match reference and destination keypoints
|
|
58
|
+
let matches = [];
|
|
59
|
+
if (crosscheck) {
|
|
60
|
+
matches = getCrosscheckMatches(sourceBrief.descriptors, destinationBrief.descriptors);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
matches = bruteForceOneMatch(sourceBrief.descriptors, destinationBrief.descriptors);
|
|
64
|
+
matches = filterEuclideanDistance(matches, sourceBrief.keypoints, destinationBrief.keypoints, { origin: destinationOrigin });
|
|
65
|
+
}
|
|
66
|
+
if (matches.length < 2) {
|
|
67
|
+
throw new Error('Insufficient number of matches found to compute affine transform (less than 2).');
|
|
68
|
+
}
|
|
69
|
+
// extract source and destination points
|
|
70
|
+
let sourcePoints = [];
|
|
71
|
+
let destinationPoints = [];
|
|
72
|
+
for (const match of matches) {
|
|
73
|
+
sourcePoints.push(sourceBrief.keypoints[match.sourceIndex].origin);
|
|
74
|
+
destinationPoints.push(destinationBrief.keypoints[match.destinationIndex].origin);
|
|
75
|
+
}
|
|
76
|
+
// find inliers with ransac
|
|
77
|
+
let nbInliers = sourcePoints.length;
|
|
78
|
+
let nbRansacIterations = 0;
|
|
79
|
+
let inliers = [0, 1];
|
|
80
|
+
if (sourcePoints.length > 2) {
|
|
81
|
+
const ransacResult = ransac(sourcePoints, destinationPoints, {
|
|
82
|
+
distanceFunction: getEuclideanDistance,
|
|
83
|
+
modelFunction: createAffineTransformModel,
|
|
84
|
+
fitFunction: affineFitFunction,
|
|
85
|
+
maxNbIterations: maxRansacNbIterations,
|
|
86
|
+
});
|
|
87
|
+
nbRansacIterations = ransacResult.nbIterations;
|
|
88
|
+
inliers = ransacResult.inliers;
|
|
89
|
+
nbInliers = inliers.length;
|
|
90
|
+
const newSrcPoints = [];
|
|
91
|
+
const newDstPoints = [];
|
|
92
|
+
for (const inlier of inliers) {
|
|
93
|
+
newSrcPoints.push(sourcePoints[inlier]);
|
|
94
|
+
newDstPoints.push(destinationPoints[inlier]);
|
|
95
|
+
}
|
|
96
|
+
sourcePoints = newSrcPoints;
|
|
97
|
+
destinationPoints = newDstPoints;
|
|
98
|
+
}
|
|
99
|
+
// create debug image
|
|
100
|
+
if (debug) {
|
|
101
|
+
const montage = new Montage(source, destination, {
|
|
102
|
+
disposition: MontageDisposition.VERTICAL,
|
|
103
|
+
});
|
|
104
|
+
montage.drawMatches(matches, sourceBrief.keypoints, destinationBrief.keypoints, { showDistance: true });
|
|
105
|
+
const inlierMatches = [];
|
|
106
|
+
for (const inlier of inliers) {
|
|
107
|
+
inlierMatches.push(matches[inlier]);
|
|
108
|
+
}
|
|
109
|
+
montage.drawMatches(inlierMatches, sourceBrief.keypoints, destinationBrief.keypoints, { strokeColor: [0, 0, 255] });
|
|
110
|
+
const drawKeypointsBaseOptions = {
|
|
111
|
+
fill: true,
|
|
112
|
+
color: [0, 255, 0],
|
|
113
|
+
showScore: true,
|
|
114
|
+
markerSize: 3,
|
|
115
|
+
};
|
|
116
|
+
montage.drawKeypoints(sourceBrief.keypoints, drawKeypointsBaseOptions);
|
|
117
|
+
montage.drawKeypoints(destinationBrief.keypoints, {
|
|
118
|
+
origin: montage.destinationOrigin,
|
|
119
|
+
...drawKeypointsBaseOptions,
|
|
120
|
+
});
|
|
121
|
+
writeSync(debugImagePath, montage.image);
|
|
122
|
+
}
|
|
123
|
+
// compute affine transform from destination to reference
|
|
124
|
+
const sourceMatrix = getMatrixFromPoints(sourcePoints);
|
|
125
|
+
const destinationMatrix = getMatrixFromPoints(destinationPoints);
|
|
126
|
+
const affineTransform = matrixGetAffineTransform(sourceMatrix, destinationMatrix);
|
|
127
|
+
return {
|
|
128
|
+
transform: {
|
|
129
|
+
rotation: affineTransform.rotation,
|
|
130
|
+
scale: affineTransform.scale,
|
|
131
|
+
translation: {
|
|
132
|
+
column: Math.round(affineTransform.translation.x),
|
|
133
|
+
row: Math.round(affineTransform.translation.y),
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
stats: {
|
|
137
|
+
nbMatches: matches.length,
|
|
138
|
+
nbInliers,
|
|
139
|
+
nbRansacIterations,
|
|
140
|
+
nbSourceKeypoints,
|
|
141
|
+
nbDestinationKeypoints,
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=getAffineTransform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAffineTransform.js","sourceRoot":"","sources":["../../../src/align/affineTransfrom/getAffineTransform.ts"],"names":[],"mappings":"AAAA,OAAO,E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,IAAI;YACf,UAAU,EAAE,CAAC;SACd,CAAC;QAEF,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,SAAS,EAAE,wBAAwB,CAAC,CAAC;QACvE,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,SAAS,EAAE;YAChD,MAAM,EAAE,OAAO,CAAC,iBAAiB;YACjC,GAAG,wBAAwB;SAC5B,CAAC,CAAC;QAEH,SAAS,CAAC,cAAc,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,yDAAyD;IACzD,MAAM,YAAY,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAC;IACvD,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IACjE,MAAM,eAAe,GAAG,wBAAwB,CAC9C,YAAY,EACZ,iBAAiB,CAClB,CAAC;IAEF,OAAO;QACL,SAAS,EAAE;YACT,QAAQ,EAAE,eAAe,CAAC,QAAQ;YAClC,KAAK,EAAE,eAAe,CAAC,KAAK;YAC5B,WAAW,EAAE;gBACX,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC;gBACjD,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC;aAC/C;SACF;QACD,KAAK,EAAE;YACL,SAAS,EAAE,OAAO,CAAC,MAAM;YACzB,SAAS;YACT,kBAAkB;YAClB,iBAAiB;YACjB,sBAAsB;SACvB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Point } from '../../geometry/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Compute the distance between point 1 and point 2.
|
|
4
|
+
* @param point1 - First point.
|
|
5
|
+
* @param point2 - Second point.
|
|
6
|
+
* @returns Euclidean distance.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getEuclideanDistance(point1: Point, point2: Point): number;
|
|
9
|
+
//# sourceMappingURL=getEuclideanDistance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getEuclideanDistance.d.ts","sourceRoot":"","sources":["../../../src/align/affineTransfrom/getEuclideanDistance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,MAAM,CAEzE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute the distance between point 1 and point 2.
|
|
3
|
+
* @param point1 - First point.
|
|
4
|
+
* @param point2 - Second point.
|
|
5
|
+
* @returns Euclidean distance.
|
|
6
|
+
*/
|
|
7
|
+
export function getEuclideanDistance(point1, point2) {
|
|
8
|
+
return Math.hypot(point1.row - point2.row, point1.column - point2.column);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=getEuclideanDistance.js.map
|