Skip to content

SwarmingSoft/ImageProcessing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImageProcessing

Dependencies:

C++

Python

imageprocessing

detects bacteria, outputs positions, angles and sizes of rectangles

ImageProcessing inpath filenametpl start stop X Y DX DY outpath

inpath
path with input images (including trailing slash)
filenametpl
filename template (printf syntax)
start and stop
ints used to format filenametpl
X Y DX DY
defines a subregion to read from the images
outpath
path for output (including trailing slash)

More parameters in .cpp file (starting with "int width")

Raw data in real time.

Segmented

tracking

establishes frame-to-frame trajectories

Parameters in .cpp file (starting with "std::string dir")

Tracked

ids_generate

assigns unique ids to particles

spline_generate

smooths trajectories by splines (one parameter "smoothing")

clustering

finds bacteria in the same cluster

normalize

histogram equalisation normalization

opticalflow

outputs optical flow grid and calculates correlation functions

order of execution

  • imageprocessing onto raw images yields positions, orientations (data_exp.txt) and dimensions (data_len.txt)
  • delete_duplicated_lines_data_exp yields data withouth duplicate output rectangles (due to unknown bug)
  • tracking (yields [...]_tracked.txt)
  • ids_generate (yields data_exp_tracked_ids.txt)
  • splines_generate (yields [...]_splines.txt)
  • final data files are data_exp_tracked_splines.txt, data_exp_tracked_ids.txt, data_len_tracked.txt (and data_vel_tracked_splines.txt)

step-by-step instructions for setting up OpenCV for imageprocessing

Linux:

  • follow one of the guides, eg. here
  • you have to include the shared library files (*.so) from the bin folder of the build to the PATH variable or copy them next to executable
  • you have to change the "search directories" and "linker settings" in codeblocks (Project -> Build options -> Search directories / Linker settings) to accommodate for your file structure (and possibly add search directories and some -lopencv_ type 'Other linker options')

Windows:

  • download and install Codeblocks and if on Windows OS seperately mingw
  • Windows only: set these mingw's execuatables in the codeblock's toolchain (settings -> compiler -> toolchain executables)
  • download and unpack OpenCV (tested 3.0)
  • create symlink "opencv" to your OpenCV installation (super folder of "build", "sources" etc), e.g. under Windows using admin privileged command line and calling mklink /J C:\[...\where your Codeblocks project is]\opencv C:\[...\where your OpenCV is]\opencv
  • download and install CMake
  • build opencv library with CMake: "[...]\opencv\sources" as source and "[...]\opencv\build\x86\mingw"(create folder first) as binaries destination, click "Configure", choose "MinGW Makefiles", after it finishes "Generate"
  • add the MinGW\bin folder to your operating systems PATH variable
  • in a command line, set your directory (using cd) to [...]\opencv\build\x86, run mingw32-make, and mingw32-make install after it finishes
  • build and run imageprocessing.cbp
  • alternatively here is our precompiled (for Windows 7 and newer) library

About

Bacteria segmentation, tracking and clustering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published