Relative Content

Tag Archive for pythonnumpyimage

Python – RGBA image non-zero pixels extracting – numpy mask speed up

I need to extract non-zero pixels from RGBA Image. Code below works, but because I need to deal with really huge images, some speed up will be salutary. Getting “f_mask” is the longest task. Is it possible to somehow make things work faster? How to delete rows with all zero values ([0, 0, 0, 0]) faster?