matlab-normalize-image
Normalize images to [0,1] using im2double with proper validation and edge-case detection. Use when reading images with imread and converting to double for processing, displaying images with imshow, normalizing for ML training, brightening/adjusting pixel values, or any imread→process→imwrite workflow. Triggers on: im2double, normalize image, convert to double, imshow displays white, image appears all white, image appears all black, read and process images, batch normalize, brighten image, pixel value scaling.
npx skills add matlab/matlab-agentic-toolkit --skill matlab-normalize-image --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Image Normalization and Type Conversion Detect and prevent unexpected normalization results when converting images to [0,1] using base MATLAB image I/O functions. ## When to Use - Reading images with `imread` and converting to double for processing - Normalizing images to [0,1] for ML training or batch processing - Displaying images with `imshow` (especially if result is all-white) - Any `imread` → process → `imwrite` workflow involving type conversion - Brightening, scaling, or adjusting pixel values arithmetically ## When NOT to Use - Pure format conversion (e.g., TIFF to PNG without processing) — no normalization needed - Deep learning `imageDatastore` with `ReadFcn` — handles normalization internally - Simulink image processing blocks — different pipeline - Color space conversion (RGB↔HSV↔Lab) — separate domain - Image Processing Toolbox algorithm workflows (filtering, segmentation, morphology) ## Workflow Follow this pipeline for every image normalization task: ### Step 1: Inspect metadata with `imfinfo` Before reading, check what you're dealing with: ```matlab info = imfinfo(filePath); fprintf('ColorType: %s, BitDepth: %d, Class will be: ', info.ColorType, info.BitDepth); `
- When to Use
- When NOT to Use
- Workflow
- Step 1: Inspect metadata with imfinfo
- Step 2: Read and normalize
- Step 3: Validate and correct
- Step 4: Process (if applicable)
- Step 5: Display correctly
- Step 6: Convert and write
- Key Functions
- Common Mistakes
- Patterns
- Float-class detection and correction
- Bit-depth mismatch detection and correction
What does the matlab-normalize-image skill do?
Normalize images to [0,1] using im2double with proper validation and edge-case detection. Use when reading images with imread and converting to double for processing, displaying images with imshow, normalizing for ML training, brightening/adjusting pixel values, or any imread→process→imwrite workflow. Triggers on: im2double, normalize image, convert to double, imshow displays white, image appears all white, image appears all black, read and process images, batch normalize, brighten image, pixel value scaling.
How do I install it?
Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-normalize-image --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From matlab/matlab-agentic-toolkit, a repository with 868 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
