📄 pflat.m
字号:
function [y,alpha]=pflat(x);
% [y,alpha]=pflat(x) - normalization of projective points.
% Do a normalization on the projective
% points in x. Each column is considered to
% be a point in homogeneous coordinates.
% Normalize so that the last coordinate becomes 1.
% WARNING! This is not good if the last coordinate is 0.
% INPUT :
% x - matrix in which each column is a point.
% OR structure or imagedata object with points
% OUTPUT :
% y - result after normalization (in homogeneous coordinates)
% alpha - depth
if isa(x,'structure') | isa (x,'imagedata'),
x=getpoints(x);
end
[a,n]=size(x);
alpha=x(a,:);
y=x./(ones(a,1)*alpha);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -