Ask Your Question

Mimic's profile - activity

2015-04-18 06:04:22 -0500 received badge  Supporter (source)
2015-04-18 05:20:05 -0500 asked a question Opencv3.0 Shape Module, Compute Distance

Hi everoyne,

I wanted to use the shape module to compute Hausdorff distance and shape context distance between two shapes, but it give me the error

Assertion failed (set1.channels()==2 && set.1cols>0)

my Code :

InputArray src = imread("samples/5.jpg"); 
InputArray model = imread("samples/6.jpg");
Ptr<HausdorffDistanceExtractor> p = createHausdorffDistanceExtractor();
float dis = p->computeDistance(src, model);

So, why the input must be 2 channels ?

Thanks, Mimic