Visual Tracking / Object Tracking: Estimate the Direction the Whale Is Moving
I wouldn't rely on edges as they are not connected and foam/waves also generate them.

I would rely on the contrast between the colors of skin, water and foam, to get a solid blob.

Possibly a two step process: discard the more saturated pixels (the sea), then among the achromatic keep the dark ones. After experimenting I saw that erosion can be useful to get rid of unwanted residues.

In the end you should get a big blob, and determine its dominant orientation (equivalent ellipse of inertia, Feret diameter, most distant points...)

Unsaturated pixels:



Dark pixels:



Combination:



Eroded:



Blobs and ellipse of inertia:





As there is a risk of blob fragmentation, you can consider merging the largest blobs.