Mean of a frame always change? [closed]
Hi everyone, i read frames from webcam and print mean of 3-channels of frame.
import cv2
import numpy as np
cv2.destroyAllWindows()
capture = cv2.VideoCapture(0,cv2.CAP_DSHOW)
while (True):
ret, frame = capture.read()
cv2.imshow('video', frame)
a=np.mean(frame, axis=(0, 1))
print(a)
if cv2.waitKey(30) == 27:
break
capture.release()
cv2.destroyAllWindows()
everything is consant (lightness,camera etc.) But values are always changing. What is the reason of that?
What do you mean (changing)? 100% 10% 0.01%? What is light source?
It is around %0.1. There is no any light source
" There is no any light source" it's a black image so...
0.1% it is possible. Instead cv2.imshow('video', frame) try :
Normally you will see image noise
I mean, there is just day light not any external source.
i tried it is better but i think it is impossible to reduce that to zero, isn't it?
Cool your camera at -200°C no noise!
or if your image is not moved then you can mean succesive image
0.1 % is not "change" it is "variation of input" within "tolerances"