peachsim 0.1.1684 → 0.1.1700

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 (406) hide show
  1. package/cli/bridge-flow-runner.ts +61 -39
  2. package/cli/commands/agent-wrapper.ts +21 -10
  3. package/cli/commands/control.ts +27 -7
  4. package/cli/commands/coverage-swift.ts +72 -5
  5. package/cli/commands/coverage.ts +1 -1
  6. package/cli/commands/detect.ts +17 -4
  7. package/cli/commands/inspect/actions.ts +1 -0
  8. package/cli/commands/maestro-compare.ts +25 -99
  9. package/cli/commands/screenshot.ts +12 -0
  10. package/cli/help-core.ts +3 -4
  11. package/cli/maestro-compare.ts +172 -4
  12. package/cli/outbound-endpoints.ts +2 -10
  13. package/detox/index.ts +15 -0
  14. package/detox/launch-permissions.ts +169 -0
  15. package/dist-lib/agent-daemon-client.cjs +2 -2
  16. package/dist-lib/agent-events.cjs +2 -2
  17. package/dist-lib/attached-projects.cjs +2 -2
  18. package/dist-lib/auth/shared-session.cjs +2 -2
  19. package/dist-lib/backend-origin.cjs +2 -2
  20. package/dist-lib/beta.cjs +2 -2
  21. package/dist-lib/beta.mjs +1 -1
  22. package/dist-lib/bridge-constants.cjs +2 -2
  23. package/dist-lib/bridge-contract-input.cjs +2 -2
  24. package/dist-lib/bridge-contract-input.mjs +1 -1
  25. package/dist-lib/bridge-contract.cjs +2 -2
  26. package/dist-lib/bridge-contract.mjs +1 -1
  27. package/dist-lib/bundle-channel.cjs +6729 -3591
  28. package/dist-lib/capture-contract.cjs +2 -2
  29. package/dist-lib/capture-contract.mjs +1 -1
  30. package/dist-lib/cloud-contract.cjs +2 -2
  31. package/dist-lib/cloud-contract.mjs +1 -1
  32. package/dist-lib/cloud-test-args.cjs +2 -2
  33. package/dist-lib/cloud-test-args.mjs +1 -1
  34. package/dist-lib/cloud.cjs +2 -2
  35. package/dist-lib/cloud.mjs +1 -1
  36. package/dist-lib/config.cjs +2 -2
  37. package/dist-lib/config.mjs +1 -1
  38. package/dist-lib/detox/index.cjs +104 -3
  39. package/dist-lib/dev-bundle-resolution.cjs +208 -44
  40. package/dist-lib/expo-swift-bundle.cjs +3475 -2137
  41. package/dist-lib/expo-swift-metadata.cjs +2 -2
  42. package/dist-lib/expo-swift-metadata.mjs +1 -1
  43. package/dist-lib/home-paths.cjs +2 -2
  44. package/dist-lib/host/bridge-host.cjs +8970 -3652
  45. package/dist-lib/host/fetch-proxy-handler.cjs +332 -40
  46. package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
  47. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  48. package/dist-lib/host/replacement-module-handler.cjs +2 -2
  49. package/dist-lib/host/websocket-proxy.cjs +2 -2
  50. package/dist-lib/index.cjs +469 -143
  51. package/dist-lib/jump-to-source-babel.cjs +2 -2
  52. package/dist-lib/jump-to-source-native.cjs +2 -2
  53. package/dist-lib/kotlin-host.cjs +2 -2
  54. package/dist-lib/menu.cjs +2 -2
  55. package/dist-lib/menu.mjs +1 -1
  56. package/dist-lib/metro-fingerprint-registry.cjs +2 -2
  57. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  58. package/dist-lib/metro-production-bundle.cjs +2 -2
  59. package/dist-lib/metro-production-bundle.mjs +1 -1
  60. package/dist-lib/metro.cjs +465 -139
  61. package/dist-lib/native-app-identity-project.cjs +209 -86
  62. package/dist-lib/native-app-identity-project.mjs +251 -116
  63. package/dist-lib/native-app-identity.cjs +2 -2
  64. package/dist-lib/native-app-identity.mjs +1 -1
  65. package/dist-lib/native-firebase-metadata.cjs +2 -2
  66. package/dist-lib/native-firebase-metadata.mjs +1 -1
  67. package/dist-lib/plist.cjs +2 -2
  68. package/dist-lib/plist.mjs +1 -1
  69. package/dist-lib/profiles.cjs +2 -2
  70. package/dist-lib/public-brand.cjs +2 -2
  71. package/dist-lib/public-origins-lib-esm.json +27 -23
  72. package/dist-lib/public-origins-lib.json +221 -88
  73. package/dist-lib/react-native-host-modules.cjs +2 -2
  74. package/dist-lib/react-native-host-modules.mjs +1 -1
  75. package/dist-lib/reap-browser.cjs +2 -2
  76. package/dist-lib/scripts/dev-server-scanner.cjs +206 -31
  77. package/dist-lib/sdk.cjs +3 -3
  78. package/dist-lib/sdk.mjs +2 -2
  79. package/dist-lib/skills.cjs +20997 -16596
  80. package/dist-lib/swift-compile.cjs +3075 -459
  81. package/dist-lib/swift-compile.mjs +3028 -415
  82. package/dist-lib/swift-package.cjs +131 -69
  83. package/dist-lib/swift-package.mjs +126 -68
  84. package/dist-lib/swift-submit.cjs +2 -2
  85. package/dist-lib/swift-submit.mjs +1 -1
  86. package/dist-lib/swift-toolchain.cjs +31 -4
  87. package/dist-lib/swift.cjs +2 -2
  88. package/dist-lib/vite-swift.cjs +5049 -1704
  89. package/dist-lib/vite.cjs +261 -58
  90. package/dist-lib/worklet-executable.cjs +8 -5
  91. package/dist-lib/worklet-executable.mjs +7 -4
  92. package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +15 -1
  93. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
  94. package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
  95. package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
  96. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
  97. package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
  98. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  99. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
  100. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
  101. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
  102. package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
  103. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -0
  104. package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
  105. package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +6 -0
  106. package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
  107. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -2
  108. package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
  109. package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +3 -0
  110. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  111. package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
  112. package/package.json +1 -1
  113. package/runtime-companion.json +1 -1
  114. package/scripts/dev-server-scanner.ts +4 -0
  115. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
  116. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
  117. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
  118. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
  119. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
  120. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
  121. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
  122. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
  123. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
  124. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
  125. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
  126. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
  127. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
  128. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
  129. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
  130. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
  131. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
  132. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
  133. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
  134. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
  135. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
  136. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
  137. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
  138. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
  139. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
  140. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
  141. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
  142. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
  143. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
  144. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
  145. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
  146. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
  147. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
  148. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
  149. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
  150. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
  151. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
  152. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
  153. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
  154. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
  155. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
  156. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
  157. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
  158. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
  159. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
  160. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
  161. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
  162. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
  163. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
  164. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
  165. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
  166. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
  167. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
  168. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
  169. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
  170. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
  171. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
  172. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
  173. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
  174. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
  175. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
  176. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
  177. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
  178. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
  179. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
  180. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
  181. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
  182. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +11 -220
  183. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -6
  184. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLAvailability.h +22 -0
  185. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBackgroundActivitySession.h +145 -0
  186. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityCondition.h +113 -0
  187. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +34 -0
  188. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +225 -0
  189. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBody.h +26 -0
  190. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularGeographicCondition.h +59 -0
  191. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +64 -0
  192. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCondition.h +48 -0
  193. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h +52 -0
  194. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h +24 -0
  195. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +55 -0
  196. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +117 -0
  197. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocation.h +9 -0
  198. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +45 -0
  199. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +877 -0
  200. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +225 -0
  201. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceError.h +33 -0
  202. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceExtension.h +28 -0
  203. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationUpdater.h +250 -0
  204. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitor.h +140 -0
  205. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitorConfiguration.h +77 -0
  206. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringEvent.h +184 -0
  207. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringRecord.h +57 -0
  208. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +98 -0
  209. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +123 -0
  210. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLServiceSession.h +211 -0
  211. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +66 -0
  212. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.h +46 -0
  213. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Modules/module.modulemap +7 -0
  214. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +98 -3
  215. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h +52 -0
  216. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +240 -0
  217. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h +474 -0
  218. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceTypes.h +66 -0
  219. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Modules/module.modulemap +10 -0
  220. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4AccelerationStructure.h +9 -0
  221. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Archive.h +16 -0
  222. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ArgumentTable.h +17 -0
  223. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h +13 -0
  224. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h +14 -0
  225. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h +79 -0
  226. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandAllocator.h +15 -0
  227. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h +17 -0
  228. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h +16 -0
  229. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h +19 -0
  230. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h +15 -0
  231. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h +13 -0
  232. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CompilerTask.h +13 -0
  233. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h +19 -0
  234. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h +13 -0
  235. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h +19 -0
  236. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4FunctionDescriptor.h +13 -0
  237. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryDescriptor.h +13 -0
  238. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryFunctionDescriptor.h +13 -0
  239. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkingDescriptor.h +13 -0
  240. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h +17 -0
  241. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h +13 -0
  242. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MeshRenderPipeline.h +13 -0
  243. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h +13 -0
  244. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h +13 -0
  245. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h +17 -0
  246. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPass.h +17 -0
  247. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h +13 -0
  248. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4SpecializedFunctionDescriptor.h +13 -0
  249. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4StitchedFunctionDescriptor.h +13 -0
  250. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4TileRenderPipeline.h +13 -0
  251. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h +1212 -0
  252. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h +322 -0
  253. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h +224 -0
  254. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h +22 -0
  255. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h +279 -0
  256. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h +199 -0
  257. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h +142 -0
  258. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h +266 -0
  259. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h +82 -0
  260. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h +94 -0
  261. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h +113 -0
  262. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h +43 -0
  263. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h +449 -0
  264. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h +148 -0
  265. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h +102 -0
  266. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h +350 -0
  267. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h +90 -0
  268. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h +274 -0
  269. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h +225 -0
  270. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h +232 -0
  271. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h +39 -0
  272. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h +93 -0
  273. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h +1122 -0
  274. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h +29 -0
  275. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h +36 -0
  276. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h +81 -0
  277. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLEvent.h +79 -0
  278. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h +22 -0
  279. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h +30 -0
  280. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h +95 -0
  281. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h +29 -0
  282. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h +37 -0
  283. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h +131 -0
  284. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLGPUAddress.h +19 -0
  285. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h +284 -0
  286. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h +10 -0
  287. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h +11 -0
  288. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h +10 -0
  289. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h +157 -0
  290. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h +110 -0
  291. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h +186 -0
  292. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h +549 -0
  293. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h +57 -0
  294. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h +65 -0
  295. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h +77 -0
  296. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h +57 -0
  297. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h +342 -0
  298. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h +323 -0
  299. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h +1068 -0
  300. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h +411 -0
  301. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h +788 -0
  302. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h +141 -0
  303. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h +307 -0
  304. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h +125 -0
  305. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h +85 -0
  306. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceViewPool.h +22 -0
  307. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h +252 -0
  308. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h +158 -0
  309. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h +17 -0
  310. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h +460 -0
  311. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTextureViewPool.h +18 -0
  312. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h +125 -0
  313. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h +153 -0
  314. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h +45 -0
  315. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/Metal.h +94 -0
  316. package/sdk/ios/System/Library/Frameworks/Metal.framework/Modules/module.modulemap +6 -0
  317. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
  318. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
  319. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
  320. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
  321. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
  322. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
  323. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +4 -0
  324. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTDefines.h +35 -0
  325. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTTagClass.h +33 -0
  326. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTType.h +504 -0
  327. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLEssentialsAvailability.h +14 -0
  328. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +444 -0
  329. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/LocationEssentials.h +14 -0
  330. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Modules/module.modulemap +14 -0
  331. package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
  332. package/sdk/ios/usr/include/complex.h +167 -0
  333. package/sdk/ios/usr/include/copyfile.h +143 -0
  334. package/sdk/ios/usr/include/dispatch/dispatch.h +5 -0
  335. package/sdk/ios/usr/include/mach/mach_types.h +1 -0
  336. package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
  337. package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
  338. package/sdk/ios/usr/include/malloc/_platform.h +80 -0
  339. package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
  340. package/sdk/ios/usr/include/malloc/malloc.h +768 -0
  341. package/sdk/ios/usr/include/math.h +835 -2
  342. package/sdk/ios/usr/include/os/availability.h +168 -6
  343. package/sdk/ios/usr/include/os/base.h +351 -0
  344. package/sdk/ios/usr/include/os/clock.h +18 -0
  345. package/sdk/ios/usr/include/os/lock.h +232 -10
  346. package/sdk/ios/usr/include/os/log.h +521 -38
  347. package/sdk/ios/usr/include/os/object.h +320 -3
  348. package/sdk/ios/usr/include/os/trace.h +492 -0
  349. package/sdk/ios/usr/include/os/trace_base.h +167 -0
  350. package/sdk/ios/usr/include/os/workgroup.h +37 -0
  351. package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
  352. package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
  353. package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
  354. package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
  355. package/sdk/ios/usr/include/sys/cdefs.h +38 -1
  356. package/sdk/ios/wasm/include/unistd.h +3 -0
  357. package/skills/contrast/SKILL.md +3 -0
  358. package/src/codex-client.ts +11 -6
  359. package/src/dev-bundle-resolution.ts +124 -48
  360. package/src/expo-native-workspace.ts +176 -0
  361. package/src/expo-swift-host.ts +161 -26
  362. package/src/expo-swift-ready.ts +14 -28
  363. package/src/expoSwiftContract.ts +4 -1
  364. package/src/generated/swift-c-predefines.json +2044 -0
  365. package/src/host/bridge-host.ts +5 -0
  366. package/src/installed-package-versions.ts +14 -1
  367. package/src/metro-project-root.ts +44 -33
  368. package/src/native-app-identity-project.ts +1 -0
  369. package/src/nitro-adapter.lock.json +916 -10
  370. package/src/nitro-adapter.ts +33 -24
  371. package/src/nitro-bundle.ts +108 -21
  372. package/src/nitro-compile.ts +36 -5
  373. package/src/nitro-source.ts +13 -3
  374. package/src/nitroAdapterContract.ts +100 -20
  375. package/src/nitroContract.ts +18 -2
  376. package/src/node-http-fetch.ts +116 -0
  377. package/src/packageVersionsContract.ts +46 -0
  378. package/src/serverDiscoveryContract.ts +1 -0
  379. package/src/settingsContract.ts +0 -30
  380. package/src/swift-binary-modules.ts +20 -5
  381. package/src/swift-compile.ts +598 -81
  382. package/src/swift-coverage/package.ts +3 -1
  383. package/src/swift-coverage/xcode-assets.ts +66 -5
  384. package/src/swift-coverage/xcode-packages.ts +11 -6
  385. package/src/swift-host.ts +347 -60
  386. package/src/swift-objc-compile.ts +52 -10
  387. package/src/swift-objc-metadata.ts +2 -2
  388. package/src/swift-objc-platform.ts +2 -2
  389. package/src/swift-objc-standin.ts +53 -13
  390. package/src/swift-package-manifest.ts +151 -28
  391. package/src/swift-package.ts +158 -75
  392. package/src/swift-packages.ts +141 -44
  393. package/src/swift-source-file.ts +10 -15
  394. package/src/swift-source-pods.ts +126 -41
  395. package/src/swift-standin-digest.ts +77 -0
  396. package/src/swift-standin-emit.ts +40 -4
  397. package/src/swift-standins.ts +154 -31
  398. package/src/swift-submit.ts +5 -0
  399. package/src/swift-toolchain.ts +38 -0
  400. package/src/swiftContract.ts +168 -75
  401. package/src/target-matcher.ts +15 -2
  402. package/src/vite-plugin.ts +0 -10
  403. package/src/worklet-executable.ts +7 -3
  404. package/src/xcode-json-project.ts +14 -2
  405. package/src/xcode-project.ts +215 -100
  406. package/src/settings-flags.ts +0 -107
