返回顶部
🇺🇸 English
🇨🇳 简体中文
🇨🇳 繁體中文
🇺🇸 English
🇯🇵 日本語
🇰🇷 한국어
🇫🇷 Français
🇩🇪 Deutsch
🇪🇸 Español
🇷🇺 Русский
d

dpi-upscaler-checker

Check image DPI and intelligently upscale low-resolution images using

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
152
下载量
0
收藏
概述
安装方式
版本历史

dpi-upscaler-checker

# DPI Upscaler & Checker Check if images meet 300 DPI printing standards, and intelligently restore blurry low-resolution images using AI super-resolution technology. ## Features - **DPI Detection**: Read and verify image DPI information - **Intelligent Analysis**: Calculate actual print size and pixel density - **Super-Resolution Restoration**: Use Real-ESRGAN algorithm to enhance image clarity - **Batch Processing**: Support single image and batch folder processing - **Format Support**: JPG, PNG, TIFF, BMP, WebP ## Use Cases - Academic paper figure DPI checking - Print image quality pre-inspection - Low-resolution material restoration - Document scan enhancement ## Usage ### Check Single Image DPI ```bash python scripts/main.py check --input image.jpg ``` ### Batch Check Folder ```bash python scripts/main.py check --input ./images/ --output report.json ``` ### Super-Resolution Restoration ```bash python scripts/main.py upscale --input image.jpg --output upscaled.jpg --scale 4 ``` ### Batch Fix Low DPI Images ```bash python scripts/main.py upscale --input ./images/ --output ./output/ --min-dpi 300 --scale 2 ``` ## Parameters ### Check Command | Parameter | Type | Default | Required | Description | |-----------|------|---------|----------|-------------| | `--input` | string | - | Yes | Input image path or folder | | `--output` | string | stdout | No | Output report path | | `--target-dpi` | int | 300 | No | Target DPI threshold | ### Upscale Command | Parameter | Type | Default | Required | Description | |-----------|------|---------|----------|-------------| | `--input` | string | - | Yes | Input image path or folder | | `--output` | string | - | Yes | Output path | | `--scale` | int | 2 | No | Scale factor (2/3/4) | | `--min-dpi` | int | - | No | Only process images below this DPI | | `--denoise` | int | 0 | No | Denoise level (0-3) | | `--face-enhance` | flag | false | No | Enable face enhancement | ## Output Description ### DPI Check Report ```json { "file": "image.jpg", "dpi": [72, 72], "width_px": 1920, "height_px": 1080, "print_width_cm": 67.7, "print_height_cm": 38.1, "meets_300dpi": false, "recommended_scale": 4.17 } ``` ### Restored Image - Automatically saved as `<original_filename>_upscaled.<extension>` - Preserves original EXIF information - Sets DPI to 300 ## Dependencies - Python >= 3.8 - Pillow >= 9.0.0 - opencv-python >= 4.5.0 - numpy >= 1.21.0 - realesrgan (optional, for best results) ## Algorithm Description ### DPI Calculation ``` Actual DPI = Pixel dimensions / Physical dimensions Print size (cm) = Pixel count / DPI * 2.54 ``` ### Super-Resolution - Default use of Real-ESRGAN model - Support lightweight bicubic interpolation fallback - Intelligent model selection (general/anime/face) ## Notes 1. Input image DPI information may be inaccurate; actual pixel calculation shall prevail 2. Super-resolution cannot create non-existent information; extremely blurry images have limited improvement 3. Large file processing requires more memory 4. GPU acceleration requires CUDA environment (optional) ## Risk Assessment | Risk Indicator | Assessment | Level | |----------------|------------|-------| | Code Execution | Python/R scripts executed locally | Medium | | Network Access | No external API calls | Low | | File System Access | Read input files, write output files | Medium | | Instruction Tampering | Standard prompt guidelines | Low | | Data Exposure | Output files saved to workspace | Low | ## Security Checklist - [ ] No hardcoded credentials or API keys - [ ] No unauthorized file system access (../) - [ ] Output does not expose sensitive information - [ ] Prompt injection protections in place - [ ] Input file paths validated (no ../ traversal) - [ ] Output directory restricted to workspace - [ ] Script execution in sandboxed environment - [ ] Error messages sanitized (no stack traces exposed) - [ ] Dependencies audited ## Prerequisites ```bash # Python dependencies pip install -r requirements.txt ``` ## Evaluation Criteria ### Success Metrics - [ ] Successfully executes main functionality - [ ] Output meets quality standards - [ ] Handles edge cases gracefully - [ ] Performance is acceptable ### Test Cases 1. **Basic Functionality**: Standard input → Expected output 2. **Edge Case**: Invalid input → Graceful error handling 3. **Performance**: Large dataset → Acceptable processing time ## Lifecycle Status - **Current Stage**: Draft - **Next Review Date**: 2026-03-06 - **Known Issues**: None - **Planned Improvements**: - Performance optimization - Additional feature support

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 dpi-upscaler-checker-1776162121 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 dpi-upscaler-checker-1776162121 技能

通过命令行安装

skillhub install dpi-upscaler-checker-1776162121

下载 Zip 包

⬇ 下载 dpi-upscaler-checker v0.1.0

文件大小: 7.6 KB | 发布时间: 2026-4-17 14:42

v0.1.0 最新 2026-4-17 14:42
Initial public release of DPI Upscaler & Checker.

- Detects and verifies image DPI, including batch processing support.
- Calculates print size and pixel density to assess print readiness.
- Upscales low-resolution images using AI-based super-resolution (Real-ESRGAN), with optional face enhancement and denoising.
- Supports multiple image formats: JPG, PNG, TIFF, BMP, WebP.
- Outputs comprehensive DPI reports and saves upscaled images with preserved metadata.
- Includes risk assessment, security checklist, and usage instructions.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部