linecoords.m
来自「code for iris recognition」· M 代码 · 共 34 行
M
34 行
% linecoords - returns the x y coordinates of positions along a line%% Usage: % [x,y] = linecoords(lines, imsize)%% Arguments:% lines - an array containing parameters of the line in% form% imsize - size of the image, needed so that x y coordinates% are within the image boundary%% Output:% x - x coordinates% y - corresponding y coordinates%% Author: % Libor Masek% masekl01@csse.uwa.edu.au% School of Computer Science & Software Engineering% The University of Western Australia% November 2003function [x,y] = linecoords(lines, imsize)xd = [1:imsize(2)];yd = (-lines(3) - lines(1)*xd ) / lines(2);coords = find(yd>imsize(1));yd(coords) = imsize(1);coords = find(yd<1);yd(coords) = 1;x = int32(xd);y = int32(yd);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?