This project demonstrates a MATLAB implementation for fruit detection in 3D LiDAR point clouds using the Velodyne VLP-16 LiDAR sensor (Velodyne LIDAR Inc., San Jose, CA, USA). The dataset contains 3D point clouds of 11 Fuji apple trees and corresponding fruit position annotations. The implementation uses a Support Vector Machine (SVM) classifier for fruit detection.

Setup and Requirements

  1. Clone the Code: To begin, clone the repository using the command:

    git clone https://github.com/GRAP-UdL-AT/fruit_detection_in_LiDAR_pointClouds.git

  2. Data Preparation: Create a folder named “data” in the directory where the code is saved. Inside this folder, store the ground truth data and point cloud data in subdirectories named “AllTrees_Groundtruth” and “AllTrees_pcloud”, respectively.

  3. Prerequisites: Ensure you have the following installed in MATLAB:

  4. MATLAB R2018 (other versions not tested)
  5. Computer Vision System Toolbox
  6. Statistics and Machine Learning Toolbox

  7. Dataset: The LFuji-air dataset is stored in the /data folder. This dataset provides the necessary LiDAR data for training and evaluation.

  8. Cross-validation: Perform cross-validation to evaluate the performance of the model in detecting fruit within the LiDAR point clouds.

Notes

  • The implementation is optimized for MATLAB R2018 and tested specifically on this version.
  • The project utilizes a dataset that includes both ground truth fruit positions and point cloud data for training the detection model.