Skip to content
Snippets Groups Projects
Commit 6f930c7d authored by dronus's avatar dronus
Browse files

show color preview

parent 9e19933d
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
"camera_warmup_time": 2.5,
"resolution": [640, 480],
"fps": 40,
"shutter_milliseconds":25,
"shutter_milliseconds":6,
"contrast_limit":3.0,
"threshold": 2,
"bins":19,
......
......@@ -138,16 +138,17 @@ for f in camera.capture_continuous(rawCapture, format="bgr", use_video_port=True
timestamp = datetime.datetime.now()
text = "Unoccupied"
crop_frame=frame[190:210,0:640]
crop_frame = cv2.cvtColor(crop_frame, cv2.COLOR_BGR2GRAY)
crop_frame=frame[100:280,0:640]
# crop_frame=clahe.apply(crop_frame)
# crop_frame=cv2.equalizeHist(crop_frame)
# retval,crop_frame=cv2.threshold(crop_frame,25,255,cv2.THRESH_BINARY)
line_frame=crop_frame[10:11,5:635]
line_frame=crop_frame[140:141,5:635]
#line_frame=cv2.resize(line_frame, (num_keys+2,1), interpolation = cv2.INTER_AREA)
#line_frame_2=line_frame[0:1,1:num_keys+1]
#retval,line_frame=cv2.threshold(line_frame_2,conf["threshold"],255,cv2.THRESH_BINARY)
line_frame = cv2.cvtColor(line_frame, cv2.COLOR_BGR2GRAY)
histogram=np.zeros(histogram_steps,dtype=np.uint16)
for pixel in np.nditer(line_frame):
histogram[(int)(pixel*histogram_steps/256)]+=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment