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

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.

主站蜘蛛池模板: 明溪县| 鄄城县| 玉门市| 巴南区| 拉孜县| 盐边县| 修文县| 广东省| 闽清县| 固原市| 天全县| 长乐市| 精河县| 石门县| 仁化县| 龙海市| 鄯善县| 霍邱县| 天峻县| 烟台市| 东城区| 桦甸市| 枝江市| 安宁市| 和田市| 正镶白旗| 合山市| 武功县| 集安市| 二连浩特市| 固始县| 鄢陵县| 高唐县| 保山市| 龙陵县| 瑞金市| 清苑县| 司法| 子洲县| 巴南区| 阜阳市|