I am trying to work with the segmentation operator - GenericRegionMergingOp, but it only creates an empty image.
I have used the segmentation option in SNAP and it works for my source image.
I have used other operators (like KMeansClusterAnalysis) without problems.
Any idea on what might be the problem? have you seen this working from python using the snappy api?
Any idea on how I can see on how to troubleshoot?
Hi, I am creating a function to call the GenericRegionMergingOp operator.
The parameters are all set:
[totalIterationsForSecondSegmentation=50, regionMergingCriterion=Best Fitting, threshold=100.0, sourceBandNames=[Ljava.lang.String;@6e730be6, mergingCostCriterion=Spring]
(also tried with a string where the bandnames are separated by comma)
Both run (no errors) and create an empty image.
I have tried other operators (like KMeansClusterAnalysis) and they work fine.
I have tried the segmentation with my image within SNAP without problem.
Anyone has GenericRegionMergingOp working? Any clues on how I can find out what the problem is?
Hello,
Unfortunatelly it will not work.
There is an explanation for this:
The output product from the Write operator (within the graph) obtains a reference towards the GRM operator output band before actually running the GRM operator.
The GRM operator output band changes its source after running the algorithm, but the output product within the Write operator remains with the old reference towards the source band, created in the initialisation step.