Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Canny doesn´t run faster when using OpenMP

I want to test the benefits when building OpenCV with -D WITH_OPENMP=ON I have following test code:

clock_gettime(CLOCK_REALTIME, &requestStart);
for(int i = 0; i <= 100 ; i++){
Canny(Szene, temp,20,40,3);
}
clock_gettime(CLOCK_REALTIME, &requestEnd);
accum = ( requestEnd.tv_sec - requestStart.tv_sec ) + ( requestEnd.tv_nsec - requestStart.tv_nsec )/ BILLION;
cout << "  ________________________________________________________________" << endl;
cout << "  Canny-Filter: "<<accum/100 << " sec." << endl;
cout << "  ________________________________________________________________" << endl;

When I´m building the OpenCV library without the flag the canny-filter needs 0.0121046 sec. and with the flags it is 0.0122894 sec. So there is no benefit when using OpenMP. (tested also with median and gaussian) Am i doing something wrong enabeling OpenMP? Ddo I just need to set the flag while building or do i need to get something else?

Test-System: Raspberry PI 2, 4 Cores

Canny doesn´t run faster when using OpenMP

I want to test the benefits when building OpenCV with -D WITH_OPENMP=ON I have following test code:

clock_gettime(CLOCK_REALTIME, &requestStart);
for(int i = 0; i <= 100 ; i++){
Canny(Szene, temp,20,40,3);
}
clock_gettime(CLOCK_REALTIME, &requestEnd);
accum = ( requestEnd.tv_sec - requestStart.tv_sec ) + ( requestEnd.tv_nsec - requestStart.tv_nsec )/ BILLION;
cout << "  ________________________________________________________________" << endl;
cout << "  Canny-Filter: "<<accum/100 << " sec." << endl;
cout << "  ________________________________________________________________" << endl;

When I´m building the OpenCV library without the flag the canny-filter needs 0.0121046 sec. and with the flags it is 0.0122894 sec. So there is no benefit when using OpenMP. (tested also with median and gaussian) Am i doing something wrong enabeling OpenMP? Ddo Do I just need to set the flag while building or do i need to get something else?

Test-System: Raspberry PI 2, 4 Cores

Canny doesn´t run faster when using OpenMP

I want to test the benefits when building OpenCV with -D WITH_OPENMP=ON I have following test code:

clock_gettime(CLOCK_REALTIME, &requestStart);
for(int i = 0; i <= 100 ; i++){
Canny(Szene, temp,20,40,3);
}
clock_gettime(CLOCK_REALTIME, &requestEnd);
accum = ( requestEnd.tv_sec - requestStart.tv_sec ) + ( requestEnd.tv_nsec - requestStart.tv_nsec )/ BILLION;
cout << "  ________________________________________________________________" << endl;
cout << "  Canny-Filter: "<<accum/100 << " sec." << endl;
cout << "  ________________________________________________________________" << endl;

When I´m building the OpenCV library without the flag the canny-filter needs 0.0121046 sec. and with the flags it is 0.0122894 sec. So there is no benefit when using OpenMP. (tested also with median and gaussian) Am i doing something wrong enabeling OpenMP? Do I just need to set the flag while building or do i need to get something else?

Test-System: Raspberry PI 2, 4 Cores