Ignore:
Timestamp:
Apr 11, 2021, 10:03:02 PM (4 years ago)
Author:
sommeria
Message:

various bug repairs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/transform_field/ima_levels.m

    r1093 r1097  
    6969fctblock= inline('mean(x(:))');
    7070B=imresize(Backg,size(A),'bilinear');% interpolate to the initial size image
    71 A=(A-B);%substract background
    72 AMean=blkproc(A,[nblock_y nblock_x],fctblock);% take the mean in  blocks
    73 fctblock= inline('var(x(:))');
    74 AVar=blkproc(A,[nblock_y nblock_x],fctblock);% take the mean in  blocks
    75 Avalue=AVar./AMean% typical value of particle luminosity
    76 Avalue=imresize(Avalue,size(A),'bilinear');% interpolate to the initial size image
    77 DataOut.A=uint16(1000*tanh(A./(2*Avalue)));
     71DataOut.A=B;
     72
     73% A=(A-B);%substract background
     74% AMean=blkproc(A,[nblock_y nblock_x],fctblock);% take the mean in  blocks
     75% fctblock= inline('var(x(:))');
     76% AVar=blkproc(A,[nblock_y nblock_x],fctblock);% take the mean in  blocks
     77% Avalue=AVar./AMean;% typical value of particle luminosity
     78% Avalue=imresize(Avalue,size(A),'bilinear');% interpolate to the initial size image
     79% DataOut.A=uint16(1000*tanh(A./(2*Avalue)));
    7880%Bmin=blkproc(Aflagmin,[nblock_y nblock_x],sumblock);% find the number of minima in blocks
    7981%Backg=Backg./Bmin; % find the average of minima in blocks
    8082
    8183
     84
     85
Note: See TracChangeset for help on using the changeset viewer.