tests package¶
Submodules¶
tests.test_binarizers module¶
Testing the binarization functions.
-
class
tests.test_binarizers.DataDrivenBinarizerTester(methodName='runTest')¶ Bases:
unittest.case.TestCaseTests for the DataDriven binarizer
-
setUp()¶ Load the test image and the ‘true’ binarized image
-
test_binarize()¶ Test the function binarize Compare the binarized image.
-
test_binarize_threshold()¶ Test the function binarize_withthreshold Compare the resulting threshold.
-
-
class
tests.test_binarizers.ThresholdBinarizerTester(methodName='runTest')¶ Bases:
unittest.case.TestCaseTests for the Threshold Binarizer
-
setUp()¶ Load the test image and the ‘true’ binarized images for several thresholds
-
test_binarize0()¶ Test the function binarize for threshold 0. Compare the binarized image.
-
test_binarize175()¶ Test the function binarize for threshold 175. Compare the binarized image.
-
test_binarize255()¶ Test the function binarize for threshold 255. Compare the binarized image.
-
test_binarize256()¶ Test the function binarize for threshold 256. Compare the binarized image.
-
test_binarize57()¶ Test the function binarize for threshold 57. Compare the binarized image.
-
test_binarizeneg1()¶ Test the function binarize for threshold -1. Compare the binarized image.
-
tests.test_binary_detector module¶
Testing the binary detection functions.
-
class
tests.test_binary_detector.BinaryDetectorTester(methodName='runTest')¶ Bases:
unittest.case.TestCaseTests for the binary detector
-
setUp()¶ Load the image and features for both the noise image and the nested image.
-
setUpImage(image_file, filled_image_file, features_file, SE_file, lam, area_factor, connectivity)¶ Set up a specific image: load the image, the filled image, the features, the SE and create a binary detector.
-
test_detect()¶ Test the method detect for all regions.
-
test_fill_image()¶ Test the helper method fill_image.
-
test_holes()¶ Test the method detect for only holes.
-
test_holesislands()¶ Test the method detect for holes and islands.
-
test_indentations()¶ Test the method detect for only indentations.
-
test_islands()¶ Test the method detect for only islands.
-
test_protrusions()¶ Test the method detect for only protrusions.
-
test_protsindents()¶ Test the method detect for protrusions and indentations.
-
tests.test_detectors module¶
Testing the detection functions.
-
class
tests.test_detectors.MSSRDetectorTester(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest class for the SalientRegionDetector
-
setUp()¶ loads images and create detector objects
-
test_color()¶ Test the MSSRA detector on a color image
-
-
class
tests.test_detectors.SETester(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest class for the Detector method getSE
-
setUp()¶
-
test_getSE()¶ Test the method getSE and assert that the Structuring Element is correct.
-
test_getlam()¶ Test the method getSE and assert that the value of lamda is correct.
-
-
class
tests.test_detectors.SalientRegionDetectorTester(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest class for the SalientRegionDetector
-
setUp()¶ loads images and create detector objects
-
test_color_image()¶ Tests the salient detector on a gray scale image with specific settings
-
test_gray_image()¶ Tests the salient detector on a gray scale image with specific settings
-
tests.test_helpers module¶
Testing the helper functions.
-
class
tests.test_helpers.HelpersEllipseTester(methodName='runTest')¶ Bases:
unittest.case.TestCaseTests for the helper functions related to ellipses
-
setUp()¶ Load the binary masks to make ellipses from, and create the ground truths.
-
test_mask2features_poly_ellipse1()¶ Test the function binary_mask2ellipse_features_single for test image 1.
-
test_mask2features_poly_ellipse2()¶ Test the function binary_mask2ellipse_features_single for test image 2.
-
test_mask2features_poly_ellipse3()¶ Test the function binary_mask2ellipse_features_single for test image 3.
-
test_mask2features_poly_ellipse4()¶ Test the function binary_mask2ellipse_features_single for test image 4.
-
test_poly2standard_ellipse()¶ Test the function poly2standard_ellipse.
-
test_standard2poly_ellipse()¶ Test the function standard2poly_ellipse.
-