Addressing pixels in the image 01_

# 1, a pointer mode

uchar * ptr = src.ptr (row) ;
pointer to the first row line
may be indexed by ptr [0] ptr [1]
, respectively, for the first row of the first row, two pixels.
# 2, the direct value of the index

src.at (row, col)
index of the first row line, the first column of pixels col;

src.at (row, col) [0 ]
when the index-image is bgr above needs, 0,1,2 representative of the position B, G, R.

Released six original articles · won praise 0 · Views 112

Guess you like

Origin blog.csdn.net/qq_43621944/article/details/104078009