imresize is creating negative numbers from a matrix?
조회 수: 11 (최근 30일)
이전 댓글 표시
I'm doing something like:
image = imread(img);
image = rgb2gray(image);
image = im2double(image);
image = imresize(image);
Throughout the code, except for the last line, every element in the image matrix remains > 0. So why is imresize throwing in negative numbers?
댓글 수: 0
채택된 답변
Walter Roberson
2018년 6월 28일
Default interpolation method is bicubic https://www.mathworks.com/help/images/ref/imresize.html#buxswkh-1-method
"Note: Bicubic interpolation can produce pixel values outside the original range."
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!