that is, you don't do print(obj.attrib['foo'])
you have to do:
json.loads(obj.attrib)['foo']
because attrib doesn't return a dict, it returns a string thats a json-encoded dict
this is why you shouldn't program on drugs, folks
because you'll be too high to understand the confusing decisions of (presumably) sober people
@foone oh no what if we are exclusively on drugs
@0x00string IT'D EXPLAIN A LOT
@foone I need to find that cartoon about software development that explains the ever important metrics of wtfs/minute
Drug use would push a developer's too high.
@foone unless you are compliling the kernel
arg. this code has a suspicious amount of documentation for not appearing to have been ever used.
instead of properly writing out RGB images, it writes out BGR images that it has loaded as RGB, but it saves them as RGB when they are in fact BGR, so it just does it doubly incorrect
which'd be fine if you were just transcoding!
except the whole point of this "recipe" is to modify them in transit, which means your code has to deal with images that look like this:
@foone
That image has a certain appeal though...
now the next tricky part is that I need to combine two scripts, and the problem is that:
1. the first one is processing videos on a frame by frame basis
2. the second one does comparisons between the previous and next frame
so I need to basically take the decoder and give it a 2 frame long buffer, so it can do output frame N after already processing input frames N-1, N, and N+1
@foone why would someone do that
@foone lemi guess, OpenCV?
@developing_agent it's not just opencv, but opencv is involved, yes
@foone Congratulations to Jim Kirk finally getting his top surgery