Fastest way to extract individual pixel data?

前端 未结 2 836
孤城傲影
孤城傲影 2020-12-07 03:15

I have to get information about the scalar value of a lot of pixels on a gray-scale image using OpenCV. It will be traversing hundreds of thousands of pixels so I need the

2条回答
  •  被撕碎了的回忆
    2020-12-07 03:36

    for (int row=0;row

    You need to get the data pointer on each new row because opencv will pad the data to 32bit boundary at the start of each row

提交回复
热议问题