Using openCV I imported 4 direction images and called them (L, R, U, D), represented by arrays in uint8 format.
I created a function that generates a random sequence of arrows in list form, Arrow_Seq. This consists of n uint8 arrays.
Now I want to save files with names that makes sense as I will be saving a few thousand of these image files.
To concatenate the sequence I'm using:
Arrow_Seq[i] = np.hstack(Arr_Seq)
To save each sequence I've used:
cv2.imwrite('ArrSeq_' + str(i) + '.png', Arrow_Seq[i])
That enables me to save each file in numerical order which is not helpful as it doesn't help me identify which arrow sequence the file has inside it.
How do I save files so they are denoted something like: LUURRD.png? That tells me the sequence is Left, Up, Up, Right, Right, Down.
I assume I need to generate a variable that lists the variables inside of Arrow_Seq? If so that's where I'm having trouble - pulling out those elements just gives me the uint8 array of values and not the name of the variable direction being represented.