imresize is creating negative numbers from a matrix?
6 views (last 30 days)
Show older comments
Real Name
on 28 Jun 2018
Answered: Walter Roberson
on 28 Jun 2018
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 Comments
Accepted Answer
Walter Roberson
on 28 Jun 2018
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 Comments
More Answers (0)
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!