{"id":"b73cc425-c6f4-479b-9f91-ab4f7175b953","shortId":"3USQqW","kind":"skill","title":"vision-framework","tagline":"Implement computer vision features including text recognition (OCR), face detection, barcode scanning, image segmentation, object tracking, and document scanning in iOS apps. Covers both the modern Swift-native Vision API (iOS 16+) and legacy VNRequest patterns, VisionKit DataSca","description":"# Vision Framework\n\nDetect text, faces, barcodes, objects, and body poses in images and video using\non-device computer vision. Patterns target iOS 26+ with Swift 6.3,\nbackward-compatible where noted.\n\nSee [references/vision-requests.md](references/vision-requests.md) for complete code patterns and\n[references/visionkit-scanner.md](references/visionkit-scanner.md) for DataScannerViewController integration.\n\n## Contents\n\n- [Two API Generations](#two-api-generations)\n- [Request Pattern (Modern API)](#request-pattern-modern-api)\n- [Text Recognition (OCR)](#text-recognition-ocr)\n- [Face Detection](#face-detection)\n- [Barcode Detection](#barcode-detection)\n- [Document Scanning (iOS 26+)](#document-scanning-ios-26)\n- [Image Segmentation](#image-segmentation)\n- [Object Tracking](#object-tracking)\n- [Other Request Types](#other-request-types)\n- [Core ML Integration](#core-ml-integration)\n- [VisionKit: DataScannerViewController](#visionkit-datascannerviewcontroller)\n- [Common Mistakes](#common-mistakes)\n- [Review Checklist](#review-checklist)\n- [References](#references)\n\n## Two API Generations\n\nVision has two distinct API layers. Prefer the modern API for new code.\n\n| Aspect | Modern (iOS 18+) | Legacy |\n|---|---|---|\n| Pattern | `let result = try await request.perform(on: image)` | `VNImageRequestHandler` + completion handler |\n| Request types | Swift types — structs and classes (`RecognizeTextRequest`, `DetectFaceRectanglesRequest`) | ObjC classes (`VNRecognizeTextRequest`, `VNDetectFaceRectanglesRequest`) |\n| Concurrency | Native async/await | Completion handlers or synchronous `perform` |\n| Observations | Typed return values | Cast `results` from `[Any]` |\n| Availability | iOS 18+ / macOS 15+ | iOS 11+ |\n\nThe modern API uses the `ImageProcessingRequest` protocol. Each request type\nhas a `perform(on:orientation:)` method that accepts `CGImage`, `CIImage`,\n`CVPixelBuffer`, `CMSampleBuffer`, `Data`, or `URL`. Most requests are\nstructs; stateful requests for video tracking (e.g., `TrackObjectRequest`,\n`TrackRectangleRequest`, `DetectTrajectoriesRequest`) are final classes.\n\n## Request Pattern (Modern API)\n\nAll modern Vision requests follow the same pattern: create a request struct,\ncall `perform(on:)`, and handle the typed result.\n\n```swift\nimport Vision\n\nfunc recognizeText(in image: CGImage) async throws -> [String] {\n    var request = RecognizeTextRequest()\n    request.recognitionLevel = .accurate\n    request.recognitionLanguages = [Locale.Language(identifier: \"en-US\")]\n\n    let observations = try await request.perform(on: image)\n    return observations.compactMap { observation in\n        observation.topCandidates(1).first?.string\n    }\n}\n```\n\n### Legacy Pattern (Pre-iOS 18)\n\nUse `VNImageRequestHandler` with completion-based requests when targeting\nolder deployment versions.\n\n```swift\nimport Vision\n\nfunc recognizeTextLegacy(in image: CGImage) throws -> [String] {\n    var recognized: [String] = []\n    let request = VNRecognizeTextRequest { request, error in\n        guard let observations = request.results as? [VNRecognizedTextObservation] else { return }\n        recognized = observations.compactMap { $0.topCandidates(1).first?.string }\n    }\n    request.recognitionLevel = .accurate\n\n    let handler = VNImageRequestHandler(cgImage: image)\n    try handler.perform([request])\n    return recognized\n}\n```\n\n## Text Recognition (OCR)\n\n### Modern: RecognizeTextRequest (iOS 18+)\n\n```swift\nvar request = RecognizeTextRequest()\nrequest.recognitionLevel = .accurate       // .fast for real-time\nrequest.recognitionLanguages = [\n    Locale.Language(identifier: \"en-US\"),\n    Locale.Language(identifier: \"fr-FR\"),\n]\nrequest.usesLanguageCorrection = true\nrequest.customWords = [\"SwiftUI\", \"Xcode\"] // domain-specific terms\n\nlet observations = try await request.perform(on: cgImage)\nfor observation in observations {\n    guard let candidate = observation.topCandidates(1).first else { continue }\n    let text = candidate.string\n    let confidence = candidate.confidence  // 0.0 ... 1.0\n    let bounds = observation.boundingBox   // normalized coordinates\n}\n```\n\n### Legacy: VNRecognizeTextRequest\n\n```swift\nlet request = VNRecognizeTextRequest()\nrequest.recognitionLevel = .accurate\nrequest.recognitionLanguages = [\"en-US\", \"fr-FR\"]\nrequest.usesLanguageCorrection = true\n```\n\n**Key differences:** Modern API uses `Locale.Language` for languages; legacy\nuses string identifiers. Both support `.accurate` (best quality) and `.fast`\n(real-time suitable) recognition levels.\n\n## Face Detection\n\nDetect face rectangles, landmarks (eyes, nose, mouth), and capture quality.\n\n```swift\n// Modern API\nlet faceRequest = DetectFaceRectanglesRequest()\nlet faces = try await faceRequest.perform(on: cgImage)\n\nfor face in faces {\n    let boundingBox = face.boundingBox   // normalized CGRect\n    let roll = face.roll                 // Measurement<UnitAngle>\n    let yaw = face.yaw                  // Measurement<UnitAngle>\n}\n\n// Landmarks (eyes, nose, mouth contours)\nvar landmarkRequest = DetectFaceLandmarksRequest()\nlet landmarkFaces = try await landmarkRequest.perform(on: cgImage)\nfor face in landmarkFaces {\n    let landmarks = face.landmarks\n    let leftEye = landmarks?.leftEye?.normalizedPoints\n    let nose = landmarks?.nose?.normalizedPoints\n}\n```\n\n### Coordinate System\n\nVision uses a normalized coordinate system with origin at the bottom-left.\nConvert to UIKit (top-left origin) before display:\n\n```swift\nfunc convertToUIKit(_ rect: CGRect, imageHeight: CGFloat) -> CGRect {\n    CGRect(\n        x: rect.origin.x,\n        y: imageHeight - rect.origin.y - rect.height,\n        width: rect.width,\n        height: rect.height\n    )\n}\n```\n\n## Barcode Detection\n\nDetect 1D and 2D barcodes including QR codes.\n\n```swift\nvar request = DetectBarcodesRequest()\nrequest.symbologies = [.qr, .ean13, .code128, .pdf417]\n\nlet barcodes = try await request.perform(on: cgImage)\nfor barcode in barcodes {\n    let payload = barcode.payloadString          // decoded content\n    let symbology = barcode.symbology            // .qr, .ean13, etc.\n    let bounds = barcode.boundingBox             // normalized rect\n}\n```\n\nCommon symbologies: `.qr`, `.aztec`, `.pdf417`, `.dataMatrix`, `.ean8`,\n`.ean13`, `.code39`, `.code128`, `.upce`, `.itf14`.\n\n## Document Scanning (iOS 26+)\n\n`RecognizeDocumentsRequest` provides structured document reading with layout\nunderstanding beyond basic OCR. Returns `DocumentObservation` objects with a\nnested `Container` structure for paragraphs, tables, lists, and barcodes.\n\n```swift\nvar request = RecognizeDocumentsRequest()\nlet documents = try await request.perform(on: cgImage)\n\nfor observation in documents {\n    let container = observation.document\n\n    // Full text content\n    let fullText = container.text\n\n    // Structured access to paragraphs\n    for paragraph in container.paragraphs {\n        let paragraphText = paragraph.text\n    }\n\n    // Tables and lists\n    for table in container.tables { /* structured table data */ }\n    for list in container.lists { /* structured list data */ }\n\n    // Embedded barcodes detected within the document\n    for barcode in container.barcodes { /* barcode data */ }\n\n    // Document title if detected\n    if let title = container.title { print(title) }\n}\n```\n\nFor simpler document camera scanning, use VisionKit's\n`VNDocumentCameraViewController` which provides a full-screen camera UI with\nauto-capture, perspective correction, and multi-page scanning.\n\n## Image Segmentation\n\n### Modern: GeneratePersonSegmentationRequest (iOS 18+)\n\n```swift\nvar request = GeneratePersonSegmentationRequest()\nrequest.qualityLevel = .accurate  // .balanced, .fast\n\nlet mask = try await request.perform(on: cgImage)\n// mask is a PersonSegmentationObservation with a pixelBuffer property\nlet maskBuffer = mask.pixelBuffer\n// Apply mask using Core Image: CIFilter.blendWithMask()\n```\n\n### Legacy: VNGeneratePersonSegmentationRequest\n\n```swift\nlet request = VNGeneratePersonSegmentationRequest()\nrequest.qualityLevel = .accurate  // .balanced, .fast\nrequest.outputPixelFormat = kCVPixelFormatType_OneComponent8\n\nlet handler = VNImageRequestHandler(cgImage: cgImage)\ntry handler.perform([request])\n\nguard let mask = request.results?.first?.pixelBuffer else { return }\n// Apply mask using Core Image: CIFilter.blendWithMask()\n```\n\nQuality levels:\n- `.accurate` -- best quality, slowest (~1s), full resolution\n- `.balanced` -- good quality, moderate speed (~100ms), 960x540\n- `.fast` -- lowest quality, fastest (~10ms), 256x144, suitable for real-time\n\n### Instance Segmentation (iOS 18+)\n\nSeparate masks per person for individual effects.\n\n```swift\n// Modern API (iOS 18+)\nlet request = GeneratePersonInstanceMaskRequest()\nlet observation = try await request.perform(on: cgImage)\nlet indices = observation.allInstances\n\nfor index in indices {\n    let mask = try observation.generateMask(forInstances: IndexSet(integer: index))\n    // mask is a CVPixelBuffer with only this person visible\n}\n```\n\n```swift\n// Legacy API (iOS 17+)\nlet request = VNGeneratePersonInstanceMaskRequest()\nlet handler = VNImageRequestHandler(cgImage: cgImage)\ntry handler.perform([request])\n\nguard let result = request.results?.first else { return }\nlet indices = result.allInstances\nfor index in indices {\n    let instanceMask = try result.generateMaskedImage(\n        ofInstances: IndexSet(integer: index),\n        from: handler,\n        croppedToInstancesExtent: false\n    )\n}\n```\n\nSee [references/vision-requests.md](references/vision-requests.md) for mask composition and Core Image filter\nintegration patterns.\n\n## Object Tracking\n\n### Modern: TrackObjectRequest (iOS 18+)\n\n`TrackObjectRequest` is a stateful request that maintains tracking context\nacross frames. Conforms to both `ImageProcessingRequest` and `StatefulRequest`.\n\n```swift\n// Initialize with a detected object's bounding box\nlet initialObservation = DetectedObjectObservation(boundingBox: detectedRect)\nvar request = TrackObjectRequest(observation: initialObservation)\nrequest.trackingLevel = .accurate\n\n// For each video frame:\nlet results = try await request.perform(on: pixelBuffer)\nif let tracked = results.first {\n    let updatedBounds = tracked.boundingBox\n    let confidence = tracked.confidence\n}\n```\n\n### Legacy: VNTrackObjectRequest\n\n```swift\nlet trackRequest = VNTrackObjectRequest(detectedObjectObservation: initialObservation)\ntrackRequest.trackingLevel = .accurate\n\nlet sequenceHandler = VNSequenceRequestHandler()\n// For each frame:\ntry sequenceHandler.perform([trackRequest], on: pixelBuffer)\nif let result = trackRequest.results?.first {\n    let updatedBounds = result.boundingBox\n    trackRequest.inputObservation = result\n}\n```\n\n## Other Request Types\n\nVision provides additional requests covered in [references/vision-requests.md](references/vision-requests.md):\n\n| Request | Purpose |\n|---|---|\n| `ClassifyImageRequest` | Classify scene content (outdoor, food, animal, etc.) |\n| `GenerateAttentionBasedSaliencyImageRequest` | Heat map of where viewers focus attention |\n| `GenerateObjectnessBasedSaliencyImageRequest` | Heat map of object-like regions |\n| `GenerateForegroundInstanceMaskRequest` | Foreground object segmentation (not person-specific) |\n| `DetectRectanglesRequest` | Detect rectangular shapes (documents, cards, screens) |\n| `DetectHorizonRequest` | Detect horizon angle for auto-leveling photos |\n| `DetectHumanBodyPoseRequest` | Detect body joints (shoulders, elbows, knees) |\n| `DetectHumanBodyPose3DRequest` | 3D human body pose estimation |\n| `DetectHumanHandPoseRequest` | Detect hand joints and finger positions |\n| `DetectAnimalBodyPoseRequest` | Detect animal body joint positions |\n| `DetectFaceCaptureQualityRequest` | Face capture quality scoring (0–1) for photo selection |\n| `TrackRectangleRequest` | Track rectangular objects across video frames |\n| `TrackOpticalFlowRequest` | Optical flow between video frames |\n| `DetectTrajectoriesRequest` | Detect object trajectories in video |\n\nAll modern request types above are iOS 18+ / macOS 15+.\n\n## Core ML Integration\n\nRun custom Core ML models through Vision for automatic image preprocessing\n(resizing, normalization, color space conversion).\n\n```swift\n// Modern API (iOS 18+)\nlet model = try MLModel(contentsOf: modelURL)\nlet request = CoreMLRequest(model: .init(model))\nlet results = try await request.perform(on: cgImage)\n\n// Classification model\nif let classification = results.first as? ClassificationObservation {\n    let label = classification.identifier\n    let confidence = classification.confidence\n}\n```\n\n```swift\n// Legacy API\nlet vnModel = try VNCoreMLModel(for: model)\nlet request = VNCoreMLRequest(model: vnModel) { request, error in\n    guard let results = request.results as? [VNClassificationObservation] else { return }\n    let topResult = results.first\n}\nlet handler = VNImageRequestHandler(cgImage: cgImage)\ntry handler.perform([request])\n```\n\nFor model conversion and optimization, see the `coreml` skill.\n\n## VisionKit: DataScannerViewController\n\n`DataScannerViewController` provides a full-screen live camera scanner for text\nand barcodes. See [references/visionkit-scanner.md](references/visionkit-scanner.md) for complete patterns.\n\n### Quick Start\n\n```swift\nimport VisionKit\n\n// Check availability (requires A12+ chip and camera)\nguard DataScannerViewController.isSupported,\n      DataScannerViewController.isAvailable else { return }\n\nlet scanner = DataScannerViewController(\n    recognizedDataTypes: [\n        .text(languages: [\"en\"]),\n        .barcode(symbologies: [.qr, .ean13])\n    ],\n    qualityLevel: .balanced,\n    recognizesMultipleItems: true,\n    isHighFrameRateTrackingEnabled: true,\n    isHighlightingEnabled: true\n)\nscanner.delegate = self\npresent(scanner, animated: true) {\n    try? scanner.startScanning()\n}\n```\n\n### SwiftUI Integration\n\nWrap `DataScannerViewController` in `UIViewControllerRepresentable`. See\n[references/visionkit-scanner.md](references/visionkit-scanner.md) for the full implementation.\n\n## Common Mistakes\n\n**DON'T:** Use the legacy `VNImageRequestHandler` API for new iOS 18+ projects.\n**DO:** Use modern struct-based requests with `perform(on:)` and async/await.\n**Why:** Modern API provides type safety, better Swift concurrency support, and cleaner error handling.\n\n**DON'T:** Forget to convert normalized coordinates before drawing bounding boxes.\n**DO:** Use `VNImageRectForNormalizedRect(_:_:_:)` or manual conversion from bottom-left origin to UIKit top-left origin.\n**Why:** Vision uses normalized coordinates (0...1) with bottom-left origin; UIKit uses points with top-left origin.\n\n**DON'T:** Run Vision requests on the main thread.\n**DO:** Perform requests on a background thread or use async/await from a detached task.\n**Why:** Image analysis is CPU/GPU-intensive and blocks the UI if run on the main actor.\n\n**DON'T:** Use `.accurate` recognition level for real-time camera feeds.\n**DO:** Use `.fast` for live video, `.accurate` for still images or offline processing.\n**Why:** Accurate recognition is too slow for 30fps video; fast recognition trades quality for speed.\n\n**DON'T:** Ignore the `confidence` score on observations.\n**DO:** Filter results by confidence threshold (e.g., > 0.5) appropriate for your use case.\n**Why:** Low-confidence results are often incorrect and degrade user experience.\n\n**DON'T:** Create a new `VNImageRequestHandler` for each frame when tracking objects.\n**DO:** Use `VNSequenceRequestHandler` for video frame sequences.\n**Why:** Sequence handler maintains temporal context for tracking; per-frame handlers lose state.\n\n**DON'T:** Request all barcode symbologies when you only need QR codes.\n**DO:** Specify only the symbologies you need in the request.\n**Why:** Fewer symbologies means faster detection and fewer false positives.\n\n**DON'T:** Assume `DataScannerViewController` is available on all devices.\n**DO:** Check both `isSupported` (hardware) and `isAvailable` (user permissions) before presenting.\n**Why:** Requires A12+ chip; `isAvailable` also checks camera access authorization.\n\n## Review Checklist\n\n- [ ] Uses modern Vision API (iOS 18+) unless targeting older deployments\n- [ ] Vision requests run off the main thread (async/await or background queue)\n- [ ] Normalized coordinates converted before UI display\n- [ ] Confidence threshold applied to filter low-quality observations\n- [ ] Recognition level matches use case (`.fast` for video, `.accurate` for stills)\n- [ ] Language hints set for text recognition when input language is known\n- [ ] Barcode symbologies limited to only those needed\n- [ ] `DataScannerViewController` availability checked before presentation\n- [ ] Camera usage description (`NSCameraUsageDescription`) in Info.plist for VisionKit\n- [ ] Person segmentation quality level appropriate for use case\n- [ ] `VNSequenceRequestHandler` used for video frame tracking (not per-frame handler)\n- [ ] Error handling covers request failures and empty results\n\n## References\n\n- Vision request patterns: [references/vision-requests.md](references/vision-requests.md)\n- VisionKit scanner integration: [references/visionkit-scanner.md](references/visionkit-scanner.md)\n- Apple docs: [Vision](https://sosumi.ai/documentation/vision) |\n  [VisionKit](https://sosumi.ai/documentation/visionkit) |\n  [RecognizeTextRequest](https://sosumi.ai/documentation/vision/recognizetextrequest) |\n  [DataScannerViewController](https://sosumi.ai/documentation/visionkit/datascannerviewcontroller)","tags":["vision","framework","swift","ios","skills","dpearson2699","accessibility","agent-skills","ai-coding","apple","claude-code","codex-skills"],"capabilities":["skill","source-dpearson2699","skill-vision-framework","topic-accessibility","topic-agent-skills","topic-ai-coding","topic-apple","topic-claude-code","topic-codex-skills","topic-cursor-skills","topic-ios","topic-ios-development","topic-liquid-glass","topic-localization","topic-mapkit"],"categories":["swift-ios-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/dpearson2699/swift-ios-skills/vision-framework","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add dpearson2699/swift-ios-skills","source_repo":"https://github.com/dpearson2699/swift-ios-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 599 github stars · SKILL.md body (17,442 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:53:46.457Z","embedding":null,"createdAt":"2026-04-18T20:34:09.163Z","updatedAt":"2026-05-18T18:53:46.457Z","lastSeenAt":"2026-05-18T18:53:46.457Z","tsv":"'/documentation/vision)':1848 '/documentation/vision/recognizetextrequest)':1856 '/documentation/visionkit)':1852 '/documentation/visionkit/datascannerviewcontroller)':1860 '0':1217,1504 '0.0':468 '0.5':1612 '0.topcandidates':389 '1':339,390,458,1218,1505 '1.0':469 '100ms':912 '10ms':918 '11':239 '15':237,1250 '16':36 '17':979 '18':191,235,347,411,830,928,940,1034,1248,1274,1443,1732 '1d':639 '1s':904 '256x144':919 '26':66,125,130,697 '2d':641 '30fps':1589 '3d':1194 '6.3':69 '960x540':913 'a12':1382,1717 'accept':257 'access':748,1723 'accur':320,394,417,482,506,836,870,900,1072,1103,1560,1575,1583,1771 'across':1044,1226 'actor':1556 'addit':1130 'also':1720 'analysi':1544 'angl':1180 'anim':1144,1208,1414 'api':34,90,94,99,104,173,179,184,242,284,495,531,938,977,1272,1310,1439,1459,1730 'app':25 'appl':1843 'appli':857,892,1756 'appropri':1613,1809 'aspect':188 'assum':1697 'async':313 'async/await':219,1456,1537,1744 'attent':1153 'author':1724 'auto':816,1183 'auto-captur':815 'auto-level':1182 'automat':1262 'avail':233,1380,1700,1793 'await':197,330,446,538,570,658,730,842,947,1080,1290 'aztec':685 'background':1533,1746 'backward':71 'backward-compat':70 'balanc':837,871,907,1403 'barcod':14,48,117,120,636,642,656,663,665,722,776,782,785,1367,1398,1667,1785 'barcode-detect':119 'barcode.boundingbox':679 'barcode.payloadstring':668 'barcode.symbology':673 'base':353,1450 'basic':707 'best':507,901 'better':1463 'beyond':706 'block':1548 'bodi':51,1188,1196,1209 'bottom':604,1490,1508 'bottom-left':603,1489,1507 'bound':471,678,1059,1480 'boundingbox':547,1064 'box':1060,1481 'call':297 'camera':800,812,1362,1385,1567,1722,1797 'candid':456 'candidate.confidence':467 'candidate.string':464 'captur':527,817,1214 'card':1175 'case':1617,1767,1812 'cast':229 'cgfloat':621 'cgimag':258,312,367,398,449,541,573,661,733,845,879,880,950,986,987,1293,1339,1340 'cgrect':550,619,622,623 'check':1379,1705,1721,1794 'checklist':166,169,1726 'chip':1383,1718 'cifilter.blendwithmask':862,897 'ciimag':259 'class':210,214,280 'classif':1294,1298 'classifi':1139 'classification.confidence':1307 'classification.identifier':1304 'classificationobserv':1301 'classifyimagerequest':1138 'cleaner':1468 'cmsamplebuff':261 'code':80,187,645,1674 'code128':653,691 'code39':690 'color':1267 'common':160,163,682,1431 'common-mistak':162 'compat':72 'complet':79,202,220,352,1372 'completion-bas':351 'composit':1022 'comput':5,61 'concurr':217,1465 'confid':466,1092,1306,1601,1609,1621,1754 'conform':1046 'contain':715,739 'container.barcodes':784 'container.lists':771 'container.paragraphs':754 'container.tables':764 'container.text':746 'container.title':794 'content':88,670,743,1141 'contentsof':1279 'context':1043,1654 'continu':461 'contour':563 'convers':1269,1346,1487 'convert':606,1475,1750 'converttouikit':617 'coordin':474,591,597,1477,1503,1749 'core':148,152,860,895,1024,1251,1256 'core-ml-integr':151 'coreml':1351 'coremlrequest':1283 'correct':819 'cover':26,1132,1826 'cpu/gpu-intensive':1546 'creat':293,1632 'croppedtoinstancesext':1015 'custom':1255 'cvpixelbuff':260,969 'data':262,767,774,786 'datamatrix':687 'datasca':42 'datascannerviewcontrol':86,156,159,1354,1355,1393,1421,1698,1792,1857 'datascannerviewcontroller.isavailable':1388 'datascannerviewcontroller.issupported':1387 'decod':669 'degrad':1627 'deploy':358,1736 'descript':1799 'detach':1540 'detect':13,45,113,116,118,121,518,519,637,638,777,790,1056,1171,1178,1187,1200,1207,1236,1690 'detectanimalbodyposerequest':1206 'detectbarcodesrequest':649 'detectedobjectobserv':1063,1100 'detectedrect':1065 'detectfacecapturequalityrequest':1212 'detectfacelandmarksrequest':566 'detectfacerectanglesrequest':212,534 'detecthorizonrequest':1177 'detecthumanbodypose3drequest':1193 'detecthumanbodyposerequest':1186 'detecthumanhandposerequest':1199 'detectrectanglesrequest':1170 'detecttrajectoriesrequest':277,1235 'devic':60,1703 'differ':493 'display':614,1753 'distinct':178 'doc':1844 'document':21,122,127,694,701,728,737,780,787,799,1174 'document-scanning-io':126 'documentobserv':710 'domain':440 'domain-specif':439 'draw':1479 'e.g':274,1611 'ean13':652,675,689,1401 'ean8':688 'effect':935 'elbow':1191 'els':385,460,890,996,1331,1389 'embed':775 'empti':1830 'en':325,427,485,1397 'en-us':324,426,484 'error':377,1323,1469,1824 'estim':1198 'etc':676,1145 'experi':1629 'eye':523,560 'face':12,47,112,115,517,520,536,543,545,575,1213 'face-detect':114 'face.boundingbox':548 'face.landmarks':580 'face.roll':553 'face.yaw':557 'facerequest':533 'facerequest.perform':539 'failur':1828 'fals':1016,1693 'fast':418,510,838,872,914,1571,1591,1768 'faster':1689 'fastest':917 'featur':7 'feed':1568 'fewer':1686,1692 'filter':1026,1606,1758 'final':279 'finger':1204 'first':340,391,459,888,995,1119 'flow':1231 'focus':1152 'follow':289 'food':1143 'foreground':1163 'forget':1473 'forinst':962 'fr':432,433,488,489 'fr-fr':431,487 'frame':1045,1076,1109,1228,1234,1638,1647,1659,1817,1822 'framework':3,44 'full':741,810,905,1359,1429 'full-screen':809,1358 'fulltext':745 'func':308,363,616 'generat':91,95,174 'generateattentionbasedsaliencyimagerequest':1146 'generateforegroundinstancemaskrequest':1162 'generateobjectnessbasedsaliencyimagerequest':1154 'generatepersoninstancemaskrequest':943 'generatepersonsegmentationrequest':828,834 'good':908 'guard':379,454,884,991,1325,1386 'hand':1201 'handl':301,1470,1825 'handler':203,221,396,877,984,1014,1337,1651,1660,1823 'handler.perform':401,882,989,1342 'hardwar':1708 'heat':1147,1155 'height':634 'hint':1775 'horizon':1179 'human':1195 'identifi':323,425,430,503 'ignor':1599 'imag':16,54,131,134,200,311,333,366,399,825,861,896,1025,1263,1543,1578 'image-segment':133 'imageheight':620,628 'imageprocessingrequest':245,1049 'implement':4,1430 'import':306,361,1377 'includ':8,643 'incorrect':1625 'index':955,965,1002,1012 'indexset':963,1010 'indic':952,957,999,1004 'individu':934 'info.plist':1802 'init':1285 'initi':1053 'initialobserv':1062,1070,1101 'input':1781 'instanc':925 'instancemask':1006 'integ':964,1011 'integr':87,150,154,1027,1253,1419,1840 'io':24,35,65,124,129,190,234,238,346,410,696,829,927,939,978,1033,1247,1273,1442,1731 'isavail':1710,1719 'ishighframeratetrackingen':1406 'ishighlightingen':1408 'issupport':1707 'itf14':693 'joint':1189,1202,1210 'kcvpixelformattyp':874 'key':492 'knee':1192 'known':1784 'label':1303 'landmark':522,559,579,583,588 'landmarkfac':568,577 'landmarkrequest':565 'landmarkrequest.perform':571 'languag':499,1396,1774,1782 'layer':180 'layout':704 'left':605,611,1491,1497,1509,1517 'leftey':582,584 'legaci':38,192,342,475,500,863,976,1094,1309,1437 'let':194,327,373,380,395,443,455,462,465,470,478,532,535,546,551,555,567,578,581,586,655,666,671,677,727,738,744,755,792,839,854,866,876,885,941,944,951,958,980,983,992,998,1005,1061,1077,1085,1088,1091,1097,1104,1116,1120,1275,1281,1287,1297,1302,1305,1311,1317,1326,1333,1336,1391 'level':516,899,1184,1562,1764,1808 'like':1160 'limit':1787 'list':720,760,769,773 'live':1361,1573 'locale.language':322,424,429,497 'lose':1661 'low':1620,1760 'low-confid':1619 'low-qual':1759 'lowest':915 'maco':236,1249 'main':1526,1555,1742 'maintain':1041,1652 'manual':1486 'map':1148,1156 'mask':840,846,858,886,893,930,959,966,1021 'mask.pixelbuffer':856 'maskbuff':855 'match':1765 'mean':1688 'measur':554,558 'method':255 'mistak':161,164,1432 'ml':149,153,1252,1257 'mlmodel':1278 'model':1258,1276,1284,1286,1295,1316,1320,1345 'modelurl':1280 'moder':910 'modern':29,98,103,183,189,241,283,286,408,494,530,827,937,1031,1242,1271,1447,1458,1728 'mouth':525,562 'multi':822 'multi-pag':821 'nativ':32,218 'need':1672,1681,1791 'nest':714 'new':186,1441,1634 'normal':473,549,596,680,1266,1476,1502,1748 'normalizedpoint':585,590 'nose':524,561,587,589 'note':74 'nscamerausagedescript':1800 'objc':213 'object':18,49,136,139,711,1029,1057,1159,1164,1225,1237,1641 'object-lik':1158 'object-track':138 'observ':225,328,336,381,444,451,453,735,945,1069,1604,1762 'observation.allinstances':953 'observation.boundingbox':472 'observation.document':740 'observation.generatemask':961 'observation.topcandidates':338,457 'observations.compactmap':335,388 'ocr':11,107,111,407,708 'offlin':1580 'ofinst':1009 'often':1624 'older':357,1735 'on-devic':58 'onecomponent8':875 'optic':1230 'optim':1348 'orient':254 'origin':600,612,1492,1498,1510,1518 'other-request-typ':144 'outdoor':1142 'page':823 'paragraph':718,750,752 'paragraph.text':757 'paragraphtext':756 'pattern':40,63,81,97,102,193,282,292,343,1028,1373,1835 'payload':667 'pdf417':654,686 'per':931,1658,1821 'per-fram':1657,1820 'perform':224,252,298,1453,1529 'permiss':1712 'person':932,973,1168,1805 'person-specif':1167 'personsegmentationobserv':849 'perspect':818 'photo':1185,1220 'pixelbuff':852,889,1083,1114 'point':1513 'pose':52,1197 'posit':1205,1211,1694 'pre':345 'pre-io':344 'prefer':181 'preprocess':1264 'present':1412,1714,1796 'print':795 'process':1581 'project':1444 'properti':853 'protocol':246 'provid':699,807,1129,1356,1460 'purpos':1137 'qr':644,651,674,684,1400,1673 'qualiti':508,528,898,902,909,916,1215,1594,1761,1807 'qualitylevel':1402 'queue':1747 'quick':1374 'read':702 'real':421,512,923,1565 'real-tim':420,511,922,1564 'recogn':371,387,404 'recognit':10,106,110,406,515,1561,1584,1592,1763,1779 'recognizeddatatyp':1394 'recognizedocumentsrequest':698,726 'recognizesmultipleitem':1404 'recognizetext':309 'recognizetextlegaci':364 'recognizetextrequest':211,318,409,415,1853 'rect':618,681 'rect.height':631,635 'rect.origin':625,629 'rect.width':633 'rectangl':521 'rectangular':1172,1224 'refer':170,171,1832 'references/vision-requests.md':76,77,1018,1019,1134,1135,1836,1837 'references/visionkit-scanner.md':83,84,1369,1370,1425,1426,1841,1842 'region':1161 'request':96,101,142,146,204,248,266,270,281,288,295,317,354,374,376,402,414,479,648,725,833,867,883,942,981,990,1039,1067,1126,1131,1136,1243,1282,1318,1322,1343,1451,1523,1530,1665,1684,1738,1827,1834 'request-pattern-modern-api':100 'request.customwords':436 'request.outputpixelformat':873 'request.perform':198,331,447,659,731,843,948,1081,1291 'request.qualitylevel':835,869 'request.recognitionlanguages':321,423,483 'request.recognitionlevel':319,393,416,481 'request.results':382,887,994,1328 'request.symbologies':650 'request.trackinglevel':1071 'request.useslanguagecorrection':434,490 'requir':1381,1716 'resiz':1265 'resolut':906 'result':195,230,304,993,1078,1117,1124,1288,1327,1607,1622,1831 'result.allinstances':1000 'result.boundingbox':1122 'result.generatemaskedimage':1008 'results.first':1087,1299,1335 'return':227,334,386,403,709,891,997,1332,1390 'review':165,168,1725 'review-checklist':167 'roll':552 'run':1254,1521,1552,1739 'safeti':1462 'scan':15,22,123,128,695,801,824 'scanner':1363,1392,1413,1839 'scanner.delegate':1410 'scanner.startscanning':1417 'scene':1140 'score':1216,1602 'screen':811,1176,1360 'see':75,1017,1349,1368,1424 'segment':17,132,135,826,926,1165,1806 'select':1221 'self':1411 'separ':929 'sequenc':1648,1650 'sequencehandl':1105 'sequencehandler.perform':1111 'set':1776 'shape':1173 'shoulder':1190 'simpler':798 'skill':1352 'skill-vision-framework' 'slow':1587 'slowest':903 'sosumi.ai':1847,1851,1855,1859 'sosumi.ai/documentation/vision)':1846 'sosumi.ai/documentation/vision/recognizetextrequest)':1854 'sosumi.ai/documentation/visionkit)':1850 'sosumi.ai/documentation/visionkit/datascannerviewcontroller)':1858 'source-dpearson2699' 'space':1268 'specif':441,1169 'specifi':1676 'speed':911,1596 'start':1375 'state':269,1038,1662 'statefulrequest':1051 'still':1577,1773 'string':315,341,369,372,392,502 'struct':208,268,296,1449 'struct-bas':1448 'structur':700,716,747,765,772 'suitabl':514,920 'support':505,1466 'swift':31,68,206,305,360,412,477,529,615,646,723,831,865,936,975,1052,1096,1270,1308,1376,1464 'swift-nat':30 'swiftui':437,1418 'symbolog':672,683,1399,1668,1679,1687,1786 'synchron':223 'system':592,598 'tabl':719,758,762,766 'target':64,356,1734 'task':1541 'tempor':1653 'term':442 'text':9,46,105,109,405,463,742,1365,1395,1778 'text-recognition-ocr':108 'thread':1527,1534,1743 'threshold':1610,1755 'throw':314,368 'time':422,513,924,1566 'titl':788,793,796 'top':610,1496,1516 'top-left':609,1495,1515 'topic-accessibility' 'topic-agent-skills' 'topic-ai-coding' 'topic-apple' 'topic-claude-code' 'topic-codex-skills' 'topic-cursor-skills' 'topic-ios' 'topic-ios-development' 'topic-liquid-glass' 'topic-localization' 'topic-mapkit' 'topresult':1334 'track':19,137,140,273,1030,1042,1086,1223,1640,1656,1818 'tracked.boundingbox':1090 'tracked.confidence':1093 'trackobjectrequest':275,1032,1035,1068 'trackopticalflowrequest':1229 'trackrectanglerequest':276,1222 'trackrequest':1098,1112 'trackrequest.inputobservation':1123 'trackrequest.results':1118 'trackrequest.trackinglevel':1102 'trade':1593 'trajectori':1238 'tri':196,329,400,445,537,569,657,729,841,881,946,960,988,1007,1079,1110,1277,1289,1313,1341,1416 'true':435,491,1405,1407,1409,1415 'two':89,93,172,177 'two-api-gener':92 'type':143,147,205,207,226,249,303,1127,1244,1461 'ui':813,1550,1752 'uikit':608,1494,1511 'uiviewcontrollerrepresent':1423 'understand':705 'unless':1733 'upc':692 'updatedbound':1089,1121 'url':264 'us':326,428,486 'usag':1798 'use':57,243,348,496,501,594,802,859,894,1435,1446,1483,1501,1512,1536,1559,1570,1616,1643,1727,1766,1811,1814 'user':1628,1711 'valu':228 'var':316,370,413,564,647,724,832,1066 'version':359 'video':56,272,1075,1227,1233,1240,1574,1590,1646,1770,1816 'viewer':1151 'visibl':974 'vision':2,6,33,43,62,175,287,307,362,593,1128,1260,1500,1522,1729,1737,1833,1845 'vision-framework':1 'visionkit':41,155,158,803,1353,1378,1804,1838,1849 'visionkit-datascannerviewcontrol':157 'vnclassificationobserv':1330 'vncoremlmodel':1314 'vncoremlrequest':1319 'vndetectfacerectanglesrequest':216 'vndocumentcameraviewcontrol':805 'vngeneratepersoninstancemaskrequest':982 'vngeneratepersonsegmentationrequest':864,868 'vnimagerectfornormalizedrect':1484 'vnimagerequesthandl':201,349,397,878,985,1338,1438,1635 'vnmodel':1312,1321 'vnrecognizedtextobserv':384 'vnrecognizetextrequest':215,375,476,480 'vnrequest':39 'vnsequencerequesthandl':1106,1644,1813 'vntrackobjectrequest':1095,1099 'width':632 'within':778 'wrap':1420 'x':624,626 'xcode':438 'y':627,630 'yaw':556","prices":[{"id":"36593773-c127-4a4f-af6a-c4af38c6602c","listingId":"b73cc425-c6f4-479b-9f91-ab4f7175b953","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"dpearson2699","category":"swift-ios-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T20:34:09.163Z"}],"sources":[{"listingId":"b73cc425-c6f4-479b-9f91-ab4f7175b953","source":"github","sourceId":"dpearson2699/swift-ios-skills/vision-framework","sourceUrl":"https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/vision-framework","isPrimary":false,"firstSeenAt":"2026-04-18T22:01:31.003Z","lastSeenAt":"2026-05-18T18:53:46.457Z"},{"listingId":"b73cc425-c6f4-479b-9f91-ab4f7175b953","source":"skills_sh","sourceId":"dpearson2699/swift-ios-skills/vision-framework","sourceUrl":"https://skills.sh/dpearson2699/swift-ios-skills/vision-framework","isPrimary":true,"firstSeenAt":"2026-04-18T20:34:09.163Z","lastSeenAt":"2026-05-07T22:40:33.267Z"}],"details":{"listingId":"b73cc425-c6f4-479b-9f91-ab4f7175b953","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"dpearson2699","slug":"vision-framework","github":{"repo":"dpearson2699/swift-ios-skills","stars":599,"topics":["accessibility","agent-skills","ai-coding","apple","claude-code","codex-skills","cursor-skills","ios","ios-development","liquid-glass","localization","mapkit","networking","storekit","swift","swift-concurrency","swiftdata","swiftui","widgetkit","xcode"],"license":"other","html_url":"https://github.com/dpearson2699/swift-ios-skills","pushed_at":"2026-04-26T21:04:17Z","description":"Agent Skills for iOS 26+, Swift 6.3, SwiftUI, and modern Apple frameworks","skill_md_sha":"9a8b88a357c4e48a5807aa5521810762190def12","skill_md_path":"skills/vision-framework/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/vision-framework"},"layout":"multi","source":"github","category":"swift-ios-skills","frontmatter":{"name":"vision-framework","description":"Implement computer vision features including text recognition (OCR), face detection, barcode scanning, image segmentation, object tracking, and document scanning in iOS apps. Covers both the modern Swift-native Vision API (iOS 16+) and legacy VNRequest patterns, VisionKit DataScannerViewController for live camera scanning, and VNCoreMLRequest for custom model inference. Use when adding OCR, barcode scanning, face detection, or custom Core ML model inference with Vision."},"skills_sh_url":"https://skills.sh/dpearson2699/swift-ios-skills/vision-framework"},"updatedAt":"2026-05-18T18:53:46.457Z"}}