Interpolation method of IMAGE

When the size of the data displayed by the image command differs from the number of pixels used on the screen, the data must be interpolated.
  • Which method is used for this interpolation?
  • A user-defined property to control this would be fine.
  • If I want to create a user-defined interpolation, it would be convenient to let it be triggered automatically, when the image is resized - e.g. be resizing the figure or modifying the axes positions. What is a secure way to catch all methods of resizing? Can we attach a callback? Maybe in the Java level? (Hi Yair!)

답변 (2개)

Jan
Jan 2021년 12월 23일

0 개 추천

x = zeros(640, 480, 3);
x(:, 1:2:end, :) = 1;
image(x)
This looks confusing to me in the online version: Where are the steps on the diagonal come from? They appear in a 64x48 pixels image also.
Locally in a figure of Matlab R2018b it looks, like image() is using a "nearest neighbor" interpolation:
All pixels are black or white.

댓글 수: 1

Andreas Westlund
Andreas Westlund 2022년 5월 2일
Did you succeed in creating your own resize function? And would you mind sharing a code example?

댓글을 달려면 로그인하십시오.

yanqi liu
yanqi liu 2021년 12월 24일

0 개 추천

yes,sir,may be default display size confused,such as
clc; clear all; close all;
x = zeros(640, 480, 3);
x(:, 1:2:end, :) = 1;
figure;
h=image(x);truesize

카테고리

도움말 센터File Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

제품

질문:

Jan
2019년 4월 3일

댓글:

2022년 5월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by