The fieldofview function creates field of view image masks for fisheye images. Default field-of-view angles are derived from an illustration in the book “Beleuchtungstechnik Grundlagen“.
Usage:
mask = fieldofview(theta,rho,mode,theta_mask,rho_mask)
Where:
Parameter | Description |
mask | Is the returned image mask. |
theta | Is a matrix containing the polar rotation angles \vartheta in ° of the fisheye image. |
rho | Is a matrix containing the tilt angles \rho in ° of the fisheye image. |
mode | Defines the mask type: – 'left' : left eye– 'right' : right eye– 'binocular' : both eyes– 'overlap' : overlap of both eyes– 'user' : user defined mask |
theta_mask (optional) | Defines theta mask angles for 'user' mode. |
rho_mask (optional) | Defines rho mask angles for 'user' mode. |
Examples
Create left and right eye mask for LUMOS fisheye image:
% load hyperspectral LUMOS image IM = readhyperspec('hyperspec.mat'); RGB = hyperspec2srgb(IM); % create image masks [theta, rho, omega] = fisheyeang; left_eye = fieldofview(theta,rho,'left'); right_eye = fieldofview(theta,rho,'right'); % plot image with masks figure(1) imshow(RGB.*left_eye,[]) figure(2) imshow(RGB.*right_eye,[])
See also: readhyperspec, hyperspec2srgb, fisheyeang
Result:
Create user specific field of view mask:
% load hyperspectral LUMOS image IM = readhyperspec('hyperspec.mat'); MEL = hyperspec2unit(IM,'mel'); % create image mask theta_mask = 0:90:360; rho_mask = [90 90 90 60 90]; [theta,rho] = fisheyeang(500,180); mask = fieldofview(theta,rho,'user',theta_mask,rho_mask); % plot image mask plotfalsecolours(mask.*MEL,'log','L_{e,mel} in W m^{-2} sr^{-1}')
See also: readhyperspec, hyperspec2unit, fisheyeang, plotfalsecolours
Result:
Reference
Beleuchtungstechnik Grundlagen. 4. Auflage, Huss-Medien GmbH, am Friedrichshain 22, 10407 Berlin, 2016, ISBN: 978-3-341-016343.