Highlights
What are the main findings?
- The pyzbar-based pipeline detected 491 of 500 field QR codes (98.2%) in 45 oblique UAV imagery, processing each region of interest in 0.41 s on a standard PC.
- Under the tested pre-growth, 12 m and 45 acquisition configuration, pyzbar decoded every QR code classified as fully visible and outperformed OpenCV in detection rate and processing time.
What are the implications of the main findings?
- QR-code markers provide a basis for future plot-label reference where image metadata alone cannot identify the imaged ground location in oblique aerial imagery.
- The method provides a reproducible basis for future validation of automated plot extraction and agricultural phenotyping workflows.
Abstract
Field experiments in precision agriculture require reliable linkage of plant variants to experimental plots, which is difficult in oblique aerial imagery because the drone position does not identify the imaged ground location. We present and evaluate a reproducible workflow for detecting QR reference markers in high-resolution UAV images acquired over a wheat field before crop growth at a 45 viewing angle. The workflow combines manually defined regions of interest, documented preprocessing, a rotation sweep, and independent evaluation of OpenCV and pyzbar decoding backends. QR codes were selected for practical field deployment because their payload can directly encode a plot identifier and can be checked with an ordinary smartphone; the study does not benchmark QR codes against other fiducial-marker families. In 500 field-collected QR-code crops from 20 images, 491 codes (98.2%) were decoded; all nine failures had incomplete code visibility. The observed result is therefore a system-level outcome of both image acquisition and decoding under the tested configuration, rather than a growing-season operational accuracy. The mean processing time was approximately 0.41 s per region of interest on a standard PC. The work demonstrates QR-marker detection under the stated pre-growth conditions and provides a basis for future plot-label reference, calibration, and downstream Fusarium Head Blight phenotyping.
1. Introduction
Fusarium Head Blight (FHB) is one of the most important diseases in wheat. Resistance phenotyping in field experiments is still predominantly based on visual scoring by experienced observers [1]. In the conventional procedure, plant scientists inspect the side of the wheat head and assign a severity score describing the fraction of spikelets that are visibly infected. While this method is well established, it is labor-intensive, and its accuracy depends on observer expertise and consistency. Furthermore, breeding for FHB resistance is complex because the trait is controlled by several quantitative gene loci [1].
To reduce the manual effort, Unmanned Aerial Vehicles (UAVs) equipped with high-resolution cameras provide an efficient alternative for field-based phenotyping. UAVs offer significant advantages, especially in large breeding programs where many plots need to be assessed repeatedly [2]. They can capture non-destructive repeatable images of many plots in a single flight and can document the spatial structure of disease spread and plant growth throughout the field [2,3]. In wheat trials, UAV-based remote sensing has been used to quantify traits such as plant height, canopy structure, vegetation indices, and yield-related characteristics in field plot experiments. This shows that aerial measurements can support high-throughput field phenotyping in breeding pipelines [3,4,5]. Recent work has shown that ultralow-altitude drone phenotyping combined with deep learning can automate the assessment of resistance to FHB and classify wheat varieties into multiple resistance levels [6].
For FHB scoring, we aim to replicate the lateral view used in manual assessment by acquiring drone images with a camera tilt of approx. 45 (see Figure 1a). This configuration provides side views of the wheat heads and fine structural details that are not visible in nadir imagery. It also complements existing nadir-based deep-learning approaches by targeting the perspective used in traditional field scoring.
Figure 1.
Corresponding oblique imaging configurations at approximately 12 m altitude and 45 camera tilt. (a) Oblique UAV image illustrating the discrepancy between the drone’s GPS position and the image center, which complicates plot localization. (b) Schematic oblique UAV view of the QR-code experiment before crop growth.
To support this imaging perspective, we configured a camera–drone system for wheat-field image acquisition. Our imaging platform consists of a DJI Matrice 300 RTK drone (SZ DJI Technology Co., Ltd., Shenzhen, China) carrying a Phase One iXM-100 camera (Phase One A/S, Frederiksberg, Denmark). The 100-megapixel camera was fitted with a 150 mm lens and mounted on the drone via a three-axis stabilized gimbal; both the lens and the gimbal were also Phase One components.
This configuration achieves a ground sampling distance of approx. 0.5 mm at a flight altitude of 12 m. In addition, it records complete metadata for each image. The flight plan is designed for oblique imaging with a camera tilt of 45, allowing a lateral view of the wheat heads to mimic the scoring method of plant scientists.
However, the chosen imaging geometry complicates downstream image analysis. At 12 m altitude and 45 tilt, the images exhibit strong perspective distortion and foreshortening (see Figure 1a). More importantly, the drone’s GPS position does not correspond to the image center’s ground location, making plot localization unreliable. Any method to determine individual plots must, therefore, account for this mismatch and the geometric distortions. Accurate tracking of plots and varieties, however, is essential, because phenotypic measurements and disease scores must be associated with the correct genotype and treatment [1].
To overcome these problems, we introduce QR codes as machine-readable reference markers that link an imaged field section to its plot layout. Each plot is conventionally marked on the ground with a printed plot identifier, providing a direct link between the plot and the wheat variety. During the growing season, these printed labels become almost completely covered by leaves; although field staff can read them by walking through the crop, this is not possible from drone images. Before the growing season, we place a set of 25 QR codes in the field, each encoding a unique position label; the codes are arranged in a grid with 1 m spacing, covering approximately the footprint of a single image at 12 m altitude (see Figure 2). The corresponding oblique QR-code imaging geometry is illustrated in Figure 1b. Each code measures cm and is attached to a rigid plate at ground level. The present experiment evaluates the detection and decoding of these markers before crop growth; it does not evaluate growing-season FHB phenotyping or marker performance under vegetation occlusion.
Figure 2.
Arrangement of 25 QR-code markers in a 5 × 5 grid on bare soil before crop growth. Each marker encodes a unique grid-position label. The markers were placed at 1 m spacing to approximate the footprint of a single oblique UAV image.
First, decoding a QR code identifies a labeled marker position within the imaged field section [7]. In a future workflow, a documented link between marker labels, field layout, and plot records could support assignment of image content to individual plots and wheat varieties; such an assignment was not evaluated in the present study. If necessary, the plates can be mounted on short poles or raised higher to improve visibility, and the spacing of the QR codes can be adjusted depending on whether finer plot-level localization or coarser regional identification is required.
QR codes were selected primarily for practical workflow compatibility, not because they are claimed to be scientifically superior to ArUco, AprilTag, STag, or other coded targets. A QR payload can directly contain a plot identifier, variety label, or surveyed coordinate, and the code can be checked immediately during deployment with a standard smartphone. These properties support routine fieldwork by different users without specialized reader hardware. In contrast, alternative fiducial markers may be preferable for applications optimized for pose estimation, small-target detection, or a formal calibration benchmark [8]. Such a comparative benchmark was outside the scope of this study. QR-code corners and surveyed RTK-GNSS coordinates could be used in a future calibration study, but no calibration or reprojection-error analysis is reported here.
In practice, however, QR code recognition in oblique, high-resolution UAV images is challenging for several reasons. Automated FHB recognition requires a GSD of approx. 0.5 mm, which necessitates a very high-resolution camera; using a 100 MP camera, for example, results in TIFF files of approx. 300 MB each. Processing such large images to locate comparatively small QR code targets places high demands on computing power, so we focus on computationally efficient algorithms. Additionally, the 45 camera angle causes strong distortion of the QR codes, similar to the perspective distortions studied in QR detection based on edge direction and projection analysis [9]. Outdoors, changing light conditions and shadows reduce contrast, further complicating localization and decoding [10], while dirt, leaves, and other debris can significantly hamper edge detection [11]. During drone flights, especially with a heavy camera, wind or rapid flight maneuvers often cause images to be recorded rotated and tilted, which in turn leads to rotated QR codes. This necessitates a robust, rotation-tolerant approach to QR code detection and decoding [12].
To solve these problems, we design a modular detection workflow that combines classical image processing with a systematic comparison of QR decoding backends. The methodological contribution is not a new rotation-invariant detector, perspective-correction method, or deep-learning model. Instead, it is a reproducible field-imaging workflow with explicit ROI handling, preprocessing and rotation settings, and a controlled comparison of conventional decoders under the stated acquisition conditions. The main contributions of this paper are:
- We compare two QR decoding backends, namely OpenCV and pyzbar, and conduct a comprehensive evaluation. The dataset consists of 20 images, each containing 25 QR codes. These oblique UAV images were captured over agricultural land.
- We conduct a spatial error analysis based on QR code position labels. This analysis identifies systematic weaknesses at specific spatial positions within the image.
- We investigate the influence of QR code rotation on detection and decoding performance and determine a robust rotation sampling angle for scanning. We also show that a finer scanning angle does not lead to any further improvement in the results.
- We develop a practical desktop implementation and report its observed processing time on the study computer. Device-specific edge or real-time performance is not evaluated.
2. Material and Methods
We present a modular pipeline for robust QR code detection in high-resolution oblique aerial images. The pipeline addresses challenges of extreme resolution, perspective distortion, arbitrary in-plane rotation, and varying illumination. The goal is achieved through region-of-interest (ROI) extraction, preprocessing, rotation-invariant detection, and perspective rectification, followed by a comparison of QR decoding backends. Thus, the following steps are carried out:
- 1.
- Detecting the QR codes despite perspective distortion and spatially varying illumination.
- 2.
- Decoding the encoded position label for each QR code.
2.1. Field Setup and Image Acquisition
Our experimental setup consists of 25 QR-code markers arranged in a 5 × 5 grid in the field. Position labels range from 11 (top-left) to 55 (bottom-right), where the first digit indicates the row and the second the column. The markers were produced in-house; each QR code measures 15 cm × 15 cm and was attached to a rigid plate mounted at ground level. The grid spacing is 1 m in both horizontal and vertical directions, spanning 4 m × 4 m between the centers of the outermost markers. As seen in Figure 2, this setup covers roughly the same area as a single image of the wheat field. During the growing season, the wheat field contains 0.5 m2 (0.5 × 1 m) experimental plots, each planted with a different wheat variety.
The primary QR-code experiment used an approximately 12 m controller-referenced height above ground and a 45 oblique camera angle. This geometry was developed during prior methodological work on UAV image acquisition and metadata-driven image reduction for wheat-field experiments; FHB phenotyping itself was not evaluated in the present study. The 20 images were acquired as a controlled, deliberately similar dataset rather than as a factorial sample of acquisition conditions. The UAV was positioned along the orthogonal plot layout, and most images were recorded while the UAV was stationary or moving only minimally in order to capture the grid precisely. Small changes in the angle between the image view and the grid were deliberately included to represent in-plane rotations that can occur during field flights. Metadata showed constant settings across all 20 primary images: 150 mm focal length, a camera sensitivity setting of ISO 1600, f/5.6 aperture, and 1/2500 s exposure time. A quantitative image-overlap value, a fixed flight speed, and image-acquisition frequency were not predefined experimental factors and were not analyzed; consequently, the experiment does not evaluate their effects on motion blur, perspective distortion, or QR-code recognition.
During manual screening, each candidate image was assigned to one of four visibility categories: (i) all 25 QR codes fully visible; (ii) all 25 QR codes present but one or more codes partially cropped; (iii) QR codes present but the grid incomplete; or (iv) no QR-code grid visible. The primary dataset comprised images suitable for ROI extraction, including category (ii). Complete visibility was subsequently assessed for each individual QR-code ROI; this per-ROI classification is used when reporting decoding success among fully visible codes.
2.2. ROI Extraction and Preprocessing
Since each TIFF image has a size of 300 MB, processing the entire image is computationally inefficient and even infeasible on a standard PC. The center of each QR code was marked manually in the full image with an interactive click tool. The tool extracted and saved a fixed pixel TIFF region of interest (ROI) centered on each click. Each of these ROIs has a size of approx. 4 MB. Processing an ROI thus requires significantly less computational effort than processing the entire image. At the same time, the spatial context for recognition is preserved.
In the preprocessing phase, each ROI is evaluated as three decoder-input variants in fixed order: a raw grayscale image , a mean adaptive-threshold binary image , and a Gaussian adaptive-threshold binary image . CLAHE is an intermediate contrast-enhancement step for the two thresholded variants; it is not a separate decoder-input variant. First, we apply the standard luminance weighting to convert the ROIs from RGB into raw grayscale:
An established method for local contrast enhancement is Contrast Limited Adaptive Histogram Equalization (CLAHE) [13]. We derive to compensate for varying lighting conditions. The grayscale image is divided into tiles without overlap. Then, histogram equalization is applied within each tile. A clip limit of is used to prevent noise amplification.
Adaptive and locally weighted thresholding strategies have proven effective in QR code recognition under different lighting conditions and complex backgrounds [10,14]. Therefore, we apply two adaptive thresholding variants to achieve spatially variable binarization. For , the threshold of each pixel depends on the local environment and is calculated as the unweighted local mean intensity within a window minus a constant offset :
where is the local mean intensity. The second binary variant uses the same window and , but replaces with a Gaussian-weighted local mean. This spatially adaptive approach is intended to support scenes with non-uniform lighting and shadowing, as encountered in outdoor UAV imagery [10].
Finally, we apply morphological closing with a square structuring element and one iteration to both thresholded variants. Using this operator, small gaps in the black-and-white pattern are filled, and isolated noise pixels are suppressed. Morphological post-processing has been used in previous work to improve the robustness of QR code recognition [10].
The separately generated preprocessing images and their roles are summarized in Table 1.
Table 1.
Separately generated preprocessing images used for the controlled pyzbar analysis. Arrows describe the construction of one image.
2.3. Rotation-Invariant Detection
Due to sudden movements caused by wind or during turning maneuvers in flight, QR codes can appear in any orientation on the plane. Deep-learning-based rotated object detectors have been proposed to address rotation explicitly in barcode and QR code detection [12]. In contrast, we pursue a simpler, model-free approach to make the evaluation resource-efficient. We rotate the QR code in 10 increments and apply the decoding algorithm at each step. This rotation sweep provides 36 uniformly spaced rotation angles
For each angle , we apply a rotation transformation around the ROI center using the affine transformation matrix
We now have three preprocessing variants: (raw grayscale image, CLAHE plus mean adaptive-threshold binary image, and CLAHE plus Gaussian adaptive-threshold binary image). For each of these variants, we attempt QR code recognition for each rotation angle . The rotation process is terminated prematurely after successful recognition and decoding to minimize computational effort.
2.4. Perspective Rectification
Perspective rectification is exclusively used by the OpenCV backend as a fallback when the rotation sweep fails. A perspective transformation between two planes is represented by a homography matrix with eight degrees of freedom. Given four point correspondences for , the homography satisfies , where ≃ denotes equality up to scale in homogeneous coordinates.
Perspective distortion is known to degrade QR code localization and recognition, and specialized edge-based projection analysis has been proposed to detect and characterize such distortions [9]. For rectification of oblique frames, we use the Direct Linear Transform (DLT) algorithm, as commonly used in photogrammetry [15]. First, we apply corner detection on the preprocessed ROI to obtain quadrilateral hypotheses corresponding to the outer corners of the QR code. If a quadrilateral is detected, we compute the homography H that maps the detected corners to a square configuration using DLT. The ROI is then warped according to
and decoding is reattempted on the rectified image.
2.5. QR Code Detection
We evaluate two QR decoding backends to assess their performance under oblique viewing conditions. The first backend is OpenCV’s QRCodeDetector, which uses contour-based finder pattern detection to identify the characteristic square patterns in three corners of the QR code. The second backend is pyzbar, a Python wrapper for the ZBar library, which employs its own binarization heuristics and edge-following strategies. Both approaches are representative of traditional QR detection pipelines that operate on binarized images and geometric features, as opposed to end-to-end deep-learning architectures [14].
Both backends are applied to the same preprocessed ROIs (raw grayscale, mean-adaptive threshold, and Gaussian adaptive threshold variants) across the rotation sweep. For each backend and each ROI, we record detection success, decoded text, processing time, and the rotation angle at which decoding succeeds. This systematic comparison enables a quantitative assessment of detection rate and processing speed for each backend.
2.6. Controlled Preprocessing-Ablation Design
To isolate the contribution of each preprocessing operation, we performed a controlled ablation on the same 500 original ROI crops. This targeted experiment follows the definition of the rotation sweep and QR-code decoder above. All tests used QR-code-only pyzbar decoding, the same 10 rotation sweep from 0 to 350, and early stopping after the first successful decoding. In Table 2, the word “then” denotes decoder attempt order: pyzbar receives separately generated images one after another. It does not mean that one decoder input is constructed from the preceding decoder input.
Table 2.
Controlled preprocessing tests. Each row is one complete decoder configuration applied to all 500 original ROI crops.
2.7. QR Position Labels
Once a QR code is detected and decoded, its position label identifies the marker within the grid. The present study does not assign decoded labels to individual field plots or plant variants. A future deployment could link the marker labels to an experimental database, but this would require a documented plot-assignment procedure and independent reference data. No independently surveyed reference plot coordinates, reproducible plot-localization procedure, or predefined localization-error metric were available. The present study therefore demonstrates marker decoding only, not plot assignment or quantitative plot-localization accuracy.
2.8. Design of the Additional Image-Condition Comparison and Scaling Sensitivity Analysis
The primary evaluation was deliberately restricted to 20 images acquired at the intended 12 m flight height and 45 camera tilt. These parameters were selected because the original UAV image-acquisition workflow for the wheat/FHB field experiments used the same controller-referenced height, oblique camera angle, and alignment with the orthogonal plot layout. The QR-code experiment was designed as a controlled marker test under that intended imaging geometry; it did not perform FHB phenotyping. To examine the behavior of the decoding backends outside these primary conditions, we conducted a separate exploratory comparison using seven additional images from a QR-code experiment conducted on a different field. The additional images were selected after metadata extraction and manual visual screening to cover estimated controller-referenced heights above ground from 4.4 to 32.2 m and two camera-attitude groups (level/nadir and approximately 45 oblique). Figure 3 presents four representative selected images. The image, rather than the individual QR code, was treated as the experimental unit; individual ROIs are reported as repeated observations within each image.
Figure 3.
Illustrative images from the separate exploratory comparison. The selected images document the range of level/nadir and approximately 45 oblique acquisition conditions. Heights are controller-referenced estimates above ground, not independently validated ground-truth heights. (a) Level/nadir; estimated height 32.2 m (P0007480). (b) Level/nadir; estimated height 12.0 m (P0007516). (c) Approximately 45 oblique; estimated height 11.9 m (P0007688). (d) Approximately 45 oblique; estimated height 4.4 m (P0007735).
Only QR codes that were manually selected as visible and suitable for ROI extraction were included in this supplementary comparison (139 ROIs in total). This sample was not designed as a randomized or factorial experiment. Consequently, it is used to identify practically relevant robustness issues, not to estimate a causal effect of flight height or camera angle.
An initially striking result occurred for the closest oblique image (P0007735; estimated height above ground 4.4 m): pyzbar failed for its nine selected ROIs although the codes were visually clear. We therefore performed a targeted reproducibility check over all 139 selected ROIs. Each stored ROI crop was evaluated in its original size and after LANCZOS resampling to a maximum side length of 1200 pixels. LANCZOS is a windowed-sinc interpolation filter that estimates output pixels from a weighted neighborhood of input pixels [16]. The operation reduced only crops whose longest side exceeded 1200 pixels; it did not enlarge smaller crops. OpenCV and pyzbar were evaluated independently under both input-size conditions. For pyzbar, decoding was restricted to the QR-code symbology. This scaling analysis is reported as an exploratory sensitivity analysis and does not replace the primary 500-code evaluation.
2.9. Implementation Details
All image processing and QR-code recognition experiments were performed in Python (version 3.12.3). ROI extraction and image preprocessing were implemented with OpenCV (version 5.0.0.93) and NumPy (version 2.5.1). QR-code decoding was performed independently with the QRCodeDetector included in OpenCV and with pyzbar (version 0.1.9), a Python wrapper for ZBar (version 0.10). Recognition results were saved as CSV files. For the supplementary input-size analysis, Pillow (version 12.3.0) was used for LANCZOS resampling. The experiments were run on a PC with a 12th Gen Intel Core i7-1260P processor and 32 GB RAM, without GPU acceleration.
The code is organized as modular Python scripts, facilitating reproducibility and future integration into larger UAV image-processing workflows.
3. Results
The experimental wheat-breeding field is located in Lower Austria, Austria (48°19′09′′N, 16°04′03′′E; WGS 84; decimal degrees: 48.3192°N, 16.0675°E). It covers approximately 60 m (N–S) × 40 m (E–W) and comprises 0.5 m2 plots, each containing one wheat variety. Each plot has a printed ground identifier that links the plot to its variety. During the growing season, these labels are largely covered by leaves and cannot be read reliably from drone images.
The following results are based on 500 QR codes from 20 images (25 codes per image). They compare the two decoding backends, describe spatial error patterns, and assess the rotation and preprocessing strategies.
3.1. Overall Detection Performance
All 20 images were processed with the OpenCV implementation and pyzbar; the results are summarized in Table 3. pyzbar decoded 491/500 codes (98.2%) with a mean processing time of 0.41 s per ROI, whereas OpenCV decoded 452/500 codes (90.4%) with a mean processing time of 0.84 s per ROI. pyzbar therefore achieved a 7.8-percentage-point higher detection rate and was 2.05 times faster. At image level, pyzbar decoded all 25 QR codes in 16 of the 20 primary images; the remaining four images yielded 24, 24, 22, and 21 successful decodings. OpenCV decoded all 25 QR codes in one image; eight images yielded 24 successful decodings, four yielded 23, one yielded 22, three yielded 21, one yielded 20, and two yielded 19.
Table 3.
Backend comparison on 500 QR codes. pyzbar achieved a 98.2% detection rate and was 2.05 times faster than OpenCV.
Perspective rectification was available only as an OpenCV fallback after unsuccessful rotation-based decoding. It did not produce an additional successful decoding in the primary evaluation.
Figure 4 illustrates the two backends on one image. OpenCV did not decode the four QR codes at positions 11, 31, 33, and 43, whereas pyzbar decoded all 25 QR codes.
Figure 4.
Illustrative comparison of QR-code decoding in image P0007573. The two-digit labels identify positions in the grid (first digit: row; second digit: column). Green borders indicate successful decoding, and red borders indicate unsuccessful decoding by the respective backend. (a) OpenCV did not decode positions 11, 31, 33, and 43. (b) pyzbar decoded all 25 QR codes.
Figure 5 shows the nine QR codes (out of 500) for which pyzbar did not return a decoded label. Each was partially cropped and therefore not fully visible because the source image did not cover the complete grid. Under the 12 m and 45 imaging configuration of the primary dataset, pyzbar decoded every QR code classified as fully visible. This demonstrates robust performance under the tested conditions but does not establish general insensitivity to perspective distortion or foreshortening.
Figure 5.
All nine QR codes (out of 500) that pyzbar did not decode. Each code was only partially visible in the original UAV image. The red borders mark unsuccessful decodings.
pyzbar detected all 452 codes recognized by OpenCV and an additional 39 codes that OpenCV did not decode. Thus, a dual-backend strategy provided no additional detection benefit beyond pyzbar alone for this dataset.
3.2. Detection Results by QR Position
To examine the spatial pattern of detection failures, we analyzed the success rate for each QR position in the grid. Figure 6 summarizes the position-wise rates for both backends.
Figure 6.
Detection rate by QR position label. (a) OpenCV detection rate (0–100% scale) reveals vulnerability in the center left position 31: 25%, left column, and isolated interior positions (33 and 43). (b) pyzbar detection rate (80–100% scale) shows near-complete coverage; residual failures are confined to the top row (positions 11: 90%, 12: 95%, 13: 90%, 15: 85%) and the bottom-right corner (position 55: 95%).
Position 31 (center left) had the lowest OpenCV recognition rate (25.0%; 5/20 images), while pyzbar decoded this position in all 20 images. Across the top edge (positions 11–15), the mean rates were 71.0% for OpenCV and 92.0% for pyzbar; across the left edge, they were 75.0% and 98.0%, respectively. The five pyzbar positions with reduced rates are shown in Figure 6; all associated failures occurred in partially cropped ROIs (Figure 5).
3.3. Rotation Strategy
The initial rotation study compared 5 and 10 increments. Its original results are retained in Table 4. A confirmation experiment using the same 500 original ROI crops reproduced the 10 per-ROI detection decisions and decoded labels exactly (452/500 for OpenCV; 491/500 for pyzbar). We then evaluated 15 and 20 increments for both backends and, for pyzbar, 25, 30, and 35 increments. All other preprocessing settings were unchanged, and pyzbar was restricted to QR-code symbology. The confirmation and extension results are reported in Table 5.
Table 4.
Initial rotation study on the 500 original ROI crops. Finer rotation sampling (5) provided no detection improvement for pyzbar and only a small improvement for OpenCV, at the cost of longer runtime.
Table 5.
Confirmation and extension of the rotation-interval study on the 500 original ROI crops. The 10 confirmation and all larger intervals were evaluated separately with unchanged crops and preprocessing. Mean times are reported within their respective runs.
In the initial study, the 5OpenCV strategy detected 457 codes (91.4%), compared with 452 codes (90.4%) at 10, but required substantially longer runtime. In the confirmation experiment, 15 and 20 both reduced the detection rate to 441/500 (88.2%). Among the tested settings, 10 therefore provides the most suitable compromise when OpenCV detection performance is prioritized.
For pyzbar, every tested interval from 5 to 35 decoded the same 491 QR codes (98.2%) with identical labels. The lowest mean runtime among the confirmation and extension intervals was observed at 20 (0.35 s per ROI). Runtime did not decrease monotonically with coarser sampling. Rotation refinement did not recover the nine pyzbar failures, all of which involved incomplete visibility in the primary dataset.
Accordingly, 20 was the fastest tested pyzbar interval without a loss of detection performance in this dataset. This result is not claimed as a global optimum beyond the tested images, QR-code design, and preprocessing configuration.
3.4. Rotation Angle Distribution
Table 6 summarizes the rotation angles at which pyzbar first decoded each successful ROI. Most detections (95.1%) occurred between 0 and 90, reflecting the relatively uniform QR-code orientation in the field test. Only 3.5% occurred between 90 and 180, and 1.4% between 180 and 360. The sweep therefore covered the observed orientations in the primary dataset but does not establish performance for arbitrary rotations beyond the tested images.
Table 6.
Distribution of detection angles for pyzbar across the rotation sweep. Most detections (95.1%) occur within the 0–90 range. The rotation-sweep approach also captures less common orientations.
3.5. Preprocessing Effectiveness
Table 7 reports the first-success allocation of preprocessing variants in the final, reproducible sequential configuration. This configuration corresponds to Test E in Table 8.
Table 7.
First-success allocation of preprocessing variants in the final sequential evaluation (Test E in Table 8; 491 successful pyzbar decodings).
Table 8.
Results of the full controlled preprocessing ablation on the 500 original ROI crops. The fourth column reports first-success allocations after raw grayscale was unsuccessful; these values depend on the decoder attempt order in each test. Mean time is descriptive for this single sequential run and includes preprocessing, rotation attempts, and early stopping.
The sequential evaluation in Table 7 reports the same decoder attempt order as Test E. The additional controlled tests in Table 8 vary the attempt order to isolate the contribution of each processing operation; they provide the basis for the component-contribution conclusions.
Test A showed that raw grayscale input decoded 463/500 QR codes (92.6%). Pure CLAHE did not recover an additional code in Test B. The mean adaptive-threshold variant recovered 28 additional QR codes in Test C, increasing the total to 491/500 (98.2%). Gaussian adaptive thresholding recovered one code beyond raw grayscale in Test D, but this was the same code recovered by the mean variant. The sequential tests resolved this overlap: in Test E, mean preprocessing recovered all 28 additional codes and Gaussian preprocessing recovered none; in the reverse-order Test F, Gaussian preprocessing recovered one code first and mean preprocessing recovered the remaining 27. Test G confirmed that pure CLAHE contributed no additional decoding before the threshold-based variants. Thus, mean adaptive thresholding supplied all 28 unique additional decodings beyond raw grayscale, whereas pure CLAHE and Gaussian thresholding supplied none in this dataset.
3.6. Additional Image-Condition Comparison and Scaling Sensitivity Analysis
The supplementary comparison comprised 139 manually selected QR-code ROIs from seven images spanning estimated controller-referenced heights above ground from 4.4 to 32.2 m. Using the stored ROI crops, OpenCV decoded 132/139 ROIs (95.0%) and pyzbar decoded 130/139 (93.5%). Both backends decoded all 107 ROIs from the five level/nadir images. For the approximately 45 oblique image at an estimated height of 11.9 m (P0007688), pyzbar decoded 23/23 ROIs and OpenCV decoded 18/23. At the lower estimated height of 4.4 m (P0007735), OpenCV decoded 7/9 ROIs and pyzbar decoded none. Table 9 reports the image-wise conditions and stored-crop results. These seven selected images do not support causal attribution of the observed differences to height or camera angle.
Table 9.
Exploratory image-condition comparison. Heights are controller-referenced estimates above ground; ROIs were manually selected and therefore vary by image.
In the all-ROI scaling sensitivity analysis, resampling each crop to a maximum side length of 1200 pixels did not change OpenCV performance (132/139), whereas pyzbar decoded all 139 ROIs (Table 10). The nine additional pyzbar successes were the nine ROIs from P0007735. All 130 ROIs already decoded by pyzbar from the stored crops retained the same labels after resampling. Adding a synthetic brown background around the close-range crops did not improve pyzbar decoding. This indicates that the observed behavior was associated with pixel scale or resampling rather than the amount of surrounding soil context. This exploratory analysis was restricted to the selected ROIs and did not test pyzbar performance across acquisition geometries.
Table 10.
Exploratory scaling sensitivity analysis on the 139 manually selected ROIs from seven additional images. Each backend was evaluated independently.
4. Discussion
In the following, we discuss the performance of the QR-based detection pipeline, analyze spatial and rotational effects on recognition, and derive practical recommendations for QR code placement, flight planning, and camera calibration in agricultural field experiments.
4.1. Robustness Under Oblique Viewing Conditions
Under the tested 12 m and 45 oblique recording conditions, pyzbar achieved higher decoding performance than OpenCV. The spatial analysis shows that the nine pyzbar failures in the primary dataset occurred in ROIs with incomplete QR-code visibility at the image edge. However, the present experiment did not quantify perspective distortion, so it cannot establish that distortion has no influence on pyzbar decoding. pyzbar detected all 452 codes recognized by OpenCV, as well as an additional 39 codes. Thus, a dual-backend strategy did not improve the results in the primary dataset.
The additional image-condition comparison extends the evidence beyond the primary configuration but remains exploratory because the seven images were selected rather than sampled in a factorial design. It revealed a close-range input-scale sensitivity of pyzbar that was not visible in the primary dataset: at a maximum input side length of 1200 pixels, pyzbar decoded all 139 selected ROIs, including the nine close-range ROIs that failed in their stored crop size. Based on this exploratory result, future pyzbar deployments should define and document a fixed input-size rule; a maximum side length of 1200 pixels is the tested example. This finding does not demonstrate that performance is independent of height, camera angle, perspective distortion, illumination, or occlusion.
4.2. Spatial Patterns and Oblique Viewing Effects
OpenCV’s low recognition rate at specific positions, such as 31, warrants further investigation. At a 45 oblique viewing angle, greater geometric distortion is expected towards the top edge; however, the present data do not isolate distortion, cropping, optical effects, plate condition, or other causes. Lens defects, dirt, and small mechanical misalignments are hypotheses only, not experimentally supported explanations.
The edge analysis of the OpenCV detections across all 500 QR codes reveals a spatial pattern, including lower performance at the top and left edges. The asymmetry between the left and right edges is descriptive. It cannot be causally attributed to lens defects, gimbal mounting, camera alignment, or any other mechanism from the available data. Controlled optical, mechanical, and acquisition tests would be required to evaluate these hypotheses.
4.3. Placement and Flight Recommendations for Agricultural Experiments
Under the tested pre-growth acquisition conditions, pyzbar decoded all QR codes classified as fully visible. This result supports standardized QR-code use within the tested setting. It does not demonstrate flexible marker placement or robust performance in realistic growing-season agricultural environments. For OpenCV, some positions required special handling (e.g., larger QR codes or manual verification), which can complicate experimental procedures.
In the primary dataset, the observed pyzbar failures occurred only for QR codes that were cut off. Flight planning should therefore ensure sufficient forward and sideways overlap so that each QR code is fully visible in at least one image. This recommendation does not define a quantitative overlap threshold because this was not tested experimentally.
4.4. Rotation Study Insights
The rotation study shows that, compared with 10 increments, finer 5 increments offer no detection improvement for pyzbar and only a marginal improvement for OpenCV. The extended pyzbar comparison further showed that 15, 20, 25, 30, and 35 increments all preserved the same 491/500 detections in the primary dataset. Among these tested pyzbar intervals, 20 had the shortest mean runtime. In contrast, OpenCV lost 11 detections when its interval was increased to 15 or 20; therefore, the decoder-specific choice of interval matters.
The nine pyzbar failures were not recovered through rotation refinement. Their incomplete visibility is a plausible explanation, while the supplementary close-range test also shows that input pixel scale can affect pyzbar decoding. The results support a 20° pyzbar sweep as the fastest tested option for the present dataset, not as a general optimum for other QR-code sizes, imaging geometries, or preprocessing configurations.
4.5. Preprocessing Implications
The full controlled ablation clarifies the role of the tested preprocessing variants for the present dataset. Raw grayscale input decoded 92.6% of the QR codes, whereas the mean adaptive-threshold variant supplied all 28 unique additional successful decodings. Gaussian adaptive thresholding decoded one QR code beyond raw grayscale alone, but that code was also decoded by the mean variant; it therefore supplied no unique additional decoding. Pure CLAHE likewise supplied no additional decoding. Closing was retained as a fixed component of both threshold-based variants; its independent contribution was not isolated. This result is specific to the evaluated crops and settings; it does not establish that any operation is unnecessary under other illumination, crop-background, or QR-code conditions. The explicit comparison of both threshold orders avoids attributing the observed gain to CLAHE alone and provides a transparent basis for a future streamlined implementation.
4.6. Potential Role in Future Camera Calibration
The high marker-decoding rate indicates that many candidate image observations could be available for a future calibration study. It does not demonstrate that the observations yield accurate camera parameters or georeferencing: calibration accuracy depends on independently surveyed object coordinates, image-point measurement quality, image geometry, and a validated bundle adjustment. Neither RTK-GNSS coordinates nor QR-corner image measurements were collected for calibration in this experiment, and no reprojection error was calculated.
Without independently surveyed object coordinates and corresponding image measurements, the QR-code corners cannot be evaluated as ground control points in the present study. A future calibration experiment should survey object coordinates, estimate the camera model, report reprojection and independent-check errors, and quantify how geometric uncertainty propagates to plot assignment and downstream disease-patch mapping.
4.7. Limitations and Future Work
Our analysis was limited to rigid QR-code plates in an agricultural field before the start of crop growth. Due to changes in flight regulations, we were no longer able to conduct the experiments on growing wheat in our experimental fields. Thus, the 98.2% result applies to the present crops, acquisition configuration, and visibility conditions; it is not an operational growing-season accuracy. The primary QR-code images were deliberately similar and were mostly acquired with the UAV stationary or moving only minimally, so this study does not quantify the effects of higher flight speeds or motion blur. The additional seven-image comparison broadens the documented acquisition conditions but does not evaluate vegetation occlusion, dirt, moisture, marker deformation, shadows, changing illumination, soil-background variation, crop structure, or systematic levels of perspective distortion. Future validation should use a predefined protocol that systematically varies and records flight speed, height, camera angle, overlap, illumination, and occlusion, together with representative growing-season acquisitions. A separate operation-level ablation would also be required to isolate the contribution of morphological closing.
The 1 m spacing in the present QR-code grid was chosen for the marker-detection experiment, not validated as a plot-level placement scheme. In a future field deployment, QR codes could be associated with plots at selected boundaries. Increasing the marker spacing (e.g., to 2 or 3 m) would reduce the number of markers near each plot. Whether plots without an adjacent marker can be assigned through interpolation remains to be tested under real agricultural conditions, especially in oblique aerial images.
The next important step is the automated segmentation and classification of wheat ears in oblique aerial photographs. QR-marker decoding may provide a link between segmented ears and their corresponding plots and wheat varieties, but the accuracy and error propagation of that link have not been quantified here. A future end-to-end study should measure marker-detection, geometric-calibration, plot-assignment, and downstream disease-mapping errors separately.
QR codes can be evaluated in future camera-calibration studies after their object coordinates have been independently surveyed and their image observations have been validated. The present study does not establish calibration accuracy.
5. Conclusions
The use of aerial images in agricultural research is growing, and oblique imaging can complement nadir imagery for phenotyping applications such as FHB assessment in wheat-breeding trials [17]. In oblique images, however, the drone GPS position does not identify the ground location shown at the image center. We therefore evaluated a reproducible QR-reference-marker detection workflow in high-resolution images acquired over a wheat field before crop growth. Across 20 images and 500 QR-code crops, pyzbar decoded 491 codes; the nine failures had incomplete visibility. This is a system-level result for the stated acquisition and visibility conditions, not a quantitative demonstration of plot-localization accuracy, camera-calibration accuracy, or growing-season FHB phenotyping. The workflow provides practical evidence for QR-marker decoding and documented flight-planning considerations. Future work should validate marker performance under crop occlusion and field contamination, quantify plot-localization and calibration errors with independent ground truth, and evaluate the complete link to FHB phenotyping.
Author Contributions
Conceptualization, data curation, formal analysis, investigation, methodology, software, validation, visualization, writing—original draft, G.K.; writing—review and editing, supervision, project administration, funding acquisition, H.B. and P.M.R. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Province of Lower Austria under the FTI Strategy Lower Austria 2027 (ROBOKIZ, project ID FTI22-D-033) and by BOKU University through the project Phenotyping Across Scales.
Data Availability Statement
Since the raw UAV images of the wheat-field experiments contain sensitive location information, they will not be publicly released, but can be made available upon request to the corresponding author.
Conflicts of Interest
The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.
References
- Buerstmayr, M.; Steiner, B.; Buerstmayr, H. Breeding for Fusarium Head Blight Resistance in Wheat—Progress and Challenges. Plant Breed. 2020, 139, 429–454. [Google Scholar] [CrossRef] [Scilit]
- Xie, C.; Yang, C. A Review on Plant High-Throughput Phenotyping Traits Using UAV-based Sensors. Comput. Electron. Agric. 2020, 178, 105731. [Google Scholar] [CrossRef] [Scilit]
- Holman, F.H.; Riche, A.B.; Michalski, A.; Castle, M.; Wooster, M.J.; Hawkesford, M.J. High Throughput Field Phenotyping of Wheat Plant Height and Growth Rate in Field Plot Trials Using UAV Based Remote Sensing. Remote Sens. 2016, 8, 1031. [Google Scholar] [CrossRef] [Scilit]
- Hassan, M.A.; Yang, M.; Rasheed, A.; Yang, G.; Reynolds, M.; Xia, X.; Xiao, Y.; He, Z. A Rapid Monitoring of NDVI across the Wheat Growth Cycle for Grain Yield Prediction Using a Multi-Spectral UAV Platform. Plant Sci. 2019, 282, 95–103. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Yang, S.; Li, L.; Fei, S.; Yang, M.; Tao, Z.; Meng, Y.; Xiao, Y. Wheat Yield Prediction Using Machine Learning Method Based on UAV Remote Sensing Data. Drones 2024, 8, 284. [Google Scholar] [CrossRef] [Scilit]
- Liu, S.; Dai, J.; Huang, J.; Wen, Z.; Zhang, W.; Shen, L.; Jackson, R.; Wang, X.; Deakin, G.; Xiao, J.; et al. Combining Ultralow-Altitude Drone Phenotyping with Deep Learning Analytics to Assess Resistance and Disease Dynamics of Fusarium Head Blight in Wheat. Crop J. 2025, 13, 1372–1385. [Google Scholar] [CrossRef] [Scilit]
- Cui, Q.; Liu, M.; Huang, X.; Gao, M. Coarse-to-Fine Visual Autonomous Unmanned Aerial Vehicle Landing on a Moving Platform. Biomim. Intell. Robot. 2023, 3, 100088. [Google Scholar] [CrossRef] [Scilit]
- Kalaitzakis, M.; Cain, B.; Carroll, S.; Ambrosi, A.; Whitehead, C.; Vitzilaios, N. Fiducial Markers for Pose Estimation. J. Intell. Robot. Syst. 2021, 101, 71. [Google Scholar] [CrossRef] [Scilit]
- Karrach, L.; Pivarčiová, E.; Božek, P. Identification of QR Code Perspective Distortion Based on Edge Directions and Edge Projections Analysis. J. Imaging 2020, 6, 67. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Lopez-Rincon, O.; Starostenko, O.; Alarcon-Aquino, V.; Galan-Hernandez, J.C. Binary Large Object-Based Approach for QR Code Detection in Uncontrolled Environments. J. Electr. Comput. Eng. 2017, 2017, 4613628. [Google Scholar] [CrossRef] [Scilit]
- Szentandrási, I.; Herout, A.; Dubská, M. Fast Detection and Recognition of QR Codes in High-Resolution Images. In Proceedings of the 28th Spring Conference on Computer Graphics (SCCG ’12); Association for Computing Machinery: New York, NY, USA, 2012; pp. 129–136. [Google Scholar] [CrossRef] [Scilit]
- Luo, P.; Ma, Z.; Wu, Q.; Zhao, T.; Shen, X. Efficient Adaptive Rotated Object Detection for 1D and QR Barcodes. Sci. Rep. 2026, 16, 4689. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Reza, A.M. Realization of the Contrast Limited Adaptive Histogram Equalization (CLAHE) for Real-Time Image Enhancement. J. VLSI Signal Process. Syst. Signal Image Video Technol. 2004, 38, 35–44. [Google Scholar] [CrossRef] [Scilit]
- Alam, N.; Sagar, A.S.M.S.; Zhang, W.; Jin, T.; Dosset, A.; Dang, L.M.; Moon, H. A Comprehensive Study on Enhanced QR Extraction Techniques with Deep Learning-Based Verification. Appl. Intell. 2025, 55, 676. [Google Scholar] [CrossRef] [Scilit]
- Tommaselli, A.M.G.; Galo, M.; De Moraes, M.V.A.; Marcato, J.; Caldeira, C.R.T.; Lopes, R.F. Generating Virtual Images from Oblique Frames. Remote Sens. 2013, 5, 1875–1893. [Google Scholar] [CrossRef] [Scilit]
- Duchon, C.E. Lanczos Filtering in One and Two Dimensions. J. Appl. Meteorol. 1979, 18, 1016–1022. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Roth, P.M.; Prinz, S.; Moser, L.; Rischbeck, P.; Bürstmayr, H. Moderne Bildsegmentierung für praktische Anwendungen in der Biologie. In Proceedings of the 76th ALVA-Tagung; Arbeitsgemeinschaft für Lebensmittel-, Veterinär- und Agrarwesen (ALVA): Wieselburg, Austria, 2022. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.





