2016-07-11 5 views
0

의 설명대로 SURF를 얻을 수 있습니까? 각 이미지 포인트에 대한 Descriptor-SURF를 얻으려고합니다. 포인트의 관심을 원하지 않지만 각 포인트의 SURF 디스크립터 이미지의 어떻게 유지하기 위해 SURF 기술자는 관심 포인트이미지의 각 포인트

FastHessianData.thresh = Options.tresh; 
FastHessianData.octaves = Options.octaves; 
FastHessianData.init_sample = Options.init_sample; 
FastHessianData.img = iimg; 
ipts = FastHessian_getIpoints(FastHessianData,Options.verbose) 
% Describe the interest points 
if(~isempty(ipts)) 
    ipts = SurfDescriptor_DecribeInterestPoints(ipts,Options.upright, Options.extended, iimg, Options.verbose); 
end 

포인트가

function ipts=FastHessian_getIpoints(FastHessianData,verbose) 
% filter index map 

filter_map = [0,1,2,3; 
    1,3,4,5; 
    3,5,6,7; 
    5,7,8,9; 
    7,9,10,11]+1; 

np=0; ipts=struct; 

% Build the response map 
responseMap=FastHessian_buildResponseMap(FastHessianData); 

% Find the maxima acrros scale and space 
for o = 1:FastHessianData.octaves 
    for i = 1:2 
     b = responseMap{filter_map(o,i)}; 
     m = responseMap{filter_map(o,i+1)}; 
     t = responseMap{filter_map(o,i+2)}; 

     % loop over middle response layer at density of the most 
     % sparse layer (always top), to find maxima across scale and space 
     [c,r]=ndgrid(0:t.width-1,0:t.height-1); 
     r=r(:); c=c(:); 

     p=find(FastHessian_isExtremum(r, c, t, m, b,FastHessianData)); 
     for j=1:length(p); 
      ind=p(j); 
      [ipts,np]=FastHessian_interpolateExtremum(r(ind), c(ind), t, m, b, ipts,np); 
     end 
    end 
end 

% Show laplacian and response maps with found interest-points 
if(verbose) 
    % Show the response map 
    if(verbose) 
     fig_h=ceil(length(responseMap)/3); 
     h=figure; set(h,'name','Laplacian'); 
     for i=1:length(responseMap), 
      pic=reshape(responseMap{i}.laplacian,[responseMap{i}.width responseMap{i}.height]); 
      subplot(3,fig_h,i); imshow(pic,[]); hold on; 
     end 
     h=figure; set(h,'name','Responses'); 
     h_res=zeros(1,length(responseMap)); 
     for i=1:length(responseMap), 
      pic=reshape(responseMap{i}.responses,[responseMap{i}.width responseMap{i}.height]); 
      h_res(i)=subplot(3,fig_h,i); imshow(pic,[]); hold on; 
     end 
    end 

    % Show the maximum points 
    disp(['Number of interest points found ' num2str(np)]); 
    scales=zeros(1,length(responseMap)); 
    scaley=zeros(1,length(responseMap)); 
    scalex=zeros(1,length(responseMap)); 
    for i=1:length(responseMap) 
     scales(i)=responseMap{i}.filter*(2/15); 
     scalex(i)=responseMap{i}.width/size(FastHessianData.img,2); 
     scaley(i)=responseMap{i}.height/size(FastHessianData.img,1); 
    end 
    for i=1:np 
     [t,ind]=min((scales-ipts(i).scale).^2); 
     plot(h_res(ind),ipts(i).y*scaley(ind)+1,ipts(i).x*scalex(ind)+1,'o','color',rand(1,3)); 
    end 
end 

을 가지고있다있는 함수의 추출을 설명
% Create Integral Image 
iimg=IntegralImage_IntegralImage(img); 

을 계산하기 위해 필수적인 이미지를 사용 이 탐지 단계를 거치지 않고 모든 포인트를 확인한 다음 SURF 디스크립터로이 모든 포인트를 설명하십시오. 코드에서

+0

당신이 설명이 모든 코드 무엇을 더 나은 방법에 의해 반환 만의 모든 포인트를 포함 그래서 변수는이 질문에 관련이? –

+0

SURF는 키포인트 검출기 ("흥미로운"키포인트를 검색 함)와 설명 자로 구성됩니다. 모든 점에 설명자를 적용하려면 설명 자의 모든 점을 벡터로 입력하십시오. –

답변

1

당신은 명확 검출기 및 기술자 기능 분리가 :

  • FastHessian_getIpoints
  • SurfDescriptor_DecribeInterestPoints가 주어진 점에 대한 SURF 기술자를 계산 흥미있는 키포인트의 목록을 반환합니다.

감지기를 제거하고 이미지의 모든 점을 입력으로 제공하는 설명자 함수를 호출하십시오.

ipts 대신 키포인트 검출기

+0

이 귀중한 정보를 주셔서 감사합니다. 실제로 정확하게하고 싶습니다.하지만이 문제에 대해 약간의 설명이 있습니다. 어떻게 기술자에게 모든 포인트에 영향을 미칠 수 있습니까? 여전히 그렇게하지 못했습니다. ipts = FastHessianData.img ; 'FastHessian_getIpoints (FastHessianData, Options.verbose) 대신'ipts = FastHessian_getIpoints (FastHessianData, Options.verbose)'라는 오류 메시지가 나타납니다 :'Error in SurfDescriptor_DecribeInterestPoints (17 행) if (isempty (fields (ipts))) 끝 .' tkanks 당신의 도움을 위해 다시 –

+0

'FastHessian_getIpoints'는 직접 지정과 일치하지 않는 형식으로 포인트를 반환합니다. 따라서 일부 필드는 비어 있습니다. 어떤 포맷/구조가 포인트를 반환하는지 확인한 다음이 포맷에 따라 우리 자신의 포인트 (이미지의 모든 포인트)를 생성하는 것을 감지기를 실행하는 것이 좋습니다. –

+0

정확하게이 경우, 관심 지점은 구조체입니다. 지점의 x와 y, 점과 Laplacien의 크기를 찾을 수 있습니다. 나는 중립적 인 요소이기 때문에 저울과 laplacien에 1을 쓴다. 하지만 x와 y (공간적 픽셀 위치)를 복구하기 위해 나는 그것을 관리하지 못했습니다. –