MATLAB inverse function (doesn't allow bigger than 255)
조회 수: 1 (최근 30일)
이전 댓글 표시
Hey there ,
I have an image and i want to use an inverse function on it with this formula.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161595/image.png)
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
채택된 답변
Walter Roberson
2017년 3월 11일
for i= 1 : 1:2
for j = 1 : 2
yinv(i,j) = uint8( (double(255 - ylpf(i,j))^2 ) / 255 );
end
end
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!