Skip to content

Commit 6686837

Browse files
committed
Working on #3
1 parent 6627f79 commit 6686837

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

DigiPyRo.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ def start():
357357
dtheta = digiRPM*(6/fps)
358358
addRot = digiRPM != 0
359359

360+
changeUnits = unitVar.get()
360361
unitType = unitTypeVar.get()
361362
unitCount = unitCountVar.get()
362363
unitConv = 1 # intialize to 1 in the case that no unit conversion is selected
@@ -418,7 +419,7 @@ def start():
418419
ret, frame = vid.read()
419420
frame = cv2.resize(frame,(width,height), interpolation = cv2.INTER_CUBIC)
420421
cv2.namedWindow('Distance Calibration')
421-
cv2.setMouseCallBack('Distance Calibration', unitConversion)
422+
cv2.setMouseCallback('Distance Calibration', unitConversion)
422423

423424
instructsUnit(frame)
424425
cv2.imshow('Distance Calibration', frame)
@@ -577,7 +578,8 @@ def start():
577578
dataFile.write('DigiPyRo Run Details \n \n')
578579
dataFile.write('Original File: ' + filename + '\n' + 'Output File: ' + fileName + '\n')
579580
dataFile.write('Date of run: ' + time.strftime("%c") + '\n \n')
580-
dataFile.write('Original rotation of camera: ' + str(camRPM) + ' RPM\n' + 'Added digital rotation: ' + str(digiRPM) + ' RPM\n' + 'Curvature of surface: ' + str(naturalRPM) + ' RPM\n' + '\n' + 'Particle Tracking Data' + '\n')
581+
dataFile.write('Original rotation of camera: ' + str(camRPM) + ' RPM\n' + 'Added digital rotation: ' + str(digiRPM) + ' RPM\n' + 'Curvature of surface: ' + str(naturalRPM) + ' RPM\n' + '\n' + 'Particle Tracking Data')
582+
dataFile.write(' in ' + unitType + ' and ' + unitType + '/s\n')
581583
dataFile.write('t x y r theta u_x u_y u_r u_theta ||u||\n')
582584

583585
for i in range(len(ballX)):
@@ -697,9 +699,9 @@ def start():
697699
unitCountVar = DoubleVar()
698700
unitCountLabel = Label(root, text="Unit count:")
699701
unitCountEntry = Entry(root, textvariable = unitCountVar)
700-
unitTypeLabel.grid(row=9, column=0)
701-
unitTypeEntry.grid(row=9, column=1)
702-
unitCountLabel.grid(row=10, column=0)
703-
unitCountEntry.grid(row=10, column=1)
702+
unitTypeLabel.grid(row=8, column=1)
703+
unitTypeEntry.grid(row=8, column=2)
704+
unitCountLabel.grid(row=8, column=3)
705+
unitCountEntry.grid(row=8, column=4)
704706

705707
root.mainloop()

0 commit comments

Comments
 (0)