One Whitman's trash is another Whitman's symbol—for the elements of life. All the junk that you and I would ordinarily step over when we go for a walk on the beach is instead full of meaning for speaker. He's making connections and appreciating everything he sees on the shore, no matter how small it may seem.
Lines 11-12: "Chaff, straw, splinters of wood, weeds, and the sea-gluten" mix with "scum, scales from shining rocks, leaves of salt-lettuce, left by the tide" to create some vivid beach-junk imagery. And considering that the speaker is walking along the shore for the entire poem, it's no wonder that this imagery appears again and again. But what does it mean? Knowing Whitman, it's probably something pretty cosmic—or at least, important.
Line 22: Here Whitman's speaker actually sees himself in these bits and pieces of drift and junk, the things that the sea leaves behind.
Line 62: "Tufts of straw, sands, fragments" are left behind by nature. It's the final time that the speaker sees himself in these fragments, discarded by the ocean according to its moods. The stuff that looks like junk is, to Whitman, the stuff that life is made of—literally.