## 2 Materials and Methods
### Photogrammetry to Generate Digital Twins in Agriculture 5.0  
Photogrammetry is a technique that is used to measure and create three-dimensional models of objects and environments by analyzing images [27]. It consists of the process of capturing and analyzing photographs from different angles and using the visual and geometric information contained in those images to reconstruct the shape, position, and scale of objects in three-dimensional space. Photogrammetry is based on the principle of triangulation, which involves finding common points in different images and calculating their positions in 3D space using the geometry and parallax of images captured from different perspectives. These common points are called control points and can be identifiable visual points on images or artificial markers placed on objects.  
The photogrammetry process generally involves several stages, which may include:  
1. Image acquisition: photographs of the object or area of interest are captured from different angles and positions. It is important to have good image coverage to obtain an accurate reconstruction.
2. Image orientation: The position and relative orientation of each image are determined in relation to the others. This is accomplished by identifying common control points in the images and using matching and adjustment techniques to estimate orientation parameters.
3. Extraction of characteristic points: Key points and distinctive features are identified in the images. These points are used to track and establish correspondences between different images.
4. Matching and triangulation: correspondences are established between the characteristic points in the different images, and triangulation is performed to calculate the 3D positions of the points in space.
5. Three-dimensional model generation: A three-dimensional model is created from the calculated 3D points. Depending on the required accuracy and the desired level of detail, polygonal mesh models, dense point clouds, or surface models can be generated.  
In the context of agriculture, photogrammetry is used to generate DTs, which are accurate virtual representations of crops, land, and agricultural structures [28; 29]. These DTs provide detailed, real-time information on the status of crops and the agricultural environment, helping farmers to make decisions and optimize their farming practices [30]. The use of photogrammetry and DTs in agriculture provides a number of benefits, such as:  
* Crop monitoring: Generating DT from images allows farmers to obtain up-to-date information on crop growth and condition. They can detect areas with water stress, diseases, or pests, and take preventive or corrective measures in a timely manner.
* Land planning and management: A DT makes it easier to plan plantings, design irrigation systems, and analyze soil characteristics. Farmers can evaluate topography, slope, sun exposure, and other factors to make informed decisions about land preparation and crop distribution.
* Optimization of agricultural inputs: By generating DTs, farmers can accurately monitor crop health and apply agricultural inputs (such as fertilizers or pesticides) in a localized and targeted manner. This reduces input wastage and minimizes environmental impact.  
* Yield analysis and crop forecasting: A DT makes it possible to keep track of crop growth and yield over time. Farmers can assess plant health, estimate expected yields, and plan to harvest more efficiently.  
Finally, DT technology serves as a powerful innovation driver within the agricultural sector. It empowers farmers to explore, test, and refine new technologies, practices, and business models within a virtual environment before implementing them in the real world. This approach fosters a culture of experimentation, ultimately leading to the development of more efficient, sustainable, and profitable solutions for the agricultural industry. A DT, in this context, emerges as a catalyst for progress and positive change.