Hi All,
i executed a simple program on a arm based debian platform and also on windows. Though in windows, the time taken is not much but in debian its in minutes. Please find the details of the opencv version and the code responsible. Windows- OpenCV3.4.6 - Did not build them, installed the prebuild binaries Debian - OpenCV4.2 and since its needed for arm based i cross compiled on my linux system using the following cmake parameters cmake -D WITH_OPENMP=ON -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_TOOLCHAIN_FILE=../opencv/platforms/linux/arm-gnueabi.toolchain.cmake ../opencv/ i.m using arm-linux-gnueabihf-g++ (version 5.3.1) cross compiler
The code responsible is as follows:
int main()
{
Net net = cv::dnn::readNetFromCaffe(caffeConfigFile, caffeWeightFile);
Mat frame = imread("untitled.png", IMREAD_COLOR);
cv::Mat inputBlob = cv::dnn::blobFromImage(frame, 1.0, cv::Size(300, 300), cv::Scalar(104.0, 177.0, 123.0), false,
false);
net.setInput(inputBlob, "data");
double t = cv::getTickCount();
cv::Mat detection = net.forward("detection_out");
tt_opencvDNN = ((double)cv::getTickCount() - t) / cv::getTickFrequency();
printf("setInput is %f", tt_opencvDNN);
}
I get 0.9s when run on windows and 214.5 sec when run on debian OS. Not sure what is wrong. Is it something to do with the libs i have compiled with? Am i missing some compiler options?