FOLDERS:

	-The folder "CAD-design" contains all the STL-files and example Photos to rebuild the camera contraption.
	-The folder "implementation" contains all scripts nessesary for video capturing, processing and lip parameter calculation.
	-The folder "programs" contains all programs that are used for capturing an processing.
 		To begin with all these programs have to be installed and added to the Windows path variable.
 		When using other program versions than the recomended, the program calls in the batch scripts have to be adapted to these versions.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

HOW TO CAPTURE VIDEOS AND CALCULATE LIP PARAMETERS:

Point of departure:
	-All Programms have been installed as recommended above
	-Camera contraption has been built and camera drivers have been installed (front cam CAM1, profile cam CAM2 in batch script; make sure to install the front camera first)
	-If nessesary, the camera names in the batch scripts have been renamed if using other cameras than the recommended ones

To beginn with, go to the "implementation" folder and make a copy of the "00_00_00" folder and rename it.
All further steps should be done in this copied folder to keep the 00_00_00 folder as a template.

There are three batch scripts leading through viceo capturing and parameter calculation:
	-capture_lips_and_calculate_lip_parameters.bat
	-just_calc_lip_parameters.bat
	-just_capture_lips.bat
They do what their names indicate.
You can either capture and calculate the lip parameters in one step or capture first and calculare the parameters afterwards.
This splitting was done due to parameter calculation taking some time.

Below the steps for video capturing and parametercalculation using the "capture_lips_and_calculate_lip_parameters.bat" script are described in brief.
The script gives instructions what to do in each step itself. What follows is additional information to that:
	1.	start the script, enter a session name and hit enter; the script will generate a folder structure for all captured data
	2.	start the sessoin by pressing any key (sometimes twice)
	3.	VirtualDub will start
		it may happen, that one capture device does not start up right away; in this case reselect it in the "device" menue
	4.	set Format and Cropping to the recommended values (resolution of the cropped image has to be 256x256 pixels)
		additionally other settings can be made here like framerate etc.
	5.	adjust the camera positions making sure the lips are in the center of both cropped images
		in the profile view make sure the lower edge of the nose is stil visible (see example video)
	6.	exit both VirtualDub instances
	7.	capturing will start automatically when you press any key
		it may happen, that one device does not start capturing right away; in ths case start in maually be pressing the F5 key
	8.	to stop capturing press the ESC key in both VirtualDub instances; they will close automatically
	9.	press any key and image processing will start; this step will turn the captured videos into BMP sequences and rotate the front images
	10.	when image rocessing is done the folders containing the BMP sequences will open to manually synchronize the sequences
		this is done by deleting every image before a synchronisation event
	11.	GIE will start next
	12.	open the captured image sequences one after another (file->load BMP sequence as film) and segment the opening of the mouth/the balck background
	13.	when segmentation is done export the contours to the specified folder (file->export glottis contour waveform)
	14.	close glottal image explorer
	15.	parameter calculation will start automatically
		this can take some time
	16.	when the calculations are done you can find the time series of the lip parameters in the specified folder
		the unit of these parameters are horizontal pixel coordinate of the upper lip tip in case of protrusion
		and vertikal lip opening in pixels

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

To check weather your tool chain is working, we have a short exaple
	1.	start the "just_calc_lip_parameters.bat" script
	2.	enter the session name "template" and folow steps 8 to 16 leaving out step 10 because the sequences are allready synchronized
	3. 	if everything works fine your received contour files and lip parameter file should look simmilat to the ones in the "template_results" folder
		the "template_results" folder also contains the segmentation data for frontal and profile sequences used to receive these results
		if you load them and the corresponding sequences ti GIE you can retrace how segmentation was done

For forther information about the segmentation procedure in GIE please read the GIE manual.