Skip to content

jdobber/mollex

 
 

Repository files navigation

mollex: mollusc extractor

mollex extracts molluscoid shapes from images. Mollusca is a phylum containing cephalopods (octopods etc.) and gastropods (such as snails and slugs). More precisely, the Museum für Naturkunde Berlin kindly provided us with a large collection of molluscs as part of the Coding da Vinci hackathon.

mollex works by removing the background, performing some adaptive prefiltering and finally finding contours that match typical molluscoid shapes.

We tested mollex only on snail-like shapes.

Daten

Install instruction

Linux

mkdir build
meson --buildtype=debug build
ninja -C build
./build/mollex

Usage: ./build/mollex [options] source destination
Extract snails from images.

Options:
  -h, --help     Displays this help.
  -v, --version  Displays version information.
  --verbose      Show debug information.
  --json         Write metadata as JSON to stdout.

Arguments:
  source         Source image to process.
  destination    Destination directory.

Windows

Run inside a terminal:

meson build --backend vs \
  -Dopencv_includes=C:\opt\opencv-3.4.3\build\include\
  -Dopencv_lib=C:\opt\opencv-3.4.3\build\x64\vc15\lib\opencv_world343d.lib

This will generate project files for Visual Studio inside build. Open mollex.sln in Visual Studio and build the project.

Alternatively, in a terminal try something like this:

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsx86_amd64.bat"
cd build
MSBuild mollex

Usage

Usage: mollex [options] source destination
Extract snails from images.

Options:
  -h, --help     Displays this help.
  -v, --version  Displays version information.
  --verbose      Show debug information.
  --json         Write metadata as JSON to stdout.

Arguments:
  source         Source image to process.
  destination    Destination directory.
λ .\mollex.exe --json --verbose C:\Users\Jens\Desktop\ZMB_Mol_4085_1.jpg out
threshold: 0.21625739303 b:980943 1.32685                                                        
convex: 776734 q:1.05063                                                                         
676745 b:1.23891e+06 1.83069                                                                     
Found 1 potential molluscs                                                                       
{                                                                                                
    "basename": "ZMB_Mol_4085_1",                                                                
    "imagePath": "C:\\Users\\Jens\\Desktop\\ZMB_Mol_4085_1.jpg",                                 
    "molluscoids": [                                                                             
        {                                                                                        
            "angle": -1.5298357108069875,                                                        
            "bbox": {                                                                            
                "height": 1319,                                                                  
                "width": 816,                                                                    
                "x": 1373,                                                                       
                "y": 515                                                                         
            },                                                                                   
            "color": "#cda56f",                                                                  
            "imageName": "ZMB_Mol_4085_1_0.png",                                                 
            "ratio": 0.592178225517273                                                           
        }                                                                                        
    ]                                                                                            
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 57.6%
  • Processing 24.7%
  • C 8.3%
  • Meson 7.8%
  • Shell 1.6%