Blender  V3.3
detect.cc
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (c) 2011 libmv authors.
4 **
5 ** Permission is hereby granted, free of charge, to any person obtaining a copy
6 ** of this software and associated documentation files (the "Software"), to
7 ** deal in the Software without restriction, including without limitation the
8 ** rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 ** sell copies of the Software, and to permit persons to whom the Software is
10 ** furnished to do so, subject to the following conditions:
11 **
12 ** The above copyright notice and this permission notice shall be included in
13 ** all copies or substantial portions of the Software.
14 **
15 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 ** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 ** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 ** IN THE SOFTWARE.
22 **
23 ****************************************************************************/
24 
25 #include <memory.h>
26 #include <stdlib.h>
27 #include <queue>
28 
29 #include "libmv/base/scoped_ptr.h"
30 #include "libmv/image/array_nd.h"
31 #include "libmv/image/convolve.h"
33 #include "libmv/logging/logging.h"
35 
36 #ifndef LIBMV_NO_FAST_DETECTOR
37 # include <third_party/fast/fast.h>
38 #endif
39 
40 #ifdef __SSE2__
41 # include <emmintrin.h>
42 #endif
43 
44 namespace libmv {
45 
46 namespace {
47 
48 // Default value for FAST minimal trackness in the DetectOptions structure.
49 // TODO(sergey): Think of a better default value here.
50 int kDefaultFastMinTrackness = 128;
51 
52 // Default value for Harris threshold in the DetectOptions structure.
53 // TODO(sergey): Think of a better default value here.
54 double kDefaultHarrisThreshold = 1e-5;
55 
56 class FeatureComparison {
57  public:
58  bool operator()(const Feature& left, const Feature& right) const {
59  return right.score > left.score;
60  }
61 };
62 
63 // Filter the features so there are no features closer than
64 // minimal distance to each other.
65 // This is a naive implementation with O(n^2) asymptotic.
66 void FilterFeaturesByDistance(const vector<Feature>& all_features,
67  int min_distance,
68  vector<Feature>* detected_features) {
69  const int min_distance_squared = min_distance * min_distance;
70 
71  // Use priority queue to sort the features by their score.
72  //
73  // Do this on copy of the input features to prevent possible
74  // distortion in callee function behavior.
75  std::priority_queue<Feature, std::vector<Feature>, FeatureComparison>
76  priority_features;
77 
78  for (int i = 0; i < all_features.size(); i++) {
79  priority_features.push(all_features.at(i));
80  }
81 
82  while (!priority_features.empty()) {
83  bool ok = true;
84  Feature a = priority_features.top();
85 
86  for (int i = 0; i < detected_features->size(); i++) {
87  Feature& b = detected_features->at(i);
88  if (Square(a.x - b.x) + Square(a.y - b.y) < min_distance_squared) {
89  ok = false;
90  break;
91  }
92  }
93 
94  if (ok) {
95  detected_features->push_back(a);
96  }
97 
98  priority_features.pop();
99  }
100 }
101 
102 void DetectFAST(const FloatImage& grayscale_image,
103  const DetectOptions& options,
104  vector<Feature>* detected_features) {
105 #ifndef LIBMV_NO_FAST_DETECTOR
106  const int min_distance = options.min_distance;
107  const int min_trackness = options.fast_min_trackness;
108  const int margin = options.margin;
109  const int width = grayscale_image.Width() - 2 * margin;
110  const int height = grayscale_image.Width() - 2 * margin;
111  const int stride = grayscale_image.Width();
112 
113  scoped_array<unsigned char> byte_image(
114  FloatImageToUCharArray(grayscale_image));
115  const int byte_image_offset = margin * stride + margin;
116 
117  // TODO(MatthiasF): Support targetting a feature count (binary search
118  // trackness)
119  int num_features;
120  xy* all = fast9_detect(byte_image.get() + byte_image_offset,
121  width,
122  height,
123  stride,
124  min_trackness,
125  &num_features);
126  if (num_features == 0) {
127  free(all);
128  return;
129  }
130  int* scores = fast9_score(byte_image.get() + byte_image_offset,
131  stride,
132  all,
133  num_features,
134  min_trackness);
135  // TODO(MatthiasF): merge with close feature suppression
136  xy* nonmax = nonmax_suppression(all, scores, num_features, &num_features);
137  free(all);
138  // Remove too close features
139  // TODO(MatthiasF): A resolution independent parameter would be better than
140  // distance e.g. a coefficient going from 0 (no minimal distance) to 1
141  // (optimal circle packing)
142  // FIXME(MatthiasF): this method will not necessarily give all maximum markers
143  if (num_features) {
144  vector<Feature> all_features;
145  for (int i = 0; i < num_features; ++i) {
146  all_features.push_back(Feature((float)nonmax[i].x + margin,
147  (float)nonmax[i].y + margin,
148  (float)scores[i],
149  9.0));
150  }
151  FilterFeaturesByDistance(all_features, min_distance, detected_features);
152  }
153  free(scores);
154  free(nonmax);
155 #else
156  (void)grayscale_image; // Ignored.
157  (void)options; // Ignored.
158  (void)detected_features; // Ignored.
159  LOG(FATAL) << "FAST detector is disabled in this build.";
160 #endif
161 }
162 
163 #ifdef __SSE2__
164 static unsigned int SAD(const ubyte* imageA,
165  const ubyte* imageB,
166  int strideA,
167  int strideB) {
168  __m128i a = _mm_setzero_si128();
169  for (int i = 0; i < 16; i++) {
170  a = _mm_adds_epu16(
171  a,
172  _mm_sad_epu8(_mm_loadu_si128((__m128i*)(imageA + i * strideA)),
173  _mm_loadu_si128((__m128i*)(imageB + i * strideB))));
174  }
175  return _mm_extract_epi16(a, 0) + _mm_extract_epi16(a, 4);
176 }
177 #else
178 static unsigned int SAD(const ubyte* imageA,
179  const ubyte* imageB,
180  int strideA,
181  int strideB) {
182  unsigned int sad = 0;
183  for (int i = 0; i < 16; i++) {
184  for (int j = 0; j < 16; j++) {
185  sad += abs((int)imageA[i * strideA + j] - imageB[i * strideB + j]);
186  }
187  }
188  return sad;
189 }
190 #endif
191 
192 void DetectMORAVEC(const FloatImage& grayscale_image,
193  const DetectOptions& options,
194  vector<Feature>* detected_features) {
195  const int distance = options.min_distance;
196  const int margin = options.margin;
197  const unsigned char* pattern = options.moravec_pattern;
198  const int count = options.moravec_max_count;
199  const int width = grayscale_image.Width() - 2 * margin;
200  const int height = grayscale_image.Width() - 2 * margin;
201  const int stride = grayscale_image.Width();
202 
203  scoped_array<unsigned char> byte_image(
204  FloatImageToUCharArray(grayscale_image));
205 
206  unsigned short histogram[256];
207  memset(histogram, 0, sizeof(histogram));
208  scoped_array<ubyte> scores(new ubyte[width * height]);
209  memset(scores.get(), 0, width * height);
210  const int r = 1; // radius for self similarity comparison
211  for (int y = distance; y < height - distance; y++) {
212  for (int x = distance; x < width - distance; x++) {
213  const ubyte* s = &byte_image[y * stride + x];
214  // low self-similarity with overlapping patterns
215  // OPTI: load pattern once
216  // clang-format off
217  int score =
218  SAD(s, s-r*stride-r, stride, stride)+SAD(s, s-r*stride, stride, stride)+SAD(s, s-r*stride+r, stride, stride)+
219  SAD(s, s -r, stride, stride)+ SAD(s, s +r, stride, stride)+
220  SAD(s, s+r*stride-r, stride, stride)+SAD(s, s+r*stride, stride, stride)+SAD(s, s+r*stride+r, stride, stride);
221  // clang-format on
222 
223  score /= 256; // normalize
224  if (pattern) // find only features similar to pattern
225  score -= SAD(s, pattern, stride, 16);
226  if (score <= 16)
227  continue; // filter very self-similar features
228  score -= 16; // translate to score/histogram values
229  if (score > 255)
230  score = 255; // clip
231  ubyte* c = &scores[y * width + x];
232  for (int i = -distance; i < 0; i++) {
233  for (int j = -distance; j < distance; j++) {
234  int s = c[i * width + j];
235  if (s == 0)
236  continue;
237  if (s >= score)
238  goto nonmax;
239  c[i * width + j] = 0;
240  histogram[s]--;
241  }
242  }
243  for (int i = 0, j = -distance; j < 0; j++) {
244  int s = c[i * width + j];
245  if (s == 0)
246  continue;
247  if (s >= score)
248  goto nonmax;
249  c[i * width + j] = 0;
250  histogram[s]--;
251  }
252  c[0] = score, histogram[score]++;
253  nonmax : {} // Do nothing.
254  }
255  }
256  int min = 255, total = 0;
257  for (; min > 0; min--) {
258  int h = histogram[min];
259  if (total + h > count) {
260  break;
261  }
262  total += h;
263  }
264  for (int y = 16; y < height - 16; y++) {
265  for (int x = 16; x < width - 16; x++) {
266  int s = scores[y * width + x];
267  if (s > min) {
268  // Currently SAD works with the patterns of 16x16 pixels.
269  //
270  // Score calculation above uses top left corner of the
271  // patch as the origin, here we need to convert this value
272  // to a pattrn center by adding 8 pixels.
273  detected_features->push_back(
274  Feature((float)x + 8.0f, (float)y + 8.0f, (float)s, 16.0f));
275  }
276  }
277  }
278 }
279 
280 void DetectHarris(const FloatImage& grayscale_image,
281  const DetectOptions& options,
282  vector<Feature>* detected_features) {
283  const double alpha = 0.06;
284  const double sigma = 0.9;
285 
286  const int min_distance = options.min_distance;
287  const int margin = options.margin;
288  const double threshold = options.harris_threshold;
289 
290  FloatImage gradient_x, gradient_y;
291  ImageDerivatives(grayscale_image, sigma, &gradient_x, &gradient_y);
292 
293  FloatImage gradient_xx, gradient_yy, gradient_xy;
294  MultiplyElements(gradient_x, gradient_x, &gradient_xx);
295  MultiplyElements(gradient_y, gradient_y, &gradient_yy);
296  MultiplyElements(gradient_x, gradient_y, &gradient_xy);
297 
298  FloatImage gradient_xx_blurred, gradient_yy_blurred, gradient_xy_blurred;
299  ConvolveGaussian(gradient_xx, sigma, &gradient_xx_blurred);
300  ConvolveGaussian(gradient_yy, sigma, &gradient_yy_blurred);
301  ConvolveGaussian(gradient_xy, sigma, &gradient_xy_blurred);
302 
303  vector<Feature> all_features;
304  for (int y = margin; y < gradient_xx_blurred.Height() - margin; ++y) {
305  for (int x = margin; x < gradient_xx_blurred.Width() - margin; ++x) {
306  // Construct matrix
307  //
308  // A = [ Ix^2 Ix*Iy ]
309  // [ Ix*Iy Iy^2 ]
310  Mat2 A;
311  A(0, 0) = gradient_xx_blurred(y, x);
312  A(1, 1) = gradient_yy_blurred(y, x);
313  A(0, 1) = A(1, 0) = gradient_xy_blurred(y, x);
314 
315  double detA = A.determinant();
316  double traceA = A.trace();
317  double harris_function = detA - alpha * traceA * traceA;
318  if (harris_function > threshold) {
319  all_features.push_back(
320  Feature((float)x, (float)y, (float)harris_function, 5.0f));
321  }
322  }
323  }
324 
325  FilterFeaturesByDistance(all_features, min_distance, detected_features);
326 }
327 
328 } // namespace
329 
331  : type(DetectOptions::HARRIS),
332  margin(0),
333  min_distance(120),
334  fast_min_trackness(kDefaultFastMinTrackness),
335  moravec_max_count(0),
336  moravec_pattern(NULL),
337  harris_threshold(kDefaultHarrisThreshold) {
338 }
339 
340 void Detect(const FloatImage& image,
341  const DetectOptions& options,
342  vector<Feature>* detected_features) {
343  // Currently all the detectors requires image to be grayscale.
344  // Do it here to avoid code duplication.
345  FloatImage grayscale_image;
346  if (image.Depth() != 1) {
347  Rgb2Gray(image, &grayscale_image);
348  } else {
349  // TODO(sergey): Find a way to avoid such image duplication/
350  grayscale_image = image;
351  }
352 
353  if (options.type == DetectOptions::FAST) {
354  DetectFAST(grayscale_image, options, detected_features);
355  } else if (options.type == DetectOptions::MORAVEC) {
356  DetectMORAVEC(grayscale_image, options, detected_features);
357  } else if (options.type == DetectOptions::HARRIS) {
358  DetectHarris(grayscale_image, options, detected_features);
359  } else {
360  LOG(FATAL) << "Unknown detector has been passed to featur detection";
361  }
362 }
363 
364 std::ostream& operator<<(std::ostream& os, const Feature& feature) {
365  os << "x: " << feature.x << ", y: " << feature.y;
366  os << ", score: " << feature.score;
367  os << ", size: " << feature.size;
368  return os;
369 }
370 
371 } // namespace libmv
void BLI_kdtree_nd_() free(KDTree *tree)
Definition: kdtree_impl.h:102
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble right
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei stride
__forceinline bool all(const avxb &b)
Definition: avxb.h:201
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
#define A
SIMD_FORCE_INLINE btVector3 operator()(const btVector3 &x) const
Return the transform of the vector.
Definition: btTransform.h:90
3D array (row, column, channel).
Definition: array_nd.h:325
CCL_NAMESPACE_BEGIN struct Options options
SyclQueue void void size_t num_bytes void
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
int count
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
#define LOG(severity)
Definition: log.h:36
static int left
static unsigned c
Definition: RandGen.cpp:83
static unsigned a[3]
Definition: RandGen.cpp:78
T distance(const T &a, const T &b)
T abs(const T &a)
void Detect(const FloatImage &image, const DetectOptions &options, vector< Feature > *detected_features)
Definition: detect.cc:340
T Square(T x)
Definition: numeric.h:247
void ImageDerivatives(const Array3Df &in, double sigma, Array3Df *gradient_x, Array3Df *gradient_y)
Definition: convolve.cc:191
std::ostream & operator<<(std::ostream &os, const CameraIntrinsics &intrinsics)
A human-readable representation of the camera intrinsic parameters.
unsigned char ubyte
Definition: detect.h:36
void Rgb2Gray(const ImageIn &imaIn, ImageOut *imaOut)
unsigned char * FloatImageToUCharArray(const Image &image)
Array3Df FloatImage
void MultiplyElements(const AArrayType &a, const BArrayType &b, CArrayType *c)
Definition: array_nd.h:391
void ConvolveGaussian(const Array3Df &in, double sigma, Array3Df *out_pointer)
Definition: convolve.cc:182
Eigen::Matrix< double, 2, 2 > Mat2
Definition: numeric.h:70
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
#define min(a, b)
Definition: sort.c:35
float size
Definition: detect.h:59
float score
Definition: detect.h:53
float x
Definition: detect.h:46
float y
Definition: detect.h:46
int xy[2]
Definition: wm_draw.c:135