~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to extern/libmv/libmv/simple_pipeline/detect.cc

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
typedef unsigned int uint;
37
37
 
38
 
int featurecmp(const void *a_v, const void *b_v)
 
38
static int featurecmp(const void *a_v, const void *b_v)
39
39
{
40
40
  Feature *a = (Feature*)a_v;
41
41
  Feature *b = (Feature*)b_v;
66
66
    Feature *all_features = new Feature[num_features];
67
67
 
68
68
    for(int i = 0; i < num_features; ++i) {
69
 
      Feature a = { nonmax[i].x, nonmax[i].y, scores[i], 0 };
 
69
      Feature a = { (float)nonmax[i].x, (float)nonmax[i].y, (float)scores[i], 0 };
70
70
      all_features[i] = a;
71
71
    }
72
72
 
173
173
  for(int y=16; y<height-16; y++) {
174
174
    for(int x=16; x<width-16; x++) {
175
175
      int s = scores[y*width+x];
176
 
      Feature f = { x+8, y+8, s, 16 };
 
176
      Feature f = { (float)x+8.0f, (float)y+8.0f, (float)s, 16 };
177
177
      if(s>min) detected[i++] = f;
178
178
    }
179
179
  }