Problem with rotation of the orthomosaic created in Agisoft

96 views
Skip to first unread message

Pedja

unread,
Apr 27, 2021, 5:21:44 AM4/27/21
to FIELDimageR: A R package to analyze orthomosaic images from field trials.
Hello to all,

I have to repeat my question because I didn't solve my problem with the image rotation with the function fieldRotate.
The problem is when I try to rotate the image (which is in tiff format) I have bad results, plots are unnaturally distorted and shortened, because of that, I can't border individual plots in a good way with the function fieldShape.image.JPGimageplots.JPG
The images are attached. 
The image is exported from the project created in the Agisoft program.
Does someone have a solution for this problem?

Best regards,

Pedja

fmatias

unread,
May 1, 2021, 1:26:29 PM5/1/21
to FIELDimageR: A R package to analyze orthomosaic images from field trials.
Hi Pedja,

Thanks for asking... Based on the images that you shared seems the alignment of your rows and columns is not straight. In other words, when you correct the rotation for columns (as the example shared) you are losing the alignment for the rows. 

The best approach to fix this problem is to align the field using the rows and drawing a shapefile for each row. For example following the command line below:

EX1<- mosaic # Your image
n.row<-16 # Number of rows
n.cols<-10 # Number of columns

EX1.Shape.1<-list()
for(i1 in 1:n.row){
  print(i1)
  EX1.Crop<- fieldCrop(mosaic = EX1) # Select and crop one row per time
  EX1.Shape.1[[i1]]<-fieldShape(mosaic = EX1.Crop, 
                                                     ncols = n.cols, # All columns 
                                                     nrows = 1 # Only 1 row per time
)}

EX1.Shape.2<-EX1.Shape.1[[1]]$fieldShape # Combining all partial shapefiles (rows) in one complete shapefile (full)
for(i2 in 2:n.row){
  EX1.Shape.2<-rbind(EX1.Shape.2,EX1.Shape.1[[i2]]$fieldShape)
}
plot(EX1.Shape.2) # Final shapefile

Hope it helps you.

Best,
Filipe
Reply all
Reply to author
Forward
0 new messages