It is also worth noting the foreshadowing of Lady Macbeth's demise later in the play with these words. She will be the one, ultimately, who is haunted by pictures of "the dead" and she will replay her nightmare of killing Duncan while "sleep"walking.
Shakespeare is full of these reverberations, and it is astonishing when you consider the connections that exist between seemingly simple lines of text and actions and words spoken by other characters in the play.
Later, in Act V, Macbeth seems to have taken on the point of view expressed in the lines you quote when he says:
...Out, out brief candle.
Life's but a walking shadow, a poor player
That struts and frets his hour upon the stage
And then is heard no more.
He is taking this idea that the dead are just pictures one step further to suggest that death equals nothing. He is also making a nice nod back to Lady Macbeth's sleepwalking with the images "out brief candle" and "walking shadow." And the idea that those who are asleep or dead have no reality is actually extended here by Macbeth into the notion that even those who are "strutting" their "hour upon the stage" of life also have no ultimate purpose.
Shakespeare truly does provide layers of connection and meaning, and the seemingly simple lines you quote are good example of this.