function F=FeatFromImage(X , gb)
			%padding to 2x-1 size, similar to what we did for rawFilter->padFilter
			[imgH  imgW] = size(X);
			padXFFTbase = padFFTImage(X);

			F=[]; %the size of Feature is actuall KNOWN ahead of time, but I'm lazy...
			[nLevel nDir]=size(gb);
			for pyLevel=1:nLevel
				ratio= 2^(pyLevel-1);
				%crop the four corners
				edgeH  = imgH/ratio-1;
                edgeW  = imgW/ratio-1;
				padXFFT = padXFFTbase([1:edgeH end-edgeH:end], [1:edgeW,end-edgeW:end]) / (ratio^2);

				for pyOri=1:nDir
					%convolution filtering and remove the borders
					Fx = ifft2(padXFFT.* gb(pyLevel,pyOri).padFilter);
					Fx = cropCenter(Fx);
					Fmag = abs(Fx(:)');

					%normalize
					subF = Fmag./norm(Fmag,2);

					%accumulate feature
					F=[F subF];

				end %for-orientation
			end %for-level
			F= [F 1];
return

