Opencv in memory Mat representation

前端 未结 3 2038
情话喂你
情话喂你 2021-02-09 01:20

I know that in memory opencv represents Mat objects as one big array. So if I have 3 channels mat of dimension 200x200 then In memory it will store this mat in an array of size

3条回答
  •  后悔当初
    2021-02-09 01:50

    You can get values in array like this:

    double val = array+ (r*mat.step)+c*mat.channels()+ch;
    

提交回复
热议问题