xuduo35 / STAPLE

C++ implementation of staple algorithm for object tracking.
MIT License
121 stars 48 forks source link

segmentation fault #1

Closed GallonDeng closed 6 years ago

GallonDeng commented 6 years ago

I compiled it in my Ubuntu 14.04 system(OpenCV 3.1). When it runs, it shows segmentation fault. The message is ...norm_pwp_search_area.width 150 norm_pwp_search_area.height 148 Segmentation fault (core dumped) Any suggestion for the error? Thanks

GallonDeng commented 6 years ago

I found there is a problem in Line 40 in the fhog.cpp. It works fine when the line changes into "for(y=0; y<h; y++){ volatile float temp=(In++-Ip++)r; Gx++=temp; }" a little strange...

xuduo35 commented 6 years ago

fhog.cpp is from 'https://github.com/ppaanngggg/fhog/blob/master/pdollar/fhog.cpp'. I run my code in ubuntu15 and macOS, no crash problem.

xuduo35 commented 6 years ago

from your fix method, maybe the difference is from compiler. you can try change -O3 to -O2.

IF (UNIX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3") #c++11 ENDIF (UNIX)