T
T
Timebird2016-11-16 10:08:20
Images
Timebird, 2016-11-16 10:08:20

Image quantization example?

Hello!
Imagine that the input is a black and white image. Depending on the gradation of gray and the brightness of the pixels, this BW image can be represented as a matrix with the appropriate coefficients. In the examples in books on signal transmission, an already obtained matrix of this type is considered, but the process of obtaining it from an image could not be Googled. Question: how to get a matrix from an image?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Volkov, 2016-11-16
@Timebird

Any picture (color or black and white) is already a matrix of x*y pixels.
In your case, there is a picture in black and white. So each element of the matrix is ​​represented by a single number.
Refer to each pixel of the picture and get information about its brightness. If you have an image in RGB format, convert it to YUV format, then extract the brightness from there using the formula Y = 0.299*R + 0.587*G + 0.144*B. The transformation googles beautifully.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question