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

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.

主站蜘蛛池模板: 浪卡子县| 望奎县| 辉南县| 澄迈县| 清流县| 建昌县| 大姚县| 清新县| 恩施市| 鹿泉市| 茂名市| 绩溪县| 孝昌县| 武宣县| 增城市| 潜江市| 淮阳县| 东方市| 贵南县| 屏边| 合作市| 石屏县| 博罗县| 河津市| 双牌县| 石景山区| 宿州市| 西昌市| 竹北市| 江都市| 阿勒泰市| 无棣县| 宁蒗| 若羌县| 虞城县| 建水县| 潢川县| 北京市| 宁化县| 永善县| 喀喇沁旗|