Changeset 1129 for trunk/src/phys_ima.m


Ignore:
Timestamp:
Mar 1, 2024, 8:09:20 PM (2 months ago)
Author:
sommeria
Message:

LIF calibration update and extrct_multitif

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/phys_ima.m

    r1112 r1129  
    1111% XmlData: cell array of structures defining the calibration parameters for each image
    1212% 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
     14function [A_out,Rangx,Rangy]=phys_ima(A,XmlData,ZIndex,resolution_factor)
    1515xcorner=[];
    1616ycorner=[];
     
    2121if isstruct(XmlData)
    2222    XmlData={XmlData};
     23end
     24if ~exist('resolution_factor','var')
     25resolution_factor=1;
    2326end
    2427
     
    5053test_multi=(max(npx)~=min(npx)) || (max(npy)~=min(npy)); %different image lengths
    5154
    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));
     55npX=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)
     56npY=1+round(resolution_factor*(Rangy(1)-Rangy(2))/max(dy));
    5457
    5558x=linspace(Rangx(1),Rangx(2),npX);
Note: See TracChangeset for help on using the changeset viewer.