summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/localization/data/sqcif
ModeNameSize
-rw-r--r--1.txt258logstatsplainblame
-rw-r--r--Makefile136logstatsplainblame
-rw-r--r--expected.m198logstatsplainblame
-rw-r--r--expected_C.txt213logstatsplainblame
82' href='#n82'>82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247






















































































































































































































































                                                                                       
#include "sift.h"

/**
    SIFTLOCALMAX  Find local maximizers
   Returns the indexes of the local maximizers of
   the 3-dimensional array F.

    Say, we have a Q-dimensional array F.
   A local maximizer is an element whose value is greater than the
   value of all its neighbors.  The neighbors of an element i1...iQ
   are the subscripts j1...jQ such that iq-1 <= jq <= iq (excluding
   i1...iQ itself).  For example, if Q=1 the neighbors of an element
   are its predecessor and successor in the linear order; if Q=2, its
   neighbors are the elements immediately to its north, south, west,
   est, north-west, north-est, south-west and south-est
   (8-neighborhood).

   Points on the boundary of F are ignored (and never selected as
   local maximizers).

   SEL=SIFTLOCALMAX(F,THRESH) accepts an element as a mazimizer only
   if it is at least THRES greater than all its neighbors.

   SEL=SIFTLOCALMAX(F,THRESH,P) look for neighbors only in the first
   P dimensions of the Q-dimensional array F. This is useful to
   process F in ``slices''.

   REMARK.  Matrices (2-array) with a singleton dimension are
   interpreted as vectors (1-array). So for example SIFTLOCALMAX([0 1
   0]) and SIFTLOCALMAX([0 1 0]') both return 2 as an aswer. However,
   if [0 1 0] is to be interpreted as a 1x2 matrix, then the correct
   answer is the empty set, as all elements are on the boundary.
   Unfortunately MATLAB does not distinguish between vectors and
   2-matrices with a singleton dimension.  To forece the
   interpretation of all matrices as 2-arrays, use
   SIFTLOCALMAX(F,TRESH,2) (but note that in this case the result is
   always empty!).
**/

#define NDIMS 3

F2D* siftlocalmax(F2D* in, float thresh, int intervals, int M, int N)
{  
  int ndims, ptoffset=0, maxIter = 0; 
  int offsets[NDIMS];
  int midx[NDIMS];
  int dims[NDIMS];
  I2D* neighbors ;
  int nneighbors ;
  F2D* out;
    
 /**  
    We pass dogss[o], which has >1 intervals