Aircraft Detection 1.0
Loading...
Searching...
No Matches
straight_airplanes_extraction.h File Reference

Go to the source code of this file.

Functions

void extractStraightAirplanes ()
 Extracts, processes, and saves straightened airplane images from a dataset.
 

Function Documentation

◆ extractStraightAirplanes()

void extractStraightAirplanes ( )

Extracts, processes, and saves straightened airplane images from a dataset.

This function processes a dataset of images and their corresponding YOLO label files to extract, straighten, and save airplane images. It performs the following steps:

  1. Reads the paths of the dataset images and YOLO label files.
  2. Creates a directory to save the straightened airplane images.
  3. Iterates through each dataset image: a. Reads the image and converts it to HSV color space. b. Processes the YOLO labels to obtain bounding boxes for the airplanes. c. Prompts the user to select and optionally rotate the airplanes. d. Binarizes the selected airplane regions. e. Calculates geometric moments to determine the orientation of the airplanes. f. Extracts and rotates the airplane images to be upright. g. Saves the processed airplane images to the specified directory.
Note
This function assumes that the dataset images and YOLO label files are in the same directory.
The processed images are saved in the straight_airplanes directory within the source directory.
See also
globFiles
createDirectory
processYoloLabels
selectAirplanes
binarizeAirplanes
calculateGeometricMoments
extractRotatedAirplanes
saveStraightAirplanes