# Object-Based Time-Constrained Dynamic Time Warping Classification of Crops Using Sentinel-2
## 1 Introduction
[32] identified anomalous values in Landsat time series using DTW, replacing them by spatiotemporal interpolation for improved forest monitoring. [PERSON] et al. [33] made use of DTW as a similarity measure in sample selection, linking a few reliable samples with other interpreted samples, thus increasing the number of available training samples. [PERSON] et al. [34] used DTW similarity measure of the MODIS Normalized Difference Vegetation Index (NDVI) time series to map large-area rice cropping systems. To distinguish between different types of land use and land cover, [PERSON] et al. [18] introduced a time-weighted DTW (TWDTW) that accounts for seasonality of land cover types, improving the classification accuracy when compared to traditional DTW. The authors implemented the TWDTW into an open-source R package, _dtwSat_[25]. Most Earth Observation data processing and SITS applications using DTW have applied the analysis at the scale of a pixel [35]. This is understandable, since until the recent advent of Sentinel-2, only medium to coarse resolution SITS were available at no cost (e.g., Landsat or MODIS). The increasing spatial resolution of Sentinel-2 images makes them suitable for object-based image analysis (OBIA). Through OBIA, similar pixels are grouped together into objects through image segmentation [36]. In a recent study dedicated to the classification of Sentinel-2 SITS using DTW, [PERSON] and [PERSON] [26] demonstrated that object-based DTW outperformed pixel-based DTW for crops mapping in three study areas with different agricultural landscapes. At present, the remote sensing community lacks a dedicated workflow to perform an object-based DTW on SITS [18]. The availability of easy-to-use toolsto analyze and understand SITS is seen as a great demand for the successful application of this data to real-world problems [37; 38]. This study builds on the previous work by [PERSON] and [PERSON] [26] who compared pixel-based and object-based dynamic time warping with random forest classification for crop mapping. First, we extend the single-band analysis to multi-band time-constraint DTW for crop mapping using different study areas, time periods, more crops, and more images in the time series. The performance was assessed on two Sentinel-2 SITS from California and Texas, geographic areas characterized by highly complex agricultural landscape and practices. Secondly, we tested different time constraints in DTW classification and compared the results with those obtained by means of Euclidean distance measurement and a DTW without time constraint. Thirdly, we discuss the implications of DTW dissimilarity values in understanding the classification errors and evaluate the error propagations throughout our analysis. The approach is implemented as a ready-to-use algorithm in eCognition Developer software [39] available for the remote sensing community (see Supplementary Material). The developed workflow is able to adapt the DTW to perform on objects and solve one of the main challenges of DTW, namely a reduction in computational time [18]. The paper is structured as follows: Section 2 describes the Sentinel-2 datasets used, the design of the experiments, the background of DTW algorithm and the proposed single-band and multi-band object-based time-constraint DTW implementation. Section 3 is dedicated to the results related to the segmentation and classification accuracies. Section 4 discusses the main results, good practices in applying the object-based DTW analysis and states the advantages and limitations of the proposed workflow. Section 5 concludes the study and underlines the importance of such developments.