How to implement honeycomb structure with opencv or numpy?

Viewed 44

First, I do some image process to obtain a clear leed pattern.

This is original image.

clear leed pattern

After I get this image, I change the brightness.

low brightness

Then, I want to make this structure like this

new honeycomb structure

my idea

My questions :

  1. 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]]
  1. Is there any function in opencv or numpy to copy value to other array position ?
0 Answers
Related