Skip to content

Add SKIP_SPATIAL_ALIGNMENT option + various clean-up / bug-fixes.#2

Open
Spectavi wants to merge 21 commits intoalexsusu:masterfrom
Spectavi:master
Open

Add SKIP_SPATIAL_ALIGNMENT option + various clean-up / bug-fixes.#2
Spectavi wants to merge 21 commits intoalexsusu:masterfrom
Spectavi:master

Conversation

@Spectavi
Copy link

@Spectavi Spectavi commented Jan 4, 2020

The main purpose of this PR is to add SKIP_SPATIAL_ALIGNMENT to config.py and add the necessary code to output frames and diff data in a similar way to when spatial alignment is called. When aligning video with a consistent camera perspective (e.g. 2D software test videos) there is usually no need to perform spatial alignment. In these cases, be able to skip this step significantly reduces processing times.

The next obvious step will be to unify the output code so that the same code is called at the end whether spatial alignment is performed or not.

@Spectavi
Copy link
Author

Spectavi commented Jan 9, 2020

Just FYI, I added a commit to this that goes ahead and makes a few files PEP compliant. I can just go ahead and do similar commits for the other files so you don't have to mess with it if that's okay.

I also made the argv hardcoded checks proper flags. I was thinking maybe the config.py file could be converted to flags as well, give them the same values as defaults that way it's easy to override any of them via the command-line.

@alexsusu
Copy link
Owner

Hi. I was travelling in the last 2 weeks.
Now I have some time to look seriously to integrate your contribution you made for my video-diff package.
BTW, don't you like camel case naming (like it's usually done in Java)? I thought it's PEP compliant.
Thank you very much,
Alex

@Spectavi
Copy link
Author

Hey,
No worry on the time, take your time. I can keep moving on my fork and you can integrate as you have time.
It looks like PEP has functions and local variable names as lower-case with words separated by underscores: https://www.python.org/dev/peps/pep-0008/#function-and-variable-names
I'm using IntelliJ's Python support to do the re-factoring and going off of it's formatting suggestions.
I did notice in some areas with a lot of math keeping the upper-case variable names might increase readability, so it might be worth ignoring PEP in those cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants