Necessary conditions for extremals of Blake & Zisserman functional