test(morphology): vet DIAMETER_EQUAL_PERIMETER + ORIENTATION + EROSIONS_2_VANISH -> 80/113 - #391
Open
darkclad wants to merge 1 commit into
Open
test(morphology): vet DIAMETER_EQUAL_PERIMETER + ORIENTATION + EROSIONS_2_VANISH -> 80/113#391darkclad wants to merge 1 commit into
darkclad wants to merge 1 commit into
Conversation
…NS_2_VANISH -> 80/113
Vet three more 2D morphology features against analytic / scikit-image oracles
(morphology 77 -> 80), and document why four others in the "future-vettable" list
are not cleanly promotable.
Promoted:
- DIAMETER_EQUAL_PERIMETER -> analytic. == PERIMETER/pi (contour.cpp), pure double
arithmetic on the vetted PERIMETER; recomputed at 1e-9 in the existing
documented-formula-conformance test (same treatment as CIRCULARITY/ROUNDNESS).
- ORIENTATION -> skimage. skimage regionprops measures the major-axis angle from the
row axis; Nyxus measures the same ellipse from the x axis, so NYXUS ==
90 - degrees(skimage.orientation) = 70.4174. Matches to 10 decimals because the
ellipse angle is invariant to the pixel-size second-moment correction (it shifts
mu20 and mu02 equally). New gtest test_shape2d_skimage_orientation_and_erosions +
tests/vetting/oracles/gen_morphology_skimage.py.
- EROSIONS_2_VANISH -> skimage. Nyxus' 3x3 (8-connected) erosion count ==
skimage binary_erosion(square(3)) = 1; disk(1)/4-connected gives 2, so the test
also pins the connectivity convention.
Documented (stay regression, with reasons in the registry notes):
- GEODETIC_LENGTH: geo_len_thickness.cpp truncates PERIMETER to size_t and uses
integer division, so its value (10.0) deviates ~11% from the real-valued rectangle
formula (~11.13). Vetting it analytically would bake in the truncation -- a latent
precision issue to fix first.
- ROI_RADIUS_MEAN/MAX: mean/max per-pixel min SQUARED distance to the ROI's own
contour pixels (roi_radius.cpp); scipy distance_transform_edt uses a different
reference (distance to background, not squared), so no standard tool reproduces it.
- EROSIONS_2_VANISH_COMPLEMENT: degenerate 0 on this fixture; needs a holed fixture.
- MAJOR/MINOR_AXIS_LENGTH, ECCENTRICITY: ~1.4% moment-normalization gap vs skimage,
left regression.
gtest 717/717; pytest 72 passed (7 arrow fails are the tiff-only local build, not
regressions). Coverage regenerated (604 -> 607 / 758).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vet three more 2D morphology features against analytic / scikit-image oracles (morphology 77 -> 80), and document why four others in the "future-vettable" list are not cleanly promotable.
Promoted:
Documented (stay regression, with reasons in the registry notes):
gtest 717/717; pytest 72 passed (7 arrow fails are the tiff-only local build, not regressions). Coverage regenerated (604 -> 607 / 758).