image-js 1.0.0-alpha.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1488) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +37 -0
  3. package/dist/image-js.esm.js +33179 -0
  4. package/dist/image-js.esm.js.map +1 -0
  5. package/dist/image-js.esm.min.js +3 -0
  6. package/dist/image-js.esm.min.js.map +1 -0
  7. package/dist/image-js.umd.js +33324 -0
  8. package/dist/image-js.umd.js.map +1 -0
  9. package/dist/image-js.umd.min.js +3 -0
  10. package/dist/image-js.umd.min.js.map +1 -0
  11. package/dist-types/image-js.d.ts +4260 -0
  12. package/lib/Image.d.ts +536 -179
  13. package/lib/Image.d.ts.map +1 -1
  14. package/lib/Image.js +867 -334
  15. package/lib/Image.js.map +1 -1
  16. package/lib/Mask.d.ts +378 -0
  17. package/lib/Mask.d.ts.map +1 -0
  18. package/lib/Mask.js +557 -0
  19. package/lib/Mask.js.map +1 -0
  20. package/lib/Stack.d.ts +127 -0
  21. package/lib/Stack.d.ts.map +1 -0
  22. package/lib/Stack.js +165 -0
  23. package/lib/Stack.js.map +1 -0
  24. package/lib/align/affineTransfrom/affineFitFunction.d.ts +10 -0
  25. package/lib/align/affineTransfrom/affineFitFunction.d.ts.map +1 -0
  26. package/lib/align/affineTransfrom/affineFitFunction.js +21 -0
  27. package/lib/align/affineTransfrom/affineFitFunction.js.map +1 -0
  28. package/lib/align/affineTransfrom/applyAffineTransform.d.ts +10 -0
  29. package/lib/align/affineTransfrom/applyAffineTransform.d.ts.map +1 -0
  30. package/lib/align/affineTransfrom/applyAffineTransform.js +19 -0
  31. package/lib/align/affineTransfrom/applyAffineTransform.js.map +1 -0
  32. package/lib/align/affineTransfrom/createAffineTransformModel.d.ts +10 -0
  33. package/lib/align/affineTransfrom/createAffineTransformModel.d.ts.map +1 -0
  34. package/lib/align/affineTransfrom/createAffineTransformModel.js +23 -0
  35. package/lib/align/affineTransfrom/createAffineTransformModel.js.map +1 -0
  36. package/lib/align/affineTransfrom/drawResult.d.ts +12 -0
  37. package/lib/align/affineTransfrom/drawResult.d.ts.map +1 -0
  38. package/lib/align/affineTransfrom/drawResult.js +38 -0
  39. package/lib/align/affineTransfrom/drawResult.js.map +1 -0
  40. package/lib/align/affineTransfrom/getAffineTransform.d.ts +97 -0
  41. package/lib/align/affineTransfrom/getAffineTransform.d.ts.map +1 -0
  42. package/lib/align/affineTransfrom/getAffineTransform.js +145 -0
  43. package/lib/align/affineTransfrom/getAffineTransform.js.map +1 -0
  44. package/lib/align/affineTransfrom/getEuclideanDistance.d.ts +9 -0
  45. package/lib/align/affineTransfrom/getEuclideanDistance.d.ts.map +1 -0
  46. package/lib/align/affineTransfrom/getEuclideanDistance.js +10 -0
  47. package/lib/align/affineTransfrom/getEuclideanDistance.js.map +1 -0
  48. package/lib/align/affineTransfrom/getMatrixFromPoints.d.ts +10 -0
  49. package/lib/align/affineTransfrom/getMatrixFromPoints.d.ts.map +1 -0
  50. package/lib/align/affineTransfrom/getMatrixFromPoints.js +17 -0
  51. package/lib/align/affineTransfrom/getMatrixFromPoints.js.map +1 -0
  52. package/lib/align/affineTransfrom/getPointsFromMatrix.d.ts +9 -0
  53. package/lib/align/affineTransfrom/getPointsFromMatrix.d.ts.map +1 -0
  54. package/lib/align/affineTransfrom/getPointsFromMatrix.js +13 -0
  55. package/lib/align/affineTransfrom/getPointsFromMatrix.js.map +1 -0
  56. package/lib/align/affineTransfrom/utils/getSourceWithoutMargins.d.ts +11 -0
  57. package/lib/align/affineTransfrom/utils/getSourceWithoutMargins.d.ts.map +1 -0
  58. package/lib/align/affineTransfrom/utils/getSourceWithoutMargins.js +17 -0
  59. package/lib/align/affineTransfrom/utils/getSourceWithoutMargins.js.map +1 -0
  60. package/lib/align/alignMinDifference.d.ts +25 -0
  61. package/lib/align/alignMinDifference.d.ts.map +1 -0
  62. package/lib/align/alignMinDifference.js +79 -0
  63. package/lib/align/alignMinDifference.js.map +1 -0
  64. package/lib/align/index.d.ts +3 -0
  65. package/lib/align/index.d.ts.map +1 -0
  66. package/lib/align/index.js +3 -0
  67. package/lib/align/index.js.map +1 -0
  68. package/lib/compare/add.d.ts +10 -0
  69. package/lib/compare/add.d.ts.map +1 -0
  70. package/lib/compare/add.js +32 -0
  71. package/lib/compare/add.js.map +1 -0
  72. package/lib/compare/computePsnr.d.ts +11 -0
  73. package/lib/compare/computePsnr.d.ts.map +1 -0
  74. package/lib/compare/computePsnr.js +14 -0
  75. package/lib/compare/computePsnr.js.map +1 -0
  76. package/lib/compare/computeRmse.d.ts +18 -0
  77. package/lib/compare/computeRmse.d.ts.map +1 -0
  78. package/lib/compare/computeRmse.js +30 -0
  79. package/lib/compare/computeRmse.js.map +1 -0
  80. package/lib/compare/divide.d.ts +22 -0
  81. package/lib/compare/divide.d.ts.map +1 -0
  82. package/lib/compare/divide.js +31 -0
  83. package/lib/compare/divide.js.map +1 -0
  84. package/lib/compare/index.d.ts +7 -0
  85. package/lib/compare/index.d.ts.map +1 -0
  86. package/lib/compare/index.js +7 -0
  87. package/lib/compare/index.js.map +1 -0
  88. package/lib/compare/multiply.d.ts +22 -0
  89. package/lib/compare/multiply.d.ts.map +1 -0
  90. package/lib/compare/multiply.js +28 -0
  91. package/lib/compare/multiply.js.map +1 -0
  92. package/lib/compare/subtract.d.ts +13 -0
  93. package/lib/compare/subtract.d.ts.map +1 -0
  94. package/lib/compare/subtract.js +58 -0
  95. package/lib/compare/subtract.js.map +1 -0
  96. package/lib/compute/getExtrema.d.ts +33 -0
  97. package/lib/compute/getExtrema.d.ts.map +1 -0
  98. package/lib/compute/getExtrema.js +72 -0
  99. package/lib/compute/getExtrema.js.map +1 -0
  100. package/lib/compute/histogram.d.ts +22 -14
  101. package/lib/compute/histogram.d.ts.map +1 -1
  102. package/lib/compute/histogram.js +29 -23
  103. package/lib/compute/histogram.js.map +1 -1
  104. package/lib/compute/index.d.ts +5 -1
  105. package/lib/compute/index.d.ts.map +1 -1
  106. package/lib/compute/index.js +5 -6
  107. package/lib/compute/index.js.map +1 -1
  108. package/lib/compute/mean.d.ts +17 -0
  109. package/lib/compute/mean.d.ts.map +1 -0
  110. package/lib/compute/mean.js +37 -0
  111. package/lib/compute/mean.js.map +1 -0
  112. package/lib/compute/median.d.ts +16 -0
  113. package/lib/compute/median.d.ts.map +1 -0
  114. package/lib/compute/median.js +37 -0
  115. package/lib/compute/median.js.map +1 -0
  116. package/lib/compute/variance.d.ts +17 -0
  117. package/lib/compute/variance.d.ts.map +1 -0
  118. package/lib/compute/variance.js +33 -0
  119. package/lib/compute/variance.js.map +1 -0
  120. package/lib/correctColor/correctColor.d.ts +22 -0
  121. package/lib/correctColor/correctColor.d.ts.map +1 -0
  122. package/lib/correctColor/correctColor.js +75 -0
  123. package/lib/correctColor/correctColor.js.map +1 -0
  124. package/lib/correctColor/index.d.ts +2 -0
  125. package/lib/correctColor/index.d.ts.map +1 -0
  126. package/lib/correctColor/index.js +2 -0
  127. package/lib/correctColor/index.js.map +1 -0
  128. package/lib/correctColor/utils/formatData.d.ts +37 -0
  129. package/lib/correctColor/utils/formatData.d.ts.map +1 -0
  130. package/lib/correctColor/utils/formatData.js +60 -0
  131. package/lib/correctColor/utils/formatData.js.map +1 -0
  132. package/lib/correctColor/utils/getImageColors.d.ts +9 -0
  133. package/lib/correctColor/utils/getImageColors.d.ts.map +1 -0
  134. package/lib/correctColor/utils/getImageColors.js +19 -0
  135. package/lib/correctColor/utils/getImageColors.js.map +1 -0
  136. package/lib/correctColor/utils/referenceColorCard.d.ts +42 -0
  137. package/lib/correctColor/utils/referenceColorCard.d.ts.map +1 -0
  138. package/lib/correctColor/utils/referenceColorCard.js +146 -0
  139. package/lib/correctColor/utils/referenceColorCard.js.map +1 -0
  140. package/lib/draw/drawCircleOnImage.d.ts +28 -0
  141. package/lib/draw/drawCircleOnImage.d.ts.map +1 -0
  142. package/lib/draw/drawCircleOnImage.js +75 -0
  143. package/lib/draw/drawCircleOnImage.js.map +1 -0
  144. package/lib/draw/drawLineOnImage.d.ts +28 -0
  145. package/lib/draw/drawLineOnImage.d.ts.map +1 -0
  146. package/lib/draw/drawLineOnImage.js +27 -0
  147. package/lib/draw/drawLineOnImage.js.map +1 -0
  148. package/lib/draw/drawLineOnMask.d.ts +23 -0
  149. package/lib/draw/drawLineOnMask.d.ts.map +1 -0
  150. package/lib/draw/drawLineOnMask.js +19 -0
  151. package/lib/draw/drawLineOnMask.js.map +1 -0
  152. package/lib/draw/drawMarker.d.ts +36 -0
  153. package/lib/draw/drawMarker.d.ts.map +1 -0
  154. package/lib/draw/drawMarker.js +62 -0
  155. package/lib/draw/drawMarker.js.map +1 -0
  156. package/lib/draw/drawMarkers.d.ts +12 -0
  157. package/lib/draw/drawMarkers.d.ts.map +1 -0
  158. package/lib/draw/drawMarkers.js +17 -0
  159. package/lib/draw/drawMarkers.js.map +1 -0
  160. package/lib/draw/drawPoints.d.ts +22 -0
  161. package/lib/draw/drawPoints.d.ts.map +1 -0
  162. package/lib/draw/drawPoints.js +32 -0
  163. package/lib/draw/drawPoints.js.map +1 -0
  164. package/lib/draw/drawPolygonOnImage.d.ts +24 -0
  165. package/lib/draw/drawPolygonOnImage.d.ts.map +1 -0
  166. package/lib/draw/drawPolygonOnImage.js +44 -0
  167. package/lib/draw/drawPolygonOnImage.js.map +1 -0
  168. package/lib/draw/drawPolygonOnMask.d.ts +23 -0
  169. package/lib/draw/drawPolygonOnMask.d.ts.map +1 -0
  170. package/lib/draw/drawPolygonOnMask.js +35 -0
  171. package/lib/draw/drawPolygonOnMask.js.map +1 -0
  172. package/lib/draw/drawPolylineOnImage.d.ts +27 -0
  173. package/lib/draw/drawPolylineOnImage.d.ts.map +1 -0
  174. package/lib/draw/drawPolylineOnImage.js +26 -0
  175. package/lib/draw/drawPolylineOnImage.js.map +1 -0
  176. package/lib/draw/drawPolylineOnMask.d.ts +22 -0
  177. package/lib/draw/drawPolylineOnMask.d.ts.map +1 -0
  178. package/lib/draw/drawPolylineOnMask.js +18 -0
  179. package/lib/draw/drawPolylineOnMask.js.map +1 -0
  180. package/lib/draw/drawRectangle.d.ts +37 -0
  181. package/lib/draw/drawRectangle.d.ts.map +1 -0
  182. package/lib/draw/drawRectangle.js +50 -0
  183. package/lib/draw/drawRectangle.js.map +1 -0
  184. package/lib/draw/index.d.ts +12 -0
  185. package/lib/draw/index.d.ts.map +1 -0
  186. package/lib/draw/index.js +12 -0
  187. package/lib/draw/index.js.map +1 -0
  188. package/lib/draw/utils/deleteDuplicates.d.ts +8 -0
  189. package/lib/draw/utils/deleteDuplicates.d.ts.map +1 -0
  190. package/lib/draw/utils/deleteDuplicates.js +19 -0
  191. package/lib/draw/utils/deleteDuplicates.js.map +1 -0
  192. package/lib/draw/utils/roundPoint.d.ts +8 -0
  193. package/lib/draw/utils/roundPoint.d.ts.map +1 -0
  194. package/lib/draw/utils/roundPoint.js +12 -0
  195. package/lib/draw/utils/roundPoint.js.map +1 -0
  196. package/lib/featureMatching/descriptors/getBrief.d.ts +15 -0
  197. package/lib/featureMatching/descriptors/getBrief.d.ts.map +1 -0
  198. package/lib/featureMatching/descriptors/getBrief.js +29 -0
  199. package/lib/featureMatching/descriptors/getBrief.js.map +1 -0
  200. package/lib/featureMatching/descriptors/getBriefDescriptors.d.ts +43 -0
  201. package/lib/featureMatching/descriptors/getBriefDescriptors.d.ts.map +1 -0
  202. package/lib/featureMatching/descriptors/getBriefDescriptors.js +58 -0
  203. package/lib/featureMatching/descriptors/getBriefDescriptors.js.map +1 -0
  204. package/lib/featureMatching/descriptors/utils/getKeypointPatch.d.ts +18 -0
  205. package/lib/featureMatching/descriptors/utils/getKeypointPatch.d.ts.map +1 -0
  206. package/lib/featureMatching/descriptors/utils/getKeypointPatch.js +32 -0
  207. package/lib/featureMatching/descriptors/utils/getKeypointPatch.js.map +1 -0
  208. package/lib/featureMatching/descriptors/utils/sliceBrief.d.ts +21 -0
  209. package/lib/featureMatching/descriptors/utils/sliceBrief.d.ts.map +1 -0
  210. package/lib/featureMatching/descriptors/utils/sliceBrief.js +17 -0
  211. package/lib/featureMatching/descriptors/utils/sliceBrief.js.map +1 -0
  212. package/lib/featureMatching/featureMatching.types.d.ts +26 -0
  213. package/lib/featureMatching/featureMatching.types.d.ts.map +1 -0
  214. package/lib/featureMatching/featureMatching.types.js +2 -0
  215. package/lib/featureMatching/featureMatching.types.js.map +1 -0
  216. package/lib/featureMatching/index.d.ts +13 -0
  217. package/lib/featureMatching/index.d.ts.map +1 -0
  218. package/lib/featureMatching/index.js +13 -0
  219. package/lib/featureMatching/index.js.map +1 -0
  220. package/lib/featureMatching/keypoints/getBestKeypointsInRadius.d.ts +9 -0
  221. package/lib/featureMatching/keypoints/getBestKeypointsInRadius.d.ts.map +1 -0
  222. package/lib/featureMatching/keypoints/getBestKeypointsInRadius.js +30 -0
  223. package/lib/featureMatching/keypoints/getBestKeypointsInRadius.js.map +1 -0
  224. package/lib/featureMatching/keypoints/getFastKeypoints.d.ts +53 -0
  225. package/lib/featureMatching/keypoints/getFastKeypoints.d.ts.map +1 -0
  226. package/lib/featureMatching/keypoints/getFastKeypoints.js +71 -0
  227. package/lib/featureMatching/keypoints/getFastKeypoints.js.map +1 -0
  228. package/lib/featureMatching/keypoints/getFastScore.d.ts +13 -0
  229. package/lib/featureMatching/keypoints/getFastScore.d.ts.map +1 -0
  230. package/lib/featureMatching/keypoints/getFastScore.js +25 -0
  231. package/lib/featureMatching/keypoints/getFastScore.js.map +1 -0
  232. package/lib/featureMatching/keypoints/getHarrisScore.d.ts +20 -0
  233. package/lib/featureMatching/keypoints/getHarrisScore.d.ts.map +1 -0
  234. package/lib/featureMatching/keypoints/getHarrisScore.js +55 -0
  235. package/lib/featureMatching/keypoints/getHarrisScore.js.map +1 -0
  236. package/lib/featureMatching/keypoints/getIntensityCentroid.d.ts +11 -0
  237. package/lib/featureMatching/keypoints/getIntensityCentroid.d.ts.map +1 -0
  238. package/lib/featureMatching/keypoints/getIntensityCentroid.js +30 -0
  239. package/lib/featureMatching/keypoints/getIntensityCentroid.js.map +1 -0
  240. package/lib/featureMatching/keypoints/getIntensityMoment.d.ts +22 -0
  241. package/lib/featureMatching/keypoints/getIntensityMoment.d.ts.map +1 -0
  242. package/lib/featureMatching/keypoints/getIntensityMoment.js +27 -0
  243. package/lib/featureMatching/keypoints/getIntensityMoment.js.map +1 -0
  244. package/lib/featureMatching/keypoints/getOrientedFastKeypoints.d.ts +26 -0
  245. package/lib/featureMatching/keypoints/getOrientedFastKeypoints.d.ts.map +1 -0
  246. package/lib/featureMatching/keypoints/getOrientedFastKeypoints.js +38 -0
  247. package/lib/featureMatching/keypoints/getOrientedFastKeypoints.js.map +1 -0
  248. package/lib/featureMatching/keypoints/getPatchIntensityCentroid.d.ts +13 -0
  249. package/lib/featureMatching/keypoints/getPatchIntensityCentroid.d.ts.map +1 -0
  250. package/lib/featureMatching/keypoints/getPatchIntensityCentroid.js +31 -0
  251. package/lib/featureMatching/keypoints/getPatchIntensityCentroid.js.map +1 -0
  252. package/lib/featureMatching/keypoints/getPatchIntensityMoment.d.ts +27 -0
  253. package/lib/featureMatching/keypoints/getPatchIntensityMoment.d.ts.map +1 -0
  254. package/lib/featureMatching/keypoints/getPatchIntensityMoment.js +29 -0
  255. package/lib/featureMatching/keypoints/getPatchIntensityMoment.js.map +1 -0
  256. package/lib/featureMatching/keypoints/isFastKeypoint.d.ts +26 -0
  257. package/lib/featureMatching/keypoints/isFastKeypoint.d.ts.map +1 -0
  258. package/lib/featureMatching/keypoints/isFastKeypoint.js +74 -0
  259. package/lib/featureMatching/keypoints/isFastKeypoint.js.map +1 -0
  260. package/lib/featureMatching/keypoints/utils/getDistanceMatrix.d.ts +9 -0
  261. package/lib/featureMatching/keypoints/utils/getDistanceMatrix.d.ts.map +1 -0
  262. package/lib/featureMatching/keypoints/utils/getDistanceMatrix.js +26 -0
  263. package/lib/featureMatching/keypoints/utils/getDistanceMatrix.js.map +1 -0
  264. package/lib/featureMatching/keypoints/utils/getKeypointsInRadius.d.ts +10 -0
  265. package/lib/featureMatching/keypoints/utils/getKeypointsInRadius.d.ts.map +1 -0
  266. package/lib/featureMatching/keypoints/utils/getKeypointsInRadius.js +26 -0
  267. package/lib/featureMatching/keypoints/utils/getKeypointsInRadius.js.map +1 -0
  268. package/lib/featureMatching/matching/bruteForceMatch.d.ts +36 -0
  269. package/lib/featureMatching/matching/bruteForceMatch.d.ts.map +1 -0
  270. package/lib/featureMatching/matching/bruteForceMatch.js +33 -0
  271. package/lib/featureMatching/matching/bruteForceMatch.js.map +1 -0
  272. package/lib/featureMatching/matching/filterEuclideanDistance.d.ts +21 -0
  273. package/lib/featureMatching/matching/filterEuclideanDistance.d.ts.map +1 -0
  274. package/lib/featureMatching/matching/filterEuclideanDistance.js +43 -0
  275. package/lib/featureMatching/matching/filterEuclideanDistance.js.map +1 -0
  276. package/lib/featureMatching/matching/filterSmallestDistanceMatches.d.ts +9 -0
  277. package/lib/featureMatching/matching/filterSmallestDistanceMatches.d.ts.map +1 -0
  278. package/lib/featureMatching/matching/filterSmallestDistanceMatches.js +25 -0
  279. package/lib/featureMatching/matching/filterSmallestDistanceMatches.js.map +1 -0
  280. package/lib/featureMatching/matching/getCrosscheckMatches.d.ts +19 -0
  281. package/lib/featureMatching/matching/getCrosscheckMatches.d.ts.map +1 -0
  282. package/lib/featureMatching/matching/getCrosscheckMatches.js +55 -0
  283. package/lib/featureMatching/matching/getCrosscheckMatches.js.map +1 -0
  284. package/lib/featureMatching/matching/getHammingDistance.d.ts +10 -0
  285. package/lib/featureMatching/matching/getHammingDistance.d.ts.map +1 -0
  286. package/lib/featureMatching/matching/getHammingDistance.js +15 -0
  287. package/lib/featureMatching/matching/getHammingDistance.js.map +1 -0
  288. package/lib/featureMatching/utils/checkBorderDistance.d.ts +11 -0
  289. package/lib/featureMatching/utils/checkBorderDistance.d.ts.map +1 -0
  290. package/lib/featureMatching/utils/checkBorderDistance.js +14 -0
  291. package/lib/featureMatching/utils/checkBorderDistance.js.map +1 -0
  292. package/lib/featureMatching/utils/compareIntensity.d.ts +19 -0
  293. package/lib/featureMatching/utils/compareIntensity.d.ts.map +1 -0
  294. package/lib/featureMatching/utils/compareIntensity.js +18 -0
  295. package/lib/featureMatching/utils/compareIntensity.js.map +1 -0
  296. package/lib/featureMatching/utils/extractSquareImage.d.ts +11 -0
  297. package/lib/featureMatching/utils/extractSquareImage.d.ts.map +1 -0
  298. package/lib/featureMatching/utils/extractSquareImage.js +20 -0
  299. package/lib/featureMatching/utils/extractSquareImage.js.map +1 -0
  300. package/lib/featureMatching/utils/getColors.d.ts +11 -0
  301. package/lib/featureMatching/utils/getColors.d.ts.map +1 -0
  302. package/lib/featureMatching/utils/getColors.js +25 -0
  303. package/lib/featureMatching/utils/getColors.js.map +1 -0
  304. package/lib/featureMatching/utils/getGaussianPoints.d.ts +23 -0
  305. package/lib/featureMatching/utils/getGaussianPoints.d.ts.map +1 -0
  306. package/lib/featureMatching/utils/getGaussianPoints.js +46 -0
  307. package/lib/featureMatching/utils/getGaussianPoints.js.map +1 -0
  308. package/lib/featureMatching/utils/getKeypointColor.d.ts +11 -0
  309. package/lib/featureMatching/utils/getKeypointColor.d.ts.map +1 -0
  310. package/lib/featureMatching/utils/getKeypointColor.js +21 -0
  311. package/lib/featureMatching/utils/getKeypointColor.js.map +1 -0
  312. package/lib/featureMatching/utils/getMatchColor.d.ts +11 -0
  313. package/lib/featureMatching/utils/getMatchColor.d.ts.map +1 -0
  314. package/lib/featureMatching/utils/getMatchColor.js +20 -0
  315. package/lib/featureMatching/utils/getMatchColor.js.map +1 -0
  316. package/lib/featureMatching/utils/sortByDistance.d.ts +8 -0
  317. package/lib/featureMatching/utils/sortByDistance.d.ts.map +1 -0
  318. package/lib/featureMatching/utils/sortByDistance.js +11 -0
  319. package/lib/featureMatching/utils/sortByDistance.js.map +1 -0
  320. package/lib/featureMatching/utils/sortBySourceDest.d.ts +14 -0
  321. package/lib/featureMatching/utils/sortBySourceDest.d.ts.map +1 -0
  322. package/lib/featureMatching/utils/sortBySourceDest.js +29 -0
  323. package/lib/featureMatching/utils/sortBySourceDest.js.map +1 -0
  324. package/lib/featureMatching/visualize/Montage.d.ts +84 -0
  325. package/lib/featureMatching/visualize/Montage.d.ts.map +1 -0
  326. package/lib/featureMatching/visualize/Montage.js +113 -0
  327. package/lib/featureMatching/visualize/Montage.js.map +1 -0
  328. package/lib/featureMatching/visualize/drawKeypoints.d.ts +55 -0
  329. package/lib/featureMatching/visualize/drawKeypoints.d.ts.map +1 -0
  330. package/lib/featureMatching/visualize/drawKeypoints.js +58 -0
  331. package/lib/featureMatching/visualize/drawKeypoints.js.map +1 -0
  332. package/lib/featureMatching/visualize/drawMatches.d.ts +42 -0
  333. package/lib/featureMatching/visualize/drawMatches.d.ts.map +1 -0
  334. package/lib/featureMatching/visualize/drawMatches.js +52 -0
  335. package/lib/featureMatching/visualize/drawMatches.js.map +1 -0
  336. package/lib/featureMatching/visualize/overlapImages.d.ts +30 -0
  337. package/lib/featureMatching/visualize/overlapImages.d.ts.map +1 -0
  338. package/lib/featureMatching/visualize/overlapImages.js +35 -0
  339. package/lib/featureMatching/visualize/overlapImages.js.map +1 -0
  340. package/lib/featureMatching/visualize/scaleKeypoints.d.ts +9 -0
  341. package/lib/featureMatching/visualize/scaleKeypoints.d.ts.map +1 -0
  342. package/lib/featureMatching/visualize/scaleKeypoints.js +20 -0
  343. package/lib/featureMatching/visualize/scaleKeypoints.js.map +1 -0
  344. package/lib/filters/and.d.ts +16 -0
  345. package/lib/filters/and.d.ts.map +1 -0
  346. package/lib/filters/and.js +24 -0
  347. package/lib/filters/and.js.map +1 -0
  348. package/lib/filters/blur.d.ts +33 -10
  349. package/lib/filters/blur.d.ts.map +1 -1
  350. package/lib/filters/blur.js +22 -13
  351. package/lib/filters/blur.js.map +1 -1
  352. package/lib/filters/convolution.d.ts +71 -10
  353. package/lib/filters/convolution.d.ts.map +1 -1
  354. package/lib/filters/convolution.js +160 -128
  355. package/lib/filters/convolution.js.map +1 -1
  356. package/lib/filters/derivativeFilter.d.ts +38 -0
  357. package/lib/filters/derivativeFilter.d.ts.map +1 -0
  358. package/lib/filters/derivativeFilter.js +26 -0
  359. package/lib/filters/derivativeFilter.js.map +1 -0
  360. package/lib/filters/flip.d.ts +20 -0
  361. package/lib/filters/flip.d.ts.map +1 -0
  362. package/lib/filters/flip.js +23 -0
  363. package/lib/filters/flip.js.map +1 -0
  364. package/lib/filters/flipX.d.ts +8 -0
  365. package/lib/filters/flipX.d.ts.map +1 -0
  366. package/lib/filters/flipX.js +24 -0
  367. package/lib/filters/flipX.js.map +1 -0
  368. package/lib/filters/flipY.d.ts +8 -0
  369. package/lib/filters/flipY.d.ts.map +1 -0
  370. package/lib/filters/flipY.js +24 -0
  371. package/lib/filters/flipY.js.map +1 -0
  372. package/lib/filters/gaussianBlur.d.ts +53 -17
  373. package/lib/filters/gaussianBlur.d.ts.map +1 -1
  374. package/lib/filters/gaussianBlur.js +52 -47
  375. package/lib/filters/gaussianBlur.js.map +1 -1
  376. package/lib/filters/gradientFilter.d.ts +51 -0
  377. package/lib/filters/gradientFilter.d.ts.map +1 -0
  378. package/lib/filters/gradientFilter.js +49 -0
  379. package/lib/filters/gradientFilter.js.map +1 -0
  380. package/lib/filters/hypotenuse.d.ts +16 -0
  381. package/lib/filters/hypotenuse.d.ts.map +1 -0
  382. package/lib/filters/hypotenuse.js +36 -0
  383. package/lib/filters/hypotenuse.js.map +1 -0
  384. package/lib/filters/increaseContrast.d.ts +21 -0
  385. package/lib/filters/increaseContrast.d.ts.map +1 -0
  386. package/lib/filters/increaseContrast.js +49 -0
  387. package/lib/filters/increaseContrast.js.map +1 -0
  388. package/lib/filters/index.d.ts +14 -4
  389. package/lib/filters/index.d.ts.map +1 -1
  390. package/lib/filters/index.js +14 -9
  391. package/lib/filters/index.js.map +1 -1
  392. package/lib/filters/invert.d.ts +10 -9
  393. package/lib/filters/invert.d.ts.map +1 -1
  394. package/lib/filters/invert.js +31 -16
  395. package/lib/filters/invert.js.map +1 -1
  396. package/lib/filters/level.d.ts +46 -0
  397. package/lib/filters/level.d.ts.map +1 -0
  398. package/lib/filters/level.js +63 -0
  399. package/lib/filters/level.js.map +1 -0
  400. package/lib/filters/medianFilter.d.ts +26 -0
  401. package/lib/filters/medianFilter.d.ts.map +1 -0
  402. package/lib/filters/medianFilter.js +42 -0
  403. package/lib/filters/medianFilter.js.map +1 -0
  404. package/lib/filters/or.d.ts +16 -0
  405. package/lib/filters/or.d.ts.map +1 -0
  406. package/lib/filters/or.js +24 -0
  407. package/lib/filters/or.js.map +1 -0
  408. package/lib/filters/pixelate.d.ts +24 -0
  409. package/lib/filters/pixelate.d.ts.map +1 -0
  410. package/lib/filters/pixelate.js +105 -0
  411. package/lib/filters/pixelate.js.map +1 -0
  412. package/lib/geometry/getPerspectiveWarp.d.ts +37 -0
  413. package/lib/geometry/getPerspectiveWarp.d.ts.map +1 -0
  414. package/lib/geometry/getPerspectiveWarp.js +131 -0
  415. package/lib/geometry/getPerspectiveWarp.js.map +1 -0
  416. package/lib/geometry/index.d.ts +6 -3
  417. package/lib/geometry/index.d.ts.map +1 -1
  418. package/lib/geometry/index.js +5 -8
  419. package/lib/geometry/index.js.map +1 -1
  420. package/lib/geometry/resize.d.ts +48 -13
  421. package/lib/geometry/resize.d.ts.map +1 -1
  422. package/lib/geometry/resize.js +86 -90
  423. package/lib/geometry/resize.js.map +1 -1
  424. package/lib/geometry/rotate.d.ts +9 -13
  425. package/lib/geometry/rotate.d.ts.map +1 -1
  426. package/lib/geometry/rotate.js +46 -26
  427. package/lib/geometry/rotate.js.map +1 -1
  428. package/lib/geometry/transform.d.ts +45 -12
  429. package/lib/geometry/transform.d.ts.map +1 -1
  430. package/lib/geometry/transform.js +102 -84
  431. package/lib/geometry/transform.js.map +1 -1
  432. package/lib/geometry/transformRotate.d.ts +24 -0
  433. package/lib/geometry/transformRotate.d.ts.map +1 -0
  434. package/lib/geometry/transformRotate.js +38 -0
  435. package/lib/geometry/transformRotate.js.map +1 -0
  436. package/lib/index.d.ts +24 -8
  437. package/lib/index.d.ts.map +1 -1
  438. package/lib/index.js +24 -13
  439. package/lib/index.js.map +1 -1
  440. package/lib/load/decode.d.ts +8 -7
  441. package/lib/load/decode.d.ts.map +1 -1
  442. package/lib/load/decode.js +22 -28
  443. package/lib/load/decode.js.map +1 -1
  444. package/lib/load/decodeJpeg.d.ts +7 -6
  445. package/lib/load/decodeJpeg.d.ts.map +1 -1
  446. package/lib/load/decodeJpeg.js +26 -16
  447. package/lib/load/decodeJpeg.js.map +1 -1
  448. package/lib/load/decodePng.d.ts +7 -6
  449. package/lib/load/decodePng.d.ts.map +1 -1
  450. package/lib/load/decodePng.js +67 -67
  451. package/lib/load/decodePng.js.map +1 -1
  452. package/lib/load/decodeTiff.d.ts +17 -0
  453. package/lib/load/decodeTiff.d.ts.map +1 -0
  454. package/lib/load/decodeTiff.js +57 -0
  455. package/lib/load/decodeTiff.js.map +1 -0
  456. package/lib/load/fetchURL.d.ts +7 -0
  457. package/lib/load/fetchURL.d.ts.map +1 -0
  458. package/lib/load/fetchURL.js +13 -0
  459. package/lib/load/fetchURL.js.map +1 -0
  460. package/lib/load/getMetadata.d.ts +16 -0
  461. package/lib/load/getMetadata.d.ts.map +1 -0
  462. package/lib/load/getMetadata.js +15 -0
  463. package/lib/load/getMetadata.js.map +1 -0
  464. package/lib/load/index.d.ts +9 -6
  465. package/lib/load/index.d.ts.map +1 -1
  466. package/lib/load/index.js +9 -11
  467. package/lib/load/index.js.map +1 -1
  468. package/lib/load/load.types.d.ts +8 -0
  469. package/lib/load/load.types.d.ts.map +1 -0
  470. package/lib/load/load.types.js +2 -0
  471. package/lib/load/load.types.js.map +1 -0
  472. package/lib/load/read.d.ts +16 -11
  473. package/lib/load/read.d.ts.map +1 -1
  474. package/lib/load/read.js +24 -23
  475. package/lib/load/read.js.map +1 -1
  476. package/lib/load/readCanvas.d.ts +7 -2
  477. package/lib/load/readCanvas.d.ts.map +1 -1
  478. package/lib/load/readCanvas.js +16 -17
  479. package/lib/load/readCanvas.js.map +1 -1
  480. package/lib/load/readImg.d.ts +7 -2
  481. package/lib/load/readImg.d.ts.map +1 -1
  482. package/lib/load/readImg.js +17 -16
  483. package/lib/load/readImg.js.map +1 -1
  484. package/lib/maskAnalysis/getBorderPoints.d.ts +12 -0
  485. package/lib/maskAnalysis/getBorderPoints.d.ts.map +1 -0
  486. package/lib/maskAnalysis/getBorderPoints.js +53 -0
  487. package/lib/maskAnalysis/getBorderPoints.js.map +1 -0
  488. package/lib/maskAnalysis/getConvexHull.d.ts +9 -0
  489. package/lib/maskAnalysis/getConvexHull.d.ts.map +1 -0
  490. package/lib/maskAnalysis/getConvexHull.js +23 -0
  491. package/lib/maskAnalysis/getConvexHull.js.map +1 -0
  492. package/lib/maskAnalysis/getFeret.d.ts +11 -0
  493. package/lib/maskAnalysis/getFeret.d.ts.map +1 -0
  494. package/lib/maskAnalysis/getFeret.js +181 -0
  495. package/lib/maskAnalysis/getFeret.js.map +1 -0
  496. package/lib/maskAnalysis/getMbr.d.ts +9 -0
  497. package/lib/maskAnalysis/getMbr.d.ts.map +1 -0
  498. package/lib/maskAnalysis/getMbr.js +13 -0
  499. package/lib/maskAnalysis/getMbr.js.map +1 -0
  500. package/lib/maskAnalysis/index.d.ts +2 -0
  501. package/lib/maskAnalysis/index.d.ts.map +1 -0
  502. package/lib/maskAnalysis/index.js +2 -0
  503. package/lib/maskAnalysis/index.js.map +1 -0
  504. package/lib/maskAnalysis/maskAnalysis.types.d.ts +97 -0
  505. package/lib/maskAnalysis/maskAnalysis.types.d.ts.map +1 -0
  506. package/lib/maskAnalysis/maskAnalysis.types.js +2 -0
  507. package/lib/maskAnalysis/maskAnalysis.types.js.map +1 -0
  508. package/lib/maskAnalysis/utils/getAngle.d.ts +19 -0
  509. package/lib/maskAnalysis/utils/getAngle.d.ts.map +1 -0
  510. package/lib/maskAnalysis/utils/getAngle.js +41 -0
  511. package/lib/maskAnalysis/utils/getAngle.js.map +1 -0
  512. package/lib/maskAnalysis/utils/getExtendedBorderPoints.d.ts +12 -0
  513. package/lib/maskAnalysis/utils/getExtendedBorderPoints.d.ts.map +1 -0
  514. package/lib/maskAnalysis/utils/getExtendedBorderPoints.js +20 -0
  515. package/lib/maskAnalysis/utils/getExtendedBorderPoints.js.map +1 -0
  516. package/lib/maskAnalysis/utils/getMbrAngle.d.ts +8 -0
  517. package/lib/maskAnalysis/utils/getMbrAngle.d.ts.map +1 -0
  518. package/lib/maskAnalysis/utils/getMbrAngle.js +20 -0
  519. package/lib/maskAnalysis/utils/getMbrAngle.js.map +1 -0
  520. package/lib/maskAnalysis/utils/getMbrFromPoints.d.ts +10 -0
  521. package/lib/maskAnalysis/utils/getMbrFromPoints.d.ts.map +1 -0
  522. package/lib/maskAnalysis/utils/getMbrFromPoints.js +102 -0
  523. package/lib/maskAnalysis/utils/getMbrFromPoints.js.map +1 -0
  524. package/lib/maskAnalysis/utils/monotoneChainConvexHull.d.ts +18 -0
  525. package/lib/maskAnalysis/utils/monotoneChainConvexHull.d.ts.map +1 -0
  526. package/lib/maskAnalysis/utils/monotoneChainConvexHull.js +44 -0
  527. package/lib/maskAnalysis/utils/monotoneChainConvexHull.js.map +1 -0
  528. package/lib/morphology/bottomHat.d.ts +18 -0
  529. package/lib/morphology/bottomHat.d.ts.map +1 -0
  530. package/lib/morphology/bottomHat.js +38 -0
  531. package/lib/morphology/bottomHat.js.map +1 -0
  532. package/lib/morphology/cannyEdgeDetector.d.ts +44 -0
  533. package/lib/morphology/cannyEdgeDetector.d.ts.map +1 -0
  534. package/lib/morphology/cannyEdgeDetector.js +146 -0
  535. package/lib/morphology/cannyEdgeDetector.js.map +1 -0
  536. package/lib/morphology/clearBorder.d.ts +26 -0
  537. package/lib/morphology/clearBorder.d.ts.map +1 -0
  538. package/lib/morphology/clearBorder.js +19 -0
  539. package/lib/morphology/clearBorder.js.map +1 -0
  540. package/lib/morphology/close.d.ts +18 -0
  541. package/lib/morphology/close.d.ts.map +1 -0
  542. package/lib/morphology/close.js +33 -0
  543. package/lib/morphology/close.js.map +1 -0
  544. package/lib/morphology/dilate.d.ts +18 -0
  545. package/lib/morphology/dilate.d.ts.map +1 -0
  546. package/lib/morphology/dilate.js +191 -0
  547. package/lib/morphology/dilate.js.map +1 -0
  548. package/lib/morphology/erode.d.ts +18 -0
  549. package/lib/morphology/erode.d.ts.map +1 -0
  550. package/lib/morphology/erode.js +191 -0
  551. package/lib/morphology/erode.js.map +1 -0
  552. package/lib/morphology/floodFill.d.ts +26 -0
  553. package/lib/morphology/floodFill.d.ts.map +1 -0
  554. package/lib/morphology/floodFill.js +18 -0
  555. package/lib/morphology/floodFill.js.map +1 -0
  556. package/lib/morphology/index.d.ts +12 -0
  557. package/lib/morphology/index.d.ts.map +1 -0
  558. package/lib/morphology/index.js +12 -0
  559. package/lib/morphology/index.js.map +1 -0
  560. package/lib/morphology/morphologicalGradient.d.ts +18 -0
  561. package/lib/morphology/morphologicalGradient.d.ts.map +1 -0
  562. package/lib/morphology/morphologicalGradient.js +34 -0
  563. package/lib/morphology/morphologicalGradient.js.map +1 -0
  564. package/lib/morphology/multipleFloodFill.d.ts +36 -0
  565. package/lib/morphology/multipleFloodFill.d.ts.map +1 -0
  566. package/lib/morphology/multipleFloodFill.js +87 -0
  567. package/lib/morphology/multipleFloodFill.js.map +1 -0
  568. package/lib/morphology/open.d.ts +18 -0
  569. package/lib/morphology/open.d.ts.map +1 -0
  570. package/lib/morphology/open.js +35 -0
  571. package/lib/morphology/open.js.map +1 -0
  572. package/lib/morphology/solidFill.d.ts +20 -0
  573. package/lib/morphology/solidFill.d.ts.map +1 -0
  574. package/lib/morphology/solidFill.js +15 -0
  575. package/lib/morphology/solidFill.js.map +1 -0
  576. package/lib/morphology/topHat.d.ts +18 -0
  577. package/lib/morphology/topHat.d.ts.map +1 -0
  578. package/lib/morphology/topHat.js +36 -0
  579. package/lib/morphology/topHat.js.map +1 -0
  580. package/lib/operations/convertBitDepth.d.ts +16 -0
  581. package/lib/operations/convertBitDepth.d.ts.map +1 -0
  582. package/lib/operations/convertBitDepth.js +56 -0
  583. package/lib/operations/convertBitDepth.js.map +1 -0
  584. package/lib/operations/convertColor.d.ts +35 -5
  585. package/lib/operations/convertColor.d.ts.map +1 -1
  586. package/lib/operations/convertColor.js +143 -75
  587. package/lib/operations/convertColor.js.map +1 -1
  588. package/lib/operations/copyTo.d.ts +17 -0
  589. package/lib/operations/copyTo.d.ts.map +1 -0
  590. package/lib/operations/copyTo.js +36 -0
  591. package/lib/operations/copyTo.js.map +1 -0
  592. package/lib/operations/correctBackground.d.ts +27 -0
  593. package/lib/operations/correctBackground.d.ts.map +1 -0
  594. package/lib/operations/correctBackground.js +44 -0
  595. package/lib/operations/correctBackground.js.map +1 -0
  596. package/lib/operations/crop.d.ts +32 -0
  597. package/lib/operations/crop.d.ts.map +1 -0
  598. package/lib/operations/crop.js +48 -0
  599. package/lib/operations/crop.js.map +1 -0
  600. package/lib/operations/cropAlpha.d.ts +11 -0
  601. package/lib/operations/cropAlpha.d.ts.map +1 -0
  602. package/lib/operations/cropAlpha.js +70 -0
  603. package/lib/operations/cropAlpha.js.map +1 -0
  604. package/lib/operations/cropRectangle.d.ts +14 -0
  605. package/lib/operations/cropRectangle.d.ts.map +1 -0
  606. package/lib/operations/cropRectangle.js +75 -0
  607. package/lib/operations/cropRectangle.js.map +1 -0
  608. package/lib/operations/extendBorders.d.ts +30 -0
  609. package/lib/operations/extendBorders.d.ts.map +1 -0
  610. package/lib/operations/extendBorders.js +61 -0
  611. package/lib/operations/extendBorders.js.map +1 -0
  612. package/lib/operations/extract.d.ts +19 -0
  613. package/lib/operations/extract.d.ts.map +1 -0
  614. package/lib/operations/extract.js +41 -0
  615. package/lib/operations/extract.js.map +1 -0
  616. package/lib/operations/getMaskFromCannyEdge.d.ts +11 -0
  617. package/lib/operations/getMaskFromCannyEdge.d.ts.map +1 -0
  618. package/lib/operations/getMaskFromCannyEdge.js +35 -0
  619. package/lib/operations/getMaskFromCannyEdge.js.map +1 -0
  620. package/lib/operations/grey.d.ts +62 -0
  621. package/lib/operations/grey.d.ts.map +1 -0
  622. package/lib/operations/grey.js +84 -0
  623. package/lib/operations/grey.js.map +1 -0
  624. package/lib/operations/greyAlgorithms.d.ts +133 -0
  625. package/lib/operations/greyAlgorithms.d.ts.map +1 -0
  626. package/lib/operations/greyAlgorithms.js +205 -0
  627. package/lib/operations/greyAlgorithms.js.map +1 -0
  628. package/lib/operations/index.d.ts +16 -5
  629. package/lib/operations/index.d.ts.map +1 -1
  630. package/lib/operations/index.js +16 -10
  631. package/lib/operations/index.js.map +1 -1
  632. package/lib/operations/merge.d.ts +7 -6
  633. package/lib/operations/merge.d.ts.map +1 -1
  634. package/lib/operations/merge.js +50 -47
  635. package/lib/operations/merge.js.map +1 -1
  636. package/lib/operations/operations.types.d.ts +7 -0
  637. package/lib/operations/operations.types.d.ts.map +1 -0
  638. package/lib/operations/operations.types.js +2 -0
  639. package/lib/operations/operations.types.js.map +1 -0
  640. package/lib/operations/paintMaskOnImage.d.ts +33 -0
  641. package/lib/operations/paintMaskOnImage.d.ts.map +1 -0
  642. package/lib/operations/paintMaskOnImage.js +53 -0
  643. package/lib/operations/paintMaskOnImage.js.map +1 -0
  644. package/lib/operations/paintMaskOnMask.d.ts +27 -0
  645. package/lib/operations/paintMaskOnMask.d.ts.map +1 -0
  646. package/lib/operations/paintMaskOnMask.js +24 -0
  647. package/lib/operations/paintMaskOnMask.js.map +1 -0
  648. package/lib/operations/split.d.ts +7 -2
  649. package/lib/operations/split.d.ts.map +1 -1
  650. package/lib/operations/split.js +19 -15
  651. package/lib/operations/split.js.map +1 -1
  652. package/lib/operations/threshold.d.ts +60 -18
  653. package/lib/operations/threshold.d.ts.map +1 -1
  654. package/lib/operations/threshold.js +90 -58
  655. package/lib/operations/threshold.js.map +1 -1
  656. package/lib/operations/thresholds/huang.d.ts +7 -0
  657. package/lib/operations/thresholds/huang.d.ts.map +1 -0
  658. package/lib/operations/thresholds/huang.js +78 -0
  659. package/lib/operations/thresholds/huang.js.map +1 -0
  660. package/lib/operations/thresholds/intermodes.d.ts +7 -0
  661. package/lib/operations/thresholds/intermodes.d.ts.map +1 -0
  662. package/lib/operations/thresholds/intermodes.js +57 -0
  663. package/lib/operations/thresholds/intermodes.js.map +1 -0
  664. package/lib/operations/thresholds/isodata.d.ts +7 -0
  665. package/lib/operations/thresholds/isodata.d.ts.map +1 -0
  666. package/lib/operations/thresholds/isodata.js +50 -0
  667. package/lib/operations/thresholds/isodata.js.map +1 -0
  668. package/lib/operations/thresholds/li.d.ts +8 -0
  669. package/lib/operations/thresholds/li.d.ts.map +1 -0
  670. package/lib/operations/thresholds/li.js +73 -0
  671. package/lib/operations/thresholds/li.js.map +1 -0
  672. package/lib/operations/thresholds/maxEntropy.d.ts +8 -0
  673. package/lib/operations/thresholds/maxEntropy.d.ts.map +1 -0
  674. package/lib/operations/thresholds/maxEntropy.js +76 -0
  675. package/lib/operations/thresholds/maxEntropy.js.map +1 -0
  676. package/lib/operations/thresholds/mean.d.ts +8 -0
  677. package/lib/operations/thresholds/mean.d.ts.map +1 -0
  678. package/lib/operations/thresholds/mean.js +22 -0
  679. package/lib/operations/thresholds/mean.js.map +1 -0
  680. package/lib/operations/thresholds/minError.d.ts +8 -0
  681. package/lib/operations/thresholds/minError.d.ts.map +1 -0
  682. package/lib/operations/thresholds/minError.js +86 -0
  683. package/lib/operations/thresholds/minError.js.map +1 -0
  684. package/lib/operations/thresholds/minimum.d.ts +7 -0
  685. package/lib/operations/thresholds/minimum.d.ts.map +1 -0
  686. package/lib/operations/thresholds/minimum.js +74 -0
  687. package/lib/operations/thresholds/minimum.js.map +1 -0
  688. package/lib/operations/thresholds/moments.d.ts +8 -0
  689. package/lib/operations/thresholds/moments.d.ts.map +1 -0
  690. package/lib/operations/thresholds/moments.js +58 -0
  691. package/lib/operations/thresholds/moments.js.map +1 -0
  692. package/lib/operations/thresholds/otsu.d.ts +7 -1
  693. package/lib/operations/thresholds/otsu.d.ts.map +1 -1
  694. package/lib/operations/thresholds/otsu.js +37 -34
  695. package/lib/operations/thresholds/otsu.js.map +1 -1
  696. package/lib/operations/thresholds/percentile.d.ts +7 -0
  697. package/lib/operations/thresholds/percentile.d.ts.map +1 -0
  698. package/lib/operations/thresholds/percentile.js +35 -0
  699. package/lib/operations/thresholds/percentile.js.map +1 -0
  700. package/lib/operations/thresholds/renyiEntropy.d.ts +8 -0
  701. package/lib/operations/thresholds/renyiEntropy.d.ts.map +1 -0
  702. package/lib/operations/thresholds/renyiEntropy.js +127 -0
  703. package/lib/operations/thresholds/renyiEntropy.js.map +1 -0
  704. package/lib/operations/thresholds/shanbhag.d.ts +8 -0
  705. package/lib/operations/thresholds/shanbhag.d.ts.map +1 -0
  706. package/lib/operations/thresholds/shanbhag.js +72 -0
  707. package/lib/operations/thresholds/shanbhag.js.map +1 -0
  708. package/lib/operations/thresholds/triangle.d.ts +6 -1
  709. package/lib/operations/thresholds/triangle.d.ts.map +1 -1
  710. package/lib/operations/thresholds/triangle.js +107 -105
  711. package/lib/operations/thresholds/triangle.js.map +1 -1
  712. package/lib/operations/thresholds/yen.d.ts +8 -0
  713. package/lib/operations/thresholds/yen.d.ts.map +1 -0
  714. package/lib/operations/thresholds/yen.js +55 -0
  715. package/lib/operations/thresholds/yen.js.map +1 -0
  716. package/lib/point/operations.d.ts +10 -0
  717. package/lib/point/operations.d.ts.map +1 -0
  718. package/lib/point/operations.js +21 -0
  719. package/lib/point/operations.js.map +1 -0
  720. package/lib/roi/Roi.d.ts +218 -0
  721. package/lib/roi/Roi.d.ts.map +1 -0
  722. package/lib/roi/Roi.js +553 -0
  723. package/lib/roi/Roi.js.map +1 -0
  724. package/lib/roi/RoiMapManager.d.ts +59 -0
  725. package/lib/roi/RoiMapManager.d.ts.map +1 -0
  726. package/lib/roi/RoiMapManager.js +51 -0
  727. package/lib/roi/RoiMapManager.js.map +1 -0
  728. package/lib/roi/colorRois.d.ts +38 -0
  729. package/lib/roi/colorRois.d.ts.map +1 -0
  730. package/lib/roi/colorRois.js +41 -0
  731. package/lib/roi/colorRois.js.map +1 -0
  732. package/lib/roi/computeRois.d.ts +7 -0
  733. package/lib/roi/computeRois.d.ts.map +1 -0
  734. package/lib/roi/computeRois.js +81 -0
  735. package/lib/roi/computeRois.js.map +1 -0
  736. package/lib/roi/fromMask.d.ts +17 -0
  737. package/lib/roi/fromMask.d.ts.map +1 -0
  738. package/lib/roi/fromMask.js +139 -0
  739. package/lib/roi/fromMask.js.map +1 -0
  740. package/lib/roi/getBorderPoints.d.ts +12 -0
  741. package/lib/roi/getBorderPoints.d.ts.map +1 -0
  742. package/lib/roi/getBorderPoints.js +12 -0
  743. package/lib/roi/getBorderPoints.js.map +1 -0
  744. package/lib/roi/getMask.d.ts +17 -0
  745. package/lib/roi/getMask.d.ts.map +1 -0
  746. package/lib/roi/getMask.js +27 -0
  747. package/lib/roi/getMask.js.map +1 -0
  748. package/lib/roi/getRois.d.ts +33 -0
  749. package/lib/roi/getRois.d.ts.map +1 -0
  750. package/lib/roi/getRois.js +27 -0
  751. package/lib/roi/getRois.js.map +1 -0
  752. package/lib/roi/index.d.ts +11 -0
  753. package/lib/roi/index.d.ts.map +1 -0
  754. package/lib/roi/index.js +11 -0
  755. package/lib/roi/index.js.map +1 -0
  756. package/lib/roi/properties/getEllipse.d.ts +9 -0
  757. package/lib/roi/properties/getEllipse.d.ts.map +1 -0
  758. package/lib/roi/properties/getEllipse.js +96 -0
  759. package/lib/roi/properties/getEllipse.js.map +1 -0
  760. package/lib/roi/roi.types.d.ts +29 -0
  761. package/lib/roi/roi.types.d.ts.map +1 -0
  762. package/lib/roi/roi.types.js +2 -0
  763. package/lib/roi/roi.types.js.map +1 -0
  764. package/lib/roi/utils/colorMaps/getBinaryMap.d.ts +33 -0
  765. package/lib/roi/utils/colorMaps/getBinaryMap.d.ts.map +1 -0
  766. package/lib/roi/utils/colorMaps/getBinaryMap.js +27 -0
  767. package/lib/roi/utils/colorMaps/getBinaryMap.js.map +1 -0
  768. package/lib/roi/utils/colorMaps/getRainbowMap.d.ts +23 -0
  769. package/lib/roi/utils/colorMaps/getRainbowMap.d.ts.map +1 -0
  770. package/lib/roi/utils/colorMaps/getRainbowMap.js +37 -0
  771. package/lib/roi/utils/colorMaps/getRainbowMap.js.map +1 -0
  772. package/lib/roi/utils/colorMaps/getSaturationMap.d.ts +33 -0
  773. package/lib/roi/utils/colorMaps/getSaturationMap.d.ts.map +1 -0
  774. package/lib/roi/utils/colorMaps/getSaturationMap.js +32 -0
  775. package/lib/roi/utils/colorMaps/getSaturationMap.js.map +1 -0
  776. package/lib/roi/utils/getColorMap.d.ts +29 -0
  777. package/lib/roi/utils/getColorMap.d.ts.map +1 -0
  778. package/lib/roi/utils/getColorMap.js +19 -0
  779. package/lib/roi/utils/getColorMap.js.map +1 -0
  780. package/lib/roi/utils/hsvToRgb.d.ts +20 -0
  781. package/lib/roi/utils/hsvToRgb.d.ts.map +1 -0
  782. package/lib/roi/utils/hsvToRgb.js +53 -0
  783. package/lib/roi/utils/hsvToRgb.js.map +1 -0
  784. package/lib/roi/utils/rgbToNumber.d.ts +7 -0
  785. package/lib/roi/utils/rgbToNumber.d.ts.map +1 -0
  786. package/lib/roi/utils/rgbToNumber.js +9 -0
  787. package/lib/roi/utils/rgbToNumber.js.map +1 -0
  788. package/lib/roi/waterShed.d.ts +36 -0
  789. package/lib/roi/waterShed.d.ts.map +1 -0
  790. package/lib/roi/waterShed.js +91 -0
  791. package/lib/roi/waterShed.js.map +1 -0
  792. package/lib/save/encode.d.ts +30 -34
  793. package/lib/save/encode.d.ts.map +1 -1
  794. package/lib/save/encode.js +24 -24
  795. package/lib/save/encode.js.map +1 -1
  796. package/lib/save/encodeBmp.d.ts +9 -0
  797. package/lib/save/encodeBmp.d.ts.map +1 -0
  798. package/lib/save/encodeBmp.js +22 -0
  799. package/lib/save/encodeBmp.js.map +1 -0
  800. package/lib/save/encodeDataURL.d.ts +10 -0
  801. package/lib/save/encodeDataURL.d.ts.map +1 -0
  802. package/lib/save/encodeDataURL.js +15 -0
  803. package/lib/save/encodeDataURL.js.map +1 -0
  804. package/lib/save/encodeJpeg.d.ts +16 -5
  805. package/lib/save/encodeJpeg.d.ts.map +1 -1
  806. package/lib/save/encodeJpeg.js +20 -18
  807. package/lib/save/encodeJpeg.js.map +1 -1
  808. package/lib/save/encodePng.d.ts +11 -4
  809. package/lib/save/encodePng.d.ts.map +1 -1
  810. package/lib/save/encodePng.js +22 -7
  811. package/lib/save/encodePng.js.map +1 -1
  812. package/lib/save/index.d.ts +6 -5
  813. package/lib/save/index.d.ts.map +1 -1
  814. package/lib/save/index.js +6 -10
  815. package/lib/save/index.js.map +1 -1
  816. package/lib/save/write.d.ts +61 -22
  817. package/lib/save/write.d.ts.map +1 -1
  818. package/lib/save/write.js +72 -49
  819. package/lib/save/write.js.map +1 -1
  820. package/lib/save/writeCanvas.d.ts +40 -14
  821. package/lib/save/writeCanvas.d.ts.map +1 -1
  822. package/lib/save/writeCanvas.js +28 -21
  823. package/lib/save/writeCanvas.js.map +1 -1
  824. package/lib/ssim/compute_dssim.d.ts +12 -0
  825. package/lib/ssim/compute_dssim.d.ts.map +1 -0
  826. package/lib/ssim/compute_dssim.js +14 -0
  827. package/lib/ssim/compute_dssim.js.map +1 -0
  828. package/lib/ssim/compute_ssim.d.ts +42 -0
  829. package/lib/ssim/compute_ssim.d.ts.map +1 -0
  830. package/lib/ssim/compute_ssim.js +56 -0
  831. package/lib/ssim/compute_ssim.js.map +1 -0
  832. package/lib/ssim/index.d.ts +3 -0
  833. package/lib/ssim/index.d.ts.map +1 -0
  834. package/lib/ssim/index.js +3 -0
  835. package/lib/ssim/index.js.map +1 -0
  836. package/lib/stack/compute/histogram.d.ts +10 -0
  837. package/lib/stack/compute/histogram.d.ts.map +1 -0
  838. package/lib/stack/compute/histogram.js +21 -0
  839. package/lib/stack/compute/histogram.js.map +1 -0
  840. package/lib/stack/compute/maxImage.d.ts +9 -0
  841. package/lib/stack/compute/maxImage.d.ts.map +1 -0
  842. package/lib/stack/compute/maxImage.js +21 -0
  843. package/lib/stack/compute/maxImage.js.map +1 -0
  844. package/lib/stack/compute/meanImage.d.ts +9 -0
  845. package/lib/stack/compute/meanImage.d.ts.map +1 -0
  846. package/lib/stack/compute/meanImage.js +29 -0
  847. package/lib/stack/compute/meanImage.js.map +1 -0
  848. package/lib/stack/compute/medianImage.d.ts +9 -0
  849. package/lib/stack/compute/medianImage.d.ts.map +1 -0
  850. package/lib/stack/compute/medianImage.js +25 -0
  851. package/lib/stack/compute/medianImage.js.map +1 -0
  852. package/lib/stack/compute/minImage.d.ts +9 -0
  853. package/lib/stack/compute/minImage.d.ts.map +1 -0
  854. package/lib/stack/compute/minImage.js +22 -0
  855. package/lib/stack/compute/minImage.js.map +1 -0
  856. package/lib/stack/compute/sum.d.ts +9 -0
  857. package/lib/stack/compute/sum.d.ts.map +1 -0
  858. package/lib/stack/compute/sum.js +30 -0
  859. package/lib/stack/compute/sum.js.map +1 -0
  860. package/lib/stack/index.d.ts +8 -0
  861. package/lib/stack/index.d.ts.map +1 -0
  862. package/lib/stack/index.js +8 -0
  863. package/lib/stack/index.js.map +1 -0
  864. package/lib/stack/load/decodeStack.d.ts +9 -0
  865. package/lib/stack/load/decodeStack.d.ts.map +1 -0
  866. package/lib/stack/load/decodeStack.js +19 -0
  867. package/lib/stack/load/decodeStack.js.map +1 -0
  868. package/lib/stack/load/decodeTiff.d.ts +8 -0
  869. package/lib/stack/load/decodeTiff.d.ts.map +1 -0
  870. package/lib/stack/load/decodeTiff.js +17 -0
  871. package/lib/stack/load/decodeTiff.js.map +1 -0
  872. package/lib/stack/utils/checkImagesValid.d.ts +13 -0
  873. package/lib/stack/utils/checkImagesValid.d.ts.map +1 -0
  874. package/lib/stack/utils/checkImagesValid.js +29 -0
  875. package/lib/stack/utils/checkImagesValid.js.map +1 -0
  876. package/lib/stack/utils/checkProcessable.d.ts +24 -0
  877. package/lib/stack/utils/checkProcessable.d.ts.map +1 -0
  878. package/lib/stack/utils/checkProcessable.js +32 -0
  879. package/lib/stack/utils/checkProcessable.js.map +1 -0
  880. package/lib/stack/utils/getStackFromFolder.d.ts +8 -0
  881. package/lib/stack/utils/getStackFromFolder.d.ts.map +1 -0
  882. package/lib/stack/utils/getStackFromFolder.js +16 -0
  883. package/lib/stack/utils/getStackFromFolder.js.map +1 -0
  884. package/lib/utils/arrayPointsToObjects.d.ts +8 -0
  885. package/lib/utils/arrayPointsToObjects.d.ts.map +1 -0
  886. package/lib/utils/arrayPointsToObjects.js +13 -0
  887. package/lib/utils/arrayPointsToObjects.js.map +1 -0
  888. package/lib/utils/boolToNumber.d.ts +8 -0
  889. package/lib/utils/boolToNumber.d.ts.map +1 -0
  890. package/lib/utils/boolToNumber.js +16 -0
  891. package/lib/utils/boolToNumber.js.map +1 -0
  892. package/lib/utils/borderIterator.d.ts +9 -0
  893. package/lib/utils/borderIterator.d.ts.map +1 -0
  894. package/lib/utils/borderIterator.js +20 -0
  895. package/lib/utils/borderIterator.js.map +1 -0
  896. package/lib/utils/clamp.d.ts +15 -3
  897. package/lib/utils/clamp.d.ts.map +1 -1
  898. package/lib/utils/clamp.js +42 -18
  899. package/lib/utils/clamp.js.map +1 -1
  900. package/lib/utils/constants/channelLabels.d.ts +8 -0
  901. package/lib/utils/constants/channelLabels.d.ts.map +1 -0
  902. package/lib/utils/constants/channelLabels.js +8 -0
  903. package/lib/utils/constants/channelLabels.js.map +1 -0
  904. package/lib/utils/constants/colorModels.d.ts +14 -0
  905. package/lib/utils/constants/colorModels.d.ts.map +1 -0
  906. package/lib/utils/constants/colorModels.js +35 -0
  907. package/lib/utils/constants/colorModels.js.map +1 -0
  908. package/lib/utils/constants/kernels.d.ts +13 -0
  909. package/lib/utils/constants/kernels.d.ts.map +1 -0
  910. package/lib/utils/constants/kernels.js +63 -0
  911. package/lib/utils/constants/kernels.js.map +1 -0
  912. package/lib/utils/constants/kinds.d.ts +7 -0
  913. package/lib/utils/constants/kinds.d.ts.map +1 -0
  914. package/lib/utils/constants/kinds.js +19 -0
  915. package/lib/utils/constants/kinds.js.map +1 -0
  916. package/lib/utils/copyData.d.ts +5 -0
  917. package/lib/utils/copyData.d.ts.map +1 -0
  918. package/lib/utils/copyData.js +15 -0
  919. package/lib/utils/copyData.js.map +1 -0
  920. package/lib/utils/cross_platform.d.ts +11 -0
  921. package/lib/utils/cross_platform.d.ts.map +1 -0
  922. package/lib/utils/cross_platform.js +17 -0
  923. package/lib/utils/cross_platform.js.map +1 -0
  924. package/lib/utils/geometry/angles.d.ts +16 -0
  925. package/lib/utils/geometry/angles.d.ts.map +1 -0
  926. package/lib/utils/geometry/angles.js +24 -0
  927. package/lib/utils/geometry/angles.js.map +1 -0
  928. package/lib/utils/geometry/getCirclePoints.d.ts +30 -0
  929. package/lib/utils/geometry/getCirclePoints.d.ts.map +1 -0
  930. package/lib/utils/geometry/getCirclePoints.js +88 -0
  931. package/lib/utils/geometry/getCirclePoints.js.map +1 -0
  932. package/lib/utils/geometry/index.d.ts +2 -0
  933. package/lib/utils/geometry/index.d.ts.map +1 -0
  934. package/lib/utils/geometry/index.js +2 -0
  935. package/lib/utils/geometry/index.js.map +1 -0
  936. package/lib/utils/geometry/lines.d.ts +23 -0
  937. package/lib/utils/geometry/lines.d.ts.map +1 -0
  938. package/lib/utils/geometry/lines.js +10 -0
  939. package/lib/utils/geometry/lines.js.map +1 -0
  940. package/lib/utils/geometry/points.d.ts +67 -0
  941. package/lib/utils/geometry/points.d.ts.map +1 -0
  942. package/lib/utils/geometry/points.js +78 -0
  943. package/lib/utils/geometry/points.js.map +1 -0
  944. package/lib/utils/geometry/polygons.d.ts +16 -0
  945. package/lib/utils/geometry/polygons.d.ts.map +1 -0
  946. package/lib/utils/geometry/polygons.js +30 -0
  947. package/lib/utils/geometry/polygons.js.map +1 -0
  948. package/lib/utils/geometry/removeClosePoints.d.ts +28 -0
  949. package/lib/utils/geometry/removeClosePoints.d.ts.map +1 -0
  950. package/lib/utils/geometry/removeClosePoints.js +43 -0
  951. package/lib/utils/geometry/removeClosePoints.js.map +1 -0
  952. package/lib/utils/getDefaultColor.d.ts +10 -0
  953. package/lib/utils/getDefaultColor.d.ts.map +1 -0
  954. package/lib/utils/getDefaultColor.js +17 -0
  955. package/lib/utils/getDefaultColor.js.map +1 -0
  956. package/lib/utils/getIndex.d.ts +5 -0
  957. package/lib/utils/getIndex.d.ts.map +1 -0
  958. package/lib/utils/getIndex.js +12 -0
  959. package/lib/utils/getIndex.js.map +1 -0
  960. package/lib/utils/getMinMax.d.ts +11 -0
  961. package/lib/utils/getMinMax.d.ts.map +1 -0
  962. package/lib/utils/getMinMax.js +24 -0
  963. package/lib/utils/getMinMax.js.map +1 -0
  964. package/lib/utils/getOutputImage.d.ts +57 -25
  965. package/lib/utils/getOutputImage.d.ts.map +1 -1
  966. package/lib/utils/getOutputImage.js +138 -37
  967. package/lib/utils/getOutputImage.js.map +1 -1
  968. package/lib/utils/getRadius.d.ts +7 -0
  969. package/lib/utils/getRadius.d.ts.map +1 -0
  970. package/lib/utils/getRadius.js +12 -0
  971. package/lib/utils/getRadius.js.map +1 -0
  972. package/lib/utils/interpolateBorder.d.ts +53 -9
  973. package/lib/utils/interpolateBorder.d.ts.map +1 -1
  974. package/lib/utils/interpolateBorder.js +136 -106
  975. package/lib/utils/interpolateBorder.js.map +1 -1
  976. package/lib/utils/interpolatePixel.d.ts +16 -7
  977. package/lib/utils/interpolatePixel.d.ts.map +1 -1
  978. package/lib/utils/interpolatePixel.js +121 -80
  979. package/lib/utils/interpolatePixel.js.map +1 -1
  980. package/lib/utils/round.d.ts +6 -1
  981. package/lib/utils/round.d.ts.map +1 -1
  982. package/lib/utils/round.js +18 -9
  983. package/lib/utils/round.js.map +1 -1
  984. package/lib/utils/sampleBackgroundPoints.d.ts +34 -0
  985. package/lib/utils/sampleBackgroundPoints.d.ts.map +1 -0
  986. package/lib/utils/sampleBackgroundPoints.js +37 -0
  987. package/lib/utils/sampleBackgroundPoints.js.map +1 -0
  988. package/lib/utils/setBlendedPixel.d.ts +11 -0
  989. package/lib/utils/setBlendedPixel.d.ts.map +1 -0
  990. package/lib/utils/setBlendedPixel.js +36 -0
  991. package/lib/utils/setBlendedPixel.js.map +1 -0
  992. package/lib/utils/setBlendedVisiblePixel.d.ts +11 -0
  993. package/lib/utils/setBlendedVisiblePixel.d.ts.map +1 -0
  994. package/lib/utils/setBlendedVisiblePixel.js +14 -0
  995. package/lib/utils/setBlendedVisiblePixel.js.map +1 -0
  996. package/lib/utils/surroundingPixels.d.ts +9 -0
  997. package/lib/utils/surroundingPixels.d.ts.map +1 -0
  998. package/lib/utils/surroundingPixels.js +15 -0
  999. package/lib/utils/surroundingPixels.js.map +1 -0
  1000. package/lib/utils/utils.types.d.ts +25 -0
  1001. package/lib/utils/utils.types.d.ts.map +1 -0
  1002. package/lib/utils/utils.types.js +2 -0
  1003. package/lib/utils/utils.types.js.map +1 -0
  1004. package/lib/utils/validators/assert.d.ts +12 -0
  1005. package/lib/utils/validators/assert.d.ts.map +1 -0
  1006. package/lib/utils/validators/assert.js +18 -0
  1007. package/lib/utils/validators/assert.js.map +1 -0
  1008. package/lib/utils/validators/checkKernel.d.ts +6 -0
  1009. package/lib/utils/validators/checkKernel.d.ts.map +1 -0
  1010. package/lib/utils/validators/checkKernel.js +10 -0
  1011. package/lib/utils/validators/checkKernel.js.map +1 -0
  1012. package/lib/utils/validators/checkPointIsInteger.d.ts +8 -0
  1013. package/lib/utils/validators/checkPointIsInteger.d.ts.map +1 -0
  1014. package/lib/utils/validators/checkPointIsInteger.js +11 -0
  1015. package/lib/utils/validators/checkPointIsInteger.js.map +1 -0
  1016. package/lib/utils/validators/checkProcessable.d.ts +25 -0
  1017. package/lib/utils/validators/checkProcessable.d.ts.map +1 -0
  1018. package/lib/utils/validators/checkProcessable.js +64 -0
  1019. package/lib/utils/validators/checkProcessable.js.map +1 -0
  1020. package/lib/utils/validators/validators.d.ts +39 -0
  1021. package/lib/utils/validators/validators.d.ts.map +1 -0
  1022. package/lib/utils/validators/validators.js +66 -0
  1023. package/lib/utils/validators/validators.js.map +1 -0
  1024. package/package.json +91 -18
  1025. package/src/Image.ts +922 -238
  1026. package/src/Mask.ts +731 -0
  1027. package/src/Stack.ts +204 -0
  1028. package/src/align/affineTransfrom/affineFitFunction.ts +27 -0
  1029. package/src/align/affineTransfrom/applyAffineTransform.ts +27 -0
  1030. package/src/align/affineTransfrom/createAffineTransformModel.ts +31 -0
  1031. package/src/align/affineTransfrom/drawResult.ts +56 -0
  1032. package/src/align/affineTransfrom/getAffineTransform.ts +310 -0
  1033. package/src/align/affineTransfrom/getEuclideanDistance.ts +11 -0
  1034. package/src/align/affineTransfrom/getMatrixFromPoints.ts +20 -0
  1035. package/src/align/affineTransfrom/getPointsFromMatrix.ts +17 -0
  1036. package/src/align/affineTransfrom/utils/getSourceWithoutMargins.ts +30 -0
  1037. package/src/align/alignMinDifference.ts +114 -0
  1038. package/src/align/index.ts +2 -0
  1039. package/src/compare/add.ts +34 -0
  1040. package/src/compare/computePsnr.ts +17 -0
  1041. package/src/compare/computeRmse.ts +33 -0
  1042. package/src/compare/divide.ts +50 -0
  1043. package/src/compare/index.ts +6 -0
  1044. package/src/compare/multiply.ts +48 -0
  1045. package/src/compare/subtract.ts +86 -0
  1046. package/src/compute/getExtrema.ts +103 -0
  1047. package/src/compute/histogram.ts +32 -10
  1048. package/src/compute/index.ts +5 -1
  1049. package/src/compute/mean.ts +48 -0
  1050. package/src/compute/median.ts +50 -0
  1051. package/src/compute/variance.ts +41 -0
  1052. package/src/correctColor/correctColor.ts +109 -0
  1053. package/src/correctColor/index.ts +1 -0
  1054. package/src/correctColor/utils/formatData.ts +86 -0
  1055. package/src/correctColor/utils/getImageColors.ts +23 -0
  1056. package/src/correctColor/utils/referenceColorCard.ts +175 -0
  1057. package/src/draw/drawCircleOnImage.ts +123 -0
  1058. package/src/draw/drawLineOnImage.ts +64 -0
  1059. package/src/draw/drawLineOnMask.ts +45 -0
  1060. package/src/draw/drawMarker.ts +108 -0
  1061. package/src/draw/drawMarkers.ts +25 -0
  1062. package/src/draw/drawPoints.ts +74 -0
  1063. package/src/draw/drawPolygonOnImage.ts +80 -0
  1064. package/src/draw/drawPolygonOnMask.ts +69 -0
  1065. package/src/draw/drawPolylineOnImage.ts +56 -0
  1066. package/src/draw/drawPolylineOnMask.ts +37 -0
  1067. package/src/draw/drawRectangle.ts +123 -0
  1068. package/src/draw/index.ts +11 -0
  1069. package/src/draw/utils/deleteDuplicates.ts +21 -0
  1070. package/src/draw/utils/roundPoint.ts +13 -0
  1071. package/src/featureMatching/descriptors/getBrief.ts +42 -0
  1072. package/src/featureMatching/descriptors/getBriefDescriptors.ts +108 -0
  1073. package/src/featureMatching/descriptors/utils/getKeypointPatch.ts +59 -0
  1074. package/src/featureMatching/descriptors/utils/sliceBrief.ts +34 -0
  1075. package/src/featureMatching/featureMatching.types.ts +26 -0
  1076. package/src/featureMatching/index.ts +12 -0
  1077. package/src/featureMatching/keypoints/getBestKeypointsInRadius.ts +39 -0
  1078. package/src/featureMatching/keypoints/getFastKeypoints.ts +157 -0
  1079. package/src/featureMatching/keypoints/getFastScore.ts +37 -0
  1080. package/src/featureMatching/keypoints/getHarrisScore.ts +73 -0
  1081. package/src/featureMatching/keypoints/getIntensityCentroid.ts +34 -0
  1082. package/src/featureMatching/keypoints/getIntensityMoment.ts +43 -0
  1083. package/src/featureMatching/keypoints/getOrientedFastKeypoints.ts +67 -0
  1084. package/src/featureMatching/keypoints/getPatchIntensityCentroid.ts +39 -0
  1085. package/src/featureMatching/keypoints/getPatchIntensityMoment.ts +56 -0
  1086. package/src/featureMatching/keypoints/isFastKeypoint.ts +101 -0
  1087. package/src/featureMatching/keypoints/utils/getDistanceMatrix.ts +35 -0
  1088. package/src/featureMatching/keypoints/utils/getKeypointsInRadius.ts +34 -0
  1089. package/src/featureMatching/matching/bruteForceMatch.ts +79 -0
  1090. package/src/featureMatching/matching/filterEuclideanDistance.ts +71 -0
  1091. package/src/featureMatching/matching/filterSmallestDistanceMatches.ts +33 -0
  1092. package/src/featureMatching/matching/getCrosscheckMatches.ts +69 -0
  1093. package/src/featureMatching/matching/getHammingDistance.ts +20 -0
  1094. package/src/featureMatching/utils/checkBorderDistance.ts +22 -0
  1095. package/src/featureMatching/utils/compareIntensity.ts +35 -0
  1096. package/src/featureMatching/utils/extractSquareImage.ts +27 -0
  1097. package/src/featureMatching/utils/getColors.ts +34 -0
  1098. package/src/featureMatching/utils/getGaussianPoints.ts +64 -0
  1099. package/src/featureMatching/utils/getKeypointColor.ts +29 -0
  1100. package/src/featureMatching/utils/getMatchColor.ts +27 -0
  1101. package/src/featureMatching/utils/sortByDistance.ts +12 -0
  1102. package/src/featureMatching/utils/sortBySourceDest.ts +27 -0
  1103. package/src/featureMatching/visualize/Montage.ts +165 -0
  1104. package/src/featureMatching/visualize/drawKeypoints.ts +146 -0
  1105. package/src/featureMatching/visualize/drawMatches.ts +107 -0
  1106. package/src/featureMatching/visualize/overlapImages.ts +67 -0
  1107. package/src/featureMatching/visualize/scaleKeypoints.ts +24 -0
  1108. package/src/filters/and.ts +33 -0
  1109. package/src/filters/blur.ts +41 -6
  1110. package/src/filters/convolution.ts +173 -137
  1111. package/src/filters/derivativeFilter.ts +71 -0
  1112. package/src/filters/flip.ts +35 -0
  1113. package/src/filters/flipX.ts +32 -0
  1114. package/src/filters/flipY.ts +34 -0
  1115. package/src/filters/gaussianBlur.ts +74 -27
  1116. package/src/filters/gradientFilter.ts +103 -0
  1117. package/src/filters/hypotenuse.ts +62 -0
  1118. package/src/filters/increaseContrast.ts +69 -0
  1119. package/src/filters/index.ts +14 -4
  1120. package/src/filters/invert.ts +42 -11
  1121. package/src/filters/level.ts +131 -0
  1122. package/src/filters/medianFilter.ts +83 -0
  1123. package/src/filters/or.ts +33 -0
  1124. package/src/filters/pixelate.ts +178 -0
  1125. package/src/geometry/getPerspectiveWarp.ts +169 -0
  1126. package/src/geometry/index.ts +6 -3
  1127. package/src/geometry/resize.ts +89 -57
  1128. package/src/geometry/rotate.ts +56 -44
  1129. package/src/geometry/transform.ts +137 -51
  1130. package/src/geometry/transformRotate.ts +65 -0
  1131. package/src/index.ts +24 -8
  1132. package/src/load/decode.ts +18 -16
  1133. package/src/load/decodeJpeg.ts +20 -4
  1134. package/src/load/decodePng.ts +30 -27
  1135. package/src/load/decodeTiff.ts +63 -0
  1136. package/src/load/fetchURL.ts +13 -0
  1137. package/src/load/getMetadata.ts +18 -0
  1138. package/src/load/index.ts +9 -6
  1139. package/src/load/load.types.ts +7 -0
  1140. package/src/load/read.ts +15 -12
  1141. package/src/load/readCanvas.ts +11 -9
  1142. package/src/load/readImg.ts +15 -9
  1143. package/src/maskAnalysis/getBorderPoints.ts +70 -0
  1144. package/src/maskAnalysis/getConvexHull.ts +29 -0
  1145. package/src/maskAnalysis/getFeret.ts +239 -0
  1146. package/src/maskAnalysis/getMbr.ts +17 -0
  1147. package/src/maskAnalysis/index.ts +1 -0
  1148. package/src/maskAnalysis/maskAnalysis.types.ts +100 -0
  1149. package/src/maskAnalysis/utils/getAngle.ts +40 -0
  1150. package/src/maskAnalysis/utils/getExtendedBorderPoints.ts +30 -0
  1151. package/src/maskAnalysis/utils/getMbrAngle.ts +25 -0
  1152. package/src/maskAnalysis/utils/getMbrFromPoints.ts +112 -0
  1153. package/src/maskAnalysis/utils/monotoneChainConvexHull.ts +65 -0
  1154. package/src/morphology/bottomHat.ts +64 -0
  1155. package/src/morphology/cannyEdgeDetector.ts +209 -0
  1156. package/src/morphology/clearBorder.ts +41 -0
  1157. package/src/morphology/close.ts +59 -0
  1158. package/src/morphology/dilate.ts +261 -0
  1159. package/src/morphology/erode.ts +261 -0
  1160. package/src/morphology/floodFill.ts +38 -0
  1161. package/src/morphology/index.ts +11 -0
  1162. package/src/morphology/morphologicalGradient.ts +66 -0
  1163. package/src/morphology/multipleFloodFill.ts +135 -0
  1164. package/src/morphology/open.ts +62 -0
  1165. package/src/morphology/solidFill.ts +29 -0
  1166. package/src/morphology/topHat.ts +62 -0
  1167. package/src/operations/convertBitDepth.ts +74 -0
  1168. package/src/operations/convertColor.ts +143 -66
  1169. package/src/operations/copyTo.ts +79 -0
  1170. package/src/operations/correctBackground.ts +71 -0
  1171. package/src/operations/crop.ts +94 -0
  1172. package/src/operations/cropAlpha.ts +108 -0
  1173. package/src/operations/cropRectangle.ts +112 -0
  1174. package/src/operations/extendBorders.ts +119 -0
  1175. package/src/operations/extract.ts +76 -0
  1176. package/src/operations/getMaskFromCannyEdge.ts +41 -0
  1177. package/src/operations/grey.ts +139 -0
  1178. package/src/operations/greyAlgorithms.ts +248 -0
  1179. package/src/operations/index.ts +16 -5
  1180. package/src/operations/merge.ts +36 -20
  1181. package/src/operations/operations.types.ts +6 -0
  1182. package/src/operations/paintMaskOnImage.ts +111 -0
  1183. package/src/operations/paintMaskOnMask.ts +59 -0
  1184. package/src/operations/split.ts +11 -4
  1185. package/src/operations/threshold.ts +111 -52
  1186. package/src/operations/thresholds/huang.ts +84 -0
  1187. package/src/operations/thresholds/intermodes.ts +61 -0
  1188. package/src/operations/thresholds/isodata.ts +53 -0
  1189. package/src/operations/thresholds/li.ts +80 -0
  1190. package/src/operations/thresholds/maxEntropy.ts +88 -0
  1191. package/src/operations/thresholds/mean.ts +22 -0
  1192. package/src/operations/thresholds/minError.ts +101 -0
  1193. package/src/operations/thresholds/minimum.ts +77 -0
  1194. package/src/operations/thresholds/moments.ts +59 -0
  1195. package/src/operations/thresholds/otsu.ts +7 -1
  1196. package/src/operations/thresholds/percentile.ts +39 -0
  1197. package/src/operations/thresholds/renyiEntropy.ts +145 -0
  1198. package/src/operations/thresholds/shanbhag.ts +80 -0
  1199. package/src/operations/thresholds/triangle.ts +8 -2
  1200. package/src/operations/thresholds/yen.ts +59 -0
  1201. package/src/point/operations.ts +29 -0
  1202. package/src/roi/Roi.ts +661 -0
  1203. package/src/roi/RoiMapManager.ts +97 -0
  1204. package/src/roi/colorRois.ts +68 -0
  1205. package/src/roi/computeRois.ts +90 -0
  1206. package/src/roi/fromMask.ts +182 -0
  1207. package/src/roi/getBorderPoints.ts +20 -0
  1208. package/src/roi/getMask.ts +41 -0
  1209. package/src/roi/getRois.ts +65 -0
  1210. package/src/roi/index.ts +10 -0
  1211. package/src/roi/properties/getEllipse.ts +124 -0
  1212. package/src/roi/roi.types.ts +23 -0
  1213. package/src/roi/utils/colorMaps/getBinaryMap.ts +67 -0
  1214. package/src/roi/utils/colorMaps/getRainbowMap.ts +59 -0
  1215. package/src/roi/utils/colorMaps/getSaturationMap.ts +70 -0
  1216. package/src/roi/utils/getColorMap.ts +46 -0
  1217. package/src/roi/utils/hsvToRgb.ts +61 -0
  1218. package/src/roi/utils/rgbToNumber.ts +8 -0
  1219. package/src/roi/waterShed.ts +146 -0
  1220. package/src/save/encode.ts +41 -43
  1221. package/src/save/encodeBmp.ts +24 -0
  1222. package/src/save/encodeDataURL.ts +25 -0
  1223. package/src/save/encodeJpeg.ts +22 -13
  1224. package/src/save/encodePng.ts +30 -6
  1225. package/src/save/index.ts +6 -5
  1226. package/src/save/write.ts +129 -50
  1227. package/src/save/writeCanvas.ts +45 -19
  1228. package/src/ssim/compute_dssim.ts +21 -0
  1229. package/src/ssim/compute_ssim.ts +94 -0
  1230. package/src/ssim/index.ts +2 -0
  1231. package/src/stack/compute/histogram.ts +26 -0
  1232. package/src/stack/compute/maxImage.ts +31 -0
  1233. package/src/stack/compute/meanImage.ts +37 -0
  1234. package/src/stack/compute/medianImage.ts +30 -0
  1235. package/src/stack/compute/minImage.ts +32 -0
  1236. package/src/stack/compute/sum.ts +37 -0
  1237. package/src/stack/index.ts +7 -0
  1238. package/src/stack/load/decodeStack.ts +26 -0
  1239. package/src/stack/load/decodeTiff.ts +19 -0
  1240. package/src/stack/utils/checkImagesValid.ts +35 -0
  1241. package/src/stack/utils/checkProcessable.ts +61 -0
  1242. package/src/stack/utils/getStackFromFolder.ts +17 -0
  1243. package/src/types/bresenham-zingl.d.ts +50 -0
  1244. package/src/utils/arrayPointsToObjects.ts +15 -0
  1245. package/src/utils/boolToNumber.ts +17 -0
  1246. package/src/utils/borderIterator.ts +22 -0
  1247. package/src/utils/clamp.ts +32 -5
  1248. package/src/utils/constants/channelLabels.ts +9 -0
  1249. package/src/utils/constants/colorModels.ts +45 -0
  1250. package/src/utils/constants/kernels.ts +73 -0
  1251. package/src/utils/constants/kinds.ts +26 -0
  1252. package/src/utils/copyData.ts +21 -0
  1253. package/src/utils/cross_platform.ts +18 -0
  1254. package/src/utils/geometry/angles.ts +26 -0
  1255. package/src/utils/geometry/getCirclePoints.ts +123 -0
  1256. package/src/utils/geometry/index.ts +1 -0
  1257. package/src/utils/geometry/lines.ts +26 -0
  1258. package/src/utils/geometry/points.ts +102 -0
  1259. package/src/utils/geometry/polygons.ts +32 -0
  1260. package/src/utils/geometry/removeClosePoints.ts +82 -0
  1261. package/src/utils/getDefaultColor.ts +20 -0
  1262. package/src/utils/getIndex.ts +26 -0
  1263. package/src/utils/getMinMax.ts +27 -0
  1264. package/src/utils/getOutputImage.ts +149 -32
  1265. package/src/utils/getRadius.ts +11 -0
  1266. package/src/utils/interpolateBorder.ts +95 -62
  1267. package/src/utils/interpolatePixel.ts +107 -57
  1268. package/src/utils/round.ts +13 -3
  1269. package/src/utils/sampleBackgroundPoints.ts +84 -0
  1270. package/src/utils/setBlendedPixel.ts +54 -0
  1271. package/src/utils/setBlendedVisiblePixel.ts +22 -0
  1272. package/src/utils/surroundingPixels.ts +14 -0
  1273. package/src/utils/utils.types.ts +32 -0
  1274. package/src/utils/validators/assert.ts +18 -0
  1275. package/src/utils/validators/checkKernel.ts +11 -0
  1276. package/src/utils/validators/checkPointIsInteger.ts +12 -0
  1277. package/src/utils/validators/checkProcessable.ts +95 -0
  1278. package/src/utils/validators/validators.ts +82 -0
  1279. package/lib/load/checkHeader.d.ts +0 -8
  1280. package/lib/load/checkHeader.d.ts.map +0 -1
  1281. package/lib/load/checkHeader.js +0 -21
  1282. package/lib/load/checkHeader.js.map +0 -1
  1283. package/lib/operations/convertDepth.d.ts +0 -3
  1284. package/lib/operations/convertDepth.d.ts.map +0 -1
  1285. package/lib/operations/convertDepth.js +0 -40
  1286. package/lib/operations/convertDepth.js.map +0 -1
  1287. package/lib/types.d.ts +0 -13
  1288. package/lib/types.d.ts.map +0 -1
  1289. package/lib/types.js +0 -17
  1290. package/lib/types.js.map +0 -1
  1291. package/lib/utils/kinds.d.ts +0 -9
  1292. package/lib/utils/kinds.d.ts.map +0 -1
  1293. package/lib/utils/kinds.js +0 -22
  1294. package/lib/utils/kinds.js.map +0 -1
  1295. package/lib/utils/validators.d.ts +0 -7
  1296. package/lib/utils/validators.d.ts.map +0 -1
  1297. package/lib/utils/validators.js +0 -19
  1298. package/lib/utils/validators.js.map +0 -1
  1299. package/lib-esm/Image.d.ts +0 -180
  1300. package/lib-esm/Image.d.ts.map +0 -1
  1301. package/lib-esm/Image.js +0 -337
  1302. package/lib-esm/Image.js.map +0 -1
  1303. package/lib-esm/compute/histogram.d.ts +0 -15
  1304. package/lib-esm/compute/histogram.d.ts.map +0 -1
  1305. package/lib-esm/compute/histogram.js +0 -21
  1306. package/lib-esm/compute/histogram.js.map +0 -1
  1307. package/lib-esm/compute/index.d.ts +0 -2
  1308. package/lib-esm/compute/index.d.ts.map +0 -1
  1309. package/lib-esm/compute/index.js +0 -2
  1310. package/lib-esm/compute/index.js.map +0 -1
  1311. package/lib-esm/filters/blur.d.ts +0 -11
  1312. package/lib-esm/filters/blur.d.ts.map +0 -1
  1313. package/lib-esm/filters/blur.js +0 -11
  1314. package/lib-esm/filters/blur.js.map +0 -1
  1315. package/lib-esm/filters/convolution.d.ts +0 -11
  1316. package/lib-esm/filters/convolution.d.ts.map +0 -1
  1317. package/lib-esm/filters/convolution.js +0 -125
  1318. package/lib-esm/filters/convolution.js.map +0 -1
  1319. package/lib-esm/filters/gaussianBlur.d.ts +0 -18
  1320. package/lib-esm/filters/gaussianBlur.d.ts.map +0 -1
  1321. package/lib-esm/filters/gaussianBlur.js +0 -45
  1322. package/lib-esm/filters/gaussianBlur.js.map +0 -1
  1323. package/lib-esm/filters/index.d.ts +0 -5
  1324. package/lib-esm/filters/index.d.ts.map +0 -1
  1325. package/lib-esm/filters/index.js +0 -5
  1326. package/lib-esm/filters/index.js.map +0 -1
  1327. package/lib-esm/filters/invert.d.ts +0 -10
  1328. package/lib-esm/filters/invert.d.ts.map +0 -1
  1329. package/lib-esm/filters/invert.js +0 -14
  1330. package/lib-esm/filters/invert.js.map +0 -1
  1331. package/lib-esm/geometry/index.d.ts +0 -4
  1332. package/lib-esm/geometry/index.d.ts.map +0 -1
  1333. package/lib-esm/geometry/index.js +0 -4
  1334. package/lib-esm/geometry/index.js.map +0 -1
  1335. package/lib-esm/geometry/resize.d.ts +0 -14
  1336. package/lib-esm/geometry/resize.d.ts.map +0 -1
  1337. package/lib-esm/geometry/resize.js +0 -88
  1338. package/lib-esm/geometry/resize.js.map +0 -1
  1339. package/lib-esm/geometry/rotate.d.ts +0 -14
  1340. package/lib-esm/geometry/rotate.d.ts.map +0 -1
  1341. package/lib-esm/geometry/rotate.js +0 -24
  1342. package/lib-esm/geometry/rotate.js.map +0 -1
  1343. package/lib-esm/geometry/transform.d.ts +0 -13
  1344. package/lib-esm/geometry/transform.d.ts.map +0 -1
  1345. package/lib-esm/geometry/transform.js +0 -82
  1346. package/lib-esm/geometry/transform.js.map +0 -1
  1347. package/lib-esm/index.d.ts +0 -9
  1348. package/lib-esm/index.d.ts.map +0 -1
  1349. package/lib-esm/index.js +0 -9
  1350. package/lib-esm/index.js.map +0 -1
  1351. package/lib-esm/load/checkHeader.d.ts +0 -8
  1352. package/lib-esm/load/checkHeader.d.ts.map +0 -1
  1353. package/lib-esm/load/checkHeader.js +0 -18
  1354. package/lib-esm/load/checkHeader.js.map +0 -1
  1355. package/lib-esm/load/decode.d.ts +0 -8
  1356. package/lib-esm/load/decode.d.ts.map +0 -1
  1357. package/lib-esm/load/decode.js +0 -23
  1358. package/lib-esm/load/decode.js.map +0 -1
  1359. package/lib-esm/load/decodeJpeg.d.ts +0 -7
  1360. package/lib-esm/load/decodeJpeg.d.ts.map +0 -1
  1361. package/lib-esm/load/decodeJpeg.js +0 -14
  1362. package/lib-esm/load/decodeJpeg.js.map +0 -1
  1363. package/lib-esm/load/decodePng.d.ts +0 -7
  1364. package/lib-esm/load/decodePng.d.ts.map +0 -1
  1365. package/lib-esm/load/decodePng.js +0 -65
  1366. package/lib-esm/load/decodePng.js.map +0 -1
  1367. package/lib-esm/load/index.d.ts +0 -7
  1368. package/lib-esm/load/index.d.ts.map +0 -1
  1369. package/lib-esm/load/index.js +0 -7
  1370. package/lib-esm/load/index.js.map +0 -1
  1371. package/lib-esm/load/read.d.ts +0 -12
  1372. package/lib-esm/load/read.d.ts.map +0 -1
  1373. package/lib-esm/load/read.js +0 -20
  1374. package/lib-esm/load/read.js.map +0 -1
  1375. package/lib-esm/load/readCanvas.d.ts +0 -3
  1376. package/lib-esm/load/readCanvas.d.ts.map +0 -1
  1377. package/lib-esm/load/readCanvas.js +0 -15
  1378. package/lib-esm/load/readCanvas.js.map +0 -1
  1379. package/lib-esm/load/readImg.d.ts +0 -3
  1380. package/lib-esm/load/readImg.d.ts.map +0 -1
  1381. package/lib-esm/load/readImg.js +0 -14
  1382. package/lib-esm/load/readImg.js.map +0 -1
  1383. package/lib-esm/operations/convertColor.d.ts +0 -6
  1384. package/lib-esm/operations/convertColor.d.ts.map +0 -1
  1385. package/lib-esm/operations/convertColor.js +0 -73
  1386. package/lib-esm/operations/convertColor.js.map +0 -1
  1387. package/lib-esm/operations/convertDepth.d.ts +0 -3
  1388. package/lib-esm/operations/convertDepth.d.ts.map +0 -1
  1389. package/lib-esm/operations/convertDepth.js +0 -37
  1390. package/lib-esm/operations/convertDepth.js.map +0 -1
  1391. package/lib-esm/operations/index.d.ts +0 -6
  1392. package/lib-esm/operations/index.d.ts.map +0 -1
  1393. package/lib-esm/operations/index.js +0 -6
  1394. package/lib-esm/operations/index.js.map +0 -1
  1395. package/lib-esm/operations/merge.d.ts +0 -7
  1396. package/lib-esm/operations/merge.d.ts.map +0 -1
  1397. package/lib-esm/operations/merge.js +0 -45
  1398. package/lib-esm/operations/merge.js.map +0 -1
  1399. package/lib-esm/operations/split.d.ts +0 -3
  1400. package/lib-esm/operations/split.d.ts.map +0 -1
  1401. package/lib-esm/operations/split.js +0 -13
  1402. package/lib-esm/operations/split.js.map +0 -1
  1403. package/lib-esm/operations/threshold.d.ts +0 -19
  1404. package/lib-esm/operations/threshold.d.ts.map +0 -1
  1405. package/lib-esm/operations/threshold.js +0 -55
  1406. package/lib-esm/operations/threshold.js.map +0 -1
  1407. package/lib-esm/operations/thresholds/otsu.d.ts +0 -2
  1408. package/lib-esm/operations/thresholds/otsu.d.ts.map +0 -1
  1409. package/lib-esm/operations/thresholds/otsu.js +0 -32
  1410. package/lib-esm/operations/thresholds/otsu.js.map +0 -1
  1411. package/lib-esm/operations/thresholds/triangle.d.ts +0 -2
  1412. package/lib-esm/operations/thresholds/triangle.d.ts.map +0 -1
  1413. package/lib-esm/operations/thresholds/triangle.js +0 -103
  1414. package/lib-esm/operations/thresholds/triangle.js.map +0 -1
  1415. package/lib-esm/save/encode.d.ts +0 -35
  1416. package/lib-esm/save/encode.d.ts.map +0 -1
  1417. package/lib-esm/save/encode.js +0 -22
  1418. package/lib-esm/save/encode.js.map +0 -1
  1419. package/lib-esm/save/encodeJpeg.d.ts +0 -6
  1420. package/lib-esm/save/encodeJpeg.d.ts.map +0 -1
  1421. package/lib-esm/save/encodeJpeg.js +0 -16
  1422. package/lib-esm/save/encodeJpeg.js.map +0 -1
  1423. package/lib-esm/save/encodePng.d.ts +0 -5
  1424. package/lib-esm/save/encodePng.d.ts.map +0 -1
  1425. package/lib-esm/save/encodePng.js +0 -5
  1426. package/lib-esm/save/encodePng.js.map +0 -1
  1427. package/lib-esm/save/index.d.ts +0 -6
  1428. package/lib-esm/save/index.d.ts.map +0 -1
  1429. package/lib-esm/save/index.js +0 -6
  1430. package/lib-esm/save/index.js.map +0 -1
  1431. package/lib-esm/save/write.d.ts +0 -23
  1432. package/lib-esm/save/write.d.ts.map +0 -1
  1433. package/lib-esm/save/write.js +0 -46
  1434. package/lib-esm/save/write.js.map +0 -1
  1435. package/lib-esm/save/writeCanvas.d.ts +0 -15
  1436. package/lib-esm/save/writeCanvas.d.ts.map +0 -1
  1437. package/lib-esm/save/writeCanvas.js +0 -19
  1438. package/lib-esm/save/writeCanvas.js.map +0 -1
  1439. package/lib-esm/types.d.ts +0 -13
  1440. package/lib-esm/types.d.ts.map +0 -1
  1441. package/lib-esm/types.js +0 -15
  1442. package/lib-esm/types.js.map +0 -1
  1443. package/lib-esm/utils/clamp.d.ts +0 -4
  1444. package/lib-esm/utils/clamp.d.ts.map +0 -1
  1445. package/lib-esm/utils/clamp.js +0 -16
  1446. package/lib-esm/utils/clamp.js.map +0 -1
  1447. package/lib-esm/utils/getOutputImage.d.ts +0 -26
  1448. package/lib-esm/utils/getOutputImage.d.ts.map +0 -1
  1449. package/lib-esm/utils/getOutputImage.js +0 -35
  1450. package/lib-esm/utils/getOutputImage.js.map +0 -1
  1451. package/lib-esm/utils/interpolateBorder.d.ts +0 -10
  1452. package/lib-esm/utils/interpolateBorder.d.ts.map +0 -1
  1453. package/lib-esm/utils/interpolateBorder.js +0 -99
  1454. package/lib-esm/utils/interpolateBorder.js.map +0 -1
  1455. package/lib-esm/utils/interpolatePixel.d.ts +0 -8
  1456. package/lib-esm/utils/interpolatePixel.d.ts.map +0 -1
  1457. package/lib-esm/utils/interpolatePixel.js +0 -78
  1458. package/lib-esm/utils/interpolatePixel.js.map +0 -1
  1459. package/lib-esm/utils/kinds.d.ts +0 -9
  1460. package/lib-esm/utils/kinds.d.ts.map +0 -1
  1461. package/lib-esm/utils/kinds.js +0 -20
  1462. package/lib-esm/utils/kinds.js.map +0 -1
  1463. package/lib-esm/utils/round.d.ts +0 -2
  1464. package/lib-esm/utils/round.d.ts.map +0 -1
  1465. package/lib-esm/utils/round.js +0 -7
  1466. package/lib-esm/utils/round.js.map +0 -1
  1467. package/lib-esm/utils/validators.d.ts +0 -7
  1468. package/lib-esm/utils/validators.d.ts.map +0 -1
  1469. package/lib-esm/utils/validators.js +0 -15
  1470. package/lib-esm/utils/validators.js.map +0 -1
  1471. package/src/load/checkHeader.ts +0 -20
  1472. package/src/operations/convertDepth.ts +0 -43
  1473. package/src/operations/thresholds/huang.js +0 -80
  1474. package/src/operations/thresholds/intermodes.js +0 -56
  1475. package/src/operations/thresholds/isodata.js +0 -47
  1476. package/src/operations/thresholds/li.js +0 -74
  1477. package/src/operations/thresholds/maxEntropy.js +0 -79
  1478. package/src/operations/thresholds/mean.js +0 -16
  1479. package/src/operations/thresholds/minError.js +0 -92
  1480. package/src/operations/thresholds/minimum.js +0 -75
  1481. package/src/operations/thresholds/moments.js +0 -52
  1482. package/src/operations/thresholds/percentile.js +0 -33
  1483. package/src/operations/thresholds/renyiEntropy.js +0 -142
  1484. package/src/operations/thresholds/shanbhag.js +0 -74
  1485. package/src/operations/thresholds/yen.js +0 -56
  1486. package/src/types.ts +0 -13
  1487. package/src/utils/kinds.ts +0 -27
  1488. package/src/utils/validators.ts +0 -23
