image-rs / imageproc

Image processing operations
MIT License
758 stars 149 forks source link

Match template with mask #568

Closed cospectrum closed 6 months ago

cospectrum commented 7 months ago

2 new functions: match_template_with_mask and match_template_with_mask_parallel

To close https://github.com/image-rs/imageproc/issues/567

cospectrum commented 6 months ago

Tests generated with OpenCV

theotherphil commented 6 months ago

Please add a note in the doc comments for the new functions explaining how the mask is used. Otherwise LGTM, thanks!

cospectrum commented 6 months ago

Please add a note in the doc comments for the new functions explaining how the mask is used. Otherwise LGTM, thanks!

Should I write it as a latex formula using katexit, for example?

theotherphil commented 6 months ago

Oh, that’s cool - I’ve not seen LaTeX used with docs.rs before.

It would make the code harder to read directly for people who don’t know LaTeX, but how can I resist properly rendered formulae in docs!

cospectrum commented 6 months ago

@theotherphil

Without mask.

match

With mask.

match_masked

theotherphil commented 6 months ago

Great, thanks @cospectrum !