Install any skill in seconds. Free to start, no credit card required.
Get Started Free →matlab/matlab-normalize-image
Normalize images to [0,1] using im2double with proper validation and edge-case detection.
Passed 22 of 25 test cases with the skill, and 16 of 25 without it.
and 10 more in the full report
8 fixed14 passed either way1 still failing2 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 8 test cases the skill fixed. Same model, same prompt, with and without the skill.
I have a double-precision float RGB matrix in MATLAB where pixel values range from 0.0 to 250.0. When I pass this matrix to `imshow`, the whole image displays as solid white. I tried `imshow(img, [])` but the display is still completely white. Provide a MATLAB code snippet to display this float RGB image correctly without clipping to white.
| Checked | Without skill | With skill |
|---|---|---|
| Rescale double float RGB matrix using rescale(img, 0, 1) prior to passing to imshow | Missed | Passed |
| Avoid relying on imshow auto-ranging syntax with empty brackets for RGB data | Passed | Passed |
The instructions your model reads when the skill loads.
Detect and prevent unexpected normalization results when converting images to [0,1] using base MATLAB image I/O functions.
imread and converting to double for processingimshow (especially if result is all-white)imread → process → imwrite workflow involving type conversionimageDatastore with ReadFcn — handles normalization internallyFollow this pipeline for every image normalization task:
imfinfoBefore reading, check what you're dealing with:
info = imfinfo(filePath);
fprintf('ColorType: %s, BitDepth: %d, Class will be: ', info.ColorType, info.BitDepth);
What to look for:
info.ColorType | Action |
|---|---|
'indexed' | Use [X, cmap] = imread(f) then ind2rgb(X, cmap) (core MATLAB) — single-output imread returns indices, not pixel colors |
'truecolor' | Standard RGB — proceed normally |
test cases passed, vs 16 / 25 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.