MATLAB inverse function (doesn't allow bigger than 255)
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Fabio Corres
am 11 Mär. 2017
Kommentiert: Fabio Corres
am 11 Mär. 2017
Hey there ,
I have an image and i want to use an inverse function on it with this formula.
but i have a problem after i write the code in loop.MATLAB doesn't allow the number that bigger than 255 and always give me a result as 1 (255/255).My code is here :
for i= 1 : 1:2
for j = 1 : 2
yinv(i,j) = ((255 - ylpf(i,j))^2 ) / 255;
end
end
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 11 Mär. 2017
for i= 1 : 1:2
for j = 1 : 2
yinv(i,j) = uint8( (double(255 - ylpf(i,j))^2 ) / 255 );
end
end
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!