diff --git a/Videos/sw/fan/150_rpm.mp4 b/Videos/sw/fan/150_rpm.mp4 new file mode 100644 index 0000000..710d80c Binary files /dev/null and b/Videos/sw/fan/150_rpm.mp4 differ diff --git a/Videos/sw/fan/200_rpm.mp4 b/Videos/sw/fan/200_rpm.mp4 new file mode 100644 index 0000000..db35c13 Binary files /dev/null and b/Videos/sw/fan/200_rpm.mp4 differ diff --git a/Videos/sw/fan/250_rpm.mp4 b/Videos/sw/fan/250_rpm.mp4 new file mode 100644 index 0000000..e5a7434 Binary files /dev/null and b/Videos/sw/fan/250_rpm.mp4 differ diff --git a/Videos/sw/fan/Assem1.SLDASM b/Videos/sw/fan/Assem1.SLDASM index a12f7b6..5e9ffa7 100644 Binary files a/Videos/sw/fan/Assem1.SLDASM and b/Videos/sw/fan/Assem1.SLDASM differ diff --git a/Videos/sw/fan/Assem1.zip b/Videos/sw/fan/Assem1.zip new file mode 100644 index 0000000..4493213 Binary files /dev/null and b/Videos/sw/fan/Assem1.zip differ diff --git a/Videos/sw/fan/Assem2_staggered.SLDASM b/Videos/sw/fan/Assem2_staggered.SLDASM new file mode 100644 index 0000000..2acdc7b Binary files /dev/null and b/Videos/sw/fan/Assem2_staggered.SLDASM differ diff --git a/Videos/sw/fan/blade.SLDPRT b/Videos/sw/fan/blade.SLDPRT index a0be967..37decf1 100644 Binary files a/Videos/sw/fan/blade.SLDPRT and b/Videos/sw/fan/blade.SLDPRT differ diff --git a/Videos/sw/fan/blade_not_allined.SLDPRT b/Videos/sw/fan/blade_not_allined.SLDPRT new file mode 100644 index 0000000..fb88bd9 Binary files /dev/null and b/Videos/sw/fan/blade_not_allined.SLDPRT differ diff --git a/Videos/sw/fan/disAlign_100.mp4 b/Videos/sw/fan/disAlign_100.mp4 new file mode 100644 index 0000000..f7b08a1 Binary files /dev/null and b/Videos/sw/fan/disAlign_100.mp4 differ diff --git a/Videos/sw/fan/disAlign_angle1_100.mp4 b/Videos/sw/fan/disAlign_angle1_100.mp4 new file mode 100644 index 0000000..7f627b0 Binary files /dev/null and b/Videos/sw/fan/disAlign_angle1_100.mp4 differ diff --git a/Videos/sw/fan/end_cor_10rpm.mp4 b/Videos/sw/fan/end_cor_10rpm.mp4 new file mode 100644 index 0000000..ce06f00 Binary files /dev/null and b/Videos/sw/fan/end_cor_10rpm.mp4 differ diff --git a/Videos/sw/fan/side2_180.mp4 b/Videos/sw/fan/side2_180.mp4 new file mode 100644 index 0000000..4b02067 Binary files /dev/null and b/Videos/sw/fan/side2_180.mp4 differ diff --git a/Videos/sw/fan/side80.mp4 b/Videos/sw/fan/side80.mp4 new file mode 100644 index 0000000..513050c Binary files /dev/null and b/Videos/sw/fan/side80.mp4 differ diff --git a/Videos/sw/fan/side_120.mp4 b/Videos/sw/fan/side_120.mp4 new file mode 100644 index 0000000..0fb2d6e Binary files /dev/null and b/Videos/sw/fan/side_120.mp4 differ diff --git a/hough_lines.py b/hough_lines.py new file mode 100644 index 0000000..2c23325 --- /dev/null +++ b/hough_lines.py @@ -0,0 +1,56 @@ +import cv2 +import numpy as np + +# img = cv2.imread('sudoku.png') +cap = cv2.VideoCapture("./Videos/sw/fan/end_cor_10rpm.mp4") +ret, frame = cap.read() +roi = cv2.selectROI(frame) + +while True: + + ret, frame = cap.read() + print(ret) + + + if not ret: + break + # cframe = frame + c_frame = frame[int(roi[1]):int(roi[1]+roi[3]), + int(roi[0]):int(roi[0]+roi[2])] + gray = cv2.cvtColor(c_frame, cv2.COLOR_BGR2GRAY) + edges = cv2.Canny(gray, 50, 150, apertureSize=3) + cv2.imshow('edges', gray) + lines = cv2.HoughLines(edges, 1, np.pi / 180, 10) + + for line in lines: + rho,theta = line[0] + if theta == 0: + print(theta) + a = np.cos(theta) + b = np.sin(theta) + x0 = a * rho + y0 = b * rho + # x1 stores the rounded off value of (r * cos(theta) - 1000 * sin(theta)) + x1 = int(x0 + 1000 * (-b)) + # y1 stores the rounded off value of (r * sin(theta)+ 1000 * cos(theta)) + y1 = int(y0 + 1000 * (a)) + # x2 stores the rounded off value of (r * cos(theta)+ 1000 * sin(theta)) + x2 = int(x0 - 1000 * (-b)) + # y2 stores the rounded off value of (r * sin(theta)- 1000 * cos(theta)) + y2 = int(y0 - 1000 * (a)) + cv2.line(c_frame, (x1, y1), (x2, y2), (0, 0, 255), 2) + + cv2.imshow('image', frame) + # if cv2.waitKey(0) & 0xff == ord('q'): + # # brea0k + # continue + + if cv2.waitKey(100) & 0xff == ord('c'): + break + # continue + + + # cv2.imshow('image', img) +# k = cv2.waitKey(0) +cap.release() +cv2.destroyAllWindows() \ No newline at end of file diff --git a/object_tracking_rpm.py b/object_tracking_rpm.py index 349d9ea..4fdd6a6 100644 --- a/object_tracking_rpm.py +++ b/object_tracking_rpm.py @@ -3,7 +3,7 @@ import datetime -cap = cv2.VideoCapture("../Videos_fan/speed1.mp4") +cap = cv2.VideoCapture("./Videos_fan/speed1.mp4") # tracker = cv2.TrackerMOSSE_create() # tracker = cv2.legacy.TrackerMOSSE_create()