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.
- package/cli/bridge-flow-runner.ts +61 -39
- package/cli/commands/agent-wrapper.ts +21 -10
- package/cli/commands/control.ts +27 -7
- package/cli/commands/coverage-swift.ts +72 -5
- package/cli/commands/coverage.ts +1 -1
- package/cli/commands/detect.ts +17 -4
- package/cli/commands/inspect/actions.ts +1 -0
- package/cli/commands/maestro-compare.ts +25 -99
- package/cli/commands/screenshot.ts +12 -0
- package/cli/help-core.ts +3 -4
- package/cli/maestro-compare.ts +172 -4
- package/cli/outbound-endpoints.ts +2 -10
- package/detox/index.ts +15 -0
- package/detox/launch-permissions.ts +169 -0
- package/dist-lib/agent-daemon-client.cjs +2 -2
- package/dist-lib/agent-events.cjs +2 -2
- package/dist-lib/attached-projects.cjs +2 -2
- package/dist-lib/auth/shared-session.cjs +2 -2
- package/dist-lib/backend-origin.cjs +2 -2
- package/dist-lib/beta.cjs +2 -2
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +2 -2
- package/dist-lib/bridge-contract-input.cjs +2 -2
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -2
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +6729 -3591
- package/dist-lib/capture-contract.cjs +2 -2
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +2 -2
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +2 -2
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +2 -2
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +2 -2
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +104 -3
- package/dist-lib/dev-bundle-resolution.cjs +208 -44
- package/dist-lib/expo-swift-bundle.cjs +3475 -2137
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +2 -2
- package/dist-lib/host/bridge-host.cjs +8970 -3652
- package/dist-lib/host/fetch-proxy-handler.cjs +332 -40
- package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +2 -2
- package/dist-lib/host/websocket-proxy.cjs +2 -2
- package/dist-lib/index.cjs +469 -143
- package/dist-lib/jump-to-source-babel.cjs +2 -2
- package/dist-lib/jump-to-source-native.cjs +2 -2
- package/dist-lib/kotlin-host.cjs +2 -2
- package/dist-lib/menu.cjs +2 -2
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +2 -2
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +2 -2
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +465 -139
- package/dist-lib/native-app-identity-project.cjs +209 -86
- package/dist-lib/native-app-identity-project.mjs +251 -116
- package/dist-lib/native-app-identity.cjs +2 -2
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +2 -2
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +2 -2
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +2 -2
- package/dist-lib/public-brand.cjs +2 -2
- package/dist-lib/public-origins-lib-esm.json +27 -23
- package/dist-lib/public-origins-lib.json +221 -88
- package/dist-lib/react-native-host-modules.cjs +2 -2
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +206 -31
- package/dist-lib/sdk.cjs +3 -3
- package/dist-lib/sdk.mjs +2 -2
- package/dist-lib/skills.cjs +20997 -16596
- package/dist-lib/swift-compile.cjs +3075 -459
- package/dist-lib/swift-compile.mjs +3028 -415
- package/dist-lib/swift-package.cjs +131 -69
- package/dist-lib/swift-package.mjs +126 -68
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +31 -4
- package/dist-lib/swift.cjs +2 -2
- package/dist-lib/vite-swift.cjs +5049 -1704
- package/dist-lib/vite.cjs +261 -58
- package/dist-lib/worklet-executable.cjs +8 -5
- package/dist-lib/worklet-executable.mjs +7 -4
- package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +15 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -0
- package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +6 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -2
- package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +3 -0
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +4 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +11 -220
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -6
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLAvailability.h +22 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBackgroundActivitySession.h +145 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityCondition.h +113 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +225 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBody.h +26 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularGeographicCondition.h +59 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +64 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCondition.h +48 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h +52 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h +24 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +55 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +117 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocation.h +9 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +45 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +877 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +225 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceError.h +33 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceExtension.h +28 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationUpdater.h +250 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitor.h +140 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitorConfiguration.h +77 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringEvent.h +184 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringRecord.h +57 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLServiceSession.h +211 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +66 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.h +46 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Modules/module.modulemap +7 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +98 -3
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h +52 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +240 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h +474 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceTypes.h +66 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Modules/module.modulemap +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4AccelerationStructure.h +9 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Archive.h +16 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ArgumentTable.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h +14 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h +79 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandAllocator.h +15 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h +16 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h +15 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CompilerTask.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4FunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkingDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MeshRenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPass.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4SpecializedFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4StitchedFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4TileRenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h +1212 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h +322 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h +224 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h +279 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h +199 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h +142 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h +266 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h +82 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h +113 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h +43 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h +449 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h +148 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h +102 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h +350 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h +90 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h +274 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h +225 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h +232 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h +39 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h +93 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h +1122 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h +29 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h +36 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h +81 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLEvent.h +79 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h +30 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h +95 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h +29 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h +131 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLGPUAddress.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h +284 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h +11 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h +157 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h +110 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h +549 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h +57 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h +65 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h +57 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h +342 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h +323 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h +1068 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h +411 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h +788 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h +141 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h +307 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h +125 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h +85 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceViewPool.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h +252 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h +158 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h +460 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTextureViewPool.h +18 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h +125 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h +153 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h +45 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/Metal.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +4 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTDefines.h +35 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTTagClass.h +33 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTType.h +504 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLEssentialsAvailability.h +14 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +444 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/LocationEssentials.h +14 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Modules/module.modulemap +14 -0
- package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
- package/sdk/ios/usr/include/complex.h +167 -0
- package/sdk/ios/usr/include/copyfile.h +143 -0
- package/sdk/ios/usr/include/dispatch/dispatch.h +5 -0
- package/sdk/ios/usr/include/mach/mach_types.h +1 -0
- package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
- package/sdk/ios/usr/include/malloc/_platform.h +80 -0
- package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
- package/sdk/ios/usr/include/malloc/malloc.h +768 -0
- package/sdk/ios/usr/include/math.h +835 -2
- package/sdk/ios/usr/include/os/availability.h +168 -6
- package/sdk/ios/usr/include/os/base.h +351 -0
- package/sdk/ios/usr/include/os/clock.h +18 -0
- package/sdk/ios/usr/include/os/lock.h +232 -10
- package/sdk/ios/usr/include/os/log.h +521 -38
- package/sdk/ios/usr/include/os/object.h +320 -3
- package/sdk/ios/usr/include/os/trace.h +492 -0
- package/sdk/ios/usr/include/os/trace_base.h +167 -0
- package/sdk/ios/usr/include/os/workgroup.h +37 -0
- package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
- package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
- package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
- package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
- package/sdk/ios/usr/include/sys/cdefs.h +38 -1
- package/sdk/ios/wasm/include/unistd.h +3 -0
- package/skills/contrast/SKILL.md +3 -0
- package/src/codex-client.ts +11 -6
- package/src/dev-bundle-resolution.ts +124 -48
- package/src/expo-native-workspace.ts +176 -0
- package/src/expo-swift-host.ts +161 -26
- package/src/expo-swift-ready.ts +14 -28
- package/src/expoSwiftContract.ts +4 -1
- package/src/generated/swift-c-predefines.json +2044 -0
- package/src/host/bridge-host.ts +5 -0
- package/src/installed-package-versions.ts +14 -1
- package/src/metro-project-root.ts +44 -33
- package/src/native-app-identity-project.ts +1 -0
- package/src/nitro-adapter.lock.json +916 -10
- package/src/nitro-adapter.ts +33 -24
- package/src/nitro-bundle.ts +108 -21
- package/src/nitro-compile.ts +36 -5
- package/src/nitro-source.ts +13 -3
- package/src/nitroAdapterContract.ts +100 -20
- package/src/nitroContract.ts +18 -2
- package/src/node-http-fetch.ts +116 -0
- package/src/packageVersionsContract.ts +46 -0
- package/src/serverDiscoveryContract.ts +1 -0
- package/src/settingsContract.ts +0 -30
- package/src/swift-binary-modules.ts +20 -5
- package/src/swift-compile.ts +598 -81
- package/src/swift-coverage/package.ts +3 -1
- package/src/swift-coverage/xcode-assets.ts +66 -5
- package/src/swift-coverage/xcode-packages.ts +11 -6
- package/src/swift-host.ts +347 -60
- package/src/swift-objc-compile.ts +52 -10
- package/src/swift-objc-metadata.ts +2 -2
- package/src/swift-objc-platform.ts +2 -2
- package/src/swift-objc-standin.ts +53 -13
- package/src/swift-package-manifest.ts +151 -28
- package/src/swift-package.ts +158 -75
- package/src/swift-packages.ts +141 -44
- package/src/swift-source-file.ts +10 -15
- package/src/swift-source-pods.ts +126 -41
- package/src/swift-standin-digest.ts +77 -0
- package/src/swift-standin-emit.ts +40 -4
- package/src/swift-standins.ts +154 -31
- package/src/swift-submit.ts +5 -0
- package/src/swift-toolchain.ts +38 -0
- package/src/swiftContract.ts +168 -75
- package/src/target-matcher.ts +15 -2
- package/src/vite-plugin.ts +0 -10
- package/src/worklet-executable.ts +7 -3
- package/src/xcode-json-project.ts +14 -2
- package/src/xcode-project.ts +215 -100
- package/src/settings-flags.ts +0 -107
|
@@ -0,0 +1,1369 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @header Histogram.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) 2003-2016 by Apple Inc. All rights reserved.
|
|
8
|
+
*
|
|
9
|
+
* @discussion Exports interfaces for collecting histograms of images, and causing images to conform to histograms.
|
|
10
|
+
*
|
|
11
|
+
* @ignorefuncmacro VIMAGE_NON_NULL
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
#ifndef VIMAGE_HISTOGRAM_H
|
|
15
|
+
#define VIMAGE_HISTOGRAM_H
|
|
16
|
+
|
|
17
|
+
#ifdef __cplusplus
|
|
18
|
+
extern "C" {
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
#include <vImage/vImage_Types.h>
|
|
22
|
+
|
|
23
|
+
/*!
|
|
24
|
+
* @functiongroup Histogram Calculation
|
|
25
|
+
* @discussion These functions build a histogram of the frequency of occurence of
|
|
26
|
+
* each channel value in the provided image.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/*!
|
|
30
|
+
* @function vImageHistogramCalculation_Planar8
|
|
31
|
+
*
|
|
32
|
+
* @abstract Calculates a histogram for a Planar8 image.
|
|
33
|
+
*
|
|
34
|
+
* @discussion This function performs the following operation:
|
|
35
|
+
* <pre>@textblock
|
|
36
|
+
* For each pixel, do the following:
|
|
37
|
+
* histogram[src[x]]++;
|
|
38
|
+
* @/textblock</pre>
|
|
39
|
+
*
|
|
40
|
+
* This routine will not work in place
|
|
41
|
+
*
|
|
42
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
43
|
+
*
|
|
44
|
+
* @param histogram A pointer to a histogram. On return, this array will
|
|
45
|
+
* contain the histogram for the source image.
|
|
46
|
+
* The histogram will be an array with 256 elements.
|
|
47
|
+
*
|
|
48
|
+
* @param flags The following flags are allowed:
|
|
49
|
+
* <pre>@textblock
|
|
50
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
51
|
+
* wish to do this if you have your own
|
|
52
|
+
* multithreading scheme to avoid having the
|
|
53
|
+
* two interfere with one another.
|
|
54
|
+
* @/textblock</pre>
|
|
55
|
+
*
|
|
56
|
+
* @return The following error codes may be returned
|
|
57
|
+
* <pre>@textblock
|
|
58
|
+
* kvImageNoError Success!
|
|
59
|
+
* kvImageNullPointerArgument src or histogram pointer is NULL.
|
|
60
|
+
* @/textblock</pre>
|
|
61
|
+
*/
|
|
62
|
+
VIMAGE_PF vImage_Error
|
|
63
|
+
vImageHistogramCalculation_Planar8(
|
|
64
|
+
const vImage_Buffer *src,
|
|
65
|
+
vImagePixelCount *histogram,
|
|
66
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
67
|
+
|
|
68
|
+
/*!
|
|
69
|
+
* @function vImageHistogramCalculation_PlanarF
|
|
70
|
+
*
|
|
71
|
+
* @abstract Calculates a histogram for a PlanarF image.
|
|
72
|
+
* @discussion This function performs the following operation:
|
|
73
|
+
* <pre>@textblock
|
|
74
|
+
* For each pixel, do the following:
|
|
75
|
+
* val = histogram_entries * (src[x] - minVal) / (maxVal - minVal);
|
|
76
|
+
* i = clip val between 0 and histogram_entries-1
|
|
77
|
+
* histogram[i]++;
|
|
78
|
+
* @/textblock</pre>
|
|
79
|
+
*
|
|
80
|
+
* This routine will not work in place
|
|
81
|
+
*
|
|
82
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
83
|
+
*
|
|
84
|
+
* @param histogram A pointer to a histogram. On return, this array will
|
|
85
|
+
* contain the histogram for the source image.
|
|
86
|
+
* The histogram will have histogram_entries elements.
|
|
87
|
+
*
|
|
88
|
+
* @param histogram_entries The number of histogram entries, or bins.
|
|
89
|
+
* The histogram will be an array with histogram_entries elements.
|
|
90
|
+
*
|
|
91
|
+
* @param minVal A minimum pixel value. Any pixel value less than this will be
|
|
92
|
+
* clipped to this value (for the purposes of histogram calculation),
|
|
93
|
+
* and assigned to the first histogram entry. src is not modified.
|
|
94
|
+
*
|
|
95
|
+
* @param maxVal A maximum pixel value. Any pixel value greater than this will
|
|
96
|
+
* be clipped to this value (for the purposes of histogram calculation),
|
|
97
|
+
* and assigned to the last histogram entry. src is not modified.
|
|
98
|
+
*
|
|
99
|
+
* @param flags The following flags are allowed:
|
|
100
|
+
* <pre>@textblock
|
|
101
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
102
|
+
* wish to do this if you have your own
|
|
103
|
+
* multithreading scheme to avoid having the
|
|
104
|
+
* two interfere with one another.
|
|
105
|
+
* @/textblock</pre>
|
|
106
|
+
*
|
|
107
|
+
* @return The following error codes may occur:
|
|
108
|
+
* <pre>@textblock
|
|
109
|
+
* kvImageNoError Success!
|
|
110
|
+
* kvImageInvalidParameter maxVal is less than minVal or histogram_entries is 0
|
|
111
|
+
* kvImageNullPointerArgument src or histogram pointer is NULL.
|
|
112
|
+
* @/textblock</pre>
|
|
113
|
+
*/
|
|
114
|
+
VIMAGE_PF vImage_Error
|
|
115
|
+
vImageHistogramCalculation_PlanarF(
|
|
116
|
+
const vImage_Buffer *src,
|
|
117
|
+
vImagePixelCount *histogram,
|
|
118
|
+
unsigned int histogram_entries,
|
|
119
|
+
Pixel_F minVal,
|
|
120
|
+
Pixel_F maxVal,
|
|
121
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
122
|
+
|
|
123
|
+
/*!
|
|
124
|
+
* @function vImageHistogramCalculation_ARGB8888
|
|
125
|
+
*
|
|
126
|
+
* @abstract Calculates histograms for each channel of an ARGB8888 image.
|
|
127
|
+
* @discussion This function performs the following operation:
|
|
128
|
+
* <pre>@textblock
|
|
129
|
+
*
|
|
130
|
+
* For each pixel and channel, do the following:
|
|
131
|
+
* val = src[x];
|
|
132
|
+
* histogram[ch][val[ch]]++;
|
|
133
|
+
*
|
|
134
|
+
* @/textblock</pre>
|
|
135
|
+
*
|
|
136
|
+
* This routine will not work in place
|
|
137
|
+
*
|
|
138
|
+
* All four channel histogram functions (i.e. those that support ARGB8888 or ARGBFFFF images)
|
|
139
|
+
* work equally well on four channel images with other channel orderings such as RGBA8888 or BGRAFFFF.
|
|
140
|
+
* The ordering of the histogram will match the channel order of the image.
|
|
141
|
+
*
|
|
142
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
143
|
+
*
|
|
144
|
+
* @param histogram A pointer to a histograms, one each for alpha, red, green, and blue (in that order).
|
|
145
|
+
* On return, this array will contain the four histograms for the corresponding channels.
|
|
146
|
+
* Each of the four histograms will be an array with 256 elements.
|
|
147
|
+
* This function does not allocate storage for the histograms. You must allocate
|
|
148
|
+
* storage for each of the four histograms, create an array and populate it with
|
|
149
|
+
* pointers to the histograms before calling the function.
|
|
150
|
+
*
|
|
151
|
+
* @param flags The following flags are allowed:
|
|
152
|
+
* <pre>@textblock
|
|
153
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
154
|
+
* wish to do this if you have your own
|
|
155
|
+
* multithreading scheme to avoid having the
|
|
156
|
+
* two interfere with one another.
|
|
157
|
+
*
|
|
158
|
+
* kvImageLeaveAlphaUnchanged Do not calculate the histogram for the alpha channel
|
|
159
|
+
* @/textblock</pre>
|
|
160
|
+
*
|
|
161
|
+
* @return The following error codes may occur
|
|
162
|
+
* <pre>@textblock
|
|
163
|
+
* kvImageNoError Success!
|
|
164
|
+
* kvImageNullPointerArgument src or histogram pointer is NULL.
|
|
165
|
+
* @/textblock</pre>
|
|
166
|
+
*/
|
|
167
|
+
VIMAGE_PF vImage_Error
|
|
168
|
+
vImageHistogramCalculation_ARGB8888(
|
|
169
|
+
const vImage_Buffer *src,
|
|
170
|
+
vImagePixelCount *histogram[4],
|
|
171
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
172
|
+
|
|
173
|
+
/*!
|
|
174
|
+
* @function vImageHistogramCalculation_ARGBFFFF
|
|
175
|
+
*
|
|
176
|
+
* @abstract Calculates histograms for each channel of an ARGBFFFF image.
|
|
177
|
+
* @discussion This function performs the following operation:
|
|
178
|
+
* <pre>@textblock
|
|
179
|
+
* For each pixel, do the following:
|
|
180
|
+
* val = src[x];
|
|
181
|
+
* For each channel do:
|
|
182
|
+
* i = histogram_entries * (val[ch] - minVal) / (maxVal - minVal);
|
|
183
|
+
* i = clip i between 0 and histogram_entries-1
|
|
184
|
+
* histogram[ch][i]++;
|
|
185
|
+
* @/textblock</pre>
|
|
186
|
+
*
|
|
187
|
+
* This routine will not work in place
|
|
188
|
+
*
|
|
189
|
+
* All four channel histogram functions (i.e. those that support ARGB8888 or ARGBFFFF images)
|
|
190
|
+
* work equally well on four channel images with other channel orderings such as RGBA8888 or BGRAFFFF.
|
|
191
|
+
* The ordering of the histogram will match the channel order of the image.
|
|
192
|
+
*
|
|
193
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
194
|
+
*
|
|
195
|
+
* @param histogram A pointer to an array of four histograms,
|
|
196
|
+
* one each for alpha, red, green, and blue (in that order).
|
|
197
|
+
* On return, this array will contain the four histograms for the corresponding channels.
|
|
198
|
+
* Each of the four histograms will be an array with histogram_entries elements.
|
|
199
|
+
* This function does not allocate storage for the histograms. You must allocate
|
|
200
|
+
* storage for each of the four histograms, create an array and populate it with
|
|
201
|
+
* pointers to the histograms before calling the function.
|
|
202
|
+
*
|
|
203
|
+
* @param histogram_entries The number of histogram entries, or bins. Each of the four
|
|
204
|
+
* calculated histograms will be an array with histogram_entries elements.
|
|
205
|
+
*
|
|
206
|
+
* @param minVal A minimum pixel value. Any pixel value less than this will be clipped to this value
|
|
207
|
+
* (for the purposes of histogram calculation), and assigned to the first histogram entry.
|
|
208
|
+
* This minimum value is applied to each of the four channels separately.
|
|
209
|
+
*
|
|
210
|
+
* @param maxVal A maximum pixel value. Any pixel value greater than this will be clipped to this value
|
|
211
|
+
* (for the purposes of histogram calculation), and assigned to the last histogram entry.
|
|
212
|
+
* This maximum value is applied to each of the four channels separately.
|
|
213
|
+
*
|
|
214
|
+
* @param flags The following flags are allowed:
|
|
215
|
+
* <pre>@textblock
|
|
216
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
217
|
+
* wish to do this if you have your own
|
|
218
|
+
* multithreading scheme to avoid having the
|
|
219
|
+
* two interfere with one another.
|
|
220
|
+
*
|
|
221
|
+
* kvImageLeaveAlphaUnchanged Do not calculate the histogram for the alpha channel
|
|
222
|
+
* @/textblock</pre>
|
|
223
|
+
*
|
|
224
|
+
* @return The following error codes may be returned:
|
|
225
|
+
* <pre>@textblock
|
|
226
|
+
* kvImageNoError Success!
|
|
227
|
+
* kvImageInvalidParameter maxVal is less than minVal or histogram_entries is 0
|
|
228
|
+
* kvImageNullPointerArgument src or any of the histogram pointers is NULL.
|
|
229
|
+
* @/textblock</pre>
|
|
230
|
+
*
|
|
231
|
+
*/
|
|
232
|
+
VIMAGE_PF vImage_Error
|
|
233
|
+
vImageHistogramCalculation_ARGBFFFF(
|
|
234
|
+
const vImage_Buffer *src,
|
|
235
|
+
vImagePixelCount *histogram[4],
|
|
236
|
+
unsigned int histogram_entries,
|
|
237
|
+
Pixel_F minVal,
|
|
238
|
+
Pixel_F maxVal,
|
|
239
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
/*!
|
|
243
|
+
* @functiongroup Histogram Equalization
|
|
244
|
+
* @discussion These functions attempt to change an image such that its histogram
|
|
245
|
+
* contains an even distribution of values.
|
|
246
|
+
*/
|
|
247
|
+
|
|
248
|
+
/*!
|
|
249
|
+
* @function vImageEqualization_Planar8
|
|
250
|
+
*
|
|
251
|
+
* @abstract Equalizes the histogram of a Planar8 source image.
|
|
252
|
+
* @discussion This function performs the following operation:
|
|
253
|
+
* <pre>@textblock
|
|
254
|
+
* Compute the histogram of the input image;
|
|
255
|
+
* Calculate normalized sum of histogram;
|
|
256
|
+
* For each pixel, do the following:
|
|
257
|
+
* dest[x] = equalized_histogram[src[x]];
|
|
258
|
+
* @/textblock</pre>
|
|
259
|
+
*
|
|
260
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
261
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
262
|
+
* kvImageDoNotTile
|
|
263
|
+
*
|
|
264
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
265
|
+
*
|
|
266
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
267
|
+
*
|
|
268
|
+
* @param flags The following flags are allowed:
|
|
269
|
+
* <pre>@textblock
|
|
270
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
271
|
+
* wish to do this if you have your own
|
|
272
|
+
* multithreading scheme to avoid having the
|
|
273
|
+
* two interfere with one another.
|
|
274
|
+
* @/textblock</pre>
|
|
275
|
+
*
|
|
276
|
+
* @return The following error codes may be returned:
|
|
277
|
+
* <pre>@textblock
|
|
278
|
+
* kvImageNoError Success!
|
|
279
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match
|
|
280
|
+
* kvImageNullPointerArgument src or dest pointer is NULL.
|
|
281
|
+
* @/textblock</pre>
|
|
282
|
+
*/
|
|
283
|
+
VIMAGE_PF vImage_Error
|
|
284
|
+
vImageEqualization_Planar8(
|
|
285
|
+
const vImage_Buffer *src,
|
|
286
|
+
const vImage_Buffer *dest,
|
|
287
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
288
|
+
|
|
289
|
+
/*!
|
|
290
|
+
* @function vImageEqualization_PlanarF
|
|
291
|
+
*
|
|
292
|
+
* @abstract Equalizes the histogram of a PlanarF source image.
|
|
293
|
+
* @discussion This function performs the following operation:
|
|
294
|
+
* <pre>@textblock
|
|
295
|
+
* Compute the histogram of the input image:
|
|
296
|
+
* For each pixel, do the following:
|
|
297
|
+
* val = histogram_entries * (src[x] - minVal) / (maxVal - minVal);
|
|
298
|
+
* i = clip val between 0 and histogram_entries-1
|
|
299
|
+
* histogram[i]++;
|
|
300
|
+
* Calculate normalized sum of histogram;
|
|
301
|
+
* For each pixel, do the following:
|
|
302
|
+
* val = histogram_entries * (src[x] - minVal) / (maxVal - minVal);
|
|
303
|
+
* i = clip val between 0 and histogram_entries-1
|
|
304
|
+
* dest[x] = equalized_histogram[i];
|
|
305
|
+
* @/textblock</pre>
|
|
306
|
+
*
|
|
307
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
308
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
309
|
+
* kvImageDoNotTile
|
|
310
|
+
*
|
|
311
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
312
|
+
*
|
|
313
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
314
|
+
*
|
|
315
|
+
* @param tempBuffer A pointer to a temporary buffer. If you pass NULL, the function allocates the buffer,
|
|
316
|
+
* then deallocates it before returning. Alternatively, you can allocate the buffer yourself,
|
|
317
|
+
* in which case you are responsible for deallocating it when you is no longer need it.
|
|
318
|
+
* If you want to allocate the buffer yourself, see the documentation for information
|
|
319
|
+
* on how to determine the minimum size that you must allocate.
|
|
320
|
+
*
|
|
321
|
+
* @param histogram_entries The number of histogram entries, or bins.
|
|
322
|
+
* The histogram will be an array with histogram_entries elements.
|
|
323
|
+
*
|
|
324
|
+
* @param minVal A minimum pixel value. Any pixel value less than this will be
|
|
325
|
+
* clipped to this value (for the purposes of histogram calculation),
|
|
326
|
+
* and assigned to the first histogram entry.
|
|
327
|
+
*
|
|
328
|
+
* @param maxVal A maximum pixel value. Any pixel value greater than this will
|
|
329
|
+
* be clipped to this value (for the purposes of histogram calculation),
|
|
330
|
+
* and assigned to the last histogram entry.
|
|
331
|
+
*
|
|
332
|
+
* @param flags The following flags are allowed:
|
|
333
|
+
* <pre>@textblock
|
|
334
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
335
|
+
* wish to do this if you have your own
|
|
336
|
+
* multithreading scheme to avoid having the
|
|
337
|
+
* two interfere with one another.
|
|
338
|
+
*
|
|
339
|
+
* kvImageGetTempBufferSize If this is passed, then the size of a temp
|
|
340
|
+
* buffer is returned from the left hand side
|
|
341
|
+
* of the function and no other work is done.
|
|
342
|
+
* An error may still be returned in this case.
|
|
343
|
+
* All vImage errors are < 0. 0 may also be
|
|
344
|
+
* returned, indicating that the temp buffer
|
|
345
|
+
* size is 0 for this set of parameters on
|
|
346
|
+
* this device with this operating system at
|
|
347
|
+
* this time of day.
|
|
348
|
+
* @/textblock</pre>
|
|
349
|
+
*
|
|
350
|
+
* @return The following values may be returned:
|
|
351
|
+
* <pre>@textblock
|
|
352
|
+
* >= 0 Minimum temp buffer size, if kvImageGetTempBufferSize was specified.
|
|
353
|
+
* kvImageNoError Success!
|
|
354
|
+
* kvImageInvalidParameter maxVal is less than minVal or histogram_entries is 0
|
|
355
|
+
* kvImageNullPointerArgument src or histogram pointer is NULL.
|
|
356
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match.
|
|
357
|
+
* kvImageMemoryAllocationError Can not allocate memory for the buffer.
|
|
358
|
+
* @/textblock</pre>
|
|
359
|
+
*/
|
|
360
|
+
VIMAGE_PF vImage_Error
|
|
361
|
+
vImageEqualization_PlanarF(
|
|
362
|
+
const vImage_Buffer *src,
|
|
363
|
+
const vImage_Buffer *dest,
|
|
364
|
+
void *tempBuffer,
|
|
365
|
+
unsigned int histogram_entries,
|
|
366
|
+
Pixel_F minVal,
|
|
367
|
+
Pixel_F maxVal,
|
|
368
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
369
|
+
|
|
370
|
+
/*!
|
|
371
|
+
* @function vImageEqualization_ARGB8888
|
|
372
|
+
*
|
|
373
|
+
* @abstract Equalizes the histogram of an ARGB8888 source image.
|
|
374
|
+
* @discussion This function performs the following operation:
|
|
375
|
+
* <pre>@textblock
|
|
376
|
+
* Calculates histograms for each channel of the ARGB8888 source image;
|
|
377
|
+
* Calculate normalized sum of each histogram;
|
|
378
|
+
* For each pixel do the following:
|
|
379
|
+
* val = src[x];
|
|
380
|
+
* For each channel:
|
|
381
|
+
* val[ch] = equalized_histogram[ch][val[ch]];
|
|
382
|
+
* dest[x] = val;
|
|
383
|
+
* @/textblock</pre>
|
|
384
|
+
*
|
|
385
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
386
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
387
|
+
* kvImageDoNotTile
|
|
388
|
+
*
|
|
389
|
+
* All four channel histogram functions (i.e. those that support ARGB8888 or ARGBFFFF images)
|
|
390
|
+
* work equally well on four channel images with other channel orderings such as RGBA8888 or BGRAFFFF.
|
|
391
|
+
*
|
|
392
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
393
|
+
*
|
|
394
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
395
|
+
*
|
|
396
|
+
* @param flags The following flags are allowed:
|
|
397
|
+
* <pre>@textblock
|
|
398
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
399
|
+
* wish to do this if you have your own
|
|
400
|
+
* multithreading scheme to avoid having the
|
|
401
|
+
* two interfere with one another.
|
|
402
|
+
*
|
|
403
|
+
* kvImageLeaveAlphaUnchanged Copy the alpha channel to the destination image unchanged
|
|
404
|
+
* @/textblock</pre>
|
|
405
|
+
*
|
|
406
|
+
* @return The following error codes may be returned
|
|
407
|
+
* <pre>@textblock
|
|
408
|
+
* kvImageNoError Success!
|
|
409
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match
|
|
410
|
+
* kvImageNullPointerArgument src or dest pointer is NULL.
|
|
411
|
+
* @/textblock</pre>
|
|
412
|
+
*/
|
|
413
|
+
VIMAGE_PF vImage_Error
|
|
414
|
+
vImageEqualization_ARGB8888(
|
|
415
|
+
const vImage_Buffer *src,
|
|
416
|
+
const vImage_Buffer *dest,
|
|
417
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
418
|
+
|
|
419
|
+
/*!
|
|
420
|
+
* @function vImageEqualization_ARGBFFFF
|
|
421
|
+
*
|
|
422
|
+
* @abstract Equalizes the histogram of an ARGBFFFF source image.
|
|
423
|
+
* @discussion This function performs the following operation:
|
|
424
|
+
* <pre>@textblock
|
|
425
|
+
* Compute the histogram of the input image:
|
|
426
|
+
* For each pixel, do the following:
|
|
427
|
+
* val = src[x];
|
|
428
|
+
* For each channel do:
|
|
429
|
+
* i = histogram_entries * (val[ch] - minVal) / (maxVal - minVal);
|
|
430
|
+
* i = clip i between 0 and histogram_entries-1
|
|
431
|
+
* histogram[ch][i]++;
|
|
432
|
+
*
|
|
433
|
+
* Calculate normalized sum of each histogram;
|
|
434
|
+
*
|
|
435
|
+
* For each pixel, do the following:
|
|
436
|
+
* val = src[x];
|
|
437
|
+
* For each channel do:
|
|
438
|
+
* i = histogram_entries * (val[ch] - minVal) / (maxVal - minVal);
|
|
439
|
+
* i = clip i between 0 and histogram_entries-1
|
|
440
|
+
* val[ch] = equalized_histogram[ch][i];
|
|
441
|
+
* dest[x] = val;
|
|
442
|
+
* @/textblock</pre>
|
|
443
|
+
*
|
|
444
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
445
|
+
*
|
|
446
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
447
|
+
*
|
|
448
|
+
* @param tempBuffer A pointer to a temporary buffer. If you pass NULL, the function allocates the buffer,
|
|
449
|
+
* then deallocates it before returning. Alternatively, you can allocate the buffer yourself,
|
|
450
|
+
* in which case you are responsible for deallocating it when you is no longer need it.
|
|
451
|
+
* If you want to allocate the buffer yourself, see the documentation for information
|
|
452
|
+
* on how to determine the minimum size that you must allocate.
|
|
453
|
+
*
|
|
454
|
+
* @param histogram_entries The number of histogram entries, or bins, to be used in histograms for this operation
|
|
455
|
+
*
|
|
456
|
+
* @param minVal A minimum pixel value. Any pixel value less than this will be clipped to this value
|
|
457
|
+
* (for the purposes of histogram calculation), and assigned to the first histogram entry.
|
|
458
|
+
* This minimum value is applied to each of the four channels separately.
|
|
459
|
+
*
|
|
460
|
+
* @param maxVal A maximum pixel value. Any pixel value greater than this will be clipped to this value
|
|
461
|
+
* (for the purposes of histogram calculation), and assigned to the last histogram entry.
|
|
462
|
+
* This maximum value is applied to each of the four channels separately.
|
|
463
|
+
*
|
|
464
|
+
* @param flags The following flags are allowed:
|
|
465
|
+
* <pre>@textblock
|
|
466
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
467
|
+
* wish to do this if you have your own
|
|
468
|
+
* multithreading scheme to avoid having the
|
|
469
|
+
* two interfere with one another.
|
|
470
|
+
*
|
|
471
|
+
* kvImageGetTempBufferSize If this is passed, then the size of a temp
|
|
472
|
+
* buffer is returned from the left hand side
|
|
473
|
+
* of the function and no other work is done.
|
|
474
|
+
* An error may still be returned in this case.
|
|
475
|
+
* All vImage errors are < 0. 0 may also be
|
|
476
|
+
* returned, indicating that the temp buffer
|
|
477
|
+
* size is 0 for this set of parameters on
|
|
478
|
+
* this device with this operating system at
|
|
479
|
+
* this time of day.
|
|
480
|
+
*
|
|
481
|
+
* kvImageLeaveAlphaUnchanged Copy the alpha channel to the destination image unchanged
|
|
482
|
+
* @/textblock</pre>
|
|
483
|
+
*
|
|
484
|
+
* @return The following error codes may be returned
|
|
485
|
+
* <pre>@textblock
|
|
486
|
+
* >= 0 Minimum temp buffer size, if kvImageGetTempBufferSize was specified.
|
|
487
|
+
* kvImageNoError Success!
|
|
488
|
+
* kvImageInvalidParameter maxVal is less than minVal or histogram_entries is 0
|
|
489
|
+
* kvImageNullPointerArgument src or dest pointer is NULL.
|
|
490
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match.
|
|
491
|
+
* kvImageMemoryAllocationError Can not allocate memory for the buffer.
|
|
492
|
+
* @/textblock</pre>
|
|
493
|
+
*
|
|
494
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
495
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
496
|
+
* kvImageDoNotTile
|
|
497
|
+
*
|
|
498
|
+
* All four channel histogram functions (i.e. those that support ARGB8888 or ARGBFFFF images)
|
|
499
|
+
* work equally well on four channel images with other channel orderings such as RGBA8888 or BGRAFFFF.
|
|
500
|
+
*/
|
|
501
|
+
VIMAGE_PF vImage_Error
|
|
502
|
+
vImageEqualization_ARGBFFFF(
|
|
503
|
+
const vImage_Buffer *src,
|
|
504
|
+
const vImage_Buffer *dest,
|
|
505
|
+
void *tempBuffer,
|
|
506
|
+
unsigned int histogram_entries,
|
|
507
|
+
Pixel_F minVal,
|
|
508
|
+
Pixel_F maxVal,
|
|
509
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
/*!
|
|
513
|
+
* @functiongroup Histogram Specification
|
|
514
|
+
* @discussion These functions cause the source image pixel distribution to conform to the
|
|
515
|
+
* desired histogram.
|
|
516
|
+
*/
|
|
517
|
+
|
|
518
|
+
/*!
|
|
519
|
+
* @function vImageHistogramSpecification_Planar8
|
|
520
|
+
*
|
|
521
|
+
* @abstract Performs a histogram specification operation on a Planar8 source image.
|
|
522
|
+
* @discussion This function performs the following operation:
|
|
523
|
+
* <pre>@textblock
|
|
524
|
+
* Compute the histogram of the input image;
|
|
525
|
+
* Calculate normalized sum of the input histogram and the desired_histogram
|
|
526
|
+
* Generate the inverse transform
|
|
527
|
+
* Transform final image using inv_hist as a LUT. For each pixel, do the following:
|
|
528
|
+
* dest[x] = inv_histogram[src[x]];
|
|
529
|
+
* @/textblock</pre>
|
|
530
|
+
*
|
|
531
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
532
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
533
|
+
* kvImageDoNotTile
|
|
534
|
+
*
|
|
535
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
536
|
+
*
|
|
537
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
538
|
+
*
|
|
539
|
+
* @param desired_histogram A pointer to the desired histogram for the transformed image.
|
|
540
|
+
* The histogram should be an array with 256 elements.
|
|
541
|
+
*
|
|
542
|
+
* @param flags The following flags are allowed:
|
|
543
|
+
* <pre>@textblock
|
|
544
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
545
|
+
* wish to do this if you have your own
|
|
546
|
+
* multithreading scheme to avoid having the
|
|
547
|
+
* two interfere with one another.
|
|
548
|
+
* @/textblock</pre>
|
|
549
|
+
*
|
|
550
|
+
* @return The following error codes may occur:
|
|
551
|
+
* <pre>@textblock
|
|
552
|
+
* kvImageNoError Success!
|
|
553
|
+
* kvImageBufferSizeMismatch sizes of the src and dest images do not match
|
|
554
|
+
* kvImageNullPointerArgument src, dest or desired_histogram pointer is NULL.
|
|
555
|
+
* @/textblock</pre>
|
|
556
|
+
*/
|
|
557
|
+
VIMAGE_PF vImage_Error
|
|
558
|
+
vImageHistogramSpecification_Planar8(
|
|
559
|
+
const vImage_Buffer *src,
|
|
560
|
+
const vImage_Buffer *dest,
|
|
561
|
+
const vImagePixelCount *desired_histogram,
|
|
562
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2,3) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
563
|
+
|
|
564
|
+
/*!
|
|
565
|
+
* @function vImageHistogramSpecification_PlanarF
|
|
566
|
+
*
|
|
567
|
+
* @abstract Performs a histogram specification operation on a PlanarF source image.
|
|
568
|
+
* @discussion This function performs the following operation:
|
|
569
|
+
* <pre>@textblock
|
|
570
|
+
* Compute the histogram of the input image:
|
|
571
|
+
* For each pixel, do the following:
|
|
572
|
+
* val = histogram_entries * (src[x] - minVal) / (maxVal - minVal);
|
|
573
|
+
* i = clip val between 0 and histogram_entries-1
|
|
574
|
+
* histogram[i]++;
|
|
575
|
+
* Calculate normalized sum of the input histogram and the desired_histogram
|
|
576
|
+
* Generate the inverse transform
|
|
577
|
+
* Transform final image using inverse transform as a LUT. For each pixel, do the following:
|
|
578
|
+
* val = histogram_entries * (src[x] - minVal) / (maxVal - minVal);
|
|
579
|
+
* i = clip val between 0 and histogram_entries-1
|
|
580
|
+
* dest[x] = inv_histogram[i];
|
|
581
|
+
* @/textblock</pre>
|
|
582
|
+
*
|
|
583
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
584
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
585
|
+
* kvImageDoNotTile
|
|
586
|
+
*
|
|
587
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
588
|
+
*
|
|
589
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
590
|
+
*
|
|
591
|
+
* @param tempBuffer A pointer to a temporary buffer. If you pass NULL, the function allocates the buffer,
|
|
592
|
+
* then deallocates it before returning. Alternatively, you can allocate the buffer yourself,
|
|
593
|
+
* in which case you are responsible for deallocating it when you is no longer need it.
|
|
594
|
+
* If you want to allocate the buffer yourself, see the documentation for information
|
|
595
|
+
* on how to determine the minimum size that you must allocate.
|
|
596
|
+
*
|
|
597
|
+
* @param desired_histogram A pointer the desired histogram for the transformed image.
|
|
598
|
+
* The histogram should be an array with histogram_entries elements.
|
|
599
|
+
*
|
|
600
|
+
* @param histogram_entries The number of histogram entries, or bins, to be used in histograms for this operation
|
|
601
|
+
*
|
|
602
|
+
* @param minVal A minimum pixel value. Any pixel value less than this will be
|
|
603
|
+
* clipped to this value (for the purposes of histogram calculation),
|
|
604
|
+
* and assigned to the first histogram entry.
|
|
605
|
+
*
|
|
606
|
+
* @param maxVal A maximum pixel value. Any pixel value greater than this will
|
|
607
|
+
* be clipped to this value (for the purposes of histogram calculation),
|
|
608
|
+
* and assigned to the last histogram entry.
|
|
609
|
+
*
|
|
610
|
+
* @param flags The following flags are allowed:
|
|
611
|
+
* <pre>@textblock
|
|
612
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
613
|
+
* wish to do this if you have your own
|
|
614
|
+
* multithreading scheme to avoid having the
|
|
615
|
+
* two interfere with one another.
|
|
616
|
+
*
|
|
617
|
+
* kvImageGetTempBufferSize If this is passed, then the size of a temp
|
|
618
|
+
* buffer is returned from the left hand side
|
|
619
|
+
* of the function and no other work is done.
|
|
620
|
+
* An error may still be returned in this case.
|
|
621
|
+
* All vImage errors are < 0. 0 may also be
|
|
622
|
+
* returned, indicating that the temp buffer
|
|
623
|
+
* size is 0 for this set of parameters on
|
|
624
|
+
* this device with this operating system at
|
|
625
|
+
* this time of day.
|
|
626
|
+
* @/textblock</pre>
|
|
627
|
+
*
|
|
628
|
+
* @return The following error codes may be returned:
|
|
629
|
+
* <pre>@textblock
|
|
630
|
+
* >= 0 Minimum temp buffer size, if kvImageGetTempBufferSize was specified.
|
|
631
|
+
* kvImageNoError Success!
|
|
632
|
+
* kvImageInvalidParameter maxVal is less than minVal or histogram_entries is 0
|
|
633
|
+
* kvImageNullPointerArgument src, dest or desired_histogram pointer is NULL.
|
|
634
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match.
|
|
635
|
+
* kvImageMemoryAllocationError Can not allocate memory for the buffer.
|
|
636
|
+
* @/textblock</pre>
|
|
637
|
+
*/
|
|
638
|
+
VIMAGE_PF vImage_Error
|
|
639
|
+
vImageHistogramSpecification_PlanarF(
|
|
640
|
+
const vImage_Buffer *src,
|
|
641
|
+
const vImage_Buffer *dest,
|
|
642
|
+
void *tempBuffer,
|
|
643
|
+
const vImagePixelCount *desired_histogram,
|
|
644
|
+
unsigned int histogram_entries,
|
|
645
|
+
Pixel_F minVal,
|
|
646
|
+
Pixel_F maxVal,
|
|
647
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2,4) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
/*!
|
|
651
|
+
* @function vImageHistogramSpecification_ARGB8888
|
|
652
|
+
*
|
|
653
|
+
* @abstract Performs a histogram specification operation on an ARGB8888 source image.
|
|
654
|
+
* @discussion This function performs the following operation:
|
|
655
|
+
* <pre>@textblock
|
|
656
|
+
* For each channel:
|
|
657
|
+
* Compute the histogram of the input image;
|
|
658
|
+
* Calculate normalized sum of the input histogram and the desired_histogram
|
|
659
|
+
* Generate the inverse transform
|
|
660
|
+
* Transform final image using inv_hist as a LUT. For each pixel, do the following:
|
|
661
|
+
* dest[x] = inv_histogram[src[x]];
|
|
662
|
+
* @/textblock</pre>
|
|
663
|
+
*
|
|
664
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
665
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
666
|
+
* kvImageDoNotTile
|
|
667
|
+
*
|
|
668
|
+
* All four channel histogram functions (i.e. those that support ARGB8888 or ARGBFFFF images)
|
|
669
|
+
* work equally well on four channel images with other channel orderings such as RGBA8888 or BGRAFFFF.
|
|
670
|
+
* The ordering of the desired_histogram must match the channel order of the image.
|
|
671
|
+
*
|
|
672
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
673
|
+
*
|
|
674
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
675
|
+
*
|
|
676
|
+
* @param desired_histogram A pointer to an array of four histograms, one each for
|
|
677
|
+
* alpha, red, green, and blue (in that order).
|
|
678
|
+
* These are the desired histograms for the transformed image.
|
|
679
|
+
* Each histogram should be an array with 256 elements.
|
|
680
|
+
* This function does not allocate storage for the histograms. You must allocate
|
|
681
|
+
* storage for each of the four histograms, create an array and populate it with
|
|
682
|
+
* pointers to the histograms before calling the function. The contents of the
|
|
683
|
+
* histograms are generally obtained from vImageHistogramCalculation_<fmt> from
|
|
684
|
+
* another image, but need not be so.
|
|
685
|
+
*
|
|
686
|
+
* @param flags The following flags are allowed:
|
|
687
|
+
* <pre>@textblock
|
|
688
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
689
|
+
* wish to do this if you have your own
|
|
690
|
+
* multithreading scheme to avoid having the
|
|
691
|
+
* two interfere with one another.
|
|
692
|
+
*
|
|
693
|
+
* kvImageLeaveAlphaUnchanged Copy the alpha channel to the destination image unchanged
|
|
694
|
+
* @/textblock</pre>
|
|
695
|
+
*
|
|
696
|
+
* @return The following values may be returned:
|
|
697
|
+
* <pre>@textblock
|
|
698
|
+
* kvImageNoError Success!
|
|
699
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match
|
|
700
|
+
* kvImageNullPointerArgument src, dest or any of the desired_histogram pointers is NULL.
|
|
701
|
+
* @/textblock</pre>
|
|
702
|
+
*/
|
|
703
|
+
VIMAGE_PF vImage_Error
|
|
704
|
+
vImageHistogramSpecification_ARGB8888(
|
|
705
|
+
const vImage_Buffer *src,
|
|
706
|
+
const vImage_Buffer *dest,
|
|
707
|
+
const vImagePixelCount *desired_histogram[4],
|
|
708
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2,3) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
/*!
|
|
712
|
+
* @function vImageHistogramSpecification_ARGBFFFF
|
|
713
|
+
*
|
|
714
|
+
* @abstract Performs a histogram specification operation on an ARGBFFFF source image.
|
|
715
|
+
* @discussion This function performs the following operation:
|
|
716
|
+
* <pre>@textblock
|
|
717
|
+
* For each channel do:
|
|
718
|
+
* Compute the histogram of the input image:
|
|
719
|
+
* For each pixel, do the following:
|
|
720
|
+
* val = histogram_entries * (src[x] - minVal) / (maxVal - minVal);
|
|
721
|
+
* i = clip val between 0 and histogram_entries-1
|
|
722
|
+
* histogram[ch][i]++;
|
|
723
|
+
* Calculate normalized sum of the input histogram and the desired_histogram
|
|
724
|
+
* Generate the inverse transform
|
|
725
|
+
* Transform final image using inverse transform as a LUT. For each pixel, do the following:
|
|
726
|
+
* val = histogram_entries * (src[ch][x] - minVal) / (maxVal - minVal);
|
|
727
|
+
* i = clip val between 0 and histogram_entries-1
|
|
728
|
+
* dest[ch][x] = inv_histogram[ch][i];
|
|
729
|
+
* @/textblock </pre>
|
|
730
|
+
*
|
|
731
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
732
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
733
|
+
* kvImageDoNotTile
|
|
734
|
+
*
|
|
735
|
+
* All four channel histogram functions (i.e. those that support ARGB8888 or ARGBFFFF images)
|
|
736
|
+
* work equally well on four channel images with other channel orderings such as RGBA8888 or BGRAFFFF.
|
|
737
|
+
* The ordering of the desired_histogram must match the channel order of the image.
|
|
738
|
+
*
|
|
739
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
740
|
+
*
|
|
741
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
742
|
+
*
|
|
743
|
+
* @param tempBuffer A pointer to a temporary buffer. If you pass NULL, the function allocates the buffer,
|
|
744
|
+
* then deallocates it before returning. Alternatively, you can allocate the buffer yourself,
|
|
745
|
+
* in which case you are responsible for deallocating it when you is no longer need it.
|
|
746
|
+
* If you want to allocate the buffer yourself, see the documentation for information
|
|
747
|
+
* on how to determine the minimum size that you must allocate.
|
|
748
|
+
*
|
|
749
|
+
* @param desired_histogram A pointer to an array of four histograms, one each for
|
|
750
|
+
* alpha, red, green, and blue (in that order).
|
|
751
|
+
* These are the desired histograms for the transformed image.
|
|
752
|
+
* Each histogram should be an array with histogram_entries elements..
|
|
753
|
+
* This function does not allocate storage for the histograms. You must allocate
|
|
754
|
+
* storage for each of the four histograms, create an array and populate it with
|
|
755
|
+
* pointers to the histograms before calling the function. The contents of the
|
|
756
|
+
* histograms are generally obtained from vImageHistogramCalculation_<fmt> from
|
|
757
|
+
* another image, but need not be so.
|
|
758
|
+
*
|
|
759
|
+
* @param histogram_entries The number of histogram entries, or bins, to be used in histograms for this operation
|
|
760
|
+
*
|
|
761
|
+
* @param minVal A minimum pixel value. Any pixel value less than this will be clipped to this value
|
|
762
|
+
* (for the purposes of histogram calculation), and assigned to the first histogram entry.
|
|
763
|
+
* This minimum value is applied to each of the four channels separately.
|
|
764
|
+
*
|
|
765
|
+
* @param maxVal A maximum pixel value. Any pixel value greater than this will be clipped to this value
|
|
766
|
+
* (for the purposes of histogram calculation), and assigned to the last histogram entry.
|
|
767
|
+
* This maximum value is applied to each of the four channels separately.
|
|
768
|
+
*
|
|
769
|
+
* @param flags The following flags are allowed:
|
|
770
|
+
* <pre>@textblock
|
|
771
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
772
|
+
* wish to do this if you have your own
|
|
773
|
+
* multithreading scheme to avoid having the
|
|
774
|
+
* two interfere with one another.
|
|
775
|
+
*
|
|
776
|
+
* kvImageGetTempBufferSize If this is passed, then the size of a temp
|
|
777
|
+
* buffer is returned from the left hand side
|
|
778
|
+
* of the function and no other work is done.
|
|
779
|
+
* An error may still be returned in this case.
|
|
780
|
+
* All vImage errors are < 0. 0 may also be
|
|
781
|
+
* returned, indicating that the temp buffer
|
|
782
|
+
* size is 0 for this set of parameters on
|
|
783
|
+
* this device with this operating system at
|
|
784
|
+
* this time of day.
|
|
785
|
+
*
|
|
786
|
+
* kvImageLeaveAlphaUnchanged Copy the alpha channel to the destination image unchanged
|
|
787
|
+
* @/textblock</pre>
|
|
788
|
+
*
|
|
789
|
+
* @return The following error codes may be returned:
|
|
790
|
+
* <pre>@textblock
|
|
791
|
+
* >= 0 Minimum temp buffer size, if kvImageGetTempBufferSize was specified.
|
|
792
|
+
* kvImageNoError Success!
|
|
793
|
+
* kvImageInvalidParameter maxVal is less than minVal or histogram_entries is 0
|
|
794
|
+
* kvImageNullPointerArgument src, dest or any of desired_histogram pointers is NULL.
|
|
795
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match.
|
|
796
|
+
* kvImageMemoryAllocationError Can not allocate memory for the buffer.
|
|
797
|
+
* @/textblock</pre>
|
|
798
|
+
*/
|
|
799
|
+
VIMAGE_PF vImage_Error
|
|
800
|
+
vImageHistogramSpecification_ARGBFFFF(
|
|
801
|
+
const vImage_Buffer *src,
|
|
802
|
+
const vImage_Buffer *dest,
|
|
803
|
+
void *tempBuffer,
|
|
804
|
+
const vImagePixelCount *desired_histogram[4],
|
|
805
|
+
unsigned int histogram_entries,
|
|
806
|
+
Pixel_F minVal,
|
|
807
|
+
Pixel_F maxVal,
|
|
808
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
809
|
+
|
|
810
|
+
/*!
|
|
811
|
+
* @functiongroup Contrast Stretch
|
|
812
|
+
* @discussion Some images do not make enough use of the light and dark ends of the spectrum.
|
|
813
|
+
* vImageContrastStretch functions widen the pixel value distribution to use a wider
|
|
814
|
+
* range of values.
|
|
815
|
+
*/
|
|
816
|
+
|
|
817
|
+
/*!
|
|
818
|
+
* @function vImageContrastStretch_Planar8
|
|
819
|
+
*
|
|
820
|
+
* @abstract Stretches the contrast of a Planar8 source image.
|
|
821
|
+
* @discussion This function performs the following operation:
|
|
822
|
+
* <pre>@textblock
|
|
823
|
+
* Compute the histogram of the input image;
|
|
824
|
+
* Generate LookUp table based on the histogram
|
|
825
|
+
* Transform final image using the LUT. For each pixel, do the following:
|
|
826
|
+
* dest[x] = LUT[src[x]];
|
|
827
|
+
* @/textblock</pre>
|
|
828
|
+
*
|
|
829
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
830
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
831
|
+
* kvImageDoNotTile
|
|
832
|
+
*
|
|
833
|
+
* vImageEndsInContrastStretch_Planar8 or vImageTableLookUp_Planar8 may be used instead when more control
|
|
834
|
+
* over the stretch is desired.
|
|
835
|
+
*
|
|
836
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
837
|
+
*
|
|
838
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
839
|
+
*
|
|
840
|
+
* @param flags The following flags are allowed:
|
|
841
|
+
* <pre>@textblock
|
|
842
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
843
|
+
* wish to do this if you have your own
|
|
844
|
+
* multithreading scheme to avoid having the
|
|
845
|
+
* two interfere with one another.
|
|
846
|
+
* @/textblock</pre>
|
|
847
|
+
*
|
|
848
|
+
* @return The following error codes may be returned:
|
|
849
|
+
* <pre>@textblock
|
|
850
|
+
* kvImageNoError Success!
|
|
851
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match
|
|
852
|
+
* kvImageNullPointerArgument src or dest pointer is NULL.
|
|
853
|
+
* @/textblock</pre>
|
|
854
|
+
*/
|
|
855
|
+
VIMAGE_PF vImage_Error
|
|
856
|
+
vImageContrastStretch_Planar8(
|
|
857
|
+
const vImage_Buffer *src,
|
|
858
|
+
const vImage_Buffer *dest,
|
|
859
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
860
|
+
|
|
861
|
+
/*!
|
|
862
|
+
* @function vImageContrastStretch_PlanarF
|
|
863
|
+
*
|
|
864
|
+
* @abstract Stretches the contrast of a PlanarF source image.
|
|
865
|
+
* @discussion This function performs the following operation:
|
|
866
|
+
* <pre>@textblock
|
|
867
|
+
* Find minimum and maximum value of the input image: loVal, hiVal;
|
|
868
|
+
* scale_factor = ( maxVal - minVal ) / (float) ( hiVal - loVal );
|
|
869
|
+
* Transfer the image. For each pixel do:
|
|
870
|
+
* dest[x] = (src[x] - loVal) * scale_factor + minVal;
|
|
871
|
+
* @/textblock</pre>
|
|
872
|
+
*
|
|
873
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
874
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
875
|
+
* kvImageDoNotTile
|
|
876
|
+
*
|
|
877
|
+
* vImageEndsInContrastStretch_PlanarF or vImageInterpolatedLookupTable_PlanarF may be used instead when more control
|
|
878
|
+
* over the stretch is desired.
|
|
879
|
+
*
|
|
880
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
881
|
+
*
|
|
882
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
883
|
+
*
|
|
884
|
+
* @param tempBuffer A pointer to a temporary buffer. If you pass NULL, the function allocates the buffer,
|
|
885
|
+
* then deallocates it before returning. Alternatively, you can allocate the buffer yourself,
|
|
886
|
+
* in which case you are responsible for deallocating it when you is no longer need it.
|
|
887
|
+
* If you want to allocate the buffer yourself, see the documentation for information
|
|
888
|
+
* on how to determine the minimum size that you must allocate.
|
|
889
|
+
*
|
|
890
|
+
* @param histogram_entries The number of histogram entries, or bins to be used in histograms for this operation
|
|
891
|
+
*
|
|
892
|
+
* @param minVal A minimum pixel value. Any pixel value less than this will be
|
|
893
|
+
* clipped to this value (for the purposes of histogram calculation),
|
|
894
|
+
* and assigned to the first histogram entry.
|
|
895
|
+
*
|
|
896
|
+
* @param maxVal A maximum pixel value. Any pixel value greater than this will
|
|
897
|
+
* be clipped to this value (for the purposes of histogram calculation),
|
|
898
|
+
* and assigned to the last histogram entry.
|
|
899
|
+
*
|
|
900
|
+
* @param flags The following flags are allowed:
|
|
901
|
+
* <pre>@textblock
|
|
902
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
903
|
+
* wish to do this if you have your own
|
|
904
|
+
* multithreading scheme to avoid having the
|
|
905
|
+
* two interfere with one another.
|
|
906
|
+
*
|
|
907
|
+
* kvImageGetTempBufferSize If this is passed, then the size of a temp
|
|
908
|
+
* buffer is returned from the left hand side
|
|
909
|
+
* of the function and no other work is done.
|
|
910
|
+
* An error may still be returned in this case.
|
|
911
|
+
* All vImage errors are < 0. 0 may also be
|
|
912
|
+
* returned, indicating that the temp buffer
|
|
913
|
+
* size is 0 for this set of parameters on
|
|
914
|
+
* this device with this operating system at
|
|
915
|
+
* this time of day.
|
|
916
|
+
* @/textblock</pre>
|
|
917
|
+
*
|
|
918
|
+
* @return The following error codes may be returned
|
|
919
|
+
* <pre>@textblock
|
|
920
|
+
* >= 0 Minimum temp buffer size, if kvImageGetTempBufferSize was specified.
|
|
921
|
+
* kvImageNoError Success!
|
|
922
|
+
* kvImageInvalidParameter maxVal is less than minVal or histogram_entries is 0
|
|
923
|
+
* kvImageNullPointerArgument src or dest pointer is NULL.
|
|
924
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match.
|
|
925
|
+
* kvImageMemoryAllocationError Can not allocate memory for the buffer.
|
|
926
|
+
* @/textblock</pre>
|
|
927
|
+
*/
|
|
928
|
+
VIMAGE_PF vImage_Error
|
|
929
|
+
vImageContrastStretch_PlanarF(
|
|
930
|
+
const vImage_Buffer *src,
|
|
931
|
+
const vImage_Buffer *dest,
|
|
932
|
+
void *tempBuffer,
|
|
933
|
+
unsigned int histogram_entries,
|
|
934
|
+
Pixel_F minVal,
|
|
935
|
+
Pixel_F maxVal,
|
|
936
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
937
|
+
|
|
938
|
+
/*!
|
|
939
|
+
* @function vImageContrastStretch_ARGB8888
|
|
940
|
+
* @abstract Stretches the contrast of an ARGB8888 source image.
|
|
941
|
+
* @discussion This function performs the following operation:
|
|
942
|
+
* <pre>@textblock
|
|
943
|
+
* For each channel:
|
|
944
|
+
* Compute the histogram of the input image;
|
|
945
|
+
* Generate LookUp table based on the histogram
|
|
946
|
+
* Transform final image using the LUT. For each pixel, do the following:
|
|
947
|
+
* dest[x] = LUT[src[x]];
|
|
948
|
+
* @/textblock</pre>
|
|
949
|
+
*
|
|
950
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
951
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
952
|
+
* kvImageDoNotTile
|
|
953
|
+
*
|
|
954
|
+
* All four channel histogram functions (i.e. those that support ARGB8888 or ARGBFFFF images)
|
|
955
|
+
* work equally well on four channel images with other channel orderings such as RGBA8888 or BGRAFFFF.
|
|
956
|
+
*
|
|
957
|
+
* vImageEndsInContrastStretch_ARGB8888 or vImageTableLookUp_ARGB8888 may be used instead when more control
|
|
958
|
+
* over the stretch is desired.
|
|
959
|
+
*
|
|
960
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
961
|
+
*
|
|
962
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
963
|
+
*
|
|
964
|
+
* @param flags The following flags are allowed:
|
|
965
|
+
* <pre>@textblock
|
|
966
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
967
|
+
* wish to do this if you have your own
|
|
968
|
+
* multithreading scheme to avoid having the
|
|
969
|
+
* two interfere with one another.
|
|
970
|
+
*
|
|
971
|
+
* kvImageLeaveAlphaUnchanged Copy the alpha channel to the destination image unchanged
|
|
972
|
+
* @/textblock</pre>
|
|
973
|
+
*
|
|
974
|
+
* @return The following error codes may be returned:
|
|
975
|
+
* <pre>@textblock
|
|
976
|
+
* kvImageNoError Success!
|
|
977
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match
|
|
978
|
+
* kvImageNullPointerArgument src or dest pointer is NULL.
|
|
979
|
+
* @/textblock</pre>
|
|
980
|
+
*/
|
|
981
|
+
VIMAGE_PF vImage_Error
|
|
982
|
+
vImageContrastStretch_ARGB8888(
|
|
983
|
+
const vImage_Buffer *src,
|
|
984
|
+
const vImage_Buffer *dest,
|
|
985
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
986
|
+
|
|
987
|
+
/*!
|
|
988
|
+
* @function vImageContrastStretch_ARGBFFFF
|
|
989
|
+
*
|
|
990
|
+
* @abstract Stretches the contrast of an ARGBFFFF source image.
|
|
991
|
+
* @discussion This function performs the following operation:
|
|
992
|
+
* <pre>@textblock
|
|
993
|
+
* For each channel:
|
|
994
|
+
* Find minimum and maximum value of the input image: loVal, hiVal;
|
|
995
|
+
* scale_factor = ( maxVal - minVal ) / (float) ( hiVal - loVal );
|
|
996
|
+
* Transfer the image. For each pixel do:
|
|
997
|
+
* dest[x] = (src[x] - loVal) * scale_factor + minVal;
|
|
998
|
+
* @/textblock</pre>
|
|
999
|
+
*
|
|
1000
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
1001
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
1002
|
+
* kvImageDoNotTile
|
|
1003
|
+
*
|
|
1004
|
+
* All four channel histogram functions (i.e. those that support ARGB8888 or ARGBFFFF images)
|
|
1005
|
+
* work equally well on four channel images with other channel orderings such as RGBA8888 or BGRAFFFF.
|
|
1006
|
+
*
|
|
1007
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
1008
|
+
*
|
|
1009
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
1010
|
+
*
|
|
1011
|
+
* @param tempBuffer A pointer to a temporary buffer. If you pass NULL, the function allocates the buffer,
|
|
1012
|
+
* then deallocates it before returning. Alternatively, you can allocate the buffer yourself,
|
|
1013
|
+
* in which case you are responsible for deallocating it when you is no longer need it.
|
|
1014
|
+
* If you want to allocate the buffer yourself, see the documentation for information
|
|
1015
|
+
* on how to determine the minimum size that you must allocate.
|
|
1016
|
+
*
|
|
1017
|
+
* @param histogram_entries The number of histogram entries, or bins, to be used in histograms for this operation
|
|
1018
|
+
*
|
|
1019
|
+
* @param minVal A minimum pixel value. Any pixel value less than this will be clipped to this value
|
|
1020
|
+
* (for the purposes of histogram calculation), and assigned to the first histogram entry.
|
|
1021
|
+
* This minimum value is applied to each of the four channels separately.
|
|
1022
|
+
*
|
|
1023
|
+
* @param maxVal A maximum pixel value. Any pixel value greater than this will be clipped to this value
|
|
1024
|
+
* (for the purposes of histogram calculation), and assigned to the last histogram entry.
|
|
1025
|
+
* This maximum value is applied to each of the four channels separately.
|
|
1026
|
+
*
|
|
1027
|
+
* @param flags The following flags are allowed:
|
|
1028
|
+
* <pre>@textblock
|
|
1029
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
1030
|
+
* wish to do this if you have your own
|
|
1031
|
+
* multithreading scheme to avoid having the
|
|
1032
|
+
* two interfere with one another.
|
|
1033
|
+
*
|
|
1034
|
+
* kvImageGetTempBufferSize If this is passed, then the size of a temp
|
|
1035
|
+
* buffer is returned from the left hand side
|
|
1036
|
+
* of the function and no other work is done.
|
|
1037
|
+
* An error may still be returned in this case.
|
|
1038
|
+
* All vImage errors are < 0. 0 may also be
|
|
1039
|
+
* returned, indicating that the temp buffer
|
|
1040
|
+
* size is 0 for this set of parameters on
|
|
1041
|
+
* this device with this operating system at
|
|
1042
|
+
* this time of day.
|
|
1043
|
+
*
|
|
1044
|
+
* kvImageLeaveAlphaUnchanged Copy the alpha channel to the destination image unchanged
|
|
1045
|
+
* @/textblock</pre>
|
|
1046
|
+
*
|
|
1047
|
+
* @return The following error codes may be returned:
|
|
1048
|
+
* <pre>@textblock
|
|
1049
|
+
* >= 0 Minimum temp buffer size, if kvImageGetTempBufferSize was specified.
|
|
1050
|
+
* kvImageNoError Success!
|
|
1051
|
+
* kvImageInvalidParameter maxVal is less than minVal or histogram_entries is 0
|
|
1052
|
+
* kvImageNullPointerArgument src or dest pointer is NULL.
|
|
1053
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match.
|
|
1054
|
+
* @/textblock<pre>
|
|
1055
|
+
*/
|
|
1056
|
+
VIMAGE_PF vImage_Error
|
|
1057
|
+
vImageContrastStretch_ARGBFFFF(
|
|
1058
|
+
const vImage_Buffer *src,
|
|
1059
|
+
const vImage_Buffer *dest,
|
|
1060
|
+
void *tempBuffer,
|
|
1061
|
+
unsigned int histogram_entries,
|
|
1062
|
+
Pixel_F minVal,
|
|
1063
|
+
Pixel_F maxVal,
|
|
1064
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
/*!
|
|
1068
|
+
* @functiongroup Ends-In Contrast Stretch
|
|
1069
|
+
* @discussion Readjust the image pixel value distribution to use only some of the range of available intensities.
|
|
1070
|
+
*/
|
|
1071
|
+
|
|
1072
|
+
/*!
|
|
1073
|
+
* @function vImageEndsInContrastStretch_Planar8
|
|
1074
|
+
*
|
|
1075
|
+
* @abstract Performs an ends-in contrast stretch operation on a Planar8 source image.
|
|
1076
|
+
* @discussion This function performs the following operation:
|
|
1077
|
+
* <pre>@textblock
|
|
1078
|
+
* Compute the histogram of the input image;
|
|
1079
|
+
* Generate LookUp table based on the histogram and percentage parameters
|
|
1080
|
+
* Transform final image using the LookUp table. For each pixel, do the following:
|
|
1081
|
+
* dest[x] = LUT[src[x]];
|
|
1082
|
+
* @/textblock</pre>
|
|
1083
|
+
*
|
|
1084
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
1085
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
1086
|
+
* kvImageDoNotTile
|
|
1087
|
+
*
|
|
1088
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
1089
|
+
*
|
|
1090
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
1091
|
+
*
|
|
1092
|
+
* @param percent_low A percentage value.
|
|
1093
|
+
* The number of pixels that map to the lowest end of the histogram of the
|
|
1094
|
+
* transformed image should represent this percentage of the total pixels.
|
|
1095
|
+
*
|
|
1096
|
+
* @param percent_high A percentage value.
|
|
1097
|
+
* The number of pixels that map to the highest end of the histogram of the
|
|
1098
|
+
* transformed image should represent this percentage of the total pixels.
|
|
1099
|
+
*
|
|
1100
|
+
* @param flags The following flags are allowed:
|
|
1101
|
+
* <pre>@textblock
|
|
1102
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
1103
|
+
* wish to do this if you have your own
|
|
1104
|
+
* multithreading scheme to avoid having the
|
|
1105
|
+
* two interfere with one another.
|
|
1106
|
+
* @/textblock</pre>
|
|
1107
|
+
*
|
|
1108
|
+
* @return The following error codes may be returned:
|
|
1109
|
+
* <pre>@textblock
|
|
1110
|
+
* kvImageNoError Success!
|
|
1111
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match
|
|
1112
|
+
* kvImageNullPointerArgument src or dest pointer is NULL.
|
|
1113
|
+
* kvImageInvalidParameter percent_low + percent_high is greater than 100.
|
|
1114
|
+
* @/textblock</pre>
|
|
1115
|
+
*/
|
|
1116
|
+
VIMAGE_PF vImage_Error
|
|
1117
|
+
vImageEndsInContrastStretch_Planar8(
|
|
1118
|
+
const vImage_Buffer *src,
|
|
1119
|
+
const vImage_Buffer *dest,
|
|
1120
|
+
unsigned int percent_low,
|
|
1121
|
+
unsigned int percent_high,
|
|
1122
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
1123
|
+
|
|
1124
|
+
/*!
|
|
1125
|
+
* @function vImageEndsInContrastStretch_PlanarF
|
|
1126
|
+
*
|
|
1127
|
+
* @abstract Performs an ends-in contrast stretch operation on a PlanarF source image.
|
|
1128
|
+
* @discussion
|
|
1129
|
+
* <pre>@textblock
|
|
1130
|
+
* Compute the histogram of the input image;
|
|
1131
|
+
* Generate LookUp table based on the histogram and percentage parameters
|
|
1132
|
+
* Transform final image using the LookUp table. For each pixel, do the following:
|
|
1133
|
+
* val = histogram_entries * (src[x] - minVal) / ( maxVal - minVal );
|
|
1134
|
+
* i = clip val between 0 and histogram_entries-1
|
|
1135
|
+
* dest[x] = LUT[i];
|
|
1136
|
+
*
|
|
1137
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
1138
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
1139
|
+
* kvImageDoNotTile
|
|
1140
|
+
*
|
|
1141
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
1142
|
+
*
|
|
1143
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
1144
|
+
*
|
|
1145
|
+
* @param tempBuffer A pointer to a temporary buffer. If you pass NULL, the function allocates the buffer,
|
|
1146
|
+
* then deallocates it before returning. Alternatively, you can allocate the buffer yourself,
|
|
1147
|
+
* in which case you are responsible for deallocating it when you is no longer need it.
|
|
1148
|
+
* If you want to allocate the buffer yourself, see the documentation for information
|
|
1149
|
+
* on how to determine the minimum size that you must allocate.
|
|
1150
|
+
*
|
|
1151
|
+
* @param percent_low A percentage value.
|
|
1152
|
+
* The number of pixels that map to the lowest end of the histogram of the
|
|
1153
|
+
* transformed image should represent this percentage of the total pixels.
|
|
1154
|
+
*
|
|
1155
|
+
* @param percent_high A percentage value.
|
|
1156
|
+
* The number of pixels that map to the highest end of the histogram of the
|
|
1157
|
+
* transformed image should represent this percentage of the total pixels.
|
|
1158
|
+
*
|
|
1159
|
+
* @param histogram_entries The number of histogram entries, or bins, to be used in histograms for this operation
|
|
1160
|
+
*
|
|
1161
|
+
* @param minVal A minimum pixel value, the low end of the histogram.
|
|
1162
|
+
* Any pixel value less than this will be clipped to this value
|
|
1163
|
+
* (for the purposes of histogram calculation), and assigned to the first histogram entry.
|
|
1164
|
+
*
|
|
1165
|
+
* @param maxVal A maximum pixel value, the high end of the histogram.
|
|
1166
|
+
* Any pixel value greater than this will be clipped to this value
|
|
1167
|
+
* (for the purposes of histogram calculation), and assigned to the last histogram entry.
|
|
1168
|
+
*
|
|
1169
|
+
* @param flags The following flags are allowed:
|
|
1170
|
+
* <pre>@textblock
|
|
1171
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
1172
|
+
* wish to do this if you have your own
|
|
1173
|
+
* multithreading scheme to avoid having the
|
|
1174
|
+
* two interfere with one another.
|
|
1175
|
+
*
|
|
1176
|
+
* kvImageGetTempBufferSize If this is passed, then the size of a temp
|
|
1177
|
+
* buffer is returned from the left hand side
|
|
1178
|
+
* of the function and no other work is done.
|
|
1179
|
+
* An error may still be returned in this case.
|
|
1180
|
+
* All vImage errors are < 0. 0 may also be
|
|
1181
|
+
* returned, indicating that the temp buffer
|
|
1182
|
+
* size is 0 for this set of parameters on
|
|
1183
|
+
* this device with this operating system at
|
|
1184
|
+
* this time of day.
|
|
1185
|
+
* @/textblock</pre>
|
|
1186
|
+
*
|
|
1187
|
+
* @return The following error codes may be returned:
|
|
1188
|
+
* <pre>@textblock
|
|
1189
|
+
* >= 0 Minimum temp buffer size, if kvImageGetTempBufferSize was specified.
|
|
1190
|
+
* kvImageNoError Success!
|
|
1191
|
+
* kvImageInvalidParameter maxVal is less than minVal, histogram_entries is 0 or
|
|
1192
|
+
* percent_low + percent_high is greater than 100.
|
|
1193
|
+
* kvImageNullPointerArgument src or dest pointer is NULL.
|
|
1194
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match.
|
|
1195
|
+
* kvImageMemoryAllocationError Can not allocate memory for the buffer.
|
|
1196
|
+
* @/textblock </pre>
|
|
1197
|
+
*/
|
|
1198
|
+
VIMAGE_PF vImage_Error
|
|
1199
|
+
vImageEndsInContrastStretch_PlanarF(
|
|
1200
|
+
const vImage_Buffer *src,
|
|
1201
|
+
const vImage_Buffer *dest,
|
|
1202
|
+
void *tempBuffer,
|
|
1203
|
+
unsigned int percent_low,
|
|
1204
|
+
unsigned int percent_high,
|
|
1205
|
+
unsigned int histogram_entries,
|
|
1206
|
+
Pixel_F minVal,
|
|
1207
|
+
Pixel_F maxVal,
|
|
1208
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
1209
|
+
|
|
1210
|
+
/*!
|
|
1211
|
+
* @function vImageEndsInContrastStretch_ARGB8888
|
|
1212
|
+
*
|
|
1213
|
+
* @abstract Performs an ends-in contrast stretch operation on an ARGB8888 source image.
|
|
1214
|
+
* @discussion This function performs the following operation:
|
|
1215
|
+
* <pre>@textblock
|
|
1216
|
+
* For each channel:
|
|
1217
|
+
* Compute the histogram of the input image;
|
|
1218
|
+
* Generate LookUp table based on the histogram and percentage parameters
|
|
1219
|
+
* Transform final image using the LookUp table. For each pixel, do the following:
|
|
1220
|
+
* dest[x] = LUT[src[x]];
|
|
1221
|
+
* @/textblock</pre>
|
|
1222
|
+
*
|
|
1223
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
1224
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
1225
|
+
* kvImageDoNotTile
|
|
1226
|
+
*
|
|
1227
|
+
* All four channel histogram functions (i.e. those that support ARGB8888 or ARGBFFFF images)
|
|
1228
|
+
* work equally well on four channel images with other channel orderings such as RGBA8888 or BGRAFFFF.
|
|
1229
|
+
* The ordering of the percent_low and percent_high parameters match the order of the channels.
|
|
1230
|
+
*
|
|
1231
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
1232
|
+
*
|
|
1233
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
1234
|
+
*
|
|
1235
|
+
* @param percent_low An array of four percentage values, one each for alpha, red, green, and blue.
|
|
1236
|
+
* The number of pixels that map to the lowest end of the histogram of the
|
|
1237
|
+
* transformed image should represent this percentage of the total pixels.
|
|
1238
|
+
*
|
|
1239
|
+
* @param percent_high An array of four percentage values, one each for alpha, red, green, and blue.
|
|
1240
|
+
* The number of pixels that map to the highest end of the histogram of the
|
|
1241
|
+
* transformed image should represent this percentage of the total pixels.
|
|
1242
|
+
*
|
|
1243
|
+
* @param flags The following flags are allowed:
|
|
1244
|
+
* <pre>@textblock
|
|
1245
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
1246
|
+
* wish to do this if you have your own
|
|
1247
|
+
* multithreading scheme to avoid having the
|
|
1248
|
+
* two interfere with one another.
|
|
1249
|
+
*
|
|
1250
|
+
* kvImageLeaveAlphaUnchanged Copy the alpha channel to the destination image unchanged
|
|
1251
|
+
* @/textblock</pre>
|
|
1252
|
+
*
|
|
1253
|
+
* @return The following error codes may be returned:
|
|
1254
|
+
* <pre>@textblock
|
|
1255
|
+
* kvImageNoError Success!
|
|
1256
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match
|
|
1257
|
+
* kvImageNullPointerArgument src, dest, percent_low or percent_high pointer is NULL.
|
|
1258
|
+
* kvImageInvalidParameter Some of percent_low[i]+percent_high[i] is greater than 100.
|
|
1259
|
+
* @/textblock</pre>
|
|
1260
|
+
*/
|
|
1261
|
+
VIMAGE_PF vImage_Error
|
|
1262
|
+
vImageEndsInContrastStretch_ARGB8888(
|
|
1263
|
+
const vImage_Buffer *src,
|
|
1264
|
+
const vImage_Buffer *dest,
|
|
1265
|
+
const unsigned int percent_low[4],
|
|
1266
|
+
const unsigned int percent_high[4],
|
|
1267
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2,3,4) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
1268
|
+
|
|
1269
|
+
|
|
1270
|
+
/*!
|
|
1271
|
+
* @function vImageEndsInContrastStretch_ARGBFFFF
|
|
1272
|
+
*
|
|
1273
|
+
* @abstract Performs a histogram specification operation on an ARGBFFFF source image.
|
|
1274
|
+
* @discussion This function performs the following operation:
|
|
1275
|
+
* <pre>@textblock
|
|
1276
|
+
* For each channel do:
|
|
1277
|
+
* Compute the histogram of the input image;
|
|
1278
|
+
* Generate LookUp table based on the histogram and percentage parameters
|
|
1279
|
+
* Transform final image using the LookUp table. For each pixel, do the following:
|
|
1280
|
+
* val = histogram_entries * (src[x] - minVal) / ( maxVal - minVal );
|
|
1281
|
+
* i = clip val between 0 and histogram_entries-1
|
|
1282
|
+
* dest[x] = LUT[i];
|
|
1283
|
+
* @/textblock</pre>
|
|
1284
|
+
*
|
|
1285
|
+
* This routine will work in place provided that src.data == dest.data and src.rowBytes >= dest.rowBytes.
|
|
1286
|
+
* if src.rowBytes > dest.rowBytes and src.data == dest.data, the function will only work if you pass
|
|
1287
|
+
* kvImageDoNotTile
|
|
1288
|
+
*
|
|
1289
|
+
* All four channel histogram functions (i.e. those that support ARGB8888 or ARGBFFFF images)
|
|
1290
|
+
* work equally well on four channel images with other channel orderings such as RGBA8888 or BGRAFFFF.
|
|
1291
|
+
* The ordering of the percent_low and percent_high parameters match the order of the channels.
|
|
1292
|
+
*
|
|
1293
|
+
* @param src A pointer to a vImage_Buffer that references the source pixels
|
|
1294
|
+
*
|
|
1295
|
+
* @param dest A pointer to a vImage buffer that references the destination pixels
|
|
1296
|
+
*
|
|
1297
|
+
* @param tempBuffer A pointer to a temporary buffer. If you pass NULL, the function allocates the buffer,
|
|
1298
|
+
* then deallocates it before returning. Alternatively, you can allocate the buffer yourself,
|
|
1299
|
+
* in which case you are responsible for deallocating it when you is no longer need it.
|
|
1300
|
+
* If you want to allocate the buffer yourself, see the documentation for information
|
|
1301
|
+
* on how to determine the minimum size that you must allocate.
|
|
1302
|
+
*
|
|
1303
|
+
* @param percent_low An array of four percentage values, one each for alpha, red, green, and blue.
|
|
1304
|
+
* The number of pixels that map to the lowest end of the histogram of the
|
|
1305
|
+
* transformed image should represent this percentage of the total pixels.
|
|
1306
|
+
*
|
|
1307
|
+
* @param percent_high An array of four percentage values, one each for alpha, red, green, and blue.
|
|
1308
|
+
* The number of pixels that map to the highest end of the histogram of the
|
|
1309
|
+
* transformed image should represent this percentage of the total pixels.
|
|
1310
|
+
*
|
|
1311
|
+
* @param histogram_entries The number of histogram entries, or bins, to be used in histograms for this operation
|
|
1312
|
+
*
|
|
1313
|
+
* @param minVal A minimum pixel value. Any pixel value less than this will be clipped to this value
|
|
1314
|
+
* (for the purposes of histogram calculation), and assigned to the first histogram entry.
|
|
1315
|
+
* This minimum value is applied to each of the four channels separately.
|
|
1316
|
+
*
|
|
1317
|
+
* @param maxVal A maximum pixel value. Any pixel value greater than this will be clipped to this value
|
|
1318
|
+
* (for the purposes of histogram calculation), and assigned to the last histogram entry.
|
|
1319
|
+
* This maximum value is applied to each of the four channels separately.
|
|
1320
|
+
*
|
|
1321
|
+
* @param flags The following flags are allowed:
|
|
1322
|
+
* <pre>@textblock
|
|
1323
|
+
* kvImageDoNotTile Turns off internal multithreading. You may
|
|
1324
|
+
* wish to do this if you have your own
|
|
1325
|
+
* multithreading scheme to avoid having the
|
|
1326
|
+
* two interfere with one another.
|
|
1327
|
+
*
|
|
1328
|
+
* kvImageGetTempBufferSize If this is passed, then the size of a temp
|
|
1329
|
+
* buffer is returned from the left hand side
|
|
1330
|
+
* of the function and no other work is done.
|
|
1331
|
+
* An error may still be returned in this case.
|
|
1332
|
+
* All vImage errors are < 0. 0 may also be
|
|
1333
|
+
* returned, indicating that the temp buffer
|
|
1334
|
+
* size is 0 for this set of parameters on
|
|
1335
|
+
* this device with this operating system at
|
|
1336
|
+
* this time of day.
|
|
1337
|
+
*
|
|
1338
|
+
* kvImageLeaveAlphaUnchanged Copy the alpha channel to the destination image unchanged
|
|
1339
|
+
* @/textblock</pre>
|
|
1340
|
+
* @return The following error codes may be returned:
|
|
1341
|
+
* <pre>@textblock
|
|
1342
|
+
* >= 0 Minimum temp buffer size, if kvImageGetTempBufferSize was specified.
|
|
1343
|
+
* kvImageNoError Success!
|
|
1344
|
+
* kvImageInvalidParameter maxVal is less than minVal, histogram_entries is 0 or
|
|
1345
|
+
* some of percent_low[i]+percent_high[i] is greater than 100.
|
|
1346
|
+
* kvImageNullPointerArgument src, dest, percent_low or percent_high pointer is NULL.
|
|
1347
|
+
* kvImageBufferSizeMismatch Sizes of the src and dest images do not match.
|
|
1348
|
+
* kvImageMemoryAllocationError Can not allocate memory for the buffer.
|
|
1349
|
+
* @/textblock</pre>
|
|
1350
|
+
*/
|
|
1351
|
+
VIMAGE_PF vImage_Error
|
|
1352
|
+
vImageEndsInContrastStretch_ARGBFFFF(
|
|
1353
|
+
const vImage_Buffer *src,
|
|
1354
|
+
const vImage_Buffer *dest,
|
|
1355
|
+
void *tempBuffer,
|
|
1356
|
+
const unsigned int percent_low[4],
|
|
1357
|
+
const unsigned int percent_high[4],
|
|
1358
|
+
unsigned int histogram_entries,
|
|
1359
|
+
Pixel_F minVal,
|
|
1360
|
+
Pixel_F maxVal,
|
|
1361
|
+
vImage_Flags flags ) VIMAGE_NON_NULL(1,2,4,5) API_AVAILABLE(macos(10.3), ios(5.0), watchos(1.0), tvos(5.0));
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
#ifdef __cplusplus
|
|
1365
|
+
}
|
|
1366
|
+
#endif
|
|
1367
|
+
|
|
1368
|
+
#endif
|
|
1369
|
+
|