フィルターのクリア

In 3D plot, how is the image displayed on a specific 3D spatial plane?

31 ビュー (過去 30 日間)
cui,xingxing
cui,xingxing 2022 年 8 月 26 日
コメント済み: cui,xingxing 2022 年 8 月 26 日
I am trying to display my image on a certain plane in 3D plot space, for example by displaying one of matlab's own images "peppers.png" to a fixed position, during which I try to display the image using image or imshow build in function+view(3), but the default image position is (0, 0,0), By looking at the image function properties documentation, I only see the x,y position setting property, but not the z axis,I can't change its Z position, what should I do?
your answer would be like greatly apperaciate!
srcImg = imread("peppers.png");
figure;hold on;view(3)
% hAxis = gca;
% hAxis.XRuler.FirstCrossoverValue = 0; % X crossover with Y axis
% hAxis.XRuler.SecondCrossoverValue = 0; % X crossover with Z axis
% hAxis.YRuler.FirstCrossoverValue = 0; % Y crossover with X axis
% hAxis.YRuler.SecondCrossoverValue = 0; % Y crossover with Z axis
% hAxis.ZRuler.FirstCrossoverValue = 0; % Z crossover with X axis
% hAxis.ZRuler.SecondCrossoverValue = 0; % Z crossover with Y axis
image(srcImg);

採用された回答

Chunru
Chunru 2022 年 8 月 26 日
srcImg = imread("peppers.png");
sz = size(srcImg);
[xx, yy] =meshgrid(1:sz(1), 1:sz(2));
zz = ones(size(xx)); % set the z value
figure;hold on;view(3)
warp(xx, yy, zz, srcImg)
%image(srcImg);

その他の回答 (1 件)

KSSV
KSSV 2022 年 8 月 26 日

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by