I need to color a pixel in an image. I use opencv and python.
I tried img[x,y]=[255 255 255] to color a pixel(x,y) but it wont work :(
Is there is any mistake in this?
Can you suggest any method?
Thanks in advance.
img[x,y]=[255, 255, 255] is wrong because opencv img[a,b] is a matrics then you need to change x,y then you must use img[y,x]
actualy mistake in the order of x,y
if you want to change color of point x,y use this >> img[y,x] = color
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With