this is my first post, I hope you can help me. I have 120.000 satellite images with 33x33 px and 6 channels (RBG + 3 near-infrared). We have 10.000 sections with 12 images each. (one for each month) Since a lot of them are filled with clouds, I want to find a way to get rid of them.
The images are in a Numpy array with the shape (10000, 12, 33, 33, 6) and I want to find subarrays of the shape (33, 33, 6) in which the average of ( : , : , :3 ) > 0.5 (some threshold of high RBG values indicating clouds).
As a first step, finding and deleting them would be helpful, but in order to keep the shape of the array for later training, I would need to replace them with one of the other 11 subarrays of that position.
I have tried nested for-loops with np.average, np.where, np.delete, and so on, but did not get really far (I'm a beginner).
Would appreciate any hints, tips, or solutions.
Thanks!
Max