Просмотр исходного кода

removed histogram equalization

subDesTagesMitExtraKaese 3 лет назад
Родитель
Сommit
0d4da29131
1 измененных файлов с 4 добавлено и 5 удалено
  1. 4 5
      raspberry-pi/sensors/opticalSensor.py

+ 4 - 5
raspberry-pi/sensors/opticalSensor.py

@@ -32,12 +32,11 @@ parameters =  aruco.DetectorParameters_create()
 def find_marker(image, debug=True):
     # Our operations on the frame come here
   gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
-  im_bw = cv2.equalizeHist(gray)
   if debug:
-    image[:,:,0] = im_bw
-    image[:,:,1] = im_bw
-    image[:,:,2] = im_bw
-  corners, ids, rejectedImgPoints = aruco.detectMarkers(im_bw, aruco_dict, parameters=parameters)
+    image[:,:,0] = gray
+    image[:,:,1] = gray
+    image[:,:,2] = gray
+  corners, ids, rejectedImgPoints = aruco.detectMarkers(gray, aruco_dict, parameters=parameters)
   
   markers = [None] * 4