官术网_书友最值得收藏!

The coordinate system in OpenCV

To show you the coordinate system in OpenCV and how to access individual pixels, we are going to show you a low-resolution image of the OpenCV logo:

This logo has a dimension of 20 × 18 pixels, that is, this image has 360 pixels. So, we can add the pixel count in every axis, as shown in the following image:

Now, we are going to look at the indexing of the pixels in the form (x,y). Notice that pixels are zero-indexed, meaning that the upper left corner is at (0, 0), not (1, 1). Take a look at the following image, which indexes three individual pixels. As you can see, the upper left corner of the image is the coordinates of the origin. Moreover, y coordinates get larger as they go down:

The information for an individual pixel can be extracted from an image in the same way as an individual element of an array is referenced in Python. In the next section, we are going to see how we can do this.

主站蜘蛛池模板: 大兴区| 枣强县| 峨边| 陈巴尔虎旗| 哈尔滨市| 开封县| 达拉特旗| 商南县| 文昌市| 逊克县| 镇雄县| 垫江县| 乾安县| 个旧市| 嵊州市| 和顺县| 郯城县| 鄢陵县| 山阴县| 来安县| 富民县| 黄大仙区| 丹东市| 闽清县| 漯河市| 平南县| 内乡县| 邵东县| 南漳县| 柞水县| 永宁县| 阜新| 嵩明县| 平利县| 澄江县| 龙州县| 广东省| 开封市| 沛县| 广灵县| 元阳县|