How to Extract the RGB Values of a Pixel in OpenCV using Python

preview_player
Показать описание
In this video, I'll show you How to Extract the RGB Values of a Pixel in OpenCV using Python
#OpenCV #OpenCVPython OpenCVTutorials #Python #ComputerVision

------------------------------------

image[y, x, c] or equivalently image[y][x][c].
It will return the value of the pixel in the x,y,c coordinates. Notice that indexing begins at 0. So, if you want to access the third BGR (note: not RGB) component, you must do image[y, x, 2] where y and x are the line and column desired.

b,g,r = (img[300, 300])
print (r)
print (g)
print (b)

opencv
python
image processing
computer vision
computer vision tutorial
machine learning
opencv tutorial
python tutorial
opencv tutorial for beginners
computer vision basics
opencv python tutorial
programming
python course
online course
opencv python
pixels
linux
rgb values of a pixel in opencv using python

Enjoy & stay connected with us!
Рекомендации по теме
Комментарии
Автор

How can I read the RGB value of multiple pixels at the same time??

akhilbannur
Автор

If i give coordinates as 580, 530 instead of 100, 100 will i get rgb value of whole image? please reply i need it alot.

eissafaheem
join shbcf.ru