Commit 92b16002 authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

FIX: bad output size when retrieving reference object layer tile.

No related merge requests found
Showing with 8 additions and 5 deletions
+8 -5
......@@ -174,11 +174,14 @@ class OBIABase:
tile_obj = np.squeeze(clip_obj['array']).astype(np.uint32)
else:
assert (self.ref_obj_layer_pipe is not None)
self.ref_obj_layer_pipe[-1].PropagateRequestedRegion('out', r)
tile_obj = self.ref_obj_layer_pipe[-1].GetImageAsNumpyArray('out').astype(np.uint32)
#tile_obj = self.ref_obj_layer[r['index'][1]:r['index'][1]+r['size'][1],
# r['index'][0]:r['index'][0]+r['size'][0]]
tmp_er = otb.Registry.CreateApplication('ExtractROI')
tmp_er.SetParameterInputImage('in', self.ref_obj_layer_pipe[-1].GetParameterOutputImage('out'))
tmp_er.SetParameterInt('startx', r['index'][0])
tmp_er.SetParameterInt('starty', r['index'][1])
tmp_er.SetParameterInt('sizex', r['size'][0])
tmp_er.SetParameterInt('sizey', r['size'][1])
tmp_er.Execute()
tile_obj = tmp_er.GetImageAsNumpyArray('out').astype(np.uint32)
si = otb.Registry.CreateApplication('Superimpose')
si.SetParameterString('inm', input_image)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment