Closed ardeal closed 3 months ago
The stride parameters specify the number of bytes between the start of each scanline. So, you definitely don't want "3" for those. Should be at least 3*width...
Thank you @jeffrbig2 ! Your solution works.
2 more questions are: question 1: Your current code works for 3 channel image. how to customized it for N(N>3) channel tensor?
question 2: the output of your code is a little bit different from OpenCV resize function. Please check the following picture. Do you have any ideal about how to make the output of your code the same as OpenCV?
There are dozens of reasons they would differ - not the least of which is you calling the linear color function. What on earth makes you think they'd match? If you want to get them close, then you need to do some reading about what OpenCV does. This isn't an issue at all, so I'm going to have @nothings close this issue.
Hi,
I call the
stbir_resize_uint8_linear
function with the following code and parameters, but the output ofstbir_resize_uint8_linear
function is competely wrong.is there any doc about the explanation of those parameters of
stbir_resize_uint8_linear
function? or could you please help to tell me how to fill those parameters ofstbir_resize_uint8_linear
functions?