@@ -0,0 +1,1243 @@
1
+ /*!
2
+ * @header Morphology.h
3
+ * vImage_Framework
4
+ *
5
+ * See vImage/vImage.h for more on how to view the headerdoc documentation for functions declared herein.
6
+ *
7
+ * @copyright Copyright (c) 2002-2016 by Apple Inc. All rights reserved.
8
+ *
9
+ * @discussion Morphology functions modify the shape of dark and light elements in an image. They can enlarge
10
+ * light structural elements (Dilate) or make them smaller by making the darker regions larger (Erode).
11
+ * The filters can be used in combination fill in holes (Dilate then Erode) or remove fine structure
12
+ * (Erode then Dilate). The Erode and Dilate filters can themselves have structure. For example, you
13
+ * can Dilate in the shape of a star, in which case single pixel bright signal (such as stars in a night
14
+ * sky) assume a star shape. Larger structure elements assume something of a star-like shape, but generally will
15
+ * not become fully recognizable as such until the size of the filter exceeds the size of the image
16
+ * structure element. A small circular filter can turn a rectangle into a larger rectangle with round corners.
17
+ * Many other examples abound.
18
+ *
19
+ * Min is a special case for an Erode function with a rectangular kernel that contains all the same value.
20
+ * Max is a special case for a Dilate function with a rectangular kernel that contains all the same value.
21
+ * Min and Max make use of a faster algorithm that can operate at much reduced cost.
22
+ *
23
+ * @ignorefuncmacro VIMAGE_NON_NULL
24
+ */
25
+
26
+ #ifndef VIMAGE_MORPHOLOGY_H
27
+ #define VIMAGE_MORPHOLOGY_H
28
+
29
+ #include <vImage/vImage_Types.h>
30
+
31
+
32
+ #ifdef __cplusplus
33
+ extern "C" {
34
+ #endif
35
+
36
+
37
+ /*!
38
+ * @functiongroup Dilate
39
+ * @discussion A dilate filter uses a shaped probe to trace a 3D surface. Imagine the kernel to define a 2D surface with
40
+ * the third dimension the values in the kernel. This is then lowered down over the image, itself treated
41
+ * as a 3D surface. The result image is the height at which the surface makes contact with the image for
42
+ * each pixel in the image. In this respect it operates like a scanning electron microscope with an adjustable
43
+ * probe shape. In code:
44
+ * <pre> @textblock
45
+ * for each pixel result[i][j] in the image{
46
+ * int r = 0;
47
+ * for( y = 0; y < kernel_height; y++ ){
48
+ * for( x = 0; x < kernel_width; x++ ){
49
+ * r = MAX( r, src[i+y-kernel_height/2][j+x-kernel_width/2] - k[y*kernel_width+x] )
50
+ * }
51
+ * }
52
+ *
53
+ * // normalize for kernel center not 0
54
+ * r += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
55
+ *
56
+ * // saturate overflow to representable range
57
+ * result[i][j] = CLIP( r );
58
+ * }
59
+ * @/textblock </pre>
60
+ * The ARGB variants apply the filter to the four channels in parallel. It should be noted that the application
61
+ * of the filter to the image causes the structure elements in the filter to be reflected into the image, reversed
62
+ * top to bottom and left to right. Also, if the center of the kernel is not 0, a general lightening of the image
63
+ * will occur. Some functions will run much faster if the center of the kernel is 0.
64
+ */
65
+
66
+ /*!
67
+ * @function vImageDilate_Planar8
68
+ * @abstract Apply a dilate filter to a Planar8 image
69
+ * @discussion This is a general purpose dilate filter for Planar8 data. It is optimized to handle the special cases that occur
70
+ * in image masks -- large contiguous regions of all 0xff or 0x0. If your filter is all 0's, you should use vImageMax_Planar8
71
+ * instead.
72
+ *
73
+ * <pre> @textblock
74
+ * for each pixel result[i][j] in the image{
75
+ * int r = 0;
76
+ * for( y = 0; y < kernel_height; y++ ){
77
+ * for( x = 0; x < kernel_width; x++ ){
78
+ * r = MAX( r, src[i+y-kernel_height/2][j+x-kernel_width/2] - k[y*kernel_width+x] )
79
+ * }
80
+ * }
81
+ *
82
+ * // normalize for kernel center not 0
83
+ * r += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
84
+ *
85
+ * // saturate overflow to representable range
86
+ * result[i][j] = CLIP( r );
87
+ * }
88
+ * @/textblock </pre>
89
+ *
90
+ * If only part of the dilate filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
91
+ * of the result tile relative to the src image.
92
+ *
93
+ * Does not work in place.
94
+ *
95
+ * @param src The input image
96
+ * @param dest A preallocated buffer to contain the result image
97
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the dilate filter.
98
+ * It allows the dilate filter to operate in a tiled fashion for tiles that do not start on the
99
+ * left edge of the source image.
100
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the dilate filter.
101
+ * It allows the dilate filter to operate in a tiled fashion for tiles that do not start on the
102
+ * top edge of the source image.
103
+ * @param kernel A pointer to a array of filter values of dimension kernel_height x kernel_width.
104
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
105
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
106
+ * @param flags The following flags values are allowed:
107
+ * <pre> @textblock
108
+ * kvImageNoFlags Default operation
109
+ *
110
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
111
+ * multithreading and just want the filter to run local to the current thread.
112
+ *
113
+ * kvImageGetTempBufferSize Return 0. Do no work.
114
+ * @/textblock </pre>
115
+ * @return The following error codes may result:
116
+ * <pre> @textblock
117
+ * kvImageNoError Success.
118
+ * 0 If kvImageGetTempBufferSize was among the flags, then no work was done.
119
+ *
120
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
121
+ * dimensions in the src image
122
+ *
123
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
124
+ * @/textblock </pre>
125
+ */
126
+ VIMAGE_PF vImage_Error vImageDilate_Planar8( const vImage_Buffer *src, const vImage_Buffer *dest, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, const unsigned char *kernel, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2,5) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
127
+
128
+
129
+
130
+ /*!
131
+ * @function vImageDilate_PlanarF
132
+ * @abstract Apply a dilate filter to a PlanarF image
133
+ * @discussion This is a general purpose dilate filter for Planar8 data. If your filter is all 0's, you should use vImageMax_PlanarF
134
+ * instead.
135
+ *
136
+ * <pre> @textblock
137
+ * for each pixel result[i][j] in the image{
138
+ * float r = -INFINITY;
139
+ * for( y = 0; y < kernel_height; y++ ){
140
+ * for( x = 0; x < kernel_width; x++ ){
141
+ * r = MAX( r, src[i+y-kernel_height/2][j+x-kernel_width/2] - k[y*kernel_width+x] )
142
+ * }
143
+ * }
144
+ *
145
+ * // normalize for kernel center not 0
146
+ * r += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
147
+ *
148
+ * // saturate overflow to representable range
149
+ * result[i][j] = r;
150
+ * }
151
+ * @/textblock </pre>
152
+ *
153
+ * If only part of the dilate filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
154
+ * of the result tile relative to the src image.
155
+ *
156
+ * Does not work in place. Floating-point values have host endianness.
157
+ *
158
+ * @param src The input image
159
+ * @param dest A preallocated buffer to contain the result image
160
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the dilate filter.
161
+ * It allows the dilate filter to operate in a tiled fashion for tiles that do not start on the
162
+ * left edge of the source image.
163
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the dilate filter.
164
+ * It allows the dilate filter to operate in a tiled fashion for tiles that do not start on the
165
+ * top edge of the source image.
166
+ * @param kernel A pointer to a array of filter values of dimension kernel_height x kernel_width.
167
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
168
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
169
+ * @param flags The following flags values are allowed:
170
+ * <pre> @textblock
171
+ * kvImageNoFlags Default operation
172
+ *
173
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
174
+ * multithreading and just want the filter to run local to the current thread.
175
+ *
176
+ * kvImageGetTempBufferSize Return 0. Do no work.
177
+ * @/textblock </pre>
178
+ * @return The following error codes may result:
179
+ * <pre> @textblock
180
+ * kvImageNoError Success.
181
+ * 0 If kvImageGetTempBufferSize was among the flags, then no work was done.
182
+ *
183
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
184
+ * dimensions in the src image
185
+ *
186
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
187
+ * @/textblock </pre>
188
+ */
189
+ VIMAGE_PF vImage_Error vImageDilate_PlanarF( const vImage_Buffer *src, const vImage_Buffer *dest, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, const float *kernel, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2,5) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
190
+
191
+ /*!
192
+ * @function vImageDilate_ARGB8888
193
+ * @abstract Apply a dilate filter to a ARGB8888 image
194
+ * @discussion This is a general purpose dilate filter for ARGB8888 data. If your filter is all 0's, you should use vImageMax_ARGB8888
195
+ * instead.
196
+ *
197
+ * <pre> @textblock
198
+ * for each pixel result[i][j] in the image{
199
+ * int a = 0;
200
+ * int r = 0;
201
+ * int g = 0;
202
+ * int b = 0;
203
+ * for( y = 0; y < kernel_height; y++ ){
204
+ * for( x = 0; x < kernel_width; x++ ){
205
+ * a = MAX( a, src[i+y-kernel_height/2][j+x-kernel_width/2][0] - k[y*kernel_width+x] )
206
+ * r = MAX( r, src[i+y-kernel_height/2][j+x-kernel_width/2][1] - k[y*kernel_width+x] )
207
+ * g = MAX( g, src[i+y-kernel_height/2][j+x-kernel_width/2][2] - k[y*kernel_width+x] )
208
+ * b = MAX( b, src[i+y-kernel_height/2][j+x-kernel_width/2][3] - k[y*kernel_width+x] )
209
+ * }
210
+ * }
211
+ *
212
+ * // normalize for kernel center not 0
213
+ * a += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
214
+ * r += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
215
+ * g += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
216
+ * b += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
217
+ *
218
+ * // saturate overflow to representable range
219
+ * result[i][j][0] = (flags & kvImageLeaveAlphaUnchanged) ? src[i][j] : CLIP( a );
220
+ * result[i][j][1] = CLIP( r );
221
+ * result[i][j][2] = CLIP( g );
222
+ * result[i][j][3] = CLIP( b );
223
+ * }
224
+ * @/textblock </pre>
225
+ *
226
+ * If only part of the dilate filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
227
+ * of the result tile relative to the src image.
228
+ *
229
+ * Does not work in place. If kvImageLeaveAlphaUnchanged is not used, it works for any channel order.
230
+ * If kvImageLeaveAlphaUnchanged is used, then the alpha must be first.
231
+ *
232
+ * @param src The input image
233
+ * @param dest A preallocated buffer to contain the result image
234
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the dilate filter.
235
+ * It allows the dilate filter to operate in a tiled fashion for tiles that do not start on the
236
+ * left edge of the source image.
237
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the dilate filter.
238
+ * It allows the dilate filter to operate in a tiled fashion for tiles that do not start on the
239
+ * top edge of the source image.
240
+ * @param kernel A pointer to a array of filter values of dimension kernel_height x kernel_width.
241
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
242
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
243
+ * @param flags The following flags values are allowed:
244
+ * <pre> @textblock
245
+ * kvImageNoFlags Default operation
246
+ *
247
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
248
+ * multithreading and just want the filter to run local to the current thread.
249
+ *
250
+ * kvImageGetTempBufferSize Return 0. Do no work.
251
+ *
252
+ * kvImageLeaveAlphaUnchanged The alpha channel (first byte of pixel in memory) is copied to the destination
253
+ * without modification, instead of having a dilate filter applied to it.
254
+ * @/textblock </pre>
255
+ * @return The following error codes may result:
256
+ * <pre> @textblock
257
+ * kvImageNoError Success.
258
+ * 0 If kvImageGetTempBufferSize was among the flags, then no work was done.
259
+ *
260
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
261
+ * dimensions in the src image
262
+ *
263
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
264
+ * @/textblock </pre>
265
+ */
266
+ VIMAGE_PF vImage_Error vImageDilate_ARGB8888( const vImage_Buffer *src, const vImage_Buffer *dest, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, const unsigned char *kernel, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2,5) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
267
+
268
+ /*!
269
+ * @function vImageDilate_ARGBFFFF
270
+ * @abstract Apply a dilate filter to a ARGBFFFF image
271
+ * @discussion This is a general purpose dilate filter for ARGBFFFF data. If your filter is all 0's, you should use vImageMax_ARGBFFFF
272
+ * instead.
273
+ *
274
+ * <pre> @textblock
275
+ * for each pixel result[i][j] in the image{
276
+ * float a = -INFINITY;
277
+ * float r = -INFINITY;
278
+ * float g = -INFINITY;
279
+ * float b = -INFINITY;
280
+ * for( y = 0; y < kernel_height; y++ ){
281
+ * for( x = 0; x < kernel_width; x++ ){
282
+ * a = MAX( a, src[i+y-kernel_height/2][j+x-kernel_width/2][0] - k[y*kernel_width+x] )
283
+ * r = MAX( r, src[i+y-kernel_height/2][j+x-kernel_width/2][1] - k[y*kernel_width+x] )
284
+ * g = MAX( g, src[i+y-kernel_height/2][j+x-kernel_width/2][2] - k[y*kernel_width+x] )
285
+ * b = MAX( b, src[i+y-kernel_height/2][j+x-kernel_width/2][3] - k[y*kernel_width+x] )
286
+ * }
287
+ * }
288
+ *
289
+ * // normalize for kernel center not 0
290
+ * a += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
291
+ * r += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
292
+ * g += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
293
+ * b += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
294
+ *
295
+ * // saturate overflow to representable range
296
+ * result[i][j][0] = (flags & kvImageLeaveAlphaUnchanged) ? src[i][j] : a;
297
+ * result[i][j][1] = r;
298
+ * result[i][j][2] = g;
299
+ * result[i][j][3] = b;
300
+ * }
301
+ * @/textblock </pre>
302
+ *
303
+ * If only part of the dilate filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
304
+ * of the result tile relative to the src image.
305
+ *
306
+ * Does not work in place. If kvImageLeaveAlphaUnchanged is not used, it works for any channel order.
307
+ * If kvImageLeaveAlphaUnchanged is used, then the alpha must be first. Floating-point values have host
308
+ * endianness.
309
+ *
310
+ * @param src The input image
311
+ * @param dest A preallocated buffer to contain the result image
312
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the dilate filter.
313
+ * It allows the dilate filter to operate in a tiled fashion for tiles that do not start on the
314
+ * left edge of the source image.
315
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the dilate filter.
316
+ * It allows the dilate filter to operate in a tiled fashion for tiles that do not start on the
317
+ * top edge of the source image.
318
+ * @param kernel A pointer to a array of filter values of dimension kernel_height x kernel_width.
319
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
320
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
321
+ * @param flags The following flags values are allowed:
322
+ * <pre> @textblock
323
+ * kvImageNoFlags Default operation
324
+ *
325
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
326
+ * multithreading and just want the filter to run local to the current thread.
327
+ *
328
+ * kvImageGetTempBufferSize Return 0. Do no work.
329
+ *
330
+ * kvImageLeaveAlphaUnchanged The alpha channel (first float in pixel in memory) is copied to the destination
331
+ * without modification, instead of having a dilate filter applied to it.
332
+ * @/textblock </pre>
333
+ * @return The following error codes may result:
334
+ * <pre> @textblock
335
+ * kvImageNoError Success.
336
+ * 0 If kvImageGetTempBufferSize was among the flags, then no work was done.
337
+ *
338
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
339
+ * dimensions in the src image
340
+ *
341
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
342
+ * @/textblock </pre>
343
+ */
344
+ VIMAGE_PF vImage_Error vImageDilate_ARGBFFFF( const vImage_Buffer *src, const vImage_Buffer *dest, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, const float *kernel, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2,5) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
345
+
346
+
347
+ /*!
348
+ * @functiongroup Erode
349
+ * @discussion An erode filter uses a shaped probe to trace a 3D surface. Imagine the kernel to define a 2D surface with
350
+ * the third dimension the values in the kernel. This is then elevated from underneath the image, itself treated
351
+ * as a 3D surface. The result image is the height at which the surface makes contact with the image for
352
+ * each pixel in the image.
353
+ *
354
+ * In code:
355
+ * <pre> @textblock
356
+ * for each pixel result[i][j] in the image{
357
+ * int r = MAX_CHANNEL_VALUE;
358
+ * for( y = 0; y < kernel_height; y++ ){
359
+ * for( x = 0; x < kernel_width; x++ ){
360
+ * r = MIN( r, src[i+y-kernel_height/2][j+x-kernel_width/2] - k[y*kernel_width+x] )
361
+ * }
362
+ * }
363
+ *
364
+ * // normalize for kernel center not 0
365
+ * r += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
366
+ *
367
+ * // saturate overflow to representable range
368
+ * result[i][j] = CLIP( r );
369
+ * }
370
+ * @/textblock </pre>
371
+ * The ARGB variants apply the filter to the four channels in parallel. It should be noted that the application
372
+ * of the filter to the image causes the structure elements in the filter to be reflected into the image, reversed
373
+ * top to bottom and left to right. Also, if the center of the kernel is not 0, a general lightening of the image
374
+ * will occur. Some functions will run much faster if the center of the kernel is 0.
375
+ */
376
+
377
+
378
+ /*!
379
+ * @function vImageErode_Planar8
380
+ * @abstract Apply a erode filter to a Planar8 image
381
+ * @discussion This is a general purpose erode filter for Planar8 data. If your filter is all 0's, you should use vImageMin_Planar8
382
+ * instead.
383
+ *
384
+ * <pre> @textblock
385
+ * for each pixel result[i][j] in the image{
386
+ * int r = MAX_CHANNEL_VALUE;
387
+ * for( y = 0; y < kernel_height; y++ ){
388
+ * for( x = 0; x < kernel_width; x++ ){
389
+ * r = MIN( r, src[i+y-kernel_height/2][j+x-kernel_width/2] - k[y*kernel_width+x] )
390
+ * }
391
+ * }
392
+ *
393
+ * // normalize for kernel center not 0
394
+ * r += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
395
+ *
396
+ * // saturate overflow to representable range
397
+ * result[i][j] = CLIP( r );
398
+ * }
399
+ * @/textblock </pre>
400
+ *
401
+ * If only part of the erode filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
402
+ * of the result tile relative to the src image.
403
+ *
404
+ * Does not work in place.
405
+ *
406
+ * @param src The input image
407
+ * @param dest A preallocated buffer to contain the result image
408
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the erode filter.
409
+ * It allows the erode filter to operate in a tiled fashion for tiles that do not start on the
410
+ * left edge of the source image.
411
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the erode filter.
412
+ * It allows the erode filter to operate in a tiled fashion for tiles that do not start on the
413
+ * top edge of the source image.
414
+ * @param kernel A pointer to a array of filter values of dimension kernel_height x kernel_width.
415
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
416
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
417
+ * @param flags The following flags values are allowed:
418
+ * <pre> @textblock
419
+ * kvImageNoFlags Default operation
420
+ *
421
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
422
+ * multithreading and just want the filter to run local to the current thread.
423
+ *
424
+ * kvImageGetTempBufferSize Return 0. Do no work.
425
+ * @/textblock </pre>
426
+ * @return The following error codes may result:
427
+ * <pre> @textblock
428
+ * kvImageNoError Success.
429
+ * 0 If kvImageGetTempBufferSize was among the flags, then no work was done.
430
+ *
431
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
432
+ * dimensions in the src image
433
+ *
434
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
435
+ * @/textblock </pre>
436
+ */
437
+ VIMAGE_PF vImage_Error vImageErode_Planar8( const vImage_Buffer *src, const vImage_Buffer *dest, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, const unsigned char *kernel, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2,5) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
438
+
439
+ /*!
440
+ * @function vImageErode_PlanarF
441
+ * @abstract Apply a erode filter to a PlanarF image
442
+ * @discussion This is a general purpose erode filter for Planar8 data. If your filter is all 0's, you should use vImageMin_PlanarF
443
+ * instead.
444
+ *
445
+ * <pre> @textblock
446
+ * for each pixel result[i][j] in the image{
447
+ * float r = INFINITY;
448
+ * for( y = 0; y < kernel_height; y++ ){
449
+ * for( x = 0; x < kernel_width; x++ ){
450
+ * r = MIN( r, src[i+y-kernel_height/2][j+x-kernel_width/2] - k[y*kernel_width+x] )
451
+ * }
452
+ * }
453
+ *
454
+ * // normalize for kernel center not 0
455
+ * r += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
456
+ *
457
+ * // saturate overflow to representable range
458
+ * result[i][j] = r;
459
+ * }
460
+ * @/textblock </pre>
461
+ *
462
+ * If only part of the erode filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
463
+ * of the result tile relative to the src image.
464
+ *
465
+ * Does not work in place. Floating-point values have host endianness.
466
+ *
467
+ * @param src The input image
468
+ * @param dest A preallocated buffer to contain the result image
469
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the erode filter.
470
+ * It allows the erode filter to operate in a tiled fashion for tiles that do not start on the
471
+ * left edge of the source image.
472
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the erode filter.
473
+ * It allows the erode filter to operate in a tiled fashion for tiles that do not start on the
474
+ * top edge of the source image.
475
+ * @param kernel A pointer to a array of filter values of dimension kernel_height x kernel_width.
476
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
477
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
478
+ * @param flags The following flags values are allowed:
479
+ * <pre> @textblock
480
+ * kvImageNoFlags Default operation
481
+ *
482
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
483
+ * multithreading and just want the filter to run local to the current thread.
484
+ *
485
+ * kvImageGetTempBufferSize Return 0. Do no work.
486
+ * @/textblock </pre>
487
+ * @return The following error codes may result:
488
+ * <pre> @textblock
489
+ * kvImageNoError Success.
490
+ * 0 If kvImageGetTempBufferSize was among the flags, then no work was done.
491
+ *
492
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
493
+ * dimensions in the src image
494
+ *
495
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
496
+ * @/textblock </pre>
497
+ */
498
+ VIMAGE_PF vImage_Error vImageErode_PlanarF( const vImage_Buffer *src, const vImage_Buffer *dest, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, const float *kernel, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2,5) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
499
+
500
+
501
+ /*!
502
+ * @function vImageErode_ARGB8888
503
+ * @abstract Apply a erode filter to a ARGB8888 image
504
+ * @discussion This is a general purpose erode filter for ARGB8888 data. If your filter is all 0's, you should use vImageMin_ARGB8888
505
+ * instead.
506
+ *
507
+ * <pre> @textblock
508
+ * for each pixel result[i][j] in the image{
509
+ * int a = 255;
510
+ * int r = 255;
511
+ * int g = 255;
512
+ * int b = 255;
513
+ * for( y = 0; y < kernel_height; y++ ){
514
+ * for( x = 0; x < kernel_width; x++ ){
515
+ * a = MIN( a, src[i+y-kernel_height/2][j+x-kernel_width/2][0] - k[y*kernel_width+x] )
516
+ * r = MIN( r, src[i+y-kernel_height/2][j+x-kernel_width/2][1] - k[y*kernel_width+x] )
517
+ * g = MIN( g, src[i+y-kernel_height/2][j+x-kernel_width/2][2] - k[y*kernel_width+x] )
518
+ * b = MIN( b, src[i+y-kernel_height/2][j+x-kernel_width/2][3] - k[y*kernel_width+x] )
519
+ * }
520
+ * }
521
+ *
522
+ * // normalize for kernel center not 0
523
+ * a += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
524
+ * r += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
525
+ * g += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
526
+ * b += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
527
+ *
528
+ * // saturate overflow to representable range
529
+ * result[i][j][0] = (flags & kvImageLeaveAlphaUnchanged) ? src[i][j] : CLIP( a );
530
+ * result[i][j][1] = CLIP( r );
531
+ * result[i][j][2] = CLIP( g );
532
+ * result[i][j][3] = CLIP( b );
533
+ * }
534
+ * @/textblock </pre>
535
+ *
536
+ * If only part of the erode filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
537
+ * of the result tile relative to the src image.
538
+ *
539
+ * Does not work in place. If kvImageLeaveAlphaUnchanged is not used, it works for any channel order.
540
+ * If kvImageLeaveAlphaUnchanged is used, then the alpha must be first.
541
+ *
542
+ * @param src The input image
543
+ * @param dest A preallocated buffer to contain the result image
544
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the erode filter.
545
+ * It allows the erode filter to operate in a tiled fashion for tiles that do not start on the
546
+ * left edge of the source image.
547
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the erode filter.
548
+ * It allows the erode filter to operate in a tiled fashion for tiles that do not start on the
549
+ * top edge of the source image.
550
+ * @param kernel A pointer to a array of filter values of dimension kernel_height x kernel_width.
551
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
552
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
553
+ * @param flags The following flags values are allowed:
554
+ * <pre> @textblock
555
+ * kvImageNoFlags Default operation
556
+ *
557
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
558
+ * multithreading and just want the filter to run local to the current thread.
559
+ *
560
+ * kvImageGetTempBufferSize Return 0. Do no work.
561
+ *
562
+ * kvImageLeaveAlphaUnchanged The alpha channel (first byte of pixel in memory) is copied to the destination
563
+ * without modification, instead of having a erode filter applied to it.
564
+ * @/textblock </pre>
565
+ * @return The following error codes may result:
566
+ * <pre> @textblock
567
+ * kvImageNoError Success.
568
+ * 0 If kvImageGetTempBufferSize was among the flags, then no work was done.
569
+ *
570
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
571
+ * dimensions in the src image
572
+ *
573
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
574
+ * @/textblock </pre>
575
+ */
576
+ VIMAGE_PF vImage_Error vImageErode_ARGB8888( const vImage_Buffer *src, const vImage_Buffer *dest, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, const unsigned char *kernel, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2,5) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
577
+
578
+
579
+ /*!
580
+ * @function vImageErode_ARGBFFFF
581
+ * @abstract Apply a erode filter to a ARGBFFFF image
582
+ * @discussion This is a general purpose erode filter for ARGBFFFF data. If your filter is all 0's, you should use vImageMin_ARGBFFFF
583
+ * instead.
584
+ *
585
+ * <pre> @textblock
586
+ * for each pixel result[i][j] in the image{
587
+ * float a = INFINITY;
588
+ * float r = INFINITY;
589
+ * float g = INFINITY;
590
+ * float b = INFINITY;
591
+ * for( y = 0; y < kernel_height; y++ ){
592
+ * for( x = 0; x < kernel_width; x++ ){
593
+ * a = MIN( a, src[i+y-kernel_height/2][j+x-kernel_width/2][0] - k[y*kernel_width+x] )
594
+ * r = MIN( r, src[i+y-kernel_height/2][j+x-kernel_width/2][1] - k[y*kernel_width+x] )
595
+ * g = MIN( g, src[i+y-kernel_height/2][j+x-kernel_width/2][2] - k[y*kernel_width+x] )
596
+ * b = MIN( b, src[i+y-kernel_height/2][j+x-kernel_width/2][3] - k[y*kernel_width+x] )
597
+ * }
598
+ * }
599
+ *
600
+ * // normalize for kernel center not 0
601
+ * a += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
602
+ * r += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
603
+ * g += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
604
+ * b += k[y * (kernel_height/2) * kernel_width + kernel_width/2 ];
605
+ *
606
+ * // saturate overflow to representable range
607
+ * result[i][j][0] = (flags & kvImageLeaveAlphaUnchanged) ? src[i][j] : a;
608
+ * result[i][j][1] = r;
609
+ * result[i][j][2] = g;
610
+ * result[i][j][3] = b;
611
+ * }
612
+ * @/textblock </pre>
613
+ *
614
+ * If only part of the erode filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
615
+ * of the result tile relative to the src image.
616
+ *
617
+ * Does not work in place. If kvImageLeaveAlphaUnchanged is not used, it works for any channel order.
618
+ * If kvImageLeaveAlphaUnchanged is used, then the alpha must be first. Floating-point values have host
619
+ * endianness.
620
+ *
621
+ * @param src The input image
622
+ * @param dest A preallocated buffer to contain the result image
623
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the erode filter.
624
+ * It allows the erode filter to operate in a tiled fashion for tiles that do not start on the
625
+ * left edge of the source image.
626
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the erode filter.
627
+ * It allows the erode filter to operate in a tiled fashion for tiles that do not start on the
628
+ * top edge of the source image.
629
+ * @param kernel A pointer to a array of filter values of dimension kernel_height x kernel_width.
630
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
631
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
632
+ * @param flags The following flags values are allowed:
633
+ * <pre> @textblock
634
+ * kvImageNoFlags Default operation
635
+ *
636
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
637
+ * multithreading and just want the filter to run local to the current thread.
638
+ *
639
+ * kvImageGetTempBufferSize Return 0. Do no work.
640
+ *
641
+ * kvImageLeaveAlphaUnchanged The alpha channel (first float in pixel in memory) is copied to the destination
642
+ * without modification, instead of having a erode filter applied to it.
643
+ * @/textblock </pre>
644
+ * @return The following error codes may result:
645
+ * <pre> @textblock
646
+ * kvImageNoError Success.
647
+ * 0 If kvImageGetTempBufferSize was among the flags, then no work was done.
648
+ *
649
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
650
+ * dimensions in the src image
651
+ *
652
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
653
+ * @/textblock </pre>
654
+ */
655
+ VIMAGE_PF vImage_Error vImageErode_ARGBFFFF( const vImage_Buffer *src, const vImage_Buffer *dest, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, const float *kernel, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2,5) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
656
+
657
+
658
+ /*!
659
+ * @functiongroup Max
660
+ * @discussion A max filter is a special case of a dilate filter, in which the filter elements are all 0.
661
+ * This allows a much, much faster algorithm to be used.
662
+ */
663
+
664
+ /*!
665
+ * @function vImageMax_Planar8
666
+ * @abstract Apply a max filter to a Planar8 image.
667
+ * @discussion A max filter is a special case dilate filter, in which the filter elements are all 0. It is much faster than the normal dilate.
668
+ * <pre> @textblock
669
+ * for each pixel result[i][j] in the image{
670
+ * int r = 0;
671
+ * for( y = 0; y < kernel_height; y++ ){
672
+ * for( x = 0; x < kernel_width; x++ ){
673
+ * r = MAX( r, src[i+y-kernel_height/2][j+x-kernel_width/2] )
674
+ * }
675
+ * }
676
+ *
677
+ * // saturate overflow to representable range
678
+ * result[i][j] = r;
679
+ * }
680
+ * @/textblock </pre>
681
+ * If only part of the max filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
682
+ * of the result tile relative to the src image.
683
+ *
684
+ * Does not work in place, unless the kvImageDoNotTile flag is used.
685
+ *
686
+ * @param src The input image
687
+ * @param dest A preallocated buffer to contain the result image
688
+ * @param tempBuffer May be NULL. An optional temp buffer in which to store temporary computation. To find the size
689
+ * of the temp buffer, call the function with the desired parameters and pass the kvImageGetTempBufferSize
690
+ * flag. The size of the temp buffer will be returned from the left hand side of the function in
691
+ * place of an error code, and no work will be done on the image data. A temp buffer can provide a speed
692
+ * improvement, if it can be allocated once and reused. This saves a bunch of VM faults on first use of
693
+ * the newly allocated temp buffer.
694
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the max filter.
695
+ * It allows the max filter to operate in a tiled fashion for tiles that do not start on the
696
+ * left edge of the source image.
697
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the max filter.
698
+ * It allows the max filter to operate in a tiled fashion for tiles that do not start on the
699
+ * top edge of the source image.
700
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
701
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
702
+ * @param flags The following flags values are allowed:
703
+ * <pre> @textblock
704
+ * kvImageNoFlags Default operation
705
+ *
706
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
707
+ * multithreading and just want the filter to run local to the current thread. It also
708
+ * allows the function to work in place, though more slowly.
709
+ *
710
+ * kvImageGetTempBufferSize Return 0. Do no work.
711
+ * @/textblock </pre>
712
+ * @return The following error codes may result:
713
+ * <pre> @textblock
714
+ * kvImageNoError Success.
715
+ * >=0 If kvImageGetTempBufferSize was among the flags, then no work was done.
716
+ * Instead, the size of the temp buffer needed is returned.
717
+ *
718
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
719
+ * dimensions in the src image
720
+ *
721
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
722
+ * @/textblock </pre>
723
+ */
724
+ VIMAGE_PF vImage_Error vImageMax_Planar8( const vImage_Buffer *src, const vImage_Buffer *dest, void *tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
725
+
726
+ /*!
727
+ * @function vImageMax_PlanarF
728
+ * @abstract Apply a max filter to a PlanarF image.
729
+ * @discussion A max filter is a special case dilate filter, in which the filter elements are all 0. It is much faster than the normal dilate.
730
+ * <pre> @textblock
731
+ * for each pixel result[i][j] in the image{
732
+ * float r = -INFINITY;
733
+ * for( y = 0; y < kernel_height; y++ ){
734
+ * for( x = 0; x < kernel_width; x++ ){
735
+ * r = MAX( r, src[i+y-kernel_height/2][j+x-kernel_width/2] )
736
+ * }
737
+ * }
738
+ *
739
+ * // saturate overflow to representable range
740
+ * result[i][j] = r;
741
+ * }
742
+ * @/textblock </pre>
743
+ * If only part of the max filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
744
+ * of the result tile relative to the src image.
745
+ *
746
+ * Does not work in place, unless the kvImageDoNotTile flag is used.
747
+ *
748
+ * @param src The input image
749
+ * @param dest A preallocated buffer to contain the result image
750
+ * @param tempBuffer May be NULL. An optional temp buffer in which to store temporary computation. To find the size
751
+ * of the temp buffer, call the function with the desired parameters and pass the kvImageGetTempBufferSize
752
+ * flag. The size of the temp buffer will be returned from the left hand side of the function in
753
+ * place of an error code, and no work will be done on the image data. A temp buffer can provide a speed
754
+ * improvement, if it can be allocated once and reused. This saves a bunch of VM faults on first use of
755
+ * the newly allocated temp buffer.
756
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the max filter.
757
+ * It allows the max filter to operate in a tiled fashion for tiles that do not start on the
758
+ * left edge of the source image.
759
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the max filter.
760
+ * It allows the max filter to operate in a tiled fashion for tiles that do not start on the
761
+ * top edge of the source image.
762
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
763
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
764
+ * @param flags The following flags values are allowed:
765
+ * <pre> @textblock
766
+ * kvImageNoFlags Default operation
767
+ *
768
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
769
+ * multithreading and just want the filter to run local to the current thread. It also
770
+ * allows the function to work in place, though more slowly.
771
+ *
772
+ * kvImageGetTempBufferSize Return the size of the temp buffer needed. Do no work.
773
+ * @/textblock </pre>
774
+ * @return The following error codes may result:
775
+ * <pre> @textblock
776
+ * kvImageNoError Success.
777
+ * >=0 If kvImageGetTempBufferSize was among the flags, then no work was done.
778
+ * Instead, the size of the temp buffer needed is returned.
779
+ *
780
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
781
+ * dimensions in the src image
782
+ *
783
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
784
+ * @/textblock </pre>
785
+ */
786
+ VIMAGE_PF vImage_Error vImageMax_PlanarF( const vImage_Buffer *src, const vImage_Buffer *dest, void *tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
787
+
788
+ /*!
789
+ * @function vImageMax_ARGB8888
790
+ * @abstract Apply a max filter to a ARGB8888 image
791
+ * @discussion This is a special purpose dilate filter for ARGB8888 data, for rectangular kernels with value 0. It is much faster than the normal dilate.
792
+ *
793
+ * <pre> @textblock
794
+ * for each pixel result[i][j] in the image{
795
+ * int a = 0;
796
+ * int r = 0;
797
+ * int g = 0;
798
+ * int b = 0;
799
+ * for( y = 0; y < kernel_height; y++ ){
800
+ * for( x = 0; x < kernel_width; x++ ){
801
+ * a = MAX( a, src[i+y-kernel_height/2][j+x-kernel_width/2][0] )
802
+ * r = MAX( r, src[i+y-kernel_height/2][j+x-kernel_width/2][1] )
803
+ * g = MAX( g, src[i+y-kernel_height/2][j+x-kernel_width/2][2] )
804
+ * b = MAX( b, src[i+y-kernel_height/2][j+x-kernel_width/2][3] )
805
+ * }
806
+ * }
807
+ *
808
+ * // saturate overflow to representable range
809
+ * result[i][j][0] = (flags & kvImageLeaveAlphaUnchanged) ? src[i][j] : a;
810
+ * result[i][j][1] = r;
811
+ * result[i][j][2] = g;
812
+ * result[i][j][3] = b;
813
+ * }
814
+ * @/textblock </pre>
815
+ *
816
+ * If only part of the max filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
817
+ * of the result tile relative to the src image.
818
+ *
819
+ * If kvImageLeaveAlphaUnchanged is not used, it works for any channel order.
820
+ * If kvImageLeaveAlphaUnchanged is used, then the alpha must be first.
821
+ * Does not work in place, unless the kvImageDoNotTile flag is used, in which case it will probably
822
+ * run more slowly.
823
+ *
824
+ * @param src The input image
825
+ * @param dest A preallocated buffer to contain the result image
826
+ * @param tempBuffer May be NULL. An optional temp buffer in which to store temporary computation. To find the size
827
+ * of the temp buffer, call the function with the desired parameters and pass the kvImageGetTempBufferSize
828
+ * flag. The size of the temp buffer will be returned from the left hand side of the function in
829
+ * place of an error code, and no work will be done on the image data. A temp buffer can provide a speed
830
+ * improvement, if it can be allocated once and reused. This saves a bunch of VM faults on first use of
831
+ * the newly allocated temp buffer.
832
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the max filter.
833
+ * It allows the max filter to operate in a tiled fashion for tiles that do not start on the
834
+ * left edge of the source image.
835
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the max filter.
836
+ * It allows the max filter to operate in a tiled fashion for tiles that do not start on the
837
+ * top edge of the source image.
838
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
839
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
840
+ * @param flags The following flags values are allowed:
841
+ * <pre> @textblock
842
+ * kvImageNoFlags Default operation
843
+ *
844
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
845
+ * multithreading and just want the filter to run local to the current thread.
846
+ * kvImageDoNotTile will also allow the filter to run in place, though more slowly.
847
+ *
848
+ * kvImageGetTempBufferSize Return 0. Do no work.
849
+ *
850
+ * kvImageLeaveAlphaUnchanged The alpha channel (first byte of pixel in memory) is copied to the destination
851
+ * without modification, instead of having a max filter applied to it.
852
+ * @/textblock </pre>
853
+ * @return The following error codes may result:
854
+ * <pre> @textblock
855
+ * kvImageNoError Success.
856
+ * >=0 If kvImageGetTempBufferSize was among the flags, then no work was done.
857
+ * Instead, the size of the temp buffer needed is returned.
858
+ *
859
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
860
+ * dimensions in the src image
861
+ *
862
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
863
+ * @/textblock </pre>
864
+ */
865
+ VIMAGE_PF vImage_Error vImageMax_ARGB8888( const vImage_Buffer *src, const vImage_Buffer *dest, void *tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
866
+
867
+
868
+ /*!
869
+ * @function vImageMax_ARGBFFFF
870
+ * @abstract Apply a max filter to a ARGBFFFF image
871
+ * @discussion This is a special purpose dilate filter for ARGBFFFF data, for rectangular kernels with value 0. It is much faster than the normal dilate.
872
+ *
873
+ * <pre> @textblock
874
+ * for each pixel result[i][j] in the image{
875
+ * float a = -INFINITY;
876
+ * float r = -INFINITY;
877
+ * float g = -INFINITY;
878
+ * float b = -INFINITY;
879
+ * for( y = 0; y < kernel_height; y++ ){
880
+ * for( x = 0; x < kernel_width; x++ ){
881
+ * a = MAX( a, src[i+y-kernel_height/2][j+x-kernel_width/2][0] )
882
+ * r = MAX( r, src[i+y-kernel_height/2][j+x-kernel_width/2][1] )
883
+ * g = MAX( g, src[i+y-kernel_height/2][j+x-kernel_width/2][2] )
884
+ * b = MAX( b, src[i+y-kernel_height/2][j+x-kernel_width/2][3] )
885
+ * }
886
+ * }
887
+ *
888
+ * // saturate overflow to representable range
889
+ * result[i][j][0] = (flags & kvImageLeaveAlphaUnchanged) ? src[i][j] : a;
890
+ * result[i][j][1] = r;
891
+ * result[i][j][2] = g;
892
+ * result[i][j][3] = b;
893
+ * }
894
+ * @/textblock </pre>
895
+ *
896
+ * If only part of the max filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
897
+ * of the result tile relative to the src image.
898
+ *
899
+ * If kvImageLeaveAlphaUnchanged is not used, it works for any channel order.
900
+ * If kvImageLeaveAlphaUnchanged is used, then the alpha must be first.
901
+ * Does not work in place, unless the kvImageDoNotTile flag is used, in which case it will probably
902
+ * run more slowly.
903
+ *
904
+ * @param src The input image
905
+ * @param dest A preallocated buffer to contain the result image
906
+ * @param tempBuffer May be NULL. An optional temp buffer in which to store temporary computation. To find the size
907
+ * of the temp buffer, call the function with the desired parameters and pass the kvImageGetTempBufferSize
908
+ * flag. The size of the temp buffer will be returned from the left hand side of the function in
909
+ * place of an error code, and no work will be done on the image data. A temp buffer can provide a speed
910
+ * improvement, if it can be allocated once and reused. This saves a bunch of VM faults on first use of
911
+ * the newly allocated temp buffer.
912
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the max filter.
913
+ * It allows the max filter to operate in a tiled fashion for tiles that do not start on the
914
+ * left edge of the source image.
915
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the max filter.
916
+ * It allows the max filter to operate in a tiled fashion for tiles that do not start on the
917
+ * top edge of the source image.
918
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
919
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
920
+ * @param flags The following flags values are allowed:
921
+ * <pre> @textblock
922
+ * kvImageNoFlags Default operation
923
+ *
924
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
925
+ * multithreading and just want the filter to run local to the current thread.
926
+ * kvImageDoNotTile will also allow the filter to run in place, though more slowly.
927
+ *
928
+ * kvImageGetTempBufferSize Return 0. Do no work.
929
+ *
930
+ * kvImageLeaveAlphaUnchanged The alpha channel (first byte of pixel in memory) is copied to the destination
931
+ * without modification, instead of having a max filter applied to it.
932
+ * @/textblock </pre>
933
+ * @return The following error codes may result:
934
+ * <pre> @textblock
935
+ * kvImageNoError Success.
936
+ * >=0 If kvImageGetTempBufferSize was among the flags, then no work was done.
937
+ * Instead, the size of the temp buffer needed is returned.
938
+ *
939
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
940
+ * dimensions in the src image
941
+ *
942
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
943
+ * @/textblock </pre>
944
+ */
945
+ VIMAGE_PF vImage_Error vImageMax_ARGBFFFF( const vImage_Buffer *src, const vImage_Buffer *dest, void *tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
946
+
947
+ /*!
948
+ * @functiongroup Min
949
+ * @discussion A min filter is a special case of an erode filter, in which the filter elements are all 0.
950
+ * This allows a much, much faster algorithm to be used.
951
+ */
952
+
953
+ /*!
954
+ * @function vImageMin_Planar8
955
+ * @abstract Apply a min filter to a Planar8 image.
956
+ * @discussion A min filter is a special case erode filter, in which the filter elements are all 0. It is much faster than the normal erode.
957
+ * <pre> @textblock
958
+ * for each pixel result[i][j] in the image{
959
+ * int r = MAX_CHANNEL_VALUE;
960
+ * for( y = 0; y < kernel_height; y++ ){
961
+ * for( x = 0; x < kernel_width; x++ ){
962
+ * r = MIN( r, src[i+y-kernel_height/2][j+x-kernel_width/2] )
963
+ * }
964
+ * }
965
+ *
966
+ * // saturate overflow to representable range
967
+ * result[i][j] = r;
968
+ * }
969
+ * @/textblock </pre>
970
+ * If only part of the min filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
971
+ * of the result tile relative to the src image.
972
+ *
973
+ * Does not work in place, unless the kvImageDoNotTile flag is used.
974
+ *
975
+ * @param src The input image
976
+ * @param dest A preallocated buffer to contain the result image
977
+ * @param tempBuffer May be NULL. An optional temp buffer in which to store temporary computation. To find the size
978
+ * of the temp buffer, call the function with the desired parameters and pass the kvImageGetTempBufferSize
979
+ * flag. The size of the temp buffer will be returned from the left hand side of the function in
980
+ * place of an error code, and no work will be done on the image data. A temp buffer can provide a speed
981
+ * improvement, if it can be allocated once and reused. This saves a bunch of VM faults on first use of
982
+ * the newly allocated temp buffer.
983
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the min filter.
984
+ * It allows the min filter to operate in a tiled fashion for tiles that do not start on the
985
+ * left edge of the source image.
986
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the min filter.
987
+ * It allows the min filter to operate in a tiled fashion for tiles that do not start on the
988
+ * top edge of the source image.
989
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
990
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
991
+ * @param flags The following flags values are allowed:
992
+ * <pre> @textblock
993
+ * kvImageNoFlags Default operation
994
+ *
995
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
996
+ * multithreading and just want the filter to run local to the current thread. It also
997
+ * allows the function to work in place, though more slowly.
998
+ *
999
+ * kvImageGetTempBufferSize Return 0. Do no work.
1000
+ * @/textblock </pre>
1001
+ * @return The following error codes may result:
1002
+ * <pre> @textblock
1003
+ * kvImageNoError Success.
1004
+ * >=0 If kvImageGetTempBufferSize was among the flags, then no work was done.
1005
+ * Instead, the size of the temp buffer needed is returned.
1006
+ *
1007
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
1008
+ * dimensions in the src image
1009
+ *
1010
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
1011
+ * @/textblock </pre>
1012
+ */
1013
+ VIMAGE_PF vImage_Error vImageMin_Planar8( const vImage_Buffer *src, const vImage_Buffer *dest, void *tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
1014
+
1015
+ /*!
1016
+ * @function vImageMin_PlanarF
1017
+ * @abstract Apply a min filter to a PlanarF image.
1018
+ * @discussion A min filter is a special case erode filter, in which the filter elements are all 0. It is much faster than the normal erode.
1019
+ * <pre> @textblock
1020
+ * for each pixel result[i][j] in the image{
1021
+ * float r = INFINITY;
1022
+ * for( y = 0; y < kernel_height; y++ ){
1023
+ * for( x = 0; x < kernel_width; x++ ){
1024
+ * r = MIN( r, src[i+y-kernel_height/2][j+x-kernel_width/2] )
1025
+ * }
1026
+ * }
1027
+ *
1028
+ * // saturate overflow to representable range
1029
+ * result[i][j] = r;
1030
+ * }
1031
+ * @/textblock </pre>
1032
+ * If only part of the min filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
1033
+ * of the result tile relative to the src image.
1034
+ *
1035
+ * Does not work in place, unless the kvImageDoNotTile flag is used.
1036
+ *
1037
+ * @param src The input image
1038
+ * @param dest A preallocated buffer to contain the result image
1039
+ * @param tempBuffer May be NULL. An optional temp buffer in which to store temporary computation. To find the size
1040
+ * of the temp buffer, call the function with the desired parameters and pass the kvImageGetTempBufferSize
1041
+ * flag. The size of the temp buffer will be returned from the left hand side of the function in
1042
+ * place of an error code, and no work will be done on the image data. A temp buffer can provide a speed
1043
+ * improvement, if it can be allocated once and reused. This saves a bunch of VM faults on first use of
1044
+ * the newly allocated temp buffer.
1045
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the min filter.
1046
+ * It allows the min filter to operate in a tiled fashion for tiles that do not start on the
1047
+ * left edge of the source image.
1048
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the min filter.
1049
+ * It allows the min filter to operate in a tiled fashion for tiles that do not start on the
1050
+ * top edge of the source image.
1051
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
1052
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
1053
+ * @param flags The following flags values are allowed:
1054
+ * <pre> @textblock
1055
+ * kvImageNoFlags Default operation
1056
+ *
1057
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
1058
+ * multithreading and just want the filter to run local to the current thread. It also
1059
+ * allows the function to work in place, though more slowly.
1060
+ *
1061
+ * kvImageGetTempBufferSize Return 0. Do no work.
1062
+ * @/textblock </pre>
1063
+ * @return The following error codes may result:
1064
+ * <pre> @textblock
1065
+ * kvImageNoError Success.
1066
+ * >=0 If kvImageGetTempBufferSize was among the flags, then no work was done.
1067
+ * Instead, the size of the temp buffer needed is returned.
1068
+ *
1069
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
1070
+ * dimensions in the src image
1071
+ *
1072
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
1073
+ * @/textblock </pre>
1074
+ */
1075
+ VIMAGE_PF vImage_Error vImageMin_PlanarF( const vImage_Buffer *src, const vImage_Buffer *dest, void *tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
1076
+
1077
+ /*!
1078
+ * @function vImageMin_ARGB8888
1079
+ * @abstract Apply a min filter to a ARGB8888 image
1080
+ * @discussion This is a special purpose erode filter for ARGB8888 data, for rectangular kernels with value 0. It is much faster than the normal erode.
1081
+ *
1082
+ * <pre> @textblock
1083
+ * for each pixel result[i][j] in the image{
1084
+ * int a = MAX_CHANNEL_VALUE;
1085
+ * int r = MAX_CHANNEL_VALUE;
1086
+ * int g = MAX_CHANNEL_VALUE;
1087
+ * int b = MAX_CHANNEL_VALUE;
1088
+ * for( y = 0; y < kernel_height; y++ ){
1089
+ * for( x = 0; x < kernel_width; x++ ){
1090
+ * a = MIN( a, src[i+y-kernel_height/2][j+x-kernel_width/2][0] )
1091
+ * r = MIN( r, src[i+y-kernel_height/2][j+x-kernel_width/2][1] )
1092
+ * g = MIN( g, src[i+y-kernel_height/2][j+x-kernel_width/2][2] )
1093
+ * b = MIN( b, src[i+y-kernel_height/2][j+x-kernel_width/2][3] )
1094
+ * }
1095
+ * }
1096
+ *
1097
+ * // saturate overflow to representable range
1098
+ * result[i][j][0] = (flags & kvImageLeaveAlphaUnchanged) ? src[i][j] : a;
1099
+ * result[i][j][1] = r;
1100
+ * result[i][j][2] = g;
1101
+ * result[i][j][3] = b;
1102
+ * }
1103
+ * @/textblock </pre>
1104
+ *
1105
+ * If only part of the min filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
1106
+ * of the result tile relative to the src image.
1107
+ *
1108
+ * If kvImageLeaveAlphaUnchanged is not used, it works for any channel order.
1109
+ * If kvImageLeaveAlphaUnchanged is used, then the alpha must be first.
1110
+ * Does not work in place, unless the kvImageDoNotTile flag is used, in which case it will probably
1111
+ * run more slowly.
1112
+ *
1113
+ * @param src The input image
1114
+ * @param dest A preallocated buffer to contain the result image
1115
+ * @param tempBuffer May be NULL. An optional temp buffer in which to store temporary computation. To find the size
1116
+ * of the temp buffer, call the function with the desired parameters and pass the kvImageGetTempBufferSize
1117
+ * flag. The size of the temp buffer will be returned from the left hand side of the function in
1118
+ * place of an error code, and no work will be done on the image data. A temp buffer can provide a speed
1119
+ * improvement, if it can be allocated once and reused. This saves a bunch of VM faults on first use of
1120
+ * the newly allocated temp buffer.
1121
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the min filter.
1122
+ * It allows the min filter to operate in a tiled fashion for tiles that do not start on the
1123
+ * left edge of the source image.
1124
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the min filter.
1125
+ * It allows the min filter to operate in a tiled fashion for tiles that do not start on the
1126
+ * top edge of the source image.
1127
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
1128
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
1129
+ * @param flags The following flags values are allowed:
1130
+ * <pre> @textblock
1131
+ * kvImageNoFlags Default operation
1132
+ *
1133
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
1134
+ * multithreading and just want the filter to run local to the current thread.
1135
+ * kvImageDoNotTile will also allow the filter to run in place, though more slowly.
1136
+ *
1137
+ * kvImageGetTempBufferSize Return 0. Do no work.
1138
+ *
1139
+ * kvImageLeaveAlphaUnchanged The alpha channel (first byte of pixel in memory) is copied to the destination
1140
+ * without modification, instead of having a min filter applied to it.
1141
+ * @/textblock </pre>
1142
+ * @return The following error codes may result:
1143
+ * <pre> @textblock
1144
+ * kvImageNoError Success.
1145
+ * >=0 If kvImageGetTempBufferSize was among the flags, then no work was done.
1146
+ * Instead, the size of the temp buffer needed is returned.
1147
+ *
1148
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
1149
+ * dimensions in the src image
1150
+ *
1151
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
1152
+ * @/textblock </pre>
1153
+ */
1154
+ VIMAGE_PF vImage_Error vImageMin_ARGB8888( const vImage_Buffer *src, const vImage_Buffer *dest, void *tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
1155
+
1156
+
1157
+ /*!
1158
+ * @function vImageMin_ARGBFFFF
1159
+ * @abstract Apply a min filter to a ARGBFFFF image
1160
+ * @discussion This is a special purpose erode filter for ARGBFFFF data, for rectangular kernels with value 0. It is much faster than the normal erode.
1161
+ *
1162
+ * <pre> @textblock
1163
+ * for each pixel result[i][j] in the image{
1164
+ * float a = INFINITY;
1165
+ * float r = INFINITY;
1166
+ * float g = INFINITY;
1167
+ * float b = INFINITY;
1168
+ * for( y = 0; y < kernel_height; y++ ){
1169
+ * for( x = 0; x < kernel_width; x++ ){
1170
+ * a = MIN( a, src[i+y-kernel_height/2][j+x-kernel_width/2][0] )
1171
+ * r = MIN( r, src[i+y-kernel_height/2][j+x-kernel_width/2][1] )
1172
+ * g = MIN( g, src[i+y-kernel_height/2][j+x-kernel_width/2][2] )
1173
+ * b = MIN( b, src[i+y-kernel_height/2][j+x-kernel_width/2][3] )
1174
+ * }
1175
+ * }
1176
+ *
1177
+ * // saturate overflow to representable range
1178
+ * result[i][j][0] = (flags & kvImageLeaveAlphaUnchanged) ? src[i][j] : a;
1179
+ * result[i][j][1] = r;
1180
+ * result[i][j][2] = g;
1181
+ * result[i][j][3] = b;
1182
+ * }
1183
+ * @/textblock </pre>
1184
+ *
1185
+ * If only part of the min filter of the entire image is desired, use srcOffsetToROI_X/Y to set the positioning
1186
+ * of the result tile relative to the src image.
1187
+ *
1188
+ * If kvImageLeaveAlphaUnchanged is not used, it works for any channel order.
1189
+ * If kvImageLeaveAlphaUnchanged is used, then the alpha must be first.
1190
+ * Does not work in place, unless the kvImageDoNotTile flag is used, in which case it will probably
1191
+ * run more slowly.
1192
+ *
1193
+ * @param src The input image
1194
+ * @param dest A preallocated buffer to contain the result image
1195
+ * @param tempBuffer May be NULL. An optional temp buffer in which to store temporary computation. To find the size
1196
+ * of the temp buffer, call the function with the desired parameters and pass the kvImageGetTempBufferSize
1197
+ * flag. The size of the temp buffer will be returned from the left hand side of the function in
1198
+ * place of an error code, and no work will be done on the image data. A temp buffer can provide a speed
1199
+ * improvement, if it can be allocated once and reused. This saves a bunch of VM faults on first use of
1200
+ * the newly allocated temp buffer.
1201
+ * @param srcOffsetToROI_X An offset added to the horizontal position in the src image when calculating the min filter.
1202
+ * It allows the min filter to operate in a tiled fashion for tiles that do not start on the
1203
+ * left edge of the source image.
1204
+ * @param srcOffsetToROI_Y An offset added to the vertical position in the src image when calculating the min filter.
1205
+ * It allows the min filter to operate in a tiled fashion for tiles that do not start on the
1206
+ * top edge of the source image.
1207
+ * @param kernel_height The height of the rectangular kernel. Must be an odd number.
1208
+ * @param kernel_width The width of the rectangular kernel. Must be an odd number.
1209
+ * @param flags The following flags values are allowed:
1210
+ * <pre> @textblock
1211
+ * kvImageNoFlags Default operation
1212
+ *
1213
+ * kvImageDoNotTile Turn off internal multithreading. Useful if, for example, you are doing your own
1214
+ * multithreading and just want the filter to run local to the current thread.
1215
+ * kvImageDoNotTile will also allow the filter to run in place, though more slowly.
1216
+ *
1217
+ * kvImageGetTempBufferSize Return 0. Do no work.
1218
+ *
1219
+ * kvImageLeaveAlphaUnchanged The alpha channel (first byte of pixel in memory) is copied to the destination
1220
+ * without modification, instead of having a min filter applied to it.
1221
+ * @/textblock </pre>
1222
+ * @return The following error codes may result:
1223
+ * <pre> @textblock
1224
+ * kvImageNoError Success.
1225
+ * >=0 If kvImageGetTempBufferSize was among the flags, then no work was done.
1226
+ * Instead, the size of the temp buffer needed is returned.
1227
+ *
1228
+ * kvImageRoiLargerThanInputBuffer dest->width and dest->height must be less than or equal to the corresponding
1229
+ * dimensions in the src image
1230
+ *
1231
+ * kvImageInvalidKernelSize The kernel_height and kernel_width must not be evenly divisible by 2.
1232
+ * @/textblock </pre>
1233
+ */
1234
+ VIMAGE_PF vImage_Error vImageMin_ARGBFFFF( const vImage_Buffer *src, const vImage_Buffer *dest, void *tempBuffer, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, vImagePixelCount kernel_height, vImagePixelCount kernel_width, vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
1235
+
1236
+
1237
+ #ifdef __cplusplus
1238
+ }
1239
+ #endif
1240
+
1241
+ #endif /* MORPHOLOGY_H */
1242
+
1243
+