Commit 5dc91858 authored by Davis King's avatar Davis King

updated docs

parent f24b0816
......@@ -190,35 +190,35 @@ ensures \n\
py::class_<hough_transform>(m, "hough_transform", class_docs)
.def(py::init<unsigned long>(), doc_constr, py::arg("size_"))
.def_property_readonly("size", &hough_transform::size,
"returns the size of the Hough transforms generated by this object. In particular, this object creates Hough transform images that are size() by size() pixels in size.")
"returns the size of the Hough transforms generated by this object. In particular, this object creates Hough transform images that are size by size pixels in size.")
.def("get_line", &ht_get_line, py::arg("p"),
"requires \n\
- rectangle(0,0,size()-1,size()-1).contains(p) == true \n\
- rectangle(0,0,size-1,size-1).contains(p) == true \n\
(i.e. p must be a point inside the Hough accumulator array) \n\
ensures \n\
- returns the line segment in the original image space corresponding \n\
to Hough transform point p. \n\
- The returned points are inside rectangle(0,0,size()-1,size()-1).")
- The returned points are inside rectangle(0,0,size-1,size-1).")
/*!
requires
- rectangle(0,0,size()-1,size()-1).contains(p) == true
- rectangle(0,0,size-1,size-1).contains(p) == true
(i.e. p must be a point inside the Hough accumulator array)
ensures
- returns the line segment in the original image space corresponding
to Hough transform point p.
- The returned points are inside rectangle(0,0,size()-1,size()-1).
- The returned points are inside rectangle(0,0,size-1,size-1).
!*/
.def("get_line_angle_in_degrees", &ht_get_line_angle_in_degrees, py::arg("p"),
"requires \n\
- rectangle(0,0,size()-1,size()-1).contains(p) == true \n\
- rectangle(0,0,size-1,size-1).contains(p) == true \n\
(i.e. p must be a point inside the Hough accumulator array) \n\
ensures \n\
- returns the angle, in degrees, of the line corresponding to the Hough \n\
transform point p.")
/*!
requires
- rectangle(0,0,size()-1,size()-1).contains(p) == true
- rectangle(0,0,size-1,size-1).contains(p) == true
(i.e. p must be a point inside the Hough accumulator array)
ensures
- returns the angle, in degrees, of the line corresponding to the Hough
......@@ -228,7 +228,7 @@ ensures \n\
.def("get_line_properties", &ht_get_line_properties, py::arg("p"),
"requires \n\
- rectangle(0,0,size()-1,size()-1).contains(p) == true \n\
- rectangle(0,0,size-1,size-1).contains(p) == true \n\
(i.e. p must be a point inside the Hough accumulator array) \n\
ensures \n\
- Converts a point in the Hough transform space into an angle, in degrees, \n\
......@@ -237,11 +237,11 @@ ensures \n\
transform point p. Moreover: -90 <= ANGLE_IN_DEGREES < 90. \n\
- RADIUS == the distance from the center of the input image, measured in \n\
pixels, and the line corresponding to the Hough transform point p. \n\
Moreover: -sqrt(size()*size()/2) <= RADIUS <= sqrt(size()*size()/2) \n\
Moreover: -sqrt(size*size/2) <= RADIUS <= sqrt(size*size/2) \n\
- returns a tuple of (ANGLE_IN_DEGREES, RADIUS)" )
/*!
requires
- rectangle(0,0,size()-1,size()-1).contains(p) == true
- rectangle(0,0,size-1,size-1).contains(p) == true
(i.e. p must be a point inside the Hough accumulator array)
ensures
- Converts a point in the Hough transform space into an angle, in degrees,
......@@ -250,14 +250,14 @@ ensures \n\
transform point p. Moreover: -90 <= ANGLE_IN_DEGREES < 90.
- RADIUS == the distance from the center of the input image, measured in
pixels, and the line corresponding to the Hough transform point p.
Moreover: -sqrt(size()*size()/2) <= RADIUS <= sqrt(size()*size()/2)
Moreover: -sqrt(size*size/2) <= RADIUS <= sqrt(size*size/2)
- returns a tuple of (ANGLE_IN_DEGREES, RADIUS)
!*/
.def("get_best_hough_point", &ht_get_best_hough_point, py::arg("p"), py::arg("himg"),
"requires \n\
- himg has size() rows and columns. \n\
- rectangle(0,0,size()-1,size()-1).contains(p) == true \n\
- himg has size rows and columns. \n\
- rectangle(0,0,size-1,size-1).contains(p) == true \n\
ensures \n\
- This function interprets himg as a Hough image and p as a point in the \n\
original image space. Given this, it finds the maximum scoring line that \n\
......@@ -267,8 +267,8 @@ ensures \n\
- returns a point X such that get_rect(himg).contains(X) == true")
/*!
requires
- himg has size() rows and columns.
- rectangle(0,0,size()-1,size()-1).contains(p) == true
- himg has size rows and columns.
- rectangle(0,0,size-1,size-1).contains(p) == true
ensures
- This function interprets himg as a Hough image and p as a point in the
original image space. Given this, it finds the maximum scoring line that
......@@ -289,8 +289,8 @@ ensures \n\
.def("__call__", &compute_ht<float>, py::arg("img"), py::arg("box"))
.def("__call__", &compute_ht<double>, py::arg("img"), py::arg("box"),
"requires \n\
- box.width() == size() \n\
- box.height() == size() \n\
- box.width() == size \n\
- box.height() == size \n\
ensures \n\
- Computes the Hough transform of the part of img contained within box. \n\
In particular, we do a grayscale version of the Hough transform where any \n\
......@@ -301,7 +301,7 @@ ensures \n\
pixels in img are 0 or 1 then this routine performs a normal Hough \n\
transform. However, if some pixels have larger values then they will be \n\
weighted correspondingly more in the resulting Hough transform. \n\
- The returned hough transform image will be size() rows by size() columns. \n\
- The returned hough transform image will be size rows by size columns. \n\
- The returned image is the Hough transform of the part of img contained in \n\
box. Each point in the Hough image corresponds to a line in the input box. \n\
In particular, the line for hough_image[y][x] is given by get_line(point(x,y)). \n\
......@@ -311,8 +311,8 @@ ensures \n\
obtained by calling get_line_properties()." )
/*!
requires
- box.width() == size()
- box.height() == size()
- box.width() == size
- box.height() == size
ensures
- Computes the Hough transform of the part of img contained within box.
In particular, we do a grayscale version of the Hough transform where any
......@@ -323,7 +323,7 @@ ensures \n\
pixels in img are 0 or 1 then this routine performs a normal Hough
transform. However, if some pixels have larger values then they will be
weighted correspondingly more in the resulting Hough transform.
- The returned hough transform image will be size() rows by size() columns.
- The returned hough transform image will be size rows by size columns.
- The returned image is the Hough transform of the part of img contained in
box. Each point in the Hough image corresponds to a line in the input box.
In particular, the line for hough_image[y][x] is given by get_line(point(x,y)).
......@@ -356,10 +356,10 @@ ensures \n\
.def("find_pixels_voting_for_lines", &ht_find_pixels_voting_for_lines<float>, py::arg("img"), py::arg("box"), py::arg("hough_points"), py::arg("angle_window_size")=1, py::arg("radius_window_size")=1)
.def("find_pixels_voting_for_lines", &ht_find_pixels_voting_for_lines<double>, py::arg("img"), py::arg("box"), py::arg("hough_points"), py::arg("angle_window_size")=1, py::arg("radius_window_size")=1,
"requires \n\
- box.width() == size() \n\
- box.height() == size() \n\
- box.width() == size \n\
- box.height() == size \n\
- for all valid i: \n\
- rectangle(0,0,size()-1,size()-1).contains(hough_points[i]) == true \n\
- rectangle(0,0,size-1,size-1).contains(hough_points[i]) == true \n\
(i.e. hough_points must contain points in the output Hough transform \n\
space generated by this object.) \n\
- angle_window_size >= 1 \n\
......@@ -377,7 +377,7 @@ ensures \n\
pixels in the input image belong to those lines. \n\
- This routine returns a vector, CONSTITUENT_POINTS, with the following \n\
properties: \n\
- CONSTITUENT_POINTS.size() == hough_points.size() \n\
- CONSTITUENT_POINTS.size == hough_points.size \n\
- for all valid i: \n\
- Let HP[i] = centered_rect(hough_points[i], angle_window_size, radius_window_size) \n\
- Any point in img with a non-zero value that lies on a line \n\
......@@ -386,7 +386,7 @@ ensures \n\
#CONSTITUENT_POINTS[i] will contain all the points in img that \n\
voted for the lines associated with the Hough accumulator bins in \n\
HP[i]. \n\
- #CONSTITUENT_POINTS[i].size() == the number of points in img that \n\
- #CONSTITUENT_POINTS[i].size == the number of points in img that \n\
voted for any of the lines HP[i] in Hough space. Note, however, \n\
that if angle_window_size or radius_window_size are made so large \n\
that HP[i] overlaps HP[j] for i!=j then the overlapping regions \n\
......@@ -396,10 +396,10 @@ ensures \n\
CONSTITUENT_POINTS." )
/*!
requires
- box.width() == size()
- box.height() == size()
- box.width() == size
- box.height() == size
- for all valid i:
- rectangle(0,0,size()-1,size()-1).contains(hough_points[i]) == true
- rectangle(0,0,size-1,size-1).contains(hough_points[i]) == true
(i.e. hough_points must contain points in the output Hough transform
space generated by this object.)
- angle_window_size >= 1
......@@ -417,7 +417,7 @@ ensures \n\
pixels in the input image belong to those lines.
- This routine returns a vector, CONSTITUENT_POINTS, with the following
properties:
- CONSTITUENT_POINTS.size() == hough_points.size()
- CONSTITUENT_POINTS.size == hough_points.size
- for all valid i:
- Let HP[i] = centered_rect(hough_points[i], angle_window_size, radius_window_size)
- Any point in img with a non-zero value that lies on a line
......@@ -426,7 +426,7 @@ ensures \n\
#CONSTITUENT_POINTS[i] will contain all the points in img that
voted for the lines associated with the Hough accumulator bins in
HP[i].
- #CONSTITUENT_POINTS[i].size() == the number of points in img that
- #CONSTITUENT_POINTS[i].size == the number of points in img that
voted for any of the lines HP[i] in Hough space. Note, however,
that if angle_window_size or radius_window_size are made so large
that HP[i] overlaps HP[j] for i!=j then the overlapping regions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment