I have a list of boxes defined by their coordinates and geometry as follows:
box = [x y w h]
I would like to loop through these boxes as shown below - problem is I need to change the boxes' representation in the function 'findMatchingbox) - so I boxes it to [xmin ymin xmax ymax] in this function. Problem is, when I give 'i' into the function in permanently changes the boxes in my list, I tried first letting a temp_i = i in the function, and then performing the necessary steps but to no avail.
I'm guessing it must be because python only keeps one copy of each box in memory, how would I send the specific box (i) into the function, extract the necessary information from it after transforming it, without changing the actual box? Can you make a copy of it?
for i in bboxes:
# Determine if detection belongs to an existing object
print('1:\t',i)
boxIDx = self.findMatchingBox(i)
print('2:\t')
Output:
1: [464, 282, 48, 48]
2: [464, 282, 512, 330]
findMatchingBox