- 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.
- JavaScript全程指南
- 信息安全技術(shù)
- 區(qū)塊鏈:以太坊DApp開發(fā)實(shí)戰(zhàn)
- C語言從入門到精通(第4版)
- Serverless computing in Azure with .NET
- HTML5開發(fā)精要與實(shí)例詳解
- Django Design Patterns and Best Practices
- 算法秘籍
- Visual Basic語言程序設(shè)計(jì)基礎(chǔ)(第3版)
- 3D Printing Designs:Octopus Pencil Holder
- 關(guān)系數(shù)據(jù)庫與SQL Server 2012(第3版)
- 青少年P(guān)ython趣味編程
- 新手學(xué)ASP.NET 3.5網(wǎng)絡(luò)開發(fā)
- 算法(第4版)
- Python輕松學(xué):爬蟲、游戲與架站