Changeset 897 for trunk/src/transform_field
- Timestamp:
- May 25, 2015, 8:48:58 PM (10 years ago)
- Location:
- trunk/src/transform_field
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/transform_field/ima_remove_background.m
r810 r897 54 54 B=imresize(Backg,size(A),'bilinear');% interpolate to the initial size image 55 55 ImPart=(A-B); 56 DataOut.A=ImPart.*(ImPart>threshold); 56 DataOut.A=ImPart; 57 %DataOut.A=ImPart.*(ImPart>threshold); 57 58 DataOut.A=feval(Atype,DataOut.A); -
trunk/src/transform_field/ima_remove_particles.m
r810 r897 32 32 if strcmp(DataIn,'*') 33 33 return 34 34 35 end 35 36 36 37 %parameters 37 38 threshold=200; 38 nblock_x= 30;%size of image subblocks for analysis39 nblock_y= 30;39 nblock_x=10;%size of image subblocks for analysis 40 nblock_y=10; 40 41 %--------------------------------------------------------- 41 42 DataOut=DataIn;%default … … 49 50 Atype=class(DataIn.A); 50 51 A=double(DataIn.A); 51 Backg=zeros(size(A));52 % Backg=zeros(size(A)); 52 53 Aflagmin=sparse(imregionalmin(A));%Amin=1 for local image minima 53 54 Amin=A.*Aflagmin;%values of A at local minima … … 58 59 Backg=Backg./Bmin; % find the average of minima in blocks 59 60 B=imresize(Backg,size(A),'bilinear');% interpolate to the initial size image 60 ImPart=(A-B); 61 ImPart=ImPart.*(ImPart>threshold); 62 DataOut.A=A-ImPart;% 61 DataOut.A=B; 62 % ImPart=(A-B); 63 % ImPart=ImPart.*(ImPart>threshold); 64 % DataOut.A=A-ImPart;% 63 65 DataOut.A=feval(Atype,DataOut.A); 64 66
Note: See TracChangeset
for help on using the changeset viewer.