Conversation
changed 2-space indents to the standard 4-spaces, added spaces after hashes in comments, there was also an unnecessary space after an equals sign in convert.py in processFrame()
close the file automatically after it's loaded
in videoToTextColor.py, import setColor() and convertImg() from imgToTextColor.py instead of copying them
toydotgame
left a comment
There was a problem hiding this comment.
Haven't tested code, but the changes to more standardised code styles and other similar small improvements LGTM!
|
seen your code, another suggestion is to grab the aspect ratio of the video/image instead of hardcoding to 16:9 |
|
also, the width of 80 hopefully can be changed by CLI or config file |
|
the code worked for my side |
That could definitely be done with something like ffprobe-python, I'll try to implement it as soon as I have some free time
I'll implement that using |
|
btw, i formatted your code to flake8 standard, as a poll request |
I made some changes and corrections, mainly to the Python side of the source code.
The changes include:
videoToTextColor.py! Usecam:[webcam_index_here]as the input file. (cv2.VideoCapture()also takes integers, which correspond to webcam indexes)videoToTextColor.py, importingconvert_img()fromimgToTextColor.pypip install -r requirements.txt)As a side note, this whole idea with compression based on Markov chains and Huffman trees is genius. The video was awesome too, as always :)