There is no possible "best algorithm for detecting an object", no matter which computer programming language you use.
Whether an object is present or not, or of importance or not, is a matter of interpretation.
Is Cosmic Background Microwave Radiation "noise" to be discarded? They put up a satellite to study it -- a satellite that blocks out bright objects as being "noise" for the purpose of the study.
In the below, which is the object? The chalice or the faces?

When you are walking down a sidewalk, which is more important: the graffiti on the sidewalk, or the big hole you are about to twist your ankle in?