Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
todo_ct 6.58 KiB
CAMTRON PROCESSING PIPELINE
###########################
 A) setup / preparation
 B) recorder
 C) background-subtraction
 D) process scripts
 X) HPC
 Z) laptop/fon maintenance
###########################

PRIO:
> update opencv 				-> eval how much work to fix?
> update algorithm for bgs -> eval how much work to fix?

A)
###########################

	> TEST CAM! GET RUNNING PICTURES!
		1. setup virtual machine to test
			> 8 cores, 16GB RAM, 2 TB for 1cam
			> 48 cores, 128GB RAM, 6 TB for 6cam

		2. use laptopt to test

		3. (opt/later) setup tower1 (defunct again!) as cheap testing machine!
			> get NIC working
			> give name connect inet
			--> as terminal to connect to server
			--> later: use for DMX lighting

		4. (alternatively) Raspberry Pi

			Q: is option fast enough for processing of 1/3/6 streams simultaneously?
				> test bottleneck (CPU,HDD,ethernet,)
				> is video compression on? how demanding!
				> storage: 1 minute hochrechnen. mit 24/17/12 FPS.

			Q: how should workflow look?
				> Option A
					1. record and store (where)
					2. process (where?)
				> Option B
					1. record, process (cut ROI to reduce size), store
					2. more processing (R..)
				--> what processing.
				--> draw picture as doc of workflow

	> light (opt/later)
		> find hardware (Boxes, DMX per unit, DMX splitter/controller)
		> setup hardware for 1 unit
		> check software
		> get infrared LEDs. ask if andy ordered them?
		> attach IR-LEDs (solder)

	> arenas
		> verglasungsfolie
		> 1 floor wooden plate with circle >> really needed?
		> 1 floor glass plate
		> 1 floor wooden plate

		> how to connect seamlessly?
		> o-ring: https://www.o-ring.de/o-ring-fpm-90/item-anfragemenge-6-categoryId-or-itemId-100022-search2-580.00-search3--search7-.html

		>> or use poisonous electro-harz zum giessen. Wie Form bauen?



	* setup 1 fridge
		> attach cam arm to wood
		> get video in VV
		> get video in SW-A via SDK
		> cam calibration (Use Viewer? Or own SW?)
		> configure cam settings
	* get video for 3 cams in one workstation
		> what SW?
		> calculate supported framerate+resolution+codec for hardware (CPU,RAM,HDD...)
			> or do tests and see if frames are dropped


	DONT do a diskbench to get writing speed (calculate needed speed with 3 cameras) to see if frames will be dropped or not...
		writing speed of one of the workstations is 150MB/sec
		prosilica gtx1920 needs 3x 107.53 MB/sec for BGR. 1x for MONO
		avi uncompressed
		1280x1280 @ 40 fps is limit for your CPU oO
		CPU can compress 47mio pix/second
		17x1936x1456=47mio -> 17fps @ full res
		suggested CPU i7 3840
		reduce ROI



	# Documentation
		> sketch
			> chamber: cam height+resolution+arena diameter for pixel to cm/mm ratio
			> lab: chambers+workstations+HPC

		> costs. update with what we actually buy!
		> sketch: technical: cam (QuantumEfficiency) + IRLED
		> sketch: setup plan for a chamber
		> copy last setup plan from thomas



B) recorder - camera produces frames and timestamps
###########################
	(depends on cam in A)!!!
	> use new api Vimba X
	> read manual (c++ / vimba)
============================
	> wait and detect cams
	> produce frames & timestamps
	> build GUI
		--> Q: might a console app be feasable??
============================
	> central config
		> threads for started recordings [PID]
		> storage folder

	> export settings with viewer
	> load settings with sw
	> how and where to store frames?

	All APIs cover the following functions:
		Listing currently connected cameras
		Controlling camera features
		Receiving images from the camera
		Notifications about camera connections or disconnections


	> browse other examples a bit:
		list cams / features / actioncommands
		eventhandling??

	> read Manuals
		>Vimba, C++, GigE-TL,(ImgTransform,),Cam Technical Docu
		pdf "${HOME}/vimba_5_1/Documentation/Vimba Manual.pdf" 	"${HOME}/vimba_5_1/VimbaCPP/Documentation/Vimba CPP Manual.pdf" 	"${HOME}/vimba_5_1/VimbaGigETL/Documentation/VimbaGigETLFeaturesManual.pdf"  	"${HOME}/vimba_5_1/VimbaImageTransform/Documentation/Vimba ImageTransform Manual.pdf" 	"${HOME}/vimba_5_1/Documentation/Vimba Viewer Guide.pdf"

	From Thomas:
	* recording single frames in data structure
	* used Vimba.2.1 (1.6 more likely)
	* compress each frame with loosely jpg compression
		(used framework opencv version 3.2. imwrite function with parameter: IMWRITE_JPEG_QUALITY 100 ;  IMWRITE_JPEG_OPTIMIZE 1; IMWRITE_JPEG_RST_INTERVAL 4;)
	* stores timestamps for each frame in milliseconds

SW viewer [optional]
###############################
	how?
	Wie ruft man die index.html auf der VM auf?
	Wie kommunizieren SW REC und Viewer?
		eg. OnStopButtonClicked( cmd( ../camTrack3000 --stop ) ) ??
	REST-Server/ HTTP-Json / ..







C) background subtraction
###########################
	ctb - calculates centroid points of all frames in a record
	> build
	> find test data (cp to 00 - ..)
	> process
	-----------
	> update bgs alg. opencv4 has its own bgs?


D) process scripts
###########################
 	ctd - calculated the mean speed in pixel / millisecond
	* can i reduce size of data (reduce length|fps|res)
	>> calc D) for test data set (get data from joerdis?)
	-> with all frames
	-> undersample, shorter length
	-> compare results. same?

	trajectory

	> figure out concrete steps. harmonize scripts? ..
		> trajr.
		> run calcVmeanForID.r on data
		> calc new values. max speed. angle. ...

X) HPC - High Performance Cluster
####################################
	> gamify > lvl up
	> try script to send over data
	> script that copies data once a day from VM to HPC
		> Secure-Shell-ID angepasst
		> cron
		or > II) vimba-software directly to HPC?

Z) laptop/fon maintenance
###############################




Done
#######################

> research suitable "fridges"
	-> price!, temp-range, electricity inside, size space in lab?
	-> more than 2
		Reach In Plant Growth Chambers E-36L1
		---------------------
	> setup stativ, use our lab
	> how-to connect ETHernet cable? it will have to go outside of fridge??
	> how-to control temperature and humidity? (see picture from thomas dox)
> research WS (see hardware_notes.ods for details like specs. CPU, RAM, SSDs, prices)
> cam aufhaengung
	research stativ/tripod: manfrotto arm + clamp + bodenplatte for cams
	other stuff to fix cameras > stange
> sensors for temp+humidity (HOBO)
> backup data from towers
> setup tower (displays,cards,cables)
-------------------------------
> bal: func: list_suffices
> bal: function to replace all names to snake_case (upper to lower, space/dash to underscore)
> opd: works with "name containing spaces.pdf" -> use array for files instead of string concatenation in o_helper()
> bug: changed IFS in o_helper broke nav function