From 07017db093ffbadf1e65194f5b7ed8d61e8f2c10 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 17 Aug 2011 18:37:25 +0000 Subject: [PATCH] Camera tracking integration =========================== Just another fix for MSVC. --- extern/libmv/ChangeLog | 13 +++++++++++++ extern/libmv/libmv/simple_pipeline/detect.cc | 4 +++- extern/libmv/libmv/tracking/sad.cc | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/extern/libmv/ChangeLog b/extern/libmv/ChangeLog index ffab86d06b4..a4fb9c5e05d 100644 --- a/extern/libmv/ChangeLog +++ b/extern/libmv/ChangeLog @@ -1,3 +1,16 @@ +commit a4876d8c40dcde615b44009c38c49e9a1b1d4698 +Author: Matthias Fauconneau +Date: Wed Aug 17 20:26:01 2011 +0200 + + Hack to make sad.cc compile with MSVC on system without support for the SSE instruction set. + +commit 0de723dfce5bbe44dbd19be8cd6dd6e9b03b7924 +Author: Matthias Fauconneau +Date: Wed Aug 17 20:10:46 2011 +0200 + + Fix slow path (for computers without SSE2). + Heap allocate scores in detect.cc + commit 65a9d496f81e8b37eae39a4063957b8be9a4e6f0 Author: Matthias Fauconneau Date: Wed Aug 17 19:25:17 2011 +0200 diff --git a/extern/libmv/libmv/simple_pipeline/detect.cc b/extern/libmv/libmv/simple_pipeline/detect.cc index e242d07cfed..20e6400f98f 100644 --- a/extern/libmv/libmv/simple_pipeline/detect.cc +++ b/extern/libmv/libmv/simple_pipeline/detect.cc @@ -23,6 +23,7 @@ ****************************************************************************/ #include "libmv/simple_pipeline/detect.h" +#include #include namespace libmv { @@ -54,7 +55,7 @@ static uint SAD(const ubyte* imageA, const ubyte* imageB, int strideA, int strid void Detect(ubyte* image, int stride, int width, int height, Feature* detected, int* count, int distance, ubyte* pattern) { unsigned short histogram[256]; memset(histogram,0,sizeof(histogram)); - ubyte scores[width*height]; + ubyte* scores = new ubyte[width*height]; memset(scores,0,sizeof(scores)); const int r = 1; //radius for self similarity comparison for(int y=distance; y