initmodel_static.m 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. function model = initmodel_static( settings, i_numDim )
  2. % function model = initmodel_static( settings, i_numDim )
  3. %
  4. % BRIEF
  5. % Initialize model structure.
  6. %
  7. % OUTPUT
  8. % model = initmodel( settings )
  9. % model.maxsize = [y,x] size of root filter in HOG cells
  10. % ...TODO
  11. %
  12. % author: Alexander Freytag
  13. % date: 13-02-2014 (dd-mm-yyyy) (last updated)
  14. % %% how many dimensions does our feature has?
  15. % for DPM-HOG features, this would result in the following layout
  16. % how many dimensions does our resulting 'augmented HoG feature' has?
  17. % see DPM Paper from 2010 for more details
  18. % 2*numberBins for keeping gradient sign +
  19. % 1*numberBins without the sign +
  20. % 4 strange texture feature dimensions +
  21. % 1 dimension constant to zero
  22. % -> default: 32 dimensions
  23. sizeOfModel = [ settings.lda.bg.i_numCells, ...
  24. i_numDim...
  25. ];
  26. %% initialize the rest of the model structure
  27. %empty model of according size
  28. model.w = zeros(sizeOfModel);
  29. % size of root filter in HOG cells
  30. model.i_numCells = sizeOfModel(1:2);
  31. % size of each cell in pixel
  32. model.i_binSize = settings.lda.bg.i_binSize;
  33. % strange interval
  34. model.interval = settings.lda.bg.interval;
  35. %threshold to reject detection with score lwoer than that
  36. model.d_detectionThreshold ...
  37. = settings.lda.d_detectionThreshold;
  38. %negative mean, cov matrix, and stuff like that
  39. model.bg = settings.lda.bg;
  40. %======== ======== ======== ========
  41. % add here noise model for
  42. % modeling de-noising effect
  43. %======== ======== ======== ========
  44. % this adds noise on the main diagonal of the covariance matrix
  45. model.lda.lambda = settings.lda.lambda;
  46. %%% this additionally adds a drop-out noise model
  47. model.lda.b_noiseDropOut = settings.lda.b_noiseDropOut;
  48. model.lda.d_dropOutProb = settings.lda.d_dropOutProb;
  49. end