Changeset 1129 for trunk/src/phys_ima.m
- Timestamp:
- Mar 1, 2024, 8:09:20 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/phys_ima.m
r1112 r1129 11 11 % XmlData: cell array of structures defining the calibration parameters for each image 12 12 % ZIndex: index of the reference plane used to define the phys position in 3D 13 14 function [A_out,Rangx,Rangy]=phys_ima(A,XmlData,ZIndex )13 % resolution_factor: factor to control the number of pixels of the new image, default value =1 : same nbre of pixels as the original 14 function [A_out,Rangx,Rangy]=phys_ima(A,XmlData,ZIndex,resolution_factor) 15 15 xcorner=[]; 16 16 ycorner=[]; … … 21 21 if isstruct(XmlData) 22 22 XmlData={XmlData}; 23 end 24 if ~exist('resolution_factor','var') 25 resolution_factor=1; 23 26 end 24 27 … … 50 53 test_multi=(max(npx)~=min(npx)) || (max(npy)~=min(npy)); %different image lengths 51 54 52 npX=1+round( (Rangx(2)-Rangx(1))/max(dx));% nbre of pixels in the new image (use the largest resolution max(dx) in the set of images)53 npY=1+round( (Rangy(1)-Rangy(2))/max(dy));55 npX=1+round(resolution_factor*(Rangx(2)-Rangx(1))/max(dx));% nbre of pixels in the new image (use the largest resolution max(dx) in the set of images) 56 npY=1+round(resolution_factor*(Rangy(1)-Rangy(2))/max(dy)); 54 57 55 58 x=linspace(Rangx(1),Rangx(2),npX);
Note: See TracChangeset
for help on using the changeset viewer.