can you help me to make algorithm, if i want to get LBP value from 13x13 image's size?
    조회 수: 2 (최근 30일)
  
       이전 댓글 표시
    
clear all;
     close all; 
     clc;
     I=imread('s.jpg');
     figure,imshow(I)   
   w=size(I2,1);     
     h=size(I2,2);  
     %%LBP    
       for i=2:w-1   
        for j=2:h-1    
           J0=I2(i,j);   
            I3(i-1,j-1)=I2(i-1,j-1)>J0;  
             I3(i-1,j)=I2(i-1,j)>J0;   
            I3(i-1,j+1)=I2(i-1,j+1)>J0;  
              I3(i,j+1)=I2(i,j+1)>J0;     
          I3(i+1,j+1)=I2(i+1,j+1)>J0;    
            I3(i+1,j)=I2(i+1,j)>J0;      
          I3(i+1,j-1)=I2(i+1,j-1)>J0;     
           I3(i,j-1)=I2(i,j-1)>J0;       
        LBP(i,j)=I3(i-1,j-1)*2^7+I3(i-1,j)*2^6+I3(i-1,j+1)*2^5+I3(i,j+1)*2^4+I3(i+1,j+1)*2^3+I3(i+1,j)*2^2+I3(i+1,j-1)*2^1+I3(i,j-1)*2^0;          
  end  
     end 
         subplot(1,2,1);
      imshow(LBP,[]);
      subplot(1,2,2);
      [pixel,y] = imhist(uint8(LBP));
      bar(y,pixel);
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
