First, I do some image process to obtain a clear leed pattern.
After I get this image, I change the brightness.
Then, I want to make this structure like this
My questions :
- How to copy value of [x1][y1], then change 0 to the value I copied at [x2][y2]. For example, what should I do to copy 255 at [6][6] to [13][13] and change 0 to 255 at the same time ?
[[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]]
- Is there any function in opencv or numpy to copy value to other array position ?