-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Include example use of function regionprops_table in the docs #4348
Include example use of function regionprops_table in the docs #4348
Conversation
@@ -47,3 +58,12 @@ | |||
|
|||
ax.axis((0, 600, 600, 0)) | |||
plt.show() | |||
|
|||
props = regionprops_table(label_img, properties=('centroid', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could perhaps say here that regionprops_table
actually computes the properties, while regionprops
only does lazy execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not; done in 38ddd67.
Co-authored-by: Egor Panfilov <egor.v.panfilov@gmail.com>
Co-authored-by: Egor Panfilov <egor.v.panfilov@gmail.com>
@@ -22,9 +24,17 @@ | |||
|
|||
image = rotate(image, angle=15, order=0) | |||
|
|||
rr, cc = ellipse(100, 100, 60, 50) | |||
image[rr, cc] = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just realized that there is an issue with coordinates in plotting - https://scikit-image.org/docs/dev/auto_examples/segmentation/plot_regionprops.html. See how the axes are transposed with respect to the ellipse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixing the major vs minor axes now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in cdf1678. Thanks again :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great now! Thank you!
Description
Closes #4335.
First, I thought about adding another region. It's only a toy example, but it feels too odd to write a for loop to iterate on a length-1 list.
Then, I appended a call to
regionprops_table
and displayed the result.Checklist
./doc/examples
(new features only)./benchmarks
, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.@meeseeksdev backport to v0.14.x