- 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.
- 軟件安全技術(shù)
- Django+Vue.js商城項(xiàng)目實(shí)戰(zhàn)
- Learning AndEngine
- 精通Linux(第2版)
- Gradle for Android
- 數(shù)據(jù)結(jié)構(gòu)案例教程(C/C++版)
- Python全棧數(shù)據(jù)工程師養(yǎng)成攻略(視頻講解版)
- Machine Learning in Java
- 區(qū)塊鏈架構(gòu)之美:從比特幣、以太坊、超級賬本看區(qū)塊鏈架構(gòu)設(shè)計(jì)
- Web程序設(shè)計(jì):ASP.NET(第2版)
- C語言程序設(shè)計(jì)實(shí)踐
- 計(jì)算機(jī)應(yīng)用基礎(chǔ)案例教程(第二版)
- Responsive Web Design with jQuery
- Java服務(wù)端研發(fā)知識圖譜
- Learning Apache Thrift