Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print(type(superpixels)) # <type 'numpy.ndarray'>
- print(superpixels.shape) # (1080, 1920)
- print(type(accepted)) # <type 'list'>
- print(len(accepted)) # 30676
- mask = numpy.zeros(image.shape[:2], dtype = "uint8")
- mask[numpy.in1d(superpixels, accepted).reshape(mask.shape)] = 255
- print(type(mask)) # <type 'numpy.ndarray'>
- print(mask.shape) # (1080, 1920)
- mask = (255*(numpy.any(superpixels[...,None] == numpy.asarray(accepted)[None,None,:], axis=2).astype(numpy.uint8))) # ValueError: 'axis' entry is out of bounds
- print(type(mask))
- print(mask.shape)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement