From 187c52e5c2d3d59e3c81578dbb7edbc917b103c7 Mon Sep 17 00:00:00 2001 From: vp153 Date: Fri, 26 Feb 2010 21:09:21 +0000 Subject: [PATCH] make haartraining able to train on huge amounts of data (>2gb) (thanks to Shiqi Yu for the patch). git-svn-id: https://code.ros.org/svn/opencv/trunk@2727 73c94f0f-984f-4a5f-82bc-2d8db8d8ee08 --- opencv/apps/haartraining/cvboost.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opencv/apps/haartraining/cvboost.cpp b/opencv/apps/haartraining/cvboost.cpp index 037874b4..52806a91 100644 --- a/opencv/apps/haartraining/cvboost.cpp +++ b/opencv/apps/haartraining/cvboost.cpp @@ -130,7 +130,7 @@ void cvGetSortedIndices( CvMat* val, CvMat* idx, int sortcols ) { CV_MAT_ELEM( *idx, short, i, j ) = (short) j; } - icvSortIndexedValArray_16s( (short*) (idx->data.ptr + i * idx->step), + icvSortIndexedValArray_16s( (short*) (idx->data.ptr + (size_t)i * idx->step), idx->cols, &va ); va.data += istep; } @@ -143,7 +143,7 @@ void cvGetSortedIndices( CvMat* val, CvMat* idx, int sortcols ) { CV_MAT_ELEM( *idx, int, i, j ) = j; } - icvSortIndexedValArray_32s( (int*) (idx->data.ptr + i * idx->step), + icvSortIndexedValArray_32s( (int*) (idx->data.ptr + (size_t)i * idx->step), idx->cols, &va ); va.data += istep; } @@ -156,7 +156,7 @@ void cvGetSortedIndices( CvMat* val, CvMat* idx, int sortcols ) { CV_MAT_ELEM( *idx, float, i, j ) = (float) j; } - icvSortIndexedValArray_32f( (float*) (idx->data.ptr + i * idx->step), + icvSortIndexedValArray_32f( (float*) (idx->data.ptr + (size_t)i * idx->step), idx->cols, &va ); va.data += istep; } -- 2.39.2