protected MatOfDMatch(long addr) {
super(addr);
- if(checkVector(_channels, _depth) < 0 )
- throw new IllegalArgumentException("Incomatible Mat");
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incomatible Mat: " + toString());
//FIXME: do we need release() here?
}
public MatOfDMatch(Mat m) {
super(m, Range.all());
- if(checkVector(_channels, _depth) < 0 )
- throw new IllegalArgumentException("Incomatible Mat");
+ if( !empty() && checkVector(_channels, _depth) < 0 )
+ throw new IllegalArgumentException("Incomatible Mat: " + toString());
//FIXME: do we need release() here?
}