It's possible, yes. You could use even very basic algorithms to detect lights near the horizon at night. Using IR camera
can detect exhaust
For daytime basic algorithms can look for some things, but eventually machine learning
is needed if you want it to alert you of whales, or actually identify things. To make it work
near shore and near other vessels without triggering the alarm
unless there is a collision
course is also more difficult.
, there are not really a lot of possible things to detect, and you only care about abnormal sightings, the processing power is not too great, it can already be done on a raspberry pi at 10-20 seconds per image.
You also either need several cameras to cover 360, or a camera which is spinning. The basic alarm if it sees anything is not too difficult compared to other machine learning
I was contacted about collaborating on a similar development with cameras as well as using microphones/hydrophones for commercial
ships. The idea is a cargo ship might only have 3 crew these days, and keeping a lookout is difficult. I refuse to work
on something that is not free software
so I cannot really contribute to the project