Which kind of interpolation best for resizing image?

后端 未结 3 1973
故里飘歌
故里飘歌 2021-02-02 10:14

I have a numpy array that I wish to resize using opencv. Its values range from 0 to 255. If I opt to use cv2.INTER_CUBIC, I may get values outside this range. This is undesirabl

3条回答
  •  無奈伤痛
    2021-02-02 10:58

    I think you should start with INTER_LINEAR which is the default option for resize() function. It combines sufficiently good visual results with sufficiently good time performance (although it is not as fast as INTER_NEAREST). And it won't create those out-of-range values.

提交回复
热议问题