ingredient-scanner
Installation
SKILL.md
成分扫描技能
概述
拍摄护肤品成分表,通过OCR识别成分,并使用AI解读功效与风险。
处理流程
拍照 → OCR识别 → 成分标准化 → 本地匹配 → AI解读 → 结果展示
1. OCR识别模块
import Vision
class IngredientOCR {
func recognizeText(from image: UIImage) async throws -> [String] {
guard let cgImage = image.cgImage else {
throw OCRError.invalidImage
}