Skip to content

Commit c2d5383

Browse files
committed
Removed some compilation warnings from people module.
1 parent e570d3c commit c2d5383

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

people/include/pcl/people/hog.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
#ifndef PCL_PEOPLE_HOG_H_
4242
#define PCL_PEOPLE_HOG_H_
4343

44+
#include <math.h>
45+
#include <string.h>
46+
4447
#if defined(__SSE2__)
4548
#include <pcl/common/impl/sse.hpp>
4649
#else

people/include/pcl/people/impl/ground_based_people_detection_app.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ pcl::people::GroundBasedPeopleDetectionApp<PointT>::compute (std::vector<pcl::pe
323323
top /= top(2);
324324
Eigen::Vector3f bottom = intrinsics_matrix_ * (it->getTBottom());
325325
bottom /= bottom(2);
326-
it->setPersonConfidence(person_classifier_.evaluate(rgb_image_, bottom, top, centroid, intrinsics_matrix_, vertical_));
326+
it->setPersonConfidence(person_classifier_.evaluate(rgb_image_, bottom, top, centroid, vertical_));
327327
}
328328

329329
return (true);

people/include/pcl/people/impl/person_classifier.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ pcl::people::PersonClassifier<PointT>::copyMakeBorder (PointCloudPtr& input_imag
199199
int y_end_in = std::min(int(input_image->height-1), ymin+height-1);
200200

201201
int x_start_out = std::max(0, -xmin);
202-
int x_end_out = x_start_out + (x_end_in - x_start_in);
202+
//int x_end_out = x_start_out + (x_end_in - x_start_in);
203203
int y_start_out = std::max(0, -ymin);
204-
int y_end_out = y_start_out + (y_end_in - y_start_in);
204+
//int y_end_out = y_start_out + (y_end_in - y_start_in);
205205

206206
for (unsigned int i = 0; i < (y_end_in - y_start_in + 1); i++)
207207
{
@@ -283,7 +283,6 @@ pcl::people::PersonClassifier<PointT>::evaluate (PointCloudPtr& image,
283283
Eigen::Vector3f& bottom,
284284
Eigen::Vector3f& top,
285285
Eigen::Vector3f& centroid,
286-
Eigen::Matrix3f intrinsics_matrix,
287286
bool vertical)
288287
{
289288
float pixel_height;

people/include/pcl/people/person_classifier.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,12 @@ namespace pcl
154154
* \param[in] bottom Theoretical bottom point of the cluster projected to the image.
155155
* \param[in] top Theoretical top point of the cluster projected to the image.
156156
* \param[in] centroid Theoretical centroid point of the cluster projected to the image.
157-
* \param[in] intrinsics_matrix Image intrinsic parameters.
158157
* \param[in] vertical If true, the sensor is considered to be vertically placed (portrait mode).
159158
* \return The person confidence.
160159
*/
161160
double
162161
evaluate (PointCloudPtr& image, Eigen::Vector3f& bottom, Eigen::Vector3f& top, Eigen::Vector3f& centroid,
163-
Eigen::Matrix3f intrinsics_matrix, bool vertical);
162+
bool vertical);
164163
};
165164
} /* namespace people */
166165
} /* namespace pcl */

people/src/hog.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
*/
4141

4242
#include <pcl/people/hog.h>
43-
#include <math.h>
44-
#include <string.h>
4543

4644
/** \brief Constructor. */
4745
pcl::people::HOG::HOG ()
@@ -169,6 +167,8 @@ pcl::people::HOG::gradHist( float *M, float *O, int h, int w, int bin_size, int
169167
O1=(int*)alMalloc(h*sizeof(int),16); M1=(float*) alMalloc(h*sizeof(float),16);
170168

171169
// main loop
170+
float xb = 0;
171+
float init = 0;
172172
for( x=0; x<w0; x++ ) {
173173
// compute target orientation bins for entire column - very fast
174174
gradQuantize( O+x*h, M+x*h, O0, O1, M0, M1, n_orients, nb, h0, sInv2 );
@@ -187,7 +187,7 @@ pcl::people::HOG::gradHist( float *M, float *O, int h, int w, int bin_size, int
187187
} else {
188188
// interpolate using trilinear interpolation
189189
#if defined(__SSE2__)
190-
float ms[4], xyd, xb, yb, xd, yd, init; __m128 _m, _m0, _m1;
190+
float ms[4], xyd, yb, xd, yd; __m128 _m, _m0, _m1;
191191
bool hasLf, hasRt; int xb0, yb0;
192192
if( x==0 ) { init=(0+.5f)*sInv-0.5f; xb=init; }
193193
hasLf = xb>=0; xb0 = hasLf?(int)xb:-1; hasRt = xb0 < wb-1;
@@ -220,7 +220,7 @@ pcl::people::HOG::gradHist( float *M, float *O, int h, int w, int bin_size, int
220220
#undef GHinit
221221
#undef GH
222222
#else
223-
float ms[4], xyd, xb, yb, xd, yd, init;
223+
float ms[4], xyd, yb, xd, yd;
224224
bool hasLf, hasRt; int xb0, yb0;
225225
if( x==0 ) { init=(0+.5f)*sInv-0.5f; xb=init; }
226226
hasLf = xb>=0; xb0 = hasLf?(int)xb:-1; hasRt = xb0 < wb-1;
@@ -442,7 +442,7 @@ pcl::people::HOG::gradQuantize (float *O, float *M, int *O0, int *O1, float *M0,
442442
}
443443

444444
// compute trailing locations without sse
445-
for( i; i<n; i++ ) {
445+
for( ; i<n; i++ ) {
446446
o=O[i]*oMult; m=M[i]*norm; o0=(int) o; od=o-o0;
447447
o0*=nb; o1=o0+nb; if(o1==oMax) o1=0;
448448
O0[i]=o0; O1[i]=o1; M1[i]=od*m; M0[i]=m-M1[i];

0 commit comments

Comments
 (0)