roi_pixel_img = crop_img[indices_list]
print (roi_pixel_img)
when i add (I use only to use the entire array (meaning only a part):
np.set_printoptions(threshold=sys.maxsize)
th output is:
the whole part happens in a while loop because I'm extracting pixels in this section, which is irrelevant to the question.
My goal is not to include the lines with [0 255 255] in this array, how can I do that?
the type of roi_pixel_img is numpy.ndarray.
is it even possible to answer this question without an example code for you ?
CodePudding user response:
You can do this by creating an indexing array:
r = (roi_pixel_img == [0,255,255]).all(axis = -1)
roi_pixel_img[~r]