Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotate before cropping #34

Closed
timmarkhuff opened this issue Mar 18, 2024 · 1 comment
Closed

Rotate before cropping #34

timmarkhuff opened this issue Mar 18, 2024 · 1 comment

Comments

@timmarkhuff
Copy link
Contributor

Cropping is performed after rotation, which makes it confusing to choose the right cropping parameters if the image has already been rotated. It would be more intuitive to rotate and then crop relative to the rotated frame. This should be as simple as changing the order of the method calls in _process_frame.

    def _process_frame(self, frame: np.ndarray) -> np.ndarray:
        """Apply _crop, _digital_zoom, and _rotate to the provided frame.
        as specified in options."""
        frame = self._crop(frame)
        frame = self._digital_zoom(frame)
        frame = self._rotate(frame)
        return frame
@timmarkhuff
Copy link
Contributor Author

This was addressed in #53

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

No branches or pull requests

1 participant