<< imselect Utilities and Interactive Tools rectangle >>

IPCV >> Utilities and Interactive Tools > rect2cart

rect2cart

Convert from image rectangular coordinate to cartesian coordinate in pixel mode

Syntax

[cart_x,cart_y] = rect2cart(dim, rect_x, rect_y)

Parameters

dim :

Dimention of the Scilab matrix (first 2 dim of the matrix) in row and column format, in [row col].

varargin :

Input could be in rect_x and rect_y pairs (each in m x 1 matrix), or in m x 2 matrix which consist of [rect_x rect_y]

rect_x :

X in rectangular coordinate system

rect_y :

Y in rectangular coordinate system

varargout :

Output in cart_x and cart_y pairs or matrix of [cart_x cart_y] following in the input format

cart_x :

X in cartesian coordinate system

cart_y :

Y in cartesian coordinate system

Description

This function used to convert from image rectangular coordinate to cartesian coordinate in pixel mode.

Examples

S = rand(10,10);
S2 = repmat(S,[1,1,3]);
S2(3,4,:) = [1,0,0];
imshow(S2);
rect_x = 4; rect_y = 3;
[cart_x,cart_y] = rect2cart([10,10], rect_x, rect_y);
plot(cart_x,cart_y, 'bx');

See also

Authors


Report an issue
<< imselect Utilities and Interactive Tools rectangle >>