# Usage Connect a usb camera to PC, then start GUI by executing `usbcamGUI/usbcamGUI.py` as below. ``` python usbcamGUI.py ``` The frame read from the connected camera is shown in the view area of the window. User can save image, change the camera's paramters by pushing buttons or keyboard shortcut. ## Save frame Press the `Save` button on the top or `Ctrl + s` to save frame displayed on the window. The image is saved as png and the suffix can be changed by `-p ` option (for example, `python usbcamGUI -p jpg`). The following suffixes will be acceptable. - `png` - `jpg` - `pgm` - `tiff` The filename is determined by the `Naming style` flag. While determined automatically in Sequantial and Timestamp mode, user can choose any filename in Manual mode. Press the `Naming style` button or `Ctrl + n` to switch the next flag. | style | example | | ---------- | :-----------------: | | Sequential | 00000.png | | Timestamp | [yymmdd-HHMMSS].png | | Manual | any | When save the image, the csv file that contain the parameters is also made at the same time. In the file, each parameter is listed in the format: `[param],[value]` ## Video record (experimantal) Press the `Record` button on the top or `Ctrl + r` to start recording. To improve performance, frame in the view area **doesn't update** during recording. ## Change parameters The label, slider and value on the right of the window shows each adjustable parameter supported by camera. You can drag the slider to change its value. Whether the specified parameter is valid strongly depends on what camera you use. ### Change sliders on the window. If you want to change the number of sliders on right of the window, Click Choose parameter sliders in View tab or `Ctrl + g` to see the list of parameters supported by camera. Check the items you want to set and click ok to reconstruct the layout contain the sliders of the selected parameters. ![](../../img/param.png) ## Change image size and FPS Pressing the `Properties` button calls a dialog box to change image size and FPS. Select fourcc, size and fps you want to set, then click ok. The values are applied as new properties if those are valid. ![](../../img/dialog.png) ## Switch theme To switch the GUI color-theme, Press `Light/Dark` button above the view area or `ctrl + t`. The dark theme is set by default. The files for setting style are quoted from [Alexhuszagh/BreezeStyleSheets](https://github.com/Alexhuszagh/BreezeStyleSheets) # Arguments Users can execute the program with options ``` python usbcamGUI.py