1

Why when i set a specific color of a pixel does it not show solid red? And it also appears to affect the surrounding pixels and not just the specific pixel I chose.

enter image description here

code

import cv2
import numpy
import os
print cv2.__version__

width = 60
height = 40

# create simple RGB images
img = numpy.zeros((height,width,3), numpy.uint8)
img[30,20] = [0,0,255]

cv2.imwrite('RGB.jpg', img, [int(cv2.IMWRITE_JPEG_QUALITY), 100])
os.startfile('RGB.jpg')
9000
  • 39,899
  • 9
  • 66
  • 104
JokerMartini
  • 5,674
  • 9
  • 83
  • 193

0 Answers0