Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Calculate norm of chanels with given metric tensor

I have a matrix with 3 channels (HSV color space). Now for each matrix element I need to calculate my own norm defined by metric tensor, outcome should be single channel matrix:

image description

I'm trying to find something like that it in documentation (I'm pretty sure I've seen it earlier), but so far without luck.

I need it to replace usage of cv::inRange.

Calculate norm of chanels with given metric tensor

I have a matrix with 3 channels (HSV color space). Now for each matrix element I need to calculate my own norm defined by metric tensor, outcome should be single channel matrix:

image description

I'm trying to find something like that it in documentation (I'm pretty sure I've seen it earlier), but so far without luck.luck. This will allow me to have a matrix of colors distance from specific color (metric tensor will define that).

I need it to replace usage of cv::inRange.. Instead two state result I need something more smooth (no thresholds).