image-js 1.0.0-alpha.3 → 1.1.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 +33847 -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 +33992 -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 +4259 -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 +42 -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 +28 -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 +13 -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 +33 -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 +24 -28
- package/lib/load/decode.js.map +1 -1
- package/lib/load/decodeBmp.d.ts +8 -0
- package/lib/load/decodeBmp.d.ts.map +1 -0
- package/lib/load/decodeBmp.js +36 -0
- package/lib/load/decodeBmp.js.map +1 -0
- 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 +91 -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 +80 -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 +21 -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 +45 -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 +30 -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/decodeApng.d.ts +8 -0
- package/lib/stack/load/decodeApng.d.ts.map +1 -0
- package/lib/stack/load/decodeApng.js +60 -0
- package/lib/stack/load/decodeApng.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 +21 -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 +80 -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 +44 -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 +64 -0
- package/src/featureMatching/matching/filterSmallestDistanceMatches.ts +30 -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 +14 -0
- package/src/featureMatching/utils/sortBySourceDest.ts +31 -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 +20 -17
- package/src/load/decodeBmp.ts +37 -0
- package/src/load/decodeJpeg.ts +20 -4
- package/src/load/decodePng.ts +68 -33
- package/src/load/decodeTiff.ts +94 -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 +26 -0
- package/src/maskAnalysis/utils/getMbrFromPoints.ts +112 -0
- package/src/maskAnalysis/utils/monotoneChainConvexHull.ts +66 -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 +31 -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/decodeApng.ts +71 -0
- package/src/stack/load/decodeStack.ts +28 -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 +104 -0
- package/src/utils/geometry/polygons.ts +32 -0
- package/src/utils/geometry/removeClosePoints.ts +83 -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,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Use this function to only keep the match from source to destination with
|
|
3
|
+
* the smallest distance (score) for each destination keypoint.
|
|
4
|
+
* @param matches - Matches from source to destination.
|
|
5
|
+
* @param sourceKeypoints - Source keypoints.
|
|
6
|
+
* @param destinationKeypoints - Destination keypoints.
|
|
7
|
+
* @param options - Filter smallest distance matches options.
|
|
8
|
+
* @returns Only the matches from source to destination with the smallest distance.
|
|
9
|
+
*/
|
|
10
|
+
export function filterEuclideanDistance(matches, sourceKeypoints, destinationKeypoints, options = {}) {
|
|
11
|
+
const { origin = { column: 0, row: 0 } } = options;
|
|
12
|
+
const sorted = matches.slice();
|
|
13
|
+
sorted.sort((a, b) => a.destinationIndex - b.destinationIndex);
|
|
14
|
+
const result = [];
|
|
15
|
+
let sameDestMatches = [];
|
|
16
|
+
let currentIndex = sorted[0].destinationIndex;
|
|
17
|
+
for (const match of sorted) {
|
|
18
|
+
if (match.destinationIndex === currentIndex) {
|
|
19
|
+
sameDestMatches.push(match);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
sameDestMatches.sort((a, b) => distanceSquared(a) - distanceSquared(b));
|
|
23
|
+
result.push(...sameDestMatches.slice(0, 1));
|
|
24
|
+
currentIndex = match.destinationIndex;
|
|
25
|
+
sameDestMatches = [match];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
sameDestMatches.sort((a, b) => distanceSquared(a) - distanceSquared(b));
|
|
29
|
+
result.push(...sameDestMatches.slice(0, 1));
|
|
30
|
+
return result;
|
|
31
|
+
function distanceSquared(match) {
|
|
32
|
+
return ((sourceKeypoints[match.sourceIndex].origin.row -
|
|
33
|
+
(destinationKeypoints[match.destinationIndex].origin.row -
|
|
34
|
+
origin.row)) **
|
|
35
|
+
2 +
|
|
36
|
+
(sourceKeypoints[match.sourceIndex].origin.column -
|
|
37
|
+
destinationKeypoints[match.destinationIndex].origin.column -
|
|
38
|
+
origin.column) **
|
|
39
|
+
2);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=filterEuclideanDistance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterEuclideanDistance.js","sourceRoot":"","sources":["../../../src/featureMatching/matching/filterEuclideanDistance.ts"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAgB,EAChB,eAA+B,EAC/B,oBAAoC,EACpC,UAAiD,EAAE;IAEnD,MAAM,EAAE,MAAM,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC;IAEnD,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAC/B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,GAAG,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAE/D,MAAM,MAAM,GAAY,EAAE,CAAC;IAC3B,IAAI,eAAe,GAAY,EAAE,CAAC;IAClC,IAAI,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC;IAC9C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,gBAAgB,KAAK,YAAY,EAAE,CAAC;YAC5C,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;YACxE,MAAM,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAE5C,YAAY,GAAG,KAAK,CAAC,gBAAgB,CAAC;YACtC,eAAe,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IACxE,MAAM,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5C,OAAO,MAAM,CAAC;IAEd,SAAS,eAAe,CAAC,KAAY;QACnC,OAAO,CACL,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,GAAG;YAC5C,CAAC,oBAAoB,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,GAAG;gBACtD,MAAM,CAAC,GAAG,CAAC,CAAC;YACd,CAAC;YACH,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,MAAM;gBAC/C,oBAAoB,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,MAAM;gBAC1D,MAAM,CAAC,MAAM,CAAC;gBACd,CAAC,CACJ,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Match } from './bruteForceMatch.js';
|
|
2
|
+
/**
|
|
3
|
+
* Use this function to only keep the match from source to destination with
|
|
4
|
+
* the smallest distance (score) for each destination keypoint.
|
|
5
|
+
* @param matches - Matches from source to destination.
|
|
6
|
+
* @returns Only the matches from source to destination with the smallest distance.
|
|
7
|
+
*/
|
|
8
|
+
export declare function filterSmallestDistanceMatches(matches: Match[]): Match[];
|
|
9
|
+
//# sourceMappingURL=filterSmallestDistanceMatches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterSmallestDistanceMatches.d.ts","sourceRoot":"","sources":["../../../src/featureMatching/matching/filterSmallestDistanceMatches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAqBvE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Use this function to only keep the match from source to destination with
|
|
3
|
+
* the smallest distance (score) for each destination keypoint.
|
|
4
|
+
* @param matches - Matches from source to destination.
|
|
5
|
+
* @returns Only the matches from source to destination with the smallest distance.
|
|
6
|
+
*/
|
|
7
|
+
export function filterSmallestDistanceMatches(matches) {
|
|
8
|
+
const sorted = matches.slice();
|
|
9
|
+
sorted.sort((a, b) => a.destinationIndex - b.destinationIndex);
|
|
10
|
+
const result = [];
|
|
11
|
+
let sameDestMatches = [];
|
|
12
|
+
let currentIndex = sorted[0].destinationIndex;
|
|
13
|
+
for (const match of sorted) {
|
|
14
|
+
if (match.destinationIndex === currentIndex) {
|
|
15
|
+
sameDestMatches.push(match);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
sameDestMatches.sort((a, b) => a.distance - b.distance);
|
|
19
|
+
result.push(...sameDestMatches.slice(0, 1));
|
|
20
|
+
currentIndex = match.destinationIndex;
|
|
21
|
+
sameDestMatches = [match];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
sameDestMatches.sort((a, b) => a.distance - b.distance);
|
|
25
|
+
result.push(...sameDestMatches.slice(0, 1));
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=filterSmallestDistanceMatches.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterSmallestDistanceMatches.js","sourceRoot":"","sources":["../../../src/featureMatching/matching/filterSmallestDistanceMatches.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAAC,OAAgB;IAC5D,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAC/B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,GAAG,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAE/D,MAAM,MAAM,GAAY,EAAE,CAAC;IAC3B,IAAI,eAAe,GAAY,EAAE,CAAC;IAClC,IAAI,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC;IAC9C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,gBAAgB,KAAK,YAAY,EAAE,CAAC;YAC5C,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;YACxD,MAAM,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAE5C,YAAY,GAAG,KAAK,CAAC,gBAAgB,CAAC;YACtC,eAAe,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IACxD,MAAM,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5C,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BriefDescriptor } from '../descriptors/getBriefDescriptors.js';
|
|
2
|
+
import type { Match } from './bruteForceMatch.js';
|
|
3
|
+
/**
|
|
4
|
+
* Get the crosscheck matches from the source and destination descriptors.
|
|
5
|
+
* @param source - Source descriptors.
|
|
6
|
+
* @param destination - Destination descriptors.
|
|
7
|
+
* @returns The array of crossckeck matches.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getCrosscheckMatches(source: BriefDescriptor[], destination: BriefDescriptor[]): Match[];
|
|
10
|
+
/**
|
|
11
|
+
* Return the indices of pairs the keypoints that are mutually the best match.
|
|
12
|
+
* This means that if B is the best match for A, A should be the best match for B.
|
|
13
|
+
* The distance of the resulting matches is the maximum distance between the two.
|
|
14
|
+
* @param srcDstMatches - Best matches computed from source do destination.
|
|
15
|
+
* @param dstSrcMatches - Best matches computed from destination to source.
|
|
16
|
+
* @returns The pairs of keypoints that are mutually the best match.
|
|
17
|
+
*/
|
|
18
|
+
export declare function crosscheck(srcDstMatches: Match[], dstSrcMatches: Match[]): Match[];
|
|
19
|
+
//# sourceMappingURL=getCrosscheckMatches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCrosscheckMatches.d.ts","sourceRoot":"","sources":["../../../src/featureMatching/matching/getCrosscheckMatches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAM7E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGlD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,eAAe,EAAE,EACzB,WAAW,EAAE,eAAe,EAAE,GAC7B,KAAK,EAAE,CAKT;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,aAAa,EAAE,KAAK,EAAE,EACtB,aAAa,EAAE,KAAK,EAAE,GACrB,KAAK,EAAE,CAgCT"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { sortByDestSource, sortBySourceDest, } from '../utils/sortBySourceDest.js';
|
|
2
|
+
import { bruteForceOneMatch } from './bruteForceMatch.js';
|
|
3
|
+
/**
|
|
4
|
+
* Get the crosscheck matches from the source and destination descriptors.
|
|
5
|
+
* @param source - Source descriptors.
|
|
6
|
+
* @param destination - Destination descriptors.
|
|
7
|
+
* @returns The array of crossckeck matches.
|
|
8
|
+
*/
|
|
9
|
+
export function getCrosscheckMatches(source, destination) {
|
|
10
|
+
const srcMatches = bruteForceOneMatch(source, destination);
|
|
11
|
+
const dstMatches = bruteForceOneMatch(destination, source);
|
|
12
|
+
return crosscheck(srcMatches, dstMatches);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Return the indices of pairs the keypoints that are mutually the best match.
|
|
16
|
+
* This means that if B is the best match for A, A should be the best match for B.
|
|
17
|
+
* The distance of the resulting matches is the maximum distance between the two.
|
|
18
|
+
* @param srcDstMatches - Best matches computed from source do destination.
|
|
19
|
+
* @param dstSrcMatches - Best matches computed from destination to source.
|
|
20
|
+
* @returns The pairs of keypoints that are mutually the best match.
|
|
21
|
+
*/
|
|
22
|
+
export function crosscheck(srcDstMatches, dstSrcMatches) {
|
|
23
|
+
const result = [];
|
|
24
|
+
const sortedSrcDst = sortBySourceDest(srcDstMatches);
|
|
25
|
+
const sortedDstSrc = sortByDestSource(dstSrcMatches);
|
|
26
|
+
let pointer1 = 0;
|
|
27
|
+
let pointer2 = 0;
|
|
28
|
+
while (pointer1 < sortedSrcDst.length && pointer2 < sortedDstSrc.length) {
|
|
29
|
+
const match1 = sortedSrcDst[pointer1];
|
|
30
|
+
const match2 = sortedDstSrc[pointer2];
|
|
31
|
+
if (match1.sourceIndex > match2.destinationIndex) {
|
|
32
|
+
pointer2++;
|
|
33
|
+
}
|
|
34
|
+
else if (match1.sourceIndex < match2.destinationIndex) {
|
|
35
|
+
pointer1++;
|
|
36
|
+
}
|
|
37
|
+
else if (match1.destinationIndex > match2.sourceIndex) {
|
|
38
|
+
pointer2++;
|
|
39
|
+
}
|
|
40
|
+
else if (match1.destinationIndex < match2.sourceIndex) {
|
|
41
|
+
pointer1++;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
result.push({
|
|
45
|
+
distance: Math.max(match1.distance, match2.distance),
|
|
46
|
+
sourceIndex: match1.sourceIndex,
|
|
47
|
+
destinationIndex: match1.destinationIndex,
|
|
48
|
+
});
|
|
49
|
+
pointer1++;
|
|
50
|
+
pointer2++;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=getCrosscheckMatches.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCrosscheckMatches.js","sourceRoot":"","sources":["../../../src/featureMatching/matching/getCrosscheckMatches.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAyB,EACzB,WAA8B;IAE9B,MAAM,UAAU,GAAG,kBAAkB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC3D,MAAM,UAAU,GAAG,kBAAkB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAE3D,OAAO,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CACxB,aAAsB,EACtB,aAAsB;IAEtB,MAAM,MAAM,GAAY,EAAE,CAAC;IAE3B,MAAM,YAAY,GAAG,gBAAgB,CAAC,aAAa,CAAC,CAAC;IACrD,MAAM,YAAY,GAAG,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAErD,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,QAAQ,GAAG,CAAC,CAAC;IAEjB,OAAO,QAAQ,GAAG,YAAY,CAAC,MAAM,IAAI,QAAQ,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC;QACxE,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;QAEtC,IAAI,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;YACjD,QAAQ,EAAE,CAAC;QACb,CAAC;aAAM,IAAI,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;YACxD,QAAQ,EAAE,CAAC;QACb,CAAC;aAAM,IAAI,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;YACxD,QAAQ,EAAE,CAAC;QACb,CAAC;aAAM,IAAI,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;YACxD,QAAQ,EAAE,CAAC;QACb,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC;gBACV,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;gBACpD,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;aAC1C,CAAC,CAAC;YACH,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BriefDescriptor } from '../descriptors/getBriefDescriptors.js';
|
|
2
|
+
/**
|
|
3
|
+
* Compute the Hamming distance between two bit strings.
|
|
4
|
+
* @see {@link https://en.wikipedia.org/wiki/Hamming_distance}
|
|
5
|
+
* @param descriptor1 - First bit string.
|
|
6
|
+
* @param descriptor2 - Second bit string.
|
|
7
|
+
* @returns The Hamming distance.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getHammingDistance(descriptor1: BriefDescriptor, descriptor2: BriefDescriptor): number;
|
|
10
|
+
//# sourceMappingURL=getHammingDistance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getHammingDistance.d.ts","sourceRoot":"","sources":["../../../src/featureMatching/matching/getHammingDistance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAE7E;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,eAAe,GAC3B,MAAM,CAOR"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute the Hamming distance between two bit strings.
|
|
3
|
+
* @see {@link https://en.wikipedia.org/wiki/Hamming_distance}
|
|
4
|
+
* @param descriptor1 - First bit string.
|
|
5
|
+
* @param descriptor2 - Second bit string.
|
|
6
|
+
* @returns The Hamming distance.
|
|
7
|
+
*/
|
|
8
|
+
export function getHammingDistance(descriptor1, descriptor2) {
|
|
9
|
+
let sum = 0;
|
|
10
|
+
for (let i = 0; i < descriptor1.length; i++) {
|
|
11
|
+
sum += descriptor1[i] ^ descriptor2[i];
|
|
12
|
+
}
|
|
13
|
+
return sum;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=getHammingDistance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getHammingDistance.js","sourceRoot":"","sources":["../../../src/featureMatching/matching/getHammingDistance.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAChC,WAA4B,EAC5B,WAA4B;IAE5B,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5C,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Image } from '../../Image.js';
|
|
2
|
+
import type { Point } from '../../geometry/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Check that a point is not too close to the border of the image.
|
|
5
|
+
* @param image - Image to process.
|
|
6
|
+
* @param point - The interest point.
|
|
7
|
+
* @param distance - The minimum distance to the border required.
|
|
8
|
+
* @returns Whether the point is far enough from the border.
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkBorderDistance(image: Image, point: Point, distance: number): boolean;
|
|
11
|
+
//# sourceMappingURL=checkBorderDistance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkBorderDistance.d.ts","sourceRoot":"","sources":["../../../src/featureMatching/utils/checkBorderDistance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,MAAM,GACf,OAAO,CAOT"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check that a point is not too close to the border of the image.
|
|
3
|
+
* @param image - Image to process.
|
|
4
|
+
* @param point - The interest point.
|
|
5
|
+
* @param distance - The minimum distance to the border required.
|
|
6
|
+
* @returns Whether the point is far enough from the border.
|
|
7
|
+
*/
|
|
8
|
+
export function checkBorderDistance(image, point, distance) {
|
|
9
|
+
return (point.column >= distance &&
|
|
10
|
+
point.row >= distance &&
|
|
11
|
+
image.width - point.column > distance &&
|
|
12
|
+
image.height - point.row > distance);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=checkBorderDistance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkBorderDistance.js","sourceRoot":"","sources":["../../../src/featureMatching/utils/checkBorderDistance.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAY,EACZ,KAAY,EACZ,QAAgB;IAEhB,OAAO,CACL,KAAK,CAAC,MAAM,IAAI,QAAQ;QACxB,KAAK,CAAC,GAAG,IAAI,QAAQ;QACrB,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,QAAQ;QACrC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,GAAG,QAAQ,CACpC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Image } from '../../Image.js';
|
|
2
|
+
import type { Point } from '../../geometry/index.js';
|
|
3
|
+
export interface CompareIntensityOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Origin of the points coordinates relative to the top-left corner.
|
|
6
|
+
* @default `image.getCoordinates('center')`
|
|
7
|
+
*/
|
|
8
|
+
origin?: Point;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Compare the intensity of two pixels of a GREY image.
|
|
12
|
+
* @param image - Source image of the pixels.
|
|
13
|
+
* @param p1 - First point.
|
|
14
|
+
* @param p2 - Second point.
|
|
15
|
+
* @param options - Options.
|
|
16
|
+
* @returns Wether p1 is darker that p2.
|
|
17
|
+
*/
|
|
18
|
+
export declare function compareIntensity(image: Image, p1: Point, p2: Point, options?: CompareIntensityOptions): boolean;
|
|
19
|
+
//# sourceMappingURL=compareIntensity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareIntensity.d.ts","sourceRoot":"","sources":["../../../src/featureMatching/utils/compareIntensity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGrD,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,KAAK,EACT,EAAE,EAAE,KAAK,EACT,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAST"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { sum } from '../../utils/geometry/points.js';
|
|
2
|
+
/**
|
|
3
|
+
* Compare the intensity of two pixels of a GREY image.
|
|
4
|
+
* @param image - Source image of the pixels.
|
|
5
|
+
* @param p1 - First point.
|
|
6
|
+
* @param p2 - Second point.
|
|
7
|
+
* @param options - Options.
|
|
8
|
+
* @returns Wether p1 is darker that p2.
|
|
9
|
+
*/
|
|
10
|
+
export function compareIntensity(image, p1, p2, options = {}) {
|
|
11
|
+
const { origin = image.getCoordinates('center') } = options;
|
|
12
|
+
const absoluteP1 = sum(p1, origin);
|
|
13
|
+
const absoluteP2 = sum(p2, origin);
|
|
14
|
+
const intensity1 = image.getValueByPoint(absoluteP1, 0);
|
|
15
|
+
const intensity2 = image.getValueByPoint(absoluteP2, 0);
|
|
16
|
+
return intensity1 < intensity2;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=compareIntensity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareIntensity.js","sourceRoot":"","sources":["../../../src/featureMatching/utils/compareIntensity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAUrD;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAY,EACZ,EAAS,EACT,EAAS,EACT,UAAmC,EAAE;IAErC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,GAAG,OAAO,CAAC;IAE5D,MAAM,UAAU,GAAG,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,UAAU,GAAG,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,UAAU,GAAG,KAAK,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IACxD,MAAM,UAAU,GAAG,KAAK,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IAExD,OAAO,UAAU,GAAG,UAAU,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Image } from '../../Image.js';
|
|
2
|
+
import type { Point } from '../../geometry/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Crop the source image to given dimensions around the origin.
|
|
5
|
+
* @param image - Source image.
|
|
6
|
+
* @param origin - Center point for the crop.
|
|
7
|
+
* @param patchSize - Size of the returned image.
|
|
8
|
+
* @returns The square image around the origin extracted from the source image.
|
|
9
|
+
*/
|
|
10
|
+
export declare function extractSquareImage(image: Image, origin: Point, patchSize: number): Image;
|
|
11
|
+
//# sourceMappingURL=extractSquareImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractSquareImage.d.ts","sourceRoot":"","sources":["../../../src/featureMatching/utils/extractSquareImage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,KAAK,EACb,SAAS,EAAE,MAAM,GAChB,KAAK,CAYP"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Crop the source image to given dimensions around the origin.
|
|
3
|
+
* @param image - Source image.
|
|
4
|
+
* @param origin - Center point for the crop.
|
|
5
|
+
* @param patchSize - Size of the returned image.
|
|
6
|
+
* @returns The square image around the origin extracted from the source image.
|
|
7
|
+
*/
|
|
8
|
+
export function extractSquareImage(image, origin, patchSize) {
|
|
9
|
+
const cropOffset = (patchSize - 1) / 2;
|
|
10
|
+
const cropOrigin = {
|
|
11
|
+
column: origin.column - cropOffset,
|
|
12
|
+
row: origin.row - cropOffset,
|
|
13
|
+
};
|
|
14
|
+
return image.crop({
|
|
15
|
+
origin: cropOrigin,
|
|
16
|
+
width: patchSize,
|
|
17
|
+
height: patchSize,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=extractSquareImage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractSquareImage.js","sourceRoot":"","sources":["../../../src/featureMatching/utils/extractSquareImage.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAChC,KAAY,EACZ,MAAa,EACb,SAAiB;IAEjB,MAAM,UAAU,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,UAAU,GAAG;QACjB,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,UAAU;QAClC,GAAG,EAAE,MAAM,CAAC,GAAG,GAAG,UAAU;KAC7B,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC;QAChB,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Image } from '../../Image.js';
|
|
2
|
+
import type { GetColorsOptions } from '../featureMatching.types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Generate an array of colors to draw the keypoints depending on their score or the matches depending on the distance.
|
|
5
|
+
* @param image - The source image.
|
|
6
|
+
* @param baseColor - The desired shade for the colors.
|
|
7
|
+
* @param options - Get score colors options.
|
|
8
|
+
* @returns Array of colors.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getColors(image: Image, baseColor: number[], options?: GetColorsOptions): number[][];
|
|
11
|
+
//# sourceMappingURL=getColors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getColors.d.ts","sourceRoot":"","sources":["../../../src/featureMatching/utils/getColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,MAAM,EAAE,EACnB,OAAO,GAAE,gBAAqB,GAC7B,MAAM,EAAE,EAAE,CAkBZ"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getClampFromTo } from '../../utils/clamp.js';
|
|
2
|
+
/**
|
|
3
|
+
* Generate an array of colors to draw the keypoints depending on their score or the matches depending on the distance.
|
|
4
|
+
* @param image - The source image.
|
|
5
|
+
* @param baseColor - The desired shade for the colors.
|
|
6
|
+
* @param options - Get score colors options.
|
|
7
|
+
* @returns Array of colors.
|
|
8
|
+
*/
|
|
9
|
+
export function getColors(image, baseColor, options = {}) {
|
|
10
|
+
const { nbShades = 6, minValueFactor = 0.2 } = options;
|
|
11
|
+
const maxValue = Math.max(...baseColor);
|
|
12
|
+
const minValue = maxValue * minValueFactor;
|
|
13
|
+
const interval = Math.floor((maxValue - minValue) / (nbShades - 1));
|
|
14
|
+
const clamp = getClampFromTo(0, image.maxValue);
|
|
15
|
+
const colors = [];
|
|
16
|
+
for (let i = 0; i < nbShades; i++) {
|
|
17
|
+
const color = [];
|
|
18
|
+
for (const channel of baseColor) {
|
|
19
|
+
color.push(clamp(channel - i * interval));
|
|
20
|
+
}
|
|
21
|
+
colors.push(color);
|
|
22
|
+
}
|
|
23
|
+
return colors;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=getColors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getColors.js","sourceRoot":"","sources":["../../../src/featureMatching/utils/getColors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CACvB,KAAY,EACZ,SAAmB,EACnB,UAA4B,EAAE;IAE9B,MAAM,EAAE,QAAQ,GAAG,CAAC,EAAE,cAAc,GAAG,GAAG,EAAE,GAAG,OAAO,CAAC;IACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,QAAQ,GAAG,cAAc,CAAC;IAE3C,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC;IACpE,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAEhD,MAAM,MAAM,GAAe,EAAE,CAAC;IAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,EAAE,CAAC;QACjB,KAAK,MAAM,OAAO,IAAI,SAAS,EAAE,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;QAC5C,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Point } from '../../geometry/index.js';
|
|
2
|
+
import type { GetGaussianPointsOptions } from '../../utils/utils.types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Get the coordinates of random points inside of the given dimensions, spread with a
|
|
5
|
+
* gaussian distribution around the center of the dimensions.
|
|
6
|
+
* The reference point with coordinates (0,0) is the center of the patch.
|
|
7
|
+
* @param width - Width in which the points should be.
|
|
8
|
+
* @param height - Height in which the points should be.
|
|
9
|
+
* @param options - Get gaussian points options.
|
|
10
|
+
* @returns An array of random points with a gaussian distribution.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getGaussianPoints(width: number, height: number, options?: GetGaussianPointsOptions): Point[];
|
|
13
|
+
/**
|
|
14
|
+
* Generate an array of values
|
|
15
|
+
* that follow a gaussian distribution with a mean value of zero.
|
|
16
|
+
* @param size - Specifies the width of the gaussian distribution.
|
|
17
|
+
* @param seed - Seed for the random generator.
|
|
18
|
+
* @param nbValues - Number of values wanted.
|
|
19
|
+
* @param sigma - The standard deviation. The default value is the optimal SD for BRIEF.
|
|
20
|
+
* @returns Array of values with gaussian distribution.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getGaussianValues(size: number, seed: number, nbValues: number, sigma?: number): Float64Array;
|
|
23
|
+
//# sourceMappingURL=getGaussianPoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getGaussianPoints.d.ts","sourceRoot":"","sources":["../../../src/featureMatching/utils/getGaussianPoints.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,wBAA6B,GACrC,KAAK,EAAE,CAYT;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,KAAK,SAAW,GACf,YAAY,CAgBd"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createRandomArray } from 'ml-spectra-processing';
|
|
2
|
+
import { getClampFromTo } from '../../utils/clamp.js';
|
|
3
|
+
/**
|
|
4
|
+
* Get the coordinates of random points inside of the given dimensions, spread with a
|
|
5
|
+
* gaussian distribution around the center of the dimensions.
|
|
6
|
+
* The reference point with coordinates (0,0) is the center of the patch.
|
|
7
|
+
* @param width - Width in which the points should be.
|
|
8
|
+
* @param height - Height in which the points should be.
|
|
9
|
+
* @param options - Get gaussian points options.
|
|
10
|
+
* @returns An array of random points with a gaussian distribution.
|
|
11
|
+
*/
|
|
12
|
+
export function getGaussianPoints(width, height, options = {}) {
|
|
13
|
+
const { nbPoints = 1024, xSeed = 0, ySeed = 1, sigma } = options;
|
|
14
|
+
const xCoordinates = getGaussianValues(width, xSeed, nbPoints, sigma);
|
|
15
|
+
const yCoordinates = getGaussianValues(height, ySeed, nbPoints, sigma);
|
|
16
|
+
const points = [];
|
|
17
|
+
for (let i = 0; i < nbPoints; i++) {
|
|
18
|
+
points.push({ column: xCoordinates[i], row: yCoordinates[i] });
|
|
19
|
+
}
|
|
20
|
+
return points;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Generate an array of values
|
|
24
|
+
* that follow a gaussian distribution with a mean value of zero.
|
|
25
|
+
* @param size - Specifies the width of the gaussian distribution.
|
|
26
|
+
* @param seed - Seed for the random generator.
|
|
27
|
+
* @param nbValues - Number of values wanted.
|
|
28
|
+
* @param sigma - The standard deviation. The default value is the optimal SD for BRIEF.
|
|
29
|
+
* @returns Array of values with gaussian distribution.
|
|
30
|
+
*/
|
|
31
|
+
export function getGaussianValues(size, seed, nbValues, sigma = size / 5) {
|
|
32
|
+
const width = (size - 1) / 2;
|
|
33
|
+
const array = createRandomArray({
|
|
34
|
+
distribution: 'normal',
|
|
35
|
+
seed,
|
|
36
|
+
length: nbValues,
|
|
37
|
+
standardDeviation: sigma,
|
|
38
|
+
mean: 0,
|
|
39
|
+
});
|
|
40
|
+
const clamp = getClampFromTo(-width, width);
|
|
41
|
+
return array.map((value) => {
|
|
42
|
+
const rounded = Math.round(value);
|
|
43
|
+
return clamp(rounded);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=getGaussianPoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getGaussianPoints.js","sourceRoot":"","sources":["../../../src/featureMatching/utils/getGaussianPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAa,EACb,MAAc,EACd,UAAoC,EAAE;IAEtC,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAEjE,MAAM,YAAY,GAAG,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IACtE,MAAM,YAAY,GAAG,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAEvE,MAAM,MAAM,GAAY,EAAE,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAY,EACZ,IAAY,EACZ,QAAgB,EAChB,KAAK,GAAG,IAAI,GAAG,CAAC;IAEhB,MAAM,KAAK,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAE7B,MAAM,KAAK,GAAG,iBAAiB,CAAC;QAC9B,YAAY,EAAE,QAAQ;QACtB,IAAI;QACJ,MAAM,EAAE,QAAQ;QAChB,iBAAiB,EAAE,KAAK;QACxB,IAAI,EAAE,CAAC;KACR,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAE5C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACzB,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FastKeypoint } from '../keypoints/getFastKeypoints.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the shade the keypoint with given index should have (the color is an indicator
|
|
4
|
+
* of the score). The keypoints should be sorted with highest score first.
|
|
5
|
+
* @param keypoints - The sorted keypoints.
|
|
6
|
+
* @param index - Index of the keypoint.
|
|
7
|
+
* @param colors - The colors from which to pick (sorted from brightest to darkest).
|
|
8
|
+
* @returns The color the keypoint should have.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getKeypointColor(keypoints: FastKeypoint[], index: number, colors: number[][]): number[];
|
|
11
|
+
//# sourceMappingURL=getKeypointColor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getKeypointColor.d.ts","sourceRoot":"","sources":["../../../src/featureMatching/utils/getKeypointColor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,YAAY,EAAE,EACzB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EAAE,EAAE,GACjB,MAAM,EAAE,CAcV"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the shade the keypoint with given index should have (the color is an indicator
|
|
3
|
+
* of the score). The keypoints should be sorted with highest score first.
|
|
4
|
+
* @param keypoints - The sorted keypoints.
|
|
5
|
+
* @param index - Index of the keypoint.
|
|
6
|
+
* @param colors - The colors from which to pick (sorted from brightest to darkest).
|
|
7
|
+
* @returns The color the keypoint should have.
|
|
8
|
+
*/
|
|
9
|
+
export function getKeypointColor(keypoints, index, colors) {
|
|
10
|
+
const maxScore = keypoints[0].score;
|
|
11
|
+
const minScore = keypoints.at(-1).score;
|
|
12
|
+
if (minScore === maxScore) {
|
|
13
|
+
return colors[0];
|
|
14
|
+
}
|
|
15
|
+
const score = keypoints[index].score;
|
|
16
|
+
const colorIndex = colors.length -
|
|
17
|
+
1 -
|
|
18
|
+
Math.floor(((colors.length - 1) * (score - minScore)) / (maxScore - minScore));
|
|
19
|
+
return colors[colorIndex];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=getKeypointColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getKeypointColor.js","sourceRoot":"","sources":["../../../src/featureMatching/utils/getKeypointColor.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAAyB,EACzB,KAAa,EACb,MAAkB;IAElB,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACpC,MAAM,QAAQ,GAAI,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAkB,CAAC,KAAK,CAAC;IAC1D,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC1B,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;IACD,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;IACrC,MAAM,UAAU,GACd,MAAM,CAAC,MAAM;QACb,CAAC;QACD,IAAI,CAAC,KAAK,CACR,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,CACnE,CAAC;IACJ,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Match } from '../matching/bruteForceMatch.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the shade of the match with given index (the color is an indicator
|
|
4
|
+
* of the distance). The matches should be sorted with smallest distance first.
|
|
5
|
+
* @param matches - The sorted keypoints.
|
|
6
|
+
* @param index - Index of the keypoint.
|
|
7
|
+
* @param colors - The colors from which to pick (sorted from brightest to darkest).
|
|
8
|
+
* @returns The color the keypoint should have.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getMatchColor(matches: Match[], index: number, colors: number[][]): number[];
|
|
11
|
+
//# sourceMappingURL=getMatchColor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMatchColor.d.ts","sourceRoot":"","sources":["../../../src/featureMatching/utils/getMatchColor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,KAAK,EAAE,EAChB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EAAE,EAAE,GACjB,MAAM,EAAE,CAYV"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the shade of the match with given index (the color is an indicator
|
|
3
|
+
* of the distance). The matches should be sorted with smallest distance first.
|
|
4
|
+
* @param matches - The sorted keypoints.
|
|
5
|
+
* @param index - Index of the keypoint.
|
|
6
|
+
* @param colors - The colors from which to pick (sorted from brightest to darkest).
|
|
7
|
+
* @returns The color the keypoint should have.
|
|
8
|
+
*/
|
|
9
|
+
export function getMatchColor(matches, index, colors) {
|
|
10
|
+
const maxDistance = matches.at(-1).distance;
|
|
11
|
+
const minDistance = matches[0].distance;
|
|
12
|
+
if (minDistance === maxDistance) {
|
|
13
|
+
return colors[0];
|
|
14
|
+
}
|
|
15
|
+
const distance = matches[index].distance;
|
|
16
|
+
const colorIndex = Math.floor(((colors.length - 1) * (distance - minDistance)) /
|
|
17
|
+
(maxDistance - minDistance));
|
|
18
|
+
return colors[colorIndex];
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=getMatchColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMatchColor.js","sourceRoot":"","sources":["../../../src/featureMatching/utils/getMatchColor.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAC3B,OAAgB,EAChB,KAAa,EACb,MAAkB;IAElB,MAAM,WAAW,GAAI,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAW,CAAC,QAAQ,CAAC;IACvD,MAAM,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IACxC,IAAI,WAAW,KAAK,WAAW,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC;IACzC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAC3B,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,GAAG,WAAW,CAAC,CAAC;QAC9C,CAAC,WAAW,GAAG,WAAW,CAAC,CAC9B,CAAC;IACF,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Match } from '../matching/bruteForceMatch.js';
|
|
2
|
+
/**
|
|
3
|
+
* Source array of matches by ascending distance.
|
|
4
|
+
* @param matches - Array of matches to sort.
|
|
5
|
+
* @returns Sorted copy of the array of matches.
|
|
6
|
+
*/
|
|
7
|
+
export declare function sortByDistance(matches: Match[]): Match[];
|
|
8
|
+
//# sourceMappingURL=sortByDistance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortByDistance.d.ts","sourceRoot":"","sources":["../../../src/featureMatching/utils/sortByDistance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAMxD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source array of matches by ascending distance.
|
|
3
|
+
* @param matches - Array of matches to sort.
|
|
4
|
+
* @returns Sorted copy of the array of matches.
|
|
5
|
+
*/
|
|
6
|
+
export function sortByDistance(matches) {
|
|
7
|
+
const sorted = matches.slice();
|
|
8
|
+
sorted.sort((match1, match2) => {
|
|
9
|
+
return match1.distance - match2.distance;
|
|
10
|
+
});
|
|
11
|
+
return sorted;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=sortByDistance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortByDistance.js","sourceRoot":"","sources":["../../../src/featureMatching/utils/sortByDistance.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAC/B,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;QAC7B,OAAO,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC3C,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Match } from '../matching/bruteForceMatch.js';
|
|
2
|
+
/**
|
|
3
|
+
* Sort array of matches by source index and then destination index.
|
|
4
|
+
* @param matches - Array of matches to sort.
|
|
5
|
+
* @returns Sorted copy of the array of matches.
|
|
6
|
+
*/
|
|
7
|
+
export declare function sortBySourceDest(matches: Match[]): Match[];
|
|
8
|
+
/**
|
|
9
|
+
* Sort array of matches by destination index and then source index.
|
|
10
|
+
* @param matches - Array of matches to sort.
|
|
11
|
+
* @returns Sorted copy of the array of matches.
|
|
12
|
+
*/
|
|
13
|
+
export declare function sortByDestSource(matches: Match[]): Match[];
|
|
14
|
+
//# sourceMappingURL=sortBySourceDest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortBySourceDest.d.ts","sourceRoot":"","sources":["../../../src/featureMatching/utils/sortBySourceDest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAQ1D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAQ1D"}
|