source: hep2cells/gencelllbp.m @ 131

Last change on this file since 131 was 40, checked in by dtax, 12 years ago

HEp 2 cell classification, ICPR 2012 competition

File size: 833 bytes
RevLine 
[40]1% load the data:
2load cells;
3
4sig = 3;
5
6% type of LBP map
7maph= getlbpmap(8,'u2');
8
9% compute feature for train and test:
10N = size(x,1);
11for i=1:N
12   i
13   % get image data from green channel:
14  % im = sum(x{i,1}(:,:,2),3);
15  % if (min(im(:))<0)
16  %    error('pixel values < 0');
17 %  end
18   %im = double(hist_equalize(im));
19   
20   im = x{i,1}(:,:,2);
21   im = im_gauss(double(im),sig,sig);
22   im = im.*double(x{i,2});
23   x{i,1} = lbp(im,1,8,maph,'nh');
24       
25   
26end
27M = size(z,1);
28for i=1:M
29   i
30  % im = sum(z{i,1}(:,:,2),3);
31  % if (min(im(:))<0)
32  %    error('pixel values < 0');
33  % end
34   %im = double(hist_equalize(im));
35   
36
37   im = z{i,1}(:,:,2);
38   im = im_gauss(double(im),sig,sig);
39   im = im.*double(z{i,2});
40   z{i,1} = lbp(im,1,8,maph,'nh');
41end
42
43save cells_lbp_gauss3 x z;
Note: See TracBrowser for help on using the repository browser.