Alpha band problem with fieldindex in QGIS

22 views
Skip to first unread message

Martin Gejl

unread,
Dec 3, 2025, 6:23:02 AM12/3/25
to FIELDimageR: A R package to analyze orthomosaic images from field trials.
Hi 
I have a problem in qgis 3.44.3 with the fieldindex function
When I do fieldindex this error comes up, I think it is a problem with the alpha band.

Error in (function (Red, Green, Blue, RE, NIR) :

unused argument (Extra_1 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255

Error: [lapp] cannot use 'fun'. The number of values returned is less than the number of input cells.

(returning: 1, expecting: 3475)

Perhaps the function is not properly vectorized

Execution halted


I is both when I use multispec 4 band (Green,Red,RE,NIR) and RGB (Red,Green,Blue).

I can fix it by adding a extra Color to RGB (Red,Green,Blue,RE), it is only a problem on my computer running qgis 3.44.3, not on my other computer running an older version of qgis.

And it does not help to write (Red,Green,Blue,Band 4) or (Red,Green,Blue,ban4) in stead of RE.

Any good solution to fix this?

Kind regards

Martin

Reply all
Reply to author
Forward
0 new messages