Here's a trick that outdoors leaders use: tell the group that you'll take a selfie when everyone agrees that it's the low point of the trip for posterity. When spirits are dwindling, people are hesitant to be the person to declare that the group has reached rock bottom, especially because everyone else will need to agree on it. So, as the leader you can motivate people by asking whether it's time to take the selfie.
If the group decides that they want to take their selfie, then from that point forward you can remind them that their low point has already passed. But in most cases, groups will opt to never take their selfie. Even if they do, it can serve as a powerful motivator to get people to rally through difficult situations and compel them to feel more optimistic.