Read BEFORE troubleshooting or enhancing camera image quality. Diagnoses and enhances image quality from cameras connected via Image Acquisition Toolbox or USB Webcams support package. Discovers camera capabilities at runtime, analyzes captured images for quality issues (brightness, contrast, sharpness, noise, color balance, backlighting), suggests hardware setting adjustments tailored to the specific camera, and applies Image Processing Toolbox enhancement functions.
SkillScore64Maintained
Automatic
◆Coding pack
Last verified 8/16/2026
What it changes
Passed 11 of 17 test cases with the skill, and 10 of 17 without it.
Without skill59%
With skill64%
Checks it passed that the model alone missed
Applies imlocalbrighten prior to locallapfilt in the enhancement sequence.
Evaluates the backlightRatio field within the diagnostic output structure.
Saves the generated pipeline function in the current working directory or user-specified folder.
3 fixed11 passed either way6 still failing2 broke
Pass-rate lift
+5 pp
Tokens
+116%
Agent turns
0%
Response time
-46%
Model gemini-3.6-flashMeasured 8/16/2026v114 of 22 cases passed with skill · 17 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 3
Prompt
My camera snapshot has a brightly lit background and a dark subject in the center. I ran diagnoseImageQuality.m on the frame. Which specific metric field in the diagnostic output struct indicates backlit subject issues?
What was checked, without and with the skill
Checked
Without skill
With skill
Evaluates the backlightRatio field within the diagnostic output structure.
Missed
Passed
case-17 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md299 lines5 filesincludes scripts
Purpose
Diagnose image quality issues from any connected camera and improve them through a combination of hardware setting adjustments and software post-processing. Operates in a hardware-first, software-second philosophy: always try to fix at the source before resorting to post-processing.
When to Use
User complains about poor image quality from a camera (too dark, blurry, noisy, washed out)
User asks how to improve or optimize camera settings
User captures an image and wants to enhance it
User mentions backlit subject, underexposed, overexposed, or out of focus
When NOT to Use
General image processing on files not from a camera (use IPT directly)
Building an image acquisition pipeline from scratch (use Image Acquisition Toolbox docs)
Camera geometric calibration (use Camera Calibrator app)
Reference Documents (load when needed)
Read references/diagnosis-guidance.md for detailed metric thresholds and backlight detection algorithms
Read references/hardware-tuning-guidance.md for property discovery patterns, camera-type property tables, and safe adjustment strategies (applicable to all camera types)
Read references/enhancement-guidance.md for IPT function parameters, pipeline ordering, and common errors
Script Entrypoints
scripts/diagnoseImageQuality.m — reusable diagnostic function; takes an image, returns a struct of quality metrics with assessments
Hard Requirements
Call detect_matlab_toolboxes first to confirm Image Acquisition Toolbox and Image Processing Toolbox are installed
Call check_matlab_code on any script before executing it
Never hardcode camera property names — always discover at runtime
Protocol
Step 1 — Connect and Discover Camera Capabilities
API selection: When Image Acquisition Toolbox is available, always prefer videoinput over other interfaces like webcam(). videoinput exposes more properties (via propinfo), supports bulk frame acquisition (getdata), and provides FramesAcquiredFcn for streaming. Use webcam() only when Image Acquisition Toolbox is not installed and the user has the MATLAB Support Package for USB Webcams instead.
Connect to the camera and enumerate all available properties: