Hi Artur,
I am sorry, I was looking only at the original data ... You are right, there is something about your orthos that it is not being recognized by the functions. We need to dig more into that!
I only visualized the Original image using fieldVIew() the Oriented didn't work because of projection. However, I could see that fieldIndex() is running for both orthos:
I also tried fieldShape_render() and it didn't work for your original image but one way around is using only one index to create the grid shape. Check this example with ncols = 2 and nrows = 4. It worked...!
Maybe it can help you for now until we figure out what is going on ... I would recommend reprocessing your orthos and using the default parameters from the software to see what happens. Maybe if you share your raw images we can try running it on different ortho-making software and compare results.
Here is the code I am using:
###################
### FIELDimageR ###
###################
# devtools::install_github("filipematias23/FIELDimageR.Extra")
# devtools::install_github("OpenDroneMap/FIELDimageR")
# Packages:
library(FIELDimageR)
library(FIELDimageR.Extra)
library(terra)
library(mapview)
library(sf)
library(stars)
library(leafsync)
library(mapedit)
# Uploading an example mosaic
Test_1 <- rast("Original.tif")
Test_2 <- rast("Oriented.tif")
# Visualization Option-01 (FIELDimageR.Extra):
fieldView(Test_1)
fieldView(Test_2) # There is a error in the image projection!
### Vegetation Indices
Test.Indices_1<- fieldIndex(mosaic = Test_1, Red=3,Green=2,Blue=1,RedEdge=4,NIR=5,
index = c("NGRDI","BGI"),
myIndex = c("(Red-Blue)/Green"))
Test.Indices_2<- fieldIndex(mosaic = Test_2, Red=3,Green=2,Blue=1,RedEdge=4,NIR=5,
index = c("NGRDI","BGI"),
myIndex = c("(Red-Blue)/Green"))
# Shape:
FieldShape<-fieldShape_render(mosaic = Test.Indices_1$NGRDI,
ncols = 2,
nrows = 4)
fieldView(mosaic = Test.Indices_1$NGRDI,
fieldShape = FieldShape,
type = 1,
alpha_grid = 0.2)
# Correcting Projection - It didn'twork yet !
LCC <- "+init=EPSG:3347"
WGS84 <- "+init=EPSG:4326"
NAD83 <- "+init=EPSG:4269"
WClim_CRS <- "GEOGCRS[\"WGS 84\",\n DATUM[\"World Geodetic System 1984\",\n ELLIPSOID[\"WGS 84\",6378137,298.257223563,\n LENGTHUNIT[\"metre\",1]]],\n PRIMEM[\"Greenwich\",0,\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n CS[ellipsoidal,2],\n AXIS[\"geodetic latitude (Lat)\",north,\n ORDER[1],\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n AXIS[\"geodetic longitude (Lon)\",east,\n ORDER[2],\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n ID[\"EPSG\",4326]]"
Test_2 <- terra::project(Test_2, WGS84) # R crashes lol
fieldView(Test_2)
###########
### END ###
###########
Hope it helps for now...!
All the best,
Filipe