⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pflat.m

📁 数学优化工具箱
💻 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 + -