A General Framework for Knowledge Discovery from Echocardiographic and Natural Images