Image copyright Getty Images

When a man was filmed shaving on a train the initial response on social media was disgust and outrage.

Now though people are expressing their regret at making snap judgements amidst an outpouring of empathy on social media. So what happened?

The clip, showing Anthony Torres, 56, shaving his face and flicking foam on the floor, was condemned by many of the three million viewers.

"So gross", people wrote, while others suggested they "would have puked" and called Mr Torres a "pig" and a "slob".

However, Mr Torres has since explained why he was shaving on the New Jersey train, leading many to regret their snap judgements.

He said that he had been staying at a homeless shelter for the past three nights, and had previously spent time sleeping at bus stations.

Speaking to the BBC's Outside Source programme Mr Torres said that he was "shocked" to discover that a video of him had been posted to social media.

Reflecting on the reaction to the video, Mr Torres said: "The negative comments don't bother me."

He explained that he lost his job during the economic downturn, and has struggled ever since.

Mr Torres says he was unable to shave at the homeless shelter, but admits that he "maybe shouldn't have thrown the shaving cream" on the floor.

Mr Torres was travelling to his brother's house to ask for support when the video was taken.

A number of people who saw the original video, which has since been deleted, expressed regret for laughing or mocking Mr Torres after reading more about his life.

One Twitter user wrote how they felt sorry for making a snap judgement.

Stranger-shaming

So-called stranger-shaming - or otherwise sharing covert photographs of strangers - is a long-standing issue on social media.

The phenomenon involves posting videos online to highlight a behaviour that one finds distasteful.

Manspreading, students sleeping at the library, men wearing red trousers and napping commuters have all been the target of ridicule and undercover photography.

The issue of women applying make-up on the train has drawn particular attention recently.

Others wrote that they had misjudged Mr Torres' situation, and felt ashamed for judging him.

The video and Mr Torres' subsequent explanation has sparked a conversation about the tendency to shame people on social media.

One user wrote: "His shaming says more about people judging than him."

You may also like:

Others implored people to think about the "human on the [other] side of your lens" before posting videos online.

Some on social media were moved to set up a GoFundMe page for Mr Torres with the aim of helping him get back on his feet.