diff --git a/src/pyspectrometer-v3.1.py b/src/pyspectrometer-v3.1.py index 624a15b..8def2c8 100644 --- a/src/pyspectrometer-v3.1.py +++ b/src/pyspectrometer-v3.1.py @@ -59,6 +59,7 @@ import peakutils import base64 import argparse +import re imdata = 'iVBORw0KGgoAAAANSUhEUgAAASwAAACSCAYAAAD/yvfEAAAUqHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjarZppkuW6kaz/YxVvCZgCASwHo1nvoJf/PmdlXUlXarXapEqrHE7ykGCEhw9ghvvf//XC/+OfRc+hmvc2Wov8q6OOPPmmx1//5vc5xfp9/v7l/fNd+tvXw8g/b8q8VPhafv3Y28/rl9c5Jv0c1/evr2nyuv31ie7PL9bf/mL+nCj3nwv8vP77QiX9ukD8OXGYPycq+efK9dfP69dtxTa6//Ut7J/j38/vvzLwP+hTLZ6bteSVzzVH9zb4vudYnbodLfTtPPQ+Wz8n+tPP4fehmTXlW1KJfO5aYdH/VCZfy/eZE/N58H0ujc+ljF8rpVs5ROf78buu//zfP1t5+L30n5b/TUv/+O5Prfb9950OX0F/H1L+1KH2x9d/+Hqyv7we/rqlX9/+6sqt/XyX//R6/Y2qv3Qu/G7fe6e/d3/d3ayNW24/N/X7Fr/vOG6pWt+7Gh/Of4tdxdbH4KMzEhscHUC2+NhppEwbX6rppJleut/XnTZLrPlm52vOm+buwIudZoy8aW0qVR/pZafNp3QavYFD4dX8x1rSd9nxXW6nzoVP6gH0JE6WeMu/9RH+lYPeU79TUi391/SzrqyCswp1LqUQE4fRkfR+impfgX9//Pmf+lrooH1l7tzgjEtnoP3L0l/AVb5GFw40vv4a4OTn5wSUiBUYi0mFDsSWiqWW4LUcPCUK2WnQZOm51LxoSzLLh0XmWkqjOUwB1+Y9nr5Ds+VfL0OENMJKC8XpDYNIs2o18OO1g6FpxaqZNXPrNmy20jRhrXkTo04vXt28uXv34TP00mu33rr33kefI48C49pgHkcfY8zJRSdnnrx7csCcK6+y6rLVlq++xpo7h1123bbb9t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A8L3BsdXM6Q29weXJpZ2h0T3duZXI+CiAgIDxwbHVzOkxpY2Vuc29yPgogICAgPHJkZjpTZXEvPgogICA8L3BsdXM6TGljZW5zb3I+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz77oDXnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5QMICRop9QcrlgAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAACAASURBVHja7b15mF1Vne/9WXvvs8881XCqKlWZKgMJISFMgSBgVEAg0oI2oqiobctzu/X1dtt9X1+v96G99vW1Wy9qd2NrS19ofcWrYGM7gA00GIZAMEAIkJlUZajx1HDOqTPvab1/nFPDSaoyGTBc1ud5dlJnn73XXnsN3/1bv/Vb+whAolAoFG8CNFUECoVCCZZCoVAowVIoFEqwFAqFQgmWQqFQKMFSKBRKsBQKhUIJlkKhUCjBUigUSrAUCoVCCZZCoVAowVIoFEqwFAqFQgmWQqFQKMFSKBRKsBQKhUIJlkKhUCjBUigUSrAUCoVCCZZCoVAowVIoFEqwFAqFQgmWQqFQKMFSKBRKsBQKhUIJlkKhUNQxTkciT55/IU0v7UNIA/CBNEFM/u0DfMhIAKcrxkTcz1CuQK9dZltpjKfH+uizSm/oTa+Onc/FsSs4J3Ih87WzSIY7CIokMh3AFlBuq5KVOcay46TNfvorPfSV93CgvI39mRewvfxbsrFEF3YjL9tAMZlAGgJ00D2HSE8Pxcd/g5MvqB71RteJX2PDuQmWpTIIT4IH0hHkShEe3mnRl60qwTqSsyIRWoUf4ekgTMCsiRZm7bM0oWgi92qAQAabKbb5GYgs5NnIIv6/zB4eHz34ut9si5Hi6rbr+IPYB1heOZdophV3xMBGYAGWBCHAOBQkRpCAbKdFrKS70yJrZBhYsItfyr9l5/jDb8nO0b5yFfzRf2J/9yKoPYcIexU6H3uMg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1zlChUIJ1klx3tcZ1Vx9fPAaHTvx3B0/k2OuuDnDd1WqdoUKhBOsk+G9/GSQYOH581O59zgmneSLHBgOC//aXKsxBoVCCdYJ87tM6F19w/BftHTjk8KP7qyec7o/ur3Lg0PFF6+ILTD73aRXmoFAowToBPv3Hx3+V8RNPV7noHXnuvd874XTvvd/jonfkeeLpY4ucptXyoFC8mcjn8/zqV7864eNHRka49957lWD9LnznGybdi+YOY6hUJN++q8CG60uMjp98+qPjsOH6Et++q0DlGE747kUG3/mGep3yW5He3l6eeOKJ1/06f/d3f4dt26xZs2Zq3z/90z8hpeT222+f2vfBD34QKSWf+tSn3tByGBwc5Mc//vFxj/vrv/5r9u7di2VZlEoldu3axcc//vGp79esWcPWrVspl8vYtk1PTw+33XbbCZ8PsGHDBn7yk59gWdZpuz/5u25rVws51huXMpOcdRvaE5O33qzNef6qFci/+rwhh/fG5PDemPyrzxty1Yq5r3frzZoc2hOb83pjvXG5drWQp+Pe1Pbm2Xp7e+UTTzzxul/noosukrZty69//etT+7Zs2SKr1ap86KGHpvb94Ac/kOPj46f9+iMjI/Lee++d8/vBwUH54x//+LjpHDx4UG7fvl1+4AMfkLfccovct2+fPHz48NT3Tz/9tBwdHZV/9md/Jm+66Sa5fft2OTw8fMLnf+UrX5GTWJZ1uu7/d0/kofuCc4rHMw+H5CUXHi0e110l5Pe+ZcoXnwjL0kDiqPNKAwn54hNh+b1vmfK6q44+/5ILhXzm4dCc133ovqDqxEqwprarrrpKbt26VebzeVkul+WOHTvkjTfeOPX93XffLdPptLRtW2azWbl58+ZjXqunp0du2rRp6vPY2Jh89NFHZU9Pz9S+bdu2yeeee65BaB599FG5c+dOWalU5JYtWyQgh4eHGwRo48aNctu2bbJUKslisSh7enpkqVRqSGfTpk1y9+7dslKpyEwmI7/1rW9JQL7wwgtyJplMZs57+NnPftbw+a677pKO40x9LhaL8u677576/IEPfEBKKeXnP//5Ezp/crvjjjvOHMH68E2arA4fLTjVdELe/Q9mw7Gf/qQu/+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vpxVq1axe/fuk87r2NgYPp+PSy655NRn0aREiBPre7/4xS+49dZb+cY3vtEwA/jggw9SKpVYtWrVdL++6SYCgQB79uw57vlnnGB97+/8LOg884M0u+bp/K871euU38rcdddd9PX1cd999/HJT36SNWvWcPvtt7Nz504AvvWtb/Hss8/yqU99ir6+PgYGBvA8j+Hh4WOm+9JLL7F69Wocx+H73/8+AD/+8Y9JpVJ0d3fzzDPPnHRe77vvPnK5HF/72td45zvfyWc/+1ne/e53n1QamUyGVatWcfbZZx/zuO3bt7N+/Xo+97nPzTpMfemll7j22mv5zGc+w4033sgXv/hFRkdH+fa3v31C579enJLz67FfhE7Yaf773h7/RUg5pd8iTvfZ+Nu//Vt5/fXXyy1btshsNitt25bj4+PyySefnHK679mzRxYKBWnbthwaGpJ33nnnca+3ceNG6Xme3Lp1a8P+AwcOyEqlIru6uk4oHOFIp/sXvvAFOTAwIB3HkSMjI3Lz5s2yUCjMmc7k7N1HP/pRCci/+Iu/kOl0WrquK/v7++fMv+d5s5bXAw88MBW+8cILL8hKpSJt25a9vb3yT/7kT074/JlhDZPkcrnfqY5P+afqDQM+96c6un5mv1fddSXf/EcXW7mxFG9S7rnnHq6++mo6Ozvf8mVxyt4dx4Gv/b2rWpNC8ToRjUb5+Mc/zjXXXMPzzz+vCuR3GRKqTW1qe322hx9+WFarVem6rsxms/Kxxx5riNt6K2+nPCRUKBSKNxr1xjuFQqEES6FQKJRgKRQKJVgKhUKhBEuhUCiUYCkUCiVYCoVCoQRLoVAolGApFAolWAqFQqEES6FQKJRgKRQKJVgKhUKhBEuhUCiUYCkUiv8j+f8BBkE+1lPD8Q4AAAAASUVORK5CYII=' @@ -67,16 +68,16 @@ class App: DEFAULT_CALIBRATION = ((72, 405), (304, 532)) - def __init__(self, args, window, window_title, video_source=0): + def __init__(self, args, window, window_title): self.window = window self.window.geometry("660x570") self.window.resizable (width = False, height = False) self.window.title(window_title) - self.video_source = video_source self.def_font = tkinter.font.nametofont("TkDefaultFont") self.def_font.config(size=9) - self.vid = MyVideoCapture(args.calibration or App.DEFAULT_CALIBRATION, self.video_source) + self.vid = MyVideoCapture(args.calibration or App.DEFAULT_CALIBRATION, + args.video_source, args.resolution, args.fps) #set up the graph points as str initially. #They will become ints later and we can check! @@ -260,14 +261,14 @@ def update(self): class MyVideoCapture: - def __init__(self, calibration, video_source=0): + def __init__(self, calibration, video_source, resolution, fps): self.calibration = calibration #settings for peak detect self.mindist = 50 #minumum distance between peaks self.thresh = 20 #Threshold self.savpoly = 7 #savgol filter polynomial - self.intensity = [0] * 636 #array for intensity data...full of zeroes + self.intensity = [0] * resolution[0] #array for intensity data...full of zeroes self.holdpeaks = False # Open the video source @@ -294,9 +295,9 @@ def __init__(self, calibration, video_source=0): 17. CV_CAP_PROP_WHITE_BALANCE Currently unsupported 18. CV_CAP_PROP_RECTIFICATION Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently) ''' - self.vid.set(cv2.CAP_PROP_FRAME_WIDTH,640) - self.vid.set(cv2.CAP_PROP_FRAME_HEIGHT,480) - self.vid.set(cv2.CAP_PROP_FPS, 25) + self.vid.set(cv2.CAP_PROP_FRAME_WIDTH, resolution[0]) + self.vid.set(cv2.CAP_PROP_FRAME_HEIGHT, resolution[1]) + self.vid.set(cv2.CAP_PROP_FPS, fps) if not self.vid.isOpened(): raise ValueError("Unable to open video source", video_source) @@ -386,11 +387,11 @@ def get_graph(self): ret, frame = self.vid.read() if ret: #Process the data... - #Why 636 pixels? see notes on picam at beginning of file! - piwidth = 636 image = frame bwimage = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY) rows,cols = bwimage.shape + #Why -4 pixels? see notes on picam at beginning of file! + piwidth = cols - 4 #create a blank image for the data graph = np.zeros([255,piwidth,3],dtype=np.uint8) @@ -434,8 +435,7 @@ def get_graph(self): halfway =int(rows/2) #halfway point to select a row of pixels from #pull out single row of data and store in a self.intensity array - #Why -4 pixels? see notes on picam at beginning of file! - for i in range(cols-4): + for i in range(piwidth): data = bwimage[halfway,i] if self.holdpeaks == True: @@ -504,11 +504,17 @@ def arg_parser() -> argparse.ArgumentParser: def parse_calibration(s): return tuple([ tuple(map(int, p.split(':', 1))) for p in s.split(',', 1) ]) + def parse_resolution(s): + return tuple(map(int, re.search(r'(\d+)[xX](\d+)', s).groups())) + parser = argparse.ArgumentParser() parser.add_argument('-c', '--calibration', type=parse_calibration) + parser.add_argument('-r', '--resolution', type=parse_resolution, default=(640,480)) + parser.add_argument('-f', '--fps', type=int, default=25) + parser.add_argument('-v', '--video-source', type=int, default=0) return parser # Create a window and pass it to the Application object -App(arg_parser().parse_args(), tkinter.Tk(), "PySpectrometer V3.0") +App(arg_parser().parse_args(), tkinter.Tk(), "PySpectrometer V3.1")