How to dim a picture in matlab

4 次查看(过去 30 天)
Bailey Lopez
Bailey Lopez 2016-2-17
回答: DGM 2022-12-2
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);

回答(2 个)

Walter Roberson
Walter Roberson 2016-2-17
Divide by 255. Multiply by the maximum.

DGM
DGM 2022-12-2

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by