Why is cv::resize so slow?

后端 未结 2 1342
有刺的猬
有刺的猬 2020-12-28 20:00

I\'m doing some edge detection on a live video feed:

- (void)processImage:(Mat&)image;
{
        cv::resize(image, smallImage, cv::Size(288,352), 0, 0, C         


        
2条回答
  •  死守一世寂寞
    2020-12-28 20:39

    INTER_NEAREST is the fastest and has the worst quality results. In the downscale, for each pixel, it just uses the pixel nearest to the hypothetical place.

    INTER_LINEAR is a good compromise of performance and quality, but it is slower than INTER_NEAREST.

    INTER_CUBIC is slower than INTER_LINEAR because it uses more interpolation.

    INTER_LANCZOS4 is the algorithm with the best quality result, but it is slower than the others.

    Here you can find a good comparison article: http://tanbakuchi.com/posts/comparison-of-openv-interpolation-algorithms/

提交回复
热议问题