Commit Graph

358 Commits

Author SHA1 Message Date
cgohlke bbc5b8e552 Remove range check test 2012-05-24 01:20:51 -07:00
cgohlke 6d997b9af7 Remove controversial range check 2012-05-24 01:18:49 -07:00
cgohlke 225cfca4e2 Use general format 2012-05-23 12:09:41 -07:00
cgohlke 15c0df33c9 Fix TypeError 2012-05-23 12:03:23 -07:00
cgohlke 11c4ca7f53 Add floating point range check 2012-05-23 11:37:07 -07:00
cgohlke dad16f8a29 Restore test_float_out_of_range 2012-05-23 11:33:19 -07:00
cgohlke 4377c647f4 Code cleanup 2012-05-23 01:35:36 -07:00
cgohlke c4552d294a Return correct dtype 2012-05-23 00:57:26 -07:00
cgohlke 8575a46f42 Verify dtype 2012-05-23 00:55:28 -07:00
cgohlke 5153c97b21 Fix numpy 1.7dev casting 2012-05-23 00:16:00 -07:00
cgohlke b7045e6cd0 Fix rescale_intensity 2012-05-22 18:58:22 -07:00
cgohlke 31d341c0cb Fix uniform conversion to signed int 2012-05-22 18:23:35 -07:00
cgohlke 7e51e519b1 Fix whitespace 2012-05-22 12:21:58 -07:00
cgohlke 85670d60b6 Update docstring 2012-05-22 12:13:51 -07:00
cgohlke 8e67dd901f Fix spelling 2012-05-22 11:49:17 -07:00
cgohlke 754f0e5d39 Docstring additions 2012-05-22 11:39:38 -07:00
cgohlke 64da74c91a Fix grammar 2012-05-22 11:12:47 -07:00
cgohlke fc42d86894 Adjust rescale_intensity function to new dtype conversion rules 2012-05-22 00:28:32 -07:00
cgohlke e4b49239c4 Adjust tests for new type conversion rules 2012-05-22 00:25:42 -07:00
cgohlke 3ff1ebf526 Rewrite convert function 2012-05-22 00:21:32 -07:00
Stefan van der Walt 8f43ee7739 BUG: Catch all exceptions, including NotImplementedError, when checking for number of CPUs in multi-processing. 2012-05-21 19:20:20 -07:00
Stefan van der Walt 34505fef46 BUG: Fix FreeImage Py3k compatibility [patch by Almar Klein]. 2012-05-21 18:24:32 -07:00
cgohlke 4e87a1dfce Add new 64-bit metadata types to METADATA_DATATYPE (new in FreeImage 3.15.3) 2012-05-19 13:23:32 -07:00
Tony S Yu 048c6c06eb BUG: Fix stackcopy for grayscale image. 2012-05-15 15:56:26 -04:00
Stefan van der Walt fc676d6ae0 BUG: Correctly import _feature in Python 3. 2012-05-09 15:42:04 -07:00
Tony S Yu 7326b1949f BUG: fix test images (float images between 0 and 1). 2012-05-09 18:35:38 -04:00
Stefan van der Walt d19d45850f BUG: Fix internal import in template matching. 2012-05-09 12:53:29 -07:00
Tony S Yu 06bd3ebd6f Add doctest example to match_template. 2012-05-08 21:32:09 -04:00
Tony S Yu a2f91585ef Add test for pad_input = True. 2012-05-08 21:32:08 -04:00
Tony S Yu 193d5abd3c Rename pad_output parameter to pad_input. 2012-05-08 21:32:08 -04:00
Tony S Yu 383ca6220a Set match_template to default to no padding and fix test. 2012-05-08 21:32:08 -04:00
Tony S Yu ad99285bc0 Prevent match_template from returning NaNs. 2012-05-08 21:32:08 -04:00
Tony S Yu 0c1e3541b3 Check that image is larger than template. 2012-05-08 21:32:08 -04:00
Tony S Yu b2006da346 Change flipud/fliplr to array indexing. 2012-05-08 21:32:08 -04:00
Tony S Yu 43ed4b9fb7 Pad input image instead of output. 2012-05-08 21:32:08 -04:00
Tony S Yu 5d79537566 Fix convolution input to get correlation results. 2012-05-08 21:32:07 -04:00
Tony S Yu 7caf85a5c1 Renaming for clarity. 2012-05-08 21:32:07 -04:00
Tony S Yu f21f032bfe Add normalization test and remove unnecessary clipping. 2012-05-08 21:32:07 -04:00
Tony S Yu 5682d27eb0 Rewrite normalization algorithm.
This is a major revision that removes the `method` parameter of `match_template` and uses a new normalization method.

Note that the example result is different with this new normalization.
2012-05-08 21:32:07 -04:00
Tony S Yu 753e999a7a Minor cleanup
* Rename some variables.
* Delete some old comments.
* Move some variable initializations to the top of the function.
2012-05-08 21:32:07 -04:00
Tony S Yu 883dd24cdb Fix bug when indexing into summed-area table. 2012-05-08 21:32:07 -04:00
Tony S Yu 2e8fcef89b Simply equation in docstring of match_docstring. 2012-05-08 21:32:06 -04:00
Tony S Yu cbdea0d36e Add pad_output argmument to match_template. 2012-05-08 21:32:06 -04:00
Tony S Yu 3c7ae849b9 Remove unnecessary truncation at boundary. 2012-05-08 21:32:06 -04:00
Tony S Yu 545bdab985 Refactor template matching.
* Change Cython function to take names of correlation method instead of numbers representing the methods.

* Use alternate formula for `template_norm` of 'norm-corr' method, but note that both formulas need to be checked for correctness.

* Add note that `match_template` output has a different shape than the input image. This needs to be fixed before merging.

* Change 'Sigma' to 'Sum' in docstring to avoid confusion with standard deviation.

* Other minor changes for readability.
2012-05-08 21:32:06 -04:00
Tony S Yu 8c816109c9 Remove OpenCV version of match_template 2012-05-08 21:32:06 -04:00
Tony S Yu 425a4ea707 Use feature.peak_local_max instead of custom peak detection. 2012-05-08 21:32:06 -04:00
Tony S Yu 9d3072d3f8 Fix type errors in match_template by casting inputs to float32. 2012-05-08 21:32:06 -04:00
Tony S Yu 2a00e24b12 Change _template.match_template variables to float.
Template and image in test are converted to float32 before passing to `match_template`. This change is temporary: `match_template` should convert these variables internally.
2012-05-08 21:32:06 -04:00
Tony S Yu e8461e22dd Move template matching to feature subpackage 2012-05-08 21:32:05 -04:00