Skip to content
Browse files

Speed optimization in Matlab/octave discrimination.

  • Loading branch information...
1 parent 11f1cfd commit 2dbf753c2296988e73d9a9e5a46534743951c6de @bilderbuchi committed May 18, 2011
Showing with 9 additions and 9 deletions.
  1. +2 −2 bbox/bb_cluster.m
  2. +1 −1 bbox/bb_cluster_confidence.m
  3. +1 −1 bbox/bb_draw.m
  4. +2 −2 compile.m
  5. +1 −1 img/img_blur.m
  6. +1 −1 img/img_dir.m
  7. +1 −1 other/init_workspace.m
View
4 bbox/bb_cluster.m
@@ -33,7 +33,7 @@
otherwise
bbd = bb_distance(bb2);
Z = linkagemex(bbd,'si');
- if exist('OCTAVE_VERSION')
+ if exist('OCTAVE_VERSION','builtin')
T = cluster_oct(Z,'cutoff', SPACE_THR,'criterion','distance');
else
T = cluster(Z,'cutoff', SPACE_THR,'criterion','distance');
@@ -50,4 +50,4 @@
bb = [bb mean(bb2(:,T == uT(i)),2)];
cSz = [cSz num_bb];
end
-end
+end
View
2 bbox/bb_cluster_confidence.m
@@ -39,7 +39,7 @@
otherwise
bbd = bb_distance(iBB);
Z = linkagemex(bbd,'si');
- if exist('OCTAVE_VERSION')
+ if exist('OCTAVE_VERSION','builtin')
T = cluster_oct(Z,'cutoff', SPACE_THR,'criterion','distance');
else
T = cluster(Z,'cutoff', SPACE_THR,'criterion','distance');
View
2 bbox/bb_draw.m
@@ -27,7 +27,7 @@ function bb_draw(bb1,varargin)
for i = 1:length(idx)
bb = bb1(:,idx(i));
if bb(3)-bb(1) > 0 && bb(4)-bb(2)>0
- if exist('OCTAVE_VERSION')
+ if exist('OCTAVE_VERSION','builtin')
% draw yellow rectangle manually. no line width variation yet
line([bb(1),bb(3),bb(3),bb(1),bb(1)],[bb(4),bb(4),bb(2),bb(2),bb(4)],'color','yellow')
else
View
4 compile.m
@@ -61,7 +61,7 @@
lib = [];
- if exist('OCTAVE_VERSION')
+ if exist('OCTAVE_VERSION','builtin')
disp('octave');
%for i = 1:length(files), %parser not working I think. look in the unix section.
% file = files(i).name;
@@ -118,7 +118,7 @@
%files = dir([libpath 'libopencv*.so.2.2']); %OpenCV 2.2 libraries?
lib = [];
- if exist('OCTAVE_VERSION')
+ if exist('OCTAVE_VERSION','builtin')
disp('octave');
%mkoctfile has a more picky syntax than matlab-mex concerning included libraries
for i = 1:length(files)
View
2 img/img_blur.m
@@ -24,7 +24,7 @@
csize = 6*sigma;
-if exist('OCTAVE_VERSION')
+if exist('OCTAVE_VERSION','builtin')
shift = idivide(csize - 1, 2);
h = fspecial('gaussian',csize,sigma);
else
View
2 img/img_dir.m
@@ -24,7 +24,7 @@
images = [];
for i = 1:length(ext)
- if exist('OCTAVE_VERSION')
+ if exist('OCTAVE_VERSION','builtin')
dir_list = dir([path ext{i}]);
if length(dir_list) > 0
images = [images dir_list];
View
2 other/init_workspace.m
@@ -15,7 +15,7 @@
% You should have received a copy of the GNU General Public License
% along with TLD. If not, see <http://www.gnu.org/licenses/>.
-if exist('OCTAVE_VERSION')
+if exist('OCTAVE_VERSION','builtin')
beep_on_error(0);
else
beep off;

0 comments on commit 2dbf753

Please sign in to comment.
Something went wrong with that request. Please try again.