I have an array of coordinates (y,x) refered to a specific pixels in an image fig300[0,:,:]. I want find these coordinates in my image and for these pixel change their intensity.
The output of my array, called brighter_spot is this:
array([[116, 159],
[508, 106],
[ 90, 752],
[116, 159],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[134, 380],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106],
[ 90, 752],
[116, 159],
[235, 206],
[508, 106]], dtype=int64)
I built the for-loop in this manner:
for y,x in brighter_spot:
if fig300[0,y,x] == brighter_spot.any():
fig300[0,y,x] = 0
The for-loop don't have any effect, I think that it don't run properly inside the array comparing each couple. How could I fix it?