How to dim a picture in matlab

4 visualizaciones (últimos 30 días)
Bailey Lopez
Bailey Lopez el 17 de Feb. de 2016
Respondida: DGM el 2 de Dic. de 2022
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);

Respuestas (2)

Walter Roberson
Walter Roberson el 17 de Feb. de 2016
Divide by 255. Multiply by the maximum.

DGM
DGM el 2 de Dic. de 2022

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by