- Mastering OpenCV 4 with Python
- Alberto Fernández Villán
- 181字
- 2021-07-02 12:07:13
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.
- Learning Scala Programming
- Spring 5.0 By Example
- Java異步編程實戰
- Debian 7:System Administration Best Practices
- Photoshop智能手機APP UI設計之道
- 匯編語言程序設計(第2版)
- Java加密與解密的藝術
- C語言程序設計實踐教程
- Python高效開發實戰:Django、Tornado、Flask、Twisted(第3版)
- Learning Laravel's Eloquent
- C語言程序設計
- 移動增值應用開發技術導論
- Unity 2018 Augmented Reality Projects
- Java Web入門很輕松(微課超值版)
- 軟件再工程:優化現有軟件系統的方法與最佳實踐