This repository contains the source code for the novel segmentation method of lettuce in coloured 3D point clouds presented in journal paper Segmentation of lettuce in coloured 3D point clouds for fresh weight estimation.
The src
folder contains the source code along with Makefiles and program descriptions.
The data
folder contains examples of coloured 3D point clouds of Cos and Iceberg lettuce.
If you use this code in your research or elsewhere, please cite/reference the following paper: Segmentation of lettuce in coloured 3D point clouds for fresh weight estimation
@article{Mortensen2018,
title = "Segmentation of lettuce in coloured 3D point clouds for fresh weight estimation",
author = "Anders Krogh Mortensen and Asher Bender and Brett Whelan and Margaret M. Barbour and Salah Sukkarieh and Henrik Karstoft and René Gislum",
journal = "Computers and Electronics in Agriculture",
volume = "154",
pages = "373 - 381",
year = "2018",
issn = "0168-1699",
doi = "https://doi.org/10.1016/j.compag.2018.09.010",
url = "http://www.sciencedirect.com/science/article/pii/S0168169917314102",
keywords = "Leafy vegetables, Photogrammetry, Structure from motion, Biomass, Computer vision, Agricultural robotics"
}
The programs are written in C++ using the Point Cloud Library (PCL) v1.7, Boost, Eigen and VTK. The former three are mandatory for PCL.
The programs were developed in Qt Creator (v5.7) and using CMake to building the programs. CMakeFiles
for all programs are included.
- Download or clone this repository
- For each program in the
src
folder, create a new project in Qt Creator and build the program:- When creating a new project, the following settings were used:
- Project type: "Non-Qt-Project" and "Plant C++ Application"
- Build system: "CMake"
- Kit selection: "Desktop Qt 5.7.0 GCC 64bit"
- Project Management:
<None>
- Copy the CMake-file and source code from the corresponding program to the new project folder.
- Overwrite the existing CMake-file in the project folder.
- Setup the build folder by selecting the "Project" icon in the left pane. Changed the "Build directory" to what suits you. The program will be stored in this folder.
- In Qt Creator, reconfigure CMake by selecting "Build" > "Run CMake".
- Build the project by selecting "Build" > "Build Project 'Project name'" or press
Ctrl
+B
. - (Optional) Copy the build program into a
PATH
-folder, so it can be accessed from any folder.
- When creating a new project, the following settings were used:
See descriptions of the individual programs located in the src
folder.