filipematias23 / FIELDimageR-QGIS

This software is a compilation of functions made in R to analyze orthomosaic images from research field trials from agriculture or plant breeding experiments using QGIS.
28 stars 4 forks source link

Error while using fieldSegment #4

Closed Bharannn closed 9 months ago

Bharannn commented 9 months ago

Hey, I'm trying to use the segmentation feature of fieldSegment, however I am facing an error while running the segmentation.

This is my ortho image, and I have created a shapefile layer with soil and plant as two classes.

Screenshot 2023-12-26 145847

These are the parameters I'm giving input while running the segmentation. Screenshot 2023-12-26 145916

And I am getting this error, can someone mention how to resolve this issue. Screenshot 2023-12-26 150025

filipematias23 commented 9 months ago

Hi there,

You need to give a name to the output raster...!

image

Hope it helps!

Best, Filipe

filipematias23 commented 9 months ago

@Bharannn,

You can also use the segmented image as the Index_Layer at the fieldMasck() function to crop the RGB image according to the selected criteria... In the example below, we cropped above 1.5 to eliminate the soil and select all plants...!

Hope it makes sense...!

Filipe

image

Output:

image

pspawar71 commented 9 months ago

Hey, could you please share the snapshot of the attribute table for your "train1" polygon shapefile? Also share the properties of train1 shapefile.

pspawar71 commented 9 months ago

Hello, I replicated the tutorial image to address the issue you are encountering. It seems that you are providing an empty polygon shapefile (training sample). You may have created polygons but forgot to save it. Please save your polygon features after digitization. Let us know if this resolves the issue. Here I am attaching the image of replicated example with similar issue. Screenshot (44)

Bharannn commented 9 months ago

Hey @filipematias23 and @pspawar71 , Thank you for the replies! I am able to do segmentation. I just had to add file name for the output segment in fieldSegment parameters and save the layer edits in Layer < Save Layer Edits.