- Mastering OpenCV 4 with Python
- Alberto Fernández Villán
- 321字
- 2021-07-02 12:07:13
Images formulation
An image can be described as a 2D function, f(x,y), where (x,y) are the spatial coordinates and the value of f at any point, (x,y), is proportional to the brightness or gray levels of the image. Additionally, when both (x,y) and brightness values of f are all finite discrete quantities, the image is called a digital image. Therefore, f(x,y) takes the following values:
- x ∈ [0, h-1], where h is the height of the image
- y ∈ [0, w-1], where w is the width of the image
- f(x,y) ∈ [0, L-1], where L = 256 (for an 8-bit image)
A color image can be represented in the same way, but we need to define three functions to represent the red, green, and blue values, respectively. Each of these three individual functions follows the same formulation as the f(x,y) function that was defined for grayscale images. We will denote these three functions subindex R, G and B for the three formulations (for the color images) as fR(x,y), fG(x,y), and fB(x,y).
A black and white image follows the same approximation in the way that only one function is required to represent the image. However, one key point is that f(x,y) can only take two values. Usually, these values are 0 (black) and 255 (white).
The following screenshot shows the three types of images (a color image, a grayscale image, and a black and white image):

- Embedded Linux Projects Using Yocto Project Cookbook
- Instant Testing with CasperJS
- Python程序設計(第3版)
- Scratch 3.0少兒編程與邏輯思維訓練
- Learning ArcGIS Pro
- Hands-On Microservices with Kotlin
- ArcGIS By Example
- Python編程:從入門到實踐
- Learning OpenCV 3 Computer Vision with Python(Second Edition)
- Java高并發核心編程(卷1):NIO、Netty、Redis、ZooKeeper
- OpenStack Networking Essentials
- Building Business Websites with Squarespace 7(Second Edition)
- Learning Image Processing with OpenCV
- Continuous Delivery and DevOps:A Quickstart Guide Second Edition
- FusionCharts Beginner’s Guide:The Official Guide for FusionCharts Suite