We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
loop 30 times, compare infos output:
image channel: 1 Halide Elapsed time: 7274 ms Opencv Elapsed time: 23 ms Halide: Done
someone can help me to explain it? I am first time to coding halide program. thanks.
I had try some schedule to speed up, but halide is slower than opencv, it is so weird.
if I want to speed up, how can I modify these codes to get good result.
int main() { cv::Mat image; image = imread("C:\\AIOCRProjects\\Image\\1 (1).jpg", 0); // GrayImage std::cout << "image channel: " << image.channels() << std::endl; //////////////////////////////////////////////////////////// auto startH = std::chrono::high_resolution_clock::now(); for (int i = 0; i < 30; i++) { // Halide-17.0.1-x86-64-windows C++ --> Win10+64bit+VS2022 cv::Mat HalideBlur; HalideBlur = aiPredict.BlurHal(image); cv::Mat HalideThreshold; HalideThreshold = aiPredict.ThresholdHal(HalideBlur, 128.0f); } auto endH = std::chrono::high_resolution_clock::now(); auto durationH = std::chrono::duration_cast<std::chrono::milliseconds>(endH - startH); std::cout << "Halide Elapsed time: " << durationH.count() << " ms" << std::endl; // auto startO = std::chrono::high_resolution_clock::now(); for (int i = 0; i < 30; i++) { // opencv C++ --> Win10+64bit+VS2022 cv::Mat opencvBlur; cv::blur(image, opencvBlur, cv::Size(3, 3)); cv::Mat opencvThreshold; cv::threshold(opencvBlur, opencvThreshold, 128.0, 255.0, cv::THRESH_BINARY); } auto endO = std::chrono::high_resolution_clock::now(); auto durationO = std::chrono::duration_cast<std::chrono::milliseconds>(endO - startO); std::cout << "Opencv Elapsed time: " << durationO.count() << " ms" << std::endl; //////////////////////////////////////////////////////////// std::cout << "Halide: " << "Done" << std::endl; }
The text was updated successfully, but these errors were encountered:
need to learn it step by step. it is more much faster
Sorry, something went wrong.
No branches or pull requests
loop 30 times, compare infos output:
image channel: 1
Halide Elapsed time: 7274 ms
Opencv Elapsed time: 23 ms
Halide: Done
someone can help me to explain it?
I am first time to coding halide program. thanks.
I had try some schedule to speed up, but halide is slower than opencv, it is so weird.
if I want to speed up, how can I modify these codes to get good result.
The text was updated successfully, but these errors were encountered: