image-rs / imageproc

Image processing operations
MIT License
735 stars 145 forks source link

Expose more private functions #544

Closed nan-mu closed 3 months ago

nan-mu commented 11 months ago

Can we expose more private functions? Such as hough::intersection_points which act as middleware. Or if there is any reason I don’t know, please let me know.

theotherphil commented 6 months ago

Sure, which functions do you want to be exposed?

nan-mu commented 6 months ago

Great to see your reply. This problem has been with me for a while. I can sort it out later and should submit a PR this week.

nan-mu commented 6 months ago

Now it seems like I only want to make hough::intersection_points public.

diff --git a/src/hough.rs b/src/hough.rs
index ce1a663..e731ab9 100644
--- a/src/hough.rs
+++ b/src/hough.rs
@@ -130,7 +130,7 @@ where
 /// or `None` if the line and image bounding box are disjoint. The x value of an intersection
 /// point lies within the closed interval [0, image_width] and the y value within the closed
 /// interval [0, image_height].
-fn intersection_points(
+pub fn intersection_points(
     line: PolarLine,
     image_width: u32,
     image_height: u32,
theotherphil commented 6 months ago

Ok, great - if you create a PR for this I’ll merge it. Thanks.