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

Switch imageproc::Rect to image::Rect #645

Open
ripytide opened this issue May 26, 2024 · 3 comments
Open

Switch imageproc::Rect to image::Rect #645

ripytide opened this issue May 26, 2024 · 3 comments

Comments

@ripytide
Copy link
Member

Related to #638

@ripytide
Copy link
Member Author

ripytide commented Jun 8, 2024

Continuing the discussion from #647:

All of the draw_x functions accept inputs that may be extend outside the image and then only draw the points that are within the image bounds. This is a bit odd if you think of the image as a finite canvas but makes more sense for the original use case for several of these functions which was to annotate photos/video frames with areas of interest identified using these images.
I’d rather keep the consistency between these functions so won’t merge this PR.

May I ask what the use-cases are for annotating images in areas outside of the image in photo/video frames as that does seem a bit odd to me.

@ripytide
Copy link
Member Author

ripytide commented Jun 8, 2024

Since the crop() function needs an unsigned rectangle input it might be worth creating another Rect and possibly naming them differently so functions can choose which Rect type they want to take as parameters.

Something like:

struct RectI {
x: i32,
...
}

struct RectU {
x: u32,
...
}

@ripytide
Copy link
Member Author

ripytide commented Jun 9, 2024

Or maybe simply asking upstream to make their Rect type generic that way we can have Rect<u32> and Rect<i32>.

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 a pull request may close this issue.

1 participant