How to dim a picture in matlab
Show older comments
basically, I need to create a function that scales the original range of 0-255 for the intensity to one that is between 0 and a new max value. The beginning function line is as follows:
function [dimmed] = dimImage(orig, new_max)
The next two lines are also given:
orig = imread('cupcakes.png');
orig = double(orig);
Answers (2)
Walter Roberson
on 17 Feb 2016
0 votes
Divide by 255. Multiply by the maximum.
DGM
on 2 Dec 2022
0 votes
See the answer to the same question here:
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!