@@ -0,0 +1,41 @@
1
+ import { Image } from '../Image.js';
2
+ import { assert } from '../utils/validators/assert.js';
3
+ import { checkPointIsInteger } from '../utils/validators/checkPointIsInteger.js';
4
+ /**
5
+ * Extract the pixels of an image, as specified in a mask.
6
+ * @param image - The image to process.
7
+ * @param mask - The mask defining which pixels to keep.
8
+ * @param options - Extract options.
9
+ * @returns The extracted image.
10
+ */
11
+ export function extract(image, mask, options = {}) {
12
+ const { origin = { row: 0, column: 0 } } = options;
13
+ const { row, column } = origin;
14
+ assert(row < image.height &&
15
+ column < image.width &&
16
+ row + mask.width > 0 &&
17
+ column + mask.height > 0, 'extract: image and mask have no overlap');
18
+ checkPointIsInteger(origin, 'Origin');
19
+ const resultWidth = Math.min(image.width, mask.width + column) - Math.max(0, column);
20
+ const resultHeight = Math.min(image.height, mask.height + row) - Math.max(0, row);
21
+ let newImage = new Image(resultWidth, resultHeight, {
22
+ colorModel: image.colorModel,
23
+ origin,
24
+ });
25
+ if (newImage.alpha) {
26
+ newImage = newImage.fillAlpha(0);
27
+ }
28
+ const imageStartRow = Math.max(0, row);
29
+ const imageStartColumn = Math.max(0, column);
30
+ const maskStartRow = row < 0 ? -row : 0;
31
+ const maskStartColumn = column < 0 ? -column : 0;
32
+ for (let resultRow = 0; resultRow < resultHeight; resultRow++) {
33
+ for (let resultColumn = 0; resultColumn < resultWidth; resultColumn++) {
34
+ if (mask.getBit(maskStartColumn + resultColumn, maskStartRow + resultRow)) {
35
+ newImage.setPixel(resultColumn, resultRow, image.getPixel(imageStartColumn + resultColumn, imageStartRow + resultRow));
36
+ }
37
+ }
38
+ }
39
+ return newImage;
40
+ }
41
+ //# sourceMappingURL=extract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/operations/extract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAUjF;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CACrB,KAAY,EACZ,IAAU,EACV,UAA0B,EAAE;IAE5B,MAAM,EAAE,MAAM,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC;IACnD,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE/B,MAAM,CACJ,GAAG,GAAG,KAAK,CAAC,MAAM;QAChB,MAAM,GAAG,KAAK,CAAC,KAAK;QACpB,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC;QACpB,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAC1B,yCAAyC,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AC,eAAe,GAAG,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC,EACrE,CAAC;gBACD,QAAQ,CAAC,QAAQ,CACf,YAAY,EACZ,SAAS,EACT,KAAK,CAAC,QAAQ,CACZ,gBAAgB,GAAG,YAAY,EAC/B,aAAa,GAAG,SAAS,CAC1B,CACF,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Image } from '../Image.js';
2
+ import type { DilateOptions } from '../morphology/index.js';
3
+ /**
4
+ * Creates a mask with ROI shapes with CannyEdge filter. Then these shapes
5
+ * get "filled" through internalIds.
6
+ * @param image - Image to get the mask with.
7
+ * @param options - GetMaskFromCannyEdge options.
8
+ * @returns Mask
9
+ */
10
+ export declare function getMaskFromCannyEdge(image: Image, options?: DilateOptions): import("../Mask.ts").Mask;
11
+ //# sourceMappingURL=getMaskFromCannyEdge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getMaskFromCannyEdge.d.ts","sourceRoot":"","sources":["../../src/operations/getMaskFromCannyEdge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAG5D;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,aAAa,6BA6BzE"}
@@ -0,0 +1,35 @@
1
+ import { fromMask } from '../roi/index.js';
2
+ /**
3
+ * Creates a mask with ROI shapes with CannyEdge filter. Then these shapes
4
+ * get "filled" through internalIds.
5
+ * @param image - Image to get the mask with.
6
+ * @param options - GetMaskFromCannyEdge options.
7
+ * @returns Mask
8
+ */
9
+ export function getMaskFromCannyEdge(image, options) {
10
+ const kernel = options?.kernel ?? [
11
+ [1, 1, 1],
12
+ [1, 1, 1],
13
+ [1, 1, 1],
14
+ ];
15
+ const iterations = options?.iterations ?? 1;
16
+ let mask = image.cannyEdgeDetector();
17
+ mask = mask.dilate({ iterations, kernel });
18
+ const roiMap = fromMask(mask);
19
+ const rois = roiMap.getRois({ kind: 'white' });
20
+ for (const roi of rois) {
21
+ const ids = new Set(roi.internalIDs.filter((value) => {
22
+ return value < 0;
23
+ }));
24
+ for (let i = roi.origin.row; i < roi.origin.row + roi.height; i++) {
25
+ for (let j = roi.origin.column; j < roi.origin.column + roi.width; j++) {
26
+ const value = roi.getMapValue(j, i);
27
+ if (ids.has(value)) {
28
+ mask.setBit(j, i, 1);
29
+ }
30
+ }
31
+ }
32
+ }
33
+ return mask;
34
+ }
35
+ //# sourceMappingURL=getMaskFromCannyEdge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getMaskFromCannyEdge.js","sourceRoot":"","sources":["../../src/operations/getMaskFromCannyEdge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAY,EAAE,OAAuB;IACxE,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI;QAChC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACT,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACT,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;KACV,CAAC;IACF,MAAM,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,CAAC,CAAC;IAE5C,IAAI,IAAI,GAAG,KAAK,CAAC,iBAAiB,EAAE,CAAC;IACrC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;IAE3C,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,GAAG,GAAG,IAAI,GAAG,CACjB,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;YAC/B,OAAO,KAAK,GAAG,CAAC,CAAC;QACnB,CAAC,CAAC,CACH,CAAC;QACF,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAClE,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;gBACvE,MAAM,KAAK,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACpC,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;oBACnB,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;gBACvB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,62 @@
1
+ import type { Image } from '../Image.js';
2
+ export declare const GreyAlgorithm: {
3
+ readonly LUMA_709: "luma709";
4
+ readonly LUMA_601: "luma601";
5
+ readonly MAX: "max";
6
+ readonly MIN: "min";
7
+ readonly AVERAGE: "average";
8
+ readonly MINMAX: "minmax";
9
+ readonly RED: "red";
10
+ readonly GREEN: "green";
11
+ readonly BLUE: "blue";
12
+ readonly BLACK: "black";
13
+ readonly CYAN: "cyan";
14
+ readonly MAGENTA: "magenta";
15
+ readonly YELLOW: "yellow";
16
+ readonly HUE: "hue";
17
+ readonly SATURATION: "saturation";
18
+ readonly LIGHTNESS: "lightness";
19
+ };
20
+ export type GreyAlgorithm = (typeof GreyAlgorithm)[keyof typeof GreyAlgorithm];
21
+ /**
22
+ * Call back that converts the RGB channels to grey. It is clamped afterwards.
23
+ * @callback GreyAlgorithmCallback
24
+ * @param {number} red - Value of the red channel.
25
+ * @param {number} green - Value of the green channel.
26
+ * @param {number} blue - Value of the blue channel.
27
+ * @returns {number} Value of the grey channel.
28
+ */
29
+ export type GreyAlgorithmCallback = (red: number, green: number, blue: number, image: Image) => number;
30
+ export interface GreyOptions {
31
+ /**
32
+ * Specify the grey algorithm to use.
33
+ * @default `'luma709'`
34
+ */
35
+ algorithm?: GreyAlgorithm | GreyAlgorithmCallback;
36
+ /**
37
+ * Specify wether to keep an alpha channel in the new image or not.
38
+ * @default `false`
39
+ */
40
+ keepAlpha?: boolean;
41
+ /**
42
+ * Specify wether to merge the alpha channel with the gray pixel or not.
43
+ * @default `true`
44
+ */
45
+ mergeAlpha?: boolean;
46
+ /**
47
+ * Image to which to output.
48
+ */
49
+ out?: Image;
50
+ }
51
+ /**
52
+ * Convert the current image to grayscale.
53
+ * The source image has to be RGB or RGBA.
54
+ * If there is an alpha channel you have to specify what to do:
55
+ * - keepAlpha : keep the alpha channel, you will get a GREYA image.
56
+ * - mergeAlpha : multiply each pixel of the image by the alpha, you will get a GREY image.
57
+ * @param image - Original color image to convert to grey.
58
+ * @param options - The grey conversion options.
59
+ * @returns The resulting grey image.
60
+ */
61
+ export declare function grey(image: Image, options?: GreyOptions): Image;
62
+ //# sourceMappingURL=grey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grey.d.ts","sourceRoot":"","sources":["../../src/operations/grey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AASzC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;CAiBsC,CAAC;AAEjE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAa/E;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAClC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,KAAK,KACT,MAAM,CAAC;AAEZ,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,GAAG,qBAAqB,CAAC;IAClD;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC;CACb;AAED;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,GAAE,WAAgB,GAAG,KAAK,CAkDnE"}
@@ -0,0 +1,84 @@
1
+ import { getClamp } from '../utils/clamp.js';
2
+ import { getOutputImage } from '../utils/getOutputImage.js';
3
+ import { assert } from '../utils/validators/assert.js';
4
+ import checkProcessable from '../utils/validators/checkProcessable.js';
5
+ import * as greyAlgorithms from './greyAlgorithms.js';
6
+ export const GreyAlgorithm = {
7
+ LUMA_709: 'luma709',
8
+ LUMA_601: 'luma601',
9
+ MAX: 'max',
10
+ MIN: 'min',
11
+ AVERAGE: 'average',
12
+ MINMAX: 'minmax',
13
+ RED: 'red',
14
+ GREEN: 'green',
15
+ BLUE: 'blue',
16
+ BLACK: 'black',
17
+ CYAN: 'cyan',
18
+ MAGENTA: 'magenta',
19
+ YELLOW: 'yellow',
20
+ HUE: 'hue',
21
+ SATURATION: 'saturation',
22
+ LIGHTNESS: 'lightness',
23
+ };
24
+ {
25
+ // Check that all the algorithms are in the enum.
26
+ const algos = new Set(Object.values(GreyAlgorithm));
27
+ for (const algo of Object.keys(greyAlgorithms)) {
28
+ assert(algos.has(algo), `Grey algorithm ${algo} is missing in the GreyAlgorithm enum`);
29
+ }
30
+ }
31
+ /**
32
+ * Convert the current image to grayscale.
33
+ * The source image has to be RGB or RGBA.
34
+ * If there is an alpha channel you have to specify what to do:
35
+ * - keepAlpha : keep the alpha channel, you will get a GREYA image.
36
+ * - mergeAlpha : multiply each pixel of the image by the alpha, you will get a GREY image.
37
+ * @param image - Original color image to convert to grey.
38
+ * @param options - The grey conversion options.
39
+ * @returns The resulting grey image.
40
+ */
41
+ export function grey(image, options = {}) {
42
+ let { keepAlpha = false, mergeAlpha = true } = options;
43
+ const { algorithm = 'luma709' } = options;
44
+ checkProcessable(image, {
45
+ colorModel: ['RGB', 'RGBA'],
46
+ });
47
+ keepAlpha = keepAlpha && image.alpha;
48
+ mergeAlpha = mergeAlpha && image.alpha;
49
+ if (keepAlpha) {
50
+ mergeAlpha = false;
51
+ }
52
+ const newColorModel = keepAlpha ? 'GREYA' : 'GREY';
53
+ const newImage = getOutputImage(image, options, {
54
+ newParameters: { colorModel: newColorModel },
55
+ });
56
+ let method;
57
+ if (typeof algorithm === 'function') {
58
+ method = algorithm;
59
+ }
60
+ else {
61
+ method = greyAlgorithms[algorithm];
62
+ }
63
+ const clamp = getClamp(newImage);
64
+ for (let i = 0; i < image.size; i++) {
65
+ const red = image.getValueByIndex(i, 0);
66
+ const green = image.getValueByIndex(i, 1);
67
+ const blue = image.getValueByIndex(i, 2);
68
+ let newValue;
69
+ if (mergeAlpha) {
70
+ const alpha = image.getValueByIndex(i, 3);
71
+ newValue = clamp((method(red, green, blue, image) * alpha) / image.maxValue);
72
+ }
73
+ else {
74
+ newValue = clamp(method(red, green, blue, image));
75
+ if (keepAlpha) {
76
+ const alpha = image.getValueByIndex(i, 3);
77
+ newImage.setValueByIndex(i, 1, alpha);
78
+ }
79
+ }
80
+ newImage.setValueByIndex(i, 0, newValue);
81
+ }
82
+ return newImage;
83
+ }
84
+ //# sourceMappingURL=grey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grey.js","sourceRoot":"","sources":["../../src/operations/grey.ts"],"names":[],"mappings":"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AC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,QAAQ,CAC3D,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;YAClD,IAAI,SAAS,EAAE,CAAC;gBACd,MAAM,KAAK,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC1C,QAAQ,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;QACD,QAAQ,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,133 @@
1
+ import type { Image } from '../Image.js';
2
+ /**
3
+ * Converts R, G and B values to a single value using Luma 709 standard({@link https://en.wikipedia.org/wiki/Luma_(video)}).
4
+ * @param red - Red value of current pixel.
5
+ * @param green - Green value of current pixel.
6
+ * @param blue - Blue value of current pixel.
7
+ * @returns - Corresponding gray value.
8
+ */
9
+ export declare function luma709(red: number, green: number, blue: number): number;
10
+ /**
11
+ * Converts R, G and B values to a single value using Luma 601 standard({@link https://en.wikipedia.org/wiki/Luma_(video)}).
12
+ * @param red - Red value of current pixel.
13
+ * @param green - Green value of current pixel.
14
+ * @param blue - Blue value of current pixel.
15
+ * @returns - Corresponding gray value.
16
+ */
17
+ export declare function luma601(red: number, green: number, blue: number): number;
18
+ /**
19
+ * Return the maximal value between red, green and blue.
20
+ * @param red - Red value of current pixel.
21
+ * @param green - Green value of current pixel.
22
+ * @param blue - Blue value of current pixel.
23
+ * @returns - Corresponding gray value.
24
+ */
25
+ export declare function max(red: number, green: number, blue: number): number;
26
+ /**
27
+ * Return the minimal value between red, green and blue.
28
+ * @param red - Red value of current pixel.
29
+ * @param green - Green value of current pixel.
30
+ * @param blue - Blue value of current pixel.
31
+ * @returns - Corresponding gray value.
32
+ */
33
+ export declare function min(red: number, green: number, blue: number): number;
34
+ /**
35
+ * Return the average of red, green and blue.
36
+ * @param red - Red value of current pixel.
37
+ * @param green - Green value of current pixel.
38
+ * @param blue - Blue value of current pixel.
39
+ * @returns - Corresponding gray value.
40
+ */
41
+ export declare function average(red: number, green: number, blue: number): number;
42
+ /**
43
+ * Return the average between the max and min values of red, green and blue.
44
+ * @param red - Red value of current pixel.
45
+ * @param green - Green value of current pixel.
46
+ * @param blue - Blue value of current pixel.
47
+ * @returns - Corresponding gray value.
48
+ */
49
+ export declare function minmax(red: number, green: number, blue: number): number;
50
+ /**
51
+ * Return the red value.
52
+ * @param red - Red value of current pixel.
53
+ * @returns - Corresponding gray value.
54
+ */
55
+ export declare function red(red: number): number;
56
+ /**
57
+ * Return the green value.
58
+ * @param red - Red value of current pixel.
59
+ * @param green - Green value of current pixel.
60
+ * @returns - Corresponding gray value.
61
+ */
62
+ export declare function green(red: number, green: number): number;
63
+ /**
64
+ * Return the blue value.
65
+ * @param red - Red value of current pixel.
66
+ * @param green - Green value of current pixel.
67
+ * @param blue - Blue value of current pixel.
68
+ * @returns - Corresponding gray value.
69
+ */
70
+ export declare function blue(red: number, green: number, blue: number): number;
71
+ /**
72
+ * Return the minimum of the inverses of red, green and blue.
73
+ * @param red - Red value of current pixel.
74
+ * @param green - Green value of current pixel.
75
+ * @param blue - Blue value of current pixel.
76
+ * @param image - Image to convert to grey.
77
+ * @returns - Corresponding gray value.
78
+ */
79
+ export declare function black(red: number, green: number, blue: number, image: Image): number;
80
+ /**
81
+ * Returns the cyan component of a pixel.
82
+ * @param red - Red value of current pixel.
83
+ * @param green - Green value of current pixel.
84
+ * @param blue - Blue value of current pixel.
85
+ * @param image - Image to convert to grey.
86
+ * @returns - Corresponding gray value.
87
+ */
88
+ export declare function cyan(red: number, green: number, blue: number, image: Image): number;
89
+ /**
90
+ * Returns the magenta component of a pixel.
91
+ * @param red - Red value of current pixel.
92
+ * @param green - Green value of current pixel.
93
+ * @param blue - Blue value of current pixel.
94
+ * @param image - Image to convert to grey.
95
+ * @returns - Corresponding gray value.
96
+ */
97
+ export declare function magenta(red: number, green: number, blue: number, image: Image): number;
98
+ /**
99
+ * Returns the yellow component of a pixel.
100
+ * @param red - Red value of current pixel.
101
+ * @param green - Green value of current pixel.
102
+ * @param blue - Blue value of current pixel.
103
+ * @param image - Image to convert to grey.
104
+ * @returns - Corresponding gray value.
105
+ */
106
+ export declare function yellow(red: number, green: number, blue: number, image: Image): number;
107
+ /**
108
+ * Returns the hue of a pixel as a value between 0 and 255.
109
+ * @param red - Red value of current pixel.
110
+ * @param green - Green value of current pixel.
111
+ * @param blue - Blue value of current pixel.
112
+ * @param image - Source image for the RGB values.
113
+ * @returns - Hue of the pixel.
114
+ */
115
+ export declare function hue(red: number, green: number, blue: number, image: Image): number;
116
+ /**
117
+ * Returns the saturation component of a pixel.
118
+ * @param red - Red value of current pixel.
119
+ * @param green - Green value of current pixel.
120
+ * @param blue - Blue value of current pixel.
121
+ * @param image - Source image for the RGB values.
122
+ * @returns - Saturation of the pixel.
123
+ */
124
+ export declare function saturation(red: number, green: number, blue: number, image: Image): number;
125
+ /**
126
+ * Returns the lightness of a pixel.
127
+ * @param red - Red value of current pixel.
128
+ * @param green - Green value of current pixel.
129
+ * @param blue - Blue value of current pixel.
130
+ * @returns - Lightness of the pixel.
131
+ */
132
+ export declare function lightness(red: number, green: number, blue: number): number;
133
+ //# sourceMappingURL=greyAlgorithms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"greyAlgorithms.d.ts","sourceRoot":"","sources":["../../src/operations/greyAlgorithms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGzC;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE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M,EACb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,KAAK,GACX,MAAM,CAMR;AACD;;;;;;;GAOG;AACH,wBAAgB,OAAO,CACrB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,KAAK,GACX,MAAM,CAOR;AACD;;;;;;;GAOG;AACH,wBAAgB,MAAM,CACpB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,KAAK,GACX,MAAM,CAOR;AACD;;;;;;;GAOG;AACH,wBAAgB,GAAG,CACjB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,KAAK,GACX,MAAM,CAmBR;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,KAAK,GACX,MAAM,CAMR;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAI1E"}
@@ -0,0 +1,205 @@
1
+ import { assert } from '../utils/validators/assert.js';
2
+ /**
3
+ * Converts R, G and B values to a single value using Luma 709 standard({@link https://en.wikipedia.org/wiki/Luma_(video)}).
4
+ * @param red - Red value of current pixel.
5
+ * @param green - Green value of current pixel.
6
+ * @param blue - Blue value of current pixel.
7
+ * @returns - Corresponding gray value.
8
+ */
9
+ export function luma709(red, green, blue) {
10
+ // sRGB
11
+ // return red * 0.2126 + green * 0.7152 + blue * 0.0722;
12
+ // Let's do a little trick ... in order not convert the integer to a double we do
13
+ // the multiplication with integer to reach a total of 32768 and then shift the bits
14
+ // of 15 to the right
15
+ // This does a Math.floor and may lead to small (max 1) difference
16
+ // Same result, > 10% faster on the full grey conversion
17
+ return (red * 6966 + green * 23436 + blue * 2366) >> 15;
18
+ }
19
+ /**
20
+ * Converts R, G and B values to a single value using Luma 601 standard({@link https://en.wikipedia.org/wiki/Luma_(video)}).
21
+ * @param red - Red value of current pixel.
22
+ * @param green - Green value of current pixel.
23
+ * @param blue - Blue value of current pixel.
24
+ * @returns - Corresponding gray value.
25
+ */
26
+ export function luma601(red, green, blue) {
27
+ // NTSC
28
+ // return this.red * 0.299 + green * 0.587 + blue * 0.114;
29
+ return (red * 9798 + green * 19235 + blue * 3735) >> 15;
30
+ }
31
+ /**
32
+ * Return the maximal value between red, green and blue.
33
+ * @param red - Red value of current pixel.
34
+ * @param green - Green value of current pixel.
35
+ * @param blue - Blue value of current pixel.
36
+ * @returns - Corresponding gray value.
37
+ */
38
+ export function max(red, green, blue) {
39
+ return Math.max(red, green, blue);
40
+ }
41
+ /**
42
+ * Return the minimal value between red, green and blue.
43
+ * @param red - Red value of current pixel.
44
+ * @param green - Green value of current pixel.
45
+ * @param blue - Blue value of current pixel.
46
+ * @returns - Corresponding gray value.
47
+ */
48
+ export function min(red, green, blue) {
49
+ return Math.min(red, green, blue);
50
+ }
51
+ /**
52
+ * Return the average of red, green and blue.
53
+ * @param red - Red value of current pixel.
54
+ * @param green - Green value of current pixel.
55
+ * @param blue - Blue value of current pixel.
56
+ * @returns - Corresponding gray value.
57
+ */
58
+ export function average(red, green, blue) {
59
+ return ((red + green + blue) / 3) >> 0;
60
+ }
61
+ /**
62
+ * Return the average between the max and min values of red, green and blue.
63
+ * @param red - Red value of current pixel.
64
+ * @param green - Green value of current pixel.
65
+ * @param blue - Blue value of current pixel.
66
+ * @returns - Corresponding gray value.
67
+ */
68
+ export function minmax(red, green, blue) {
69
+ return (Math.max(red, green, blue) + Math.min(red, green, blue)) / 2;
70
+ }
71
+ /**
72
+ * Return the red value.
73
+ * @param red - Red value of current pixel.
74
+ * @returns - Corresponding gray value.
75
+ */
76
+ export function red(red) {
77
+ return red;
78
+ }
79
+ /**
80
+ * Return the green value.
81
+ * @param red - Red value of current pixel.
82
+ * @param green - Green value of current pixel.
83
+ * @returns - Corresponding gray value.
84
+ */
85
+ export function green(red, green) {
86
+ return green;
87
+ }
88
+ /**
89
+ * Return the blue value.
90
+ * @param red - Red value of current pixel.
91
+ * @param green - Green value of current pixel.
92
+ * @param blue - Blue value of current pixel.
93
+ * @returns - Corresponding gray value.
94
+ */
95
+ export function blue(red, green, blue) {
96
+ return blue;
97
+ }
98
+ /**
99
+ * Return the minimum of the inverses of red, green and blue.
100
+ * @param red - Red value of current pixel.
101
+ * @param green - Green value of current pixel.
102
+ * @param blue - Blue value of current pixel.
103
+ * @param image - Image to convert to grey.
104
+ * @returns - Corresponding gray value.
105
+ */
106
+ export function black(red, green, blue, image) {
107
+ return Math.min(image.maxValue - red, image.maxValue - green, image.maxValue - blue);
108
+ }
109
+ /**
110
+ * Returns the cyan component of a pixel.
111
+ * @param red - Red value of current pixel.
112
+ * @param green - Green value of current pixel.
113
+ * @param blue - Blue value of current pixel.
114
+ * @param image - Image to convert to grey.
115
+ * @returns - Corresponding gray value.
116
+ */
117
+ export function cyan(red, green, blue, image) {
118
+ const blackColor = black(red, green, blue, image);
119
+ return (((image.maxValue - red - blackColor) / (1 - blackColor / image.maxValue)) >>
120
+ 0);
121
+ }
122
+ /**
123
+ * Returns the magenta component of a pixel.
124
+ * @param red - Red value of current pixel.
125
+ * @param green - Green value of current pixel.
126
+ * @param blue - Blue value of current pixel.
127
+ * @param image - Image to convert to grey.
128
+ * @returns - Corresponding gray value.
129
+ */
130
+ export function magenta(red, green, blue, image) {
131
+ const blackColor = black(red, green, blue, image);
132
+ return (((image.maxValue - green - blackColor) /
133
+ (1 - blackColor / image.maxValue)) >>
134
+ 0);
135
+ }
136
+ /**
137
+ * Returns the yellow component of a pixel.
138
+ * @param red - Red value of current pixel.
139
+ * @param green - Green value of current pixel.
140
+ * @param blue - Blue value of current pixel.
141
+ * @param image - Image to convert to grey.
142
+ * @returns - Corresponding gray value.
143
+ */
144
+ export function yellow(red, green, blue, image) {
145
+ const blackColor = black(red, green, blue, image);
146
+ return (((image.maxValue - blue - blackColor) /
147
+ (1 - blackColor / image.maxValue)) >>
148
+ 0);
149
+ }
150
+ /**
151
+ * Returns the hue of a pixel as a value between 0 and 255.
152
+ * @param red - Red value of current pixel.
153
+ * @param green - Green value of current pixel.
154
+ * @param blue - Blue value of current pixel.
155
+ * @param image - Source image for the RGB values.
156
+ * @returns - Hue of the pixel.
157
+ */
158
+ export function hue(red, green, blue, image) {
159
+ const minValue = min(red, green, blue);
160
+ const maxValue = max(red, green, blue);
161
+ if (maxValue === minValue) {
162
+ return 0;
163
+ }
164
+ let hue = 0;
165
+ const delta = maxValue - minValue;
166
+ if (maxValue === red) {
167
+ hue = (green - blue) / delta + (green < blue ? 6 : 0);
168
+ }
169
+ else if (maxValue === green) {
170
+ hue = (blue - red) / delta + 2;
171
+ }
172
+ else {
173
+ assert(maxValue === blue);
174
+ hue = (red - green) / delta + 4;
175
+ }
176
+ return ((hue / 6) * image.maxValue) >> 0;
177
+ }
178
+ /**
179
+ * Returns the saturation component of a pixel.
180
+ * @param red - Red value of current pixel.
181
+ * @param green - Green value of current pixel.
182
+ * @param blue - Blue value of current pixel.
183
+ * @param image - Source image for the RGB values.
184
+ * @returns - Saturation of the pixel.
185
+ */
186
+ export function saturation(red, green, blue, image) {
187
+ // from HSV model
188
+ const minValue = min(red, green, blue);
189
+ const maxValue = max(red, green, blue);
190
+ const delta = maxValue - minValue;
191
+ return maxValue === 0 ? 0 : (delta / maxValue) * image.maxValue;
192
+ }
193
+ /**
194
+ * Returns the lightness of a pixel.
195
+ * @param red - Red value of current pixel.
196
+ * @param green - Green value of current pixel.
197
+ * @param blue - Blue value of current pixel.
198
+ * @returns - Lightness of the pixel.
199
+ */
200
+ export function lightness(red, green, blue) {
201
+ const minValue = min(red, green, blue);
202
+ const maxValue = max(red, green, blue);
203
+ return (maxValue + minValue) / 2;
204
+ }
205
+ //# sourceMappingURL=greyAlgorithms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"greyAlgorithms.js","sourceRoot":"","sources":["../../src/operations/greyAlgorithms.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW,EAAE,KAAa,EAAE,IAAY;IAC9D,OAAO;IACP,wDAAwD;IACxD,iFAAiF;IACjF,oFAAoF;IACpF,qBAAqB;IACrB,kEAAkE;IAClE,wDAAwD;IACxD,OAAO,CAAC,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;AAC1D,CAAC;AACD;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW,EAAE,KAAa,EAAE,IAAY;IAC9D,OAAO;IACP,0DAA0D;IAC1D,OAAO,CAAC,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;AAC1D,CAAC;AACD;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,IAAY;IAC1D,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AACD;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,IAAY;IAC1D,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AACD;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW,EAAE,KAAa,EAAE,IAAY;IAC9D,OAAO,CAAC,CAAC,GAAG,GAAG,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AACD;;;;;;GAMG;A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epth';
3
- export * from './merge';
4
- export * from './split';
5
- export * from './threshold';
1
+ export * from './convertColor.js';
2
+ export * from './convertBitDepth.js';
3
+ export * from './extract.js';
4
+ export * from './merge.js';
5
+ export * from './split.js';
6
+ export * from './threshold.js';
7
+ export * from './grey.js';
8
+ export * from './copyTo.js';
9
+ export * from './crop.js';
10
+ export * from './cropAlpha.js';
11
+ export * from './cropRectangle.js';
12
+ export * from './operations.types.js';
13
+ export * from './paintMaskOnImage.js';
14
+ export * from './paintMaskOnMask.js';
15
+ export * from './correctBackground.js';
16
+ export * from './extendBorders.js';
6
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/operations/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/operations/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC"}