c# - Object reference not set to an instance of an object. using Emgu CV -


please guys me resolving issue in following statement:

mcvavgcomp[][] detector = imagegray.detecthaarcascade(face, 2.1, 10,   emgu.cv.cvenum.haar_detection_type.do_canny_pruning, new size(20, 20));" 

after debugging solution compiler show me following error:

object reference not set instance of object.

because you're dealing haar cascade logic, imagegray looks gray scale image of type

image<gray, byte> imagegray; 

ensure correctly initialized or converted rightly frame. check not null.

and in line:

imagegray.detecthaarcascade(face, 2.1, 10, emgu.cv.cvenum.haar_detection_type.do_canny_pruning, new size(20, 20)); 

face variable initialized like:

var face = new haarcascade("haarcascade_some_tree.xml"); 

ensure face not null.

if both variables not null, detecthaarcascade method expects fields in face object non-null , finding null.

ensure if face object fields non-null. (some key ones once variable initialized)


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -