Automatic detection of cardiac cavity boundaries on two-dimensional echocardiographic image