Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The findContours function is significantly slower in version 4.11 compared to version 4.7. #26775

Closed
@solidR22

Description

@solidR22

Describe the feature and motivation

Thank you for your work, but I tested and found that the speed of this function in version 4.11 is slower than in version 4.7.
Here are the test images and test results.

#include<opencv2/opencv.hpp>usingnamespacestd;usingnamespacecv;intmain(){Mat img =imread("111.bmp", cv::IMREAD_GRAYSCALE);cv::Mat mask;inRange(img,110,120, mask);std::vector<std::vector<cv::Point>> v_cont;for (int i =0; i <10; i++){v_cont.clear();auto start =chrono::system_clock::now();cv::findContours(mask, v_cont, cv::RETR_EXTERNAL, cv::CHAIN_APPROX_SIMPLE);auto end =chrono::system_clock::now();auto duration = chrono::duration_cast<chrono::microseconds>(end - start) /1000.;cout <<"4.11 findContours cost" <<double(duration.count()) <<"ms" << endl;}}

1234

image
image

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp