How I Did It

First, I mounted the camera on a tripod at a suitable place somewhere in the middle of the living room.  (The tripod helped me to keep the camera in the same place to guarantee the same point of view for each image, which is essential.)  With a 20mm wide-angle lens, I took the following pictures:

I didn't have to use a wide-angle lens, but if I'd used a normal lens I would have had to take more pictures to capture the whole room.  Note that the pictures overlap significantly at the edges.  This allowed me to relate the pictures to each other by identifying the pixel locations of a number of key points in each image--corners of picture frames, bookshelves, etc--that neighboring pictures have in common.  I fed this list of pixel locations, along with the focal length of the lens I used to take the pictures, to a program I wrote that inferred from this which direction the camera was facing for each picture.

With this information, it is not difficult to combine the images together and warp them to simulate the effect of taking a picture of the room with some crazy lens like a fisheye or cylindrical lens.  The process is more or less a matter of positioning all of the input images in a sphere around a virtual camera and then "taking" a picture of the pictures with the virtual camera.  Again, a program I wrote did this for me.

That gave me 95% of the results I wanted.  Although the stitching was fairly accurate, it was not exactly perfect and some things inevitably didn't quite match up along the seams between two neighboring images. It took me a couple of hours of fussing with Gimp to straighten these out to my satisfaction.  (The results still aren't perfect; you can see some of the artifacts if you look closely enough.)  Some of these problems are due to imperfections in the wide-angle lens I used to take the pictures (this particular lens seems to distort things a bit too much on the edges of the frame, and things on the edges are significantly too dark), and some due to the fact that even on the tripod, the camera didn't exactly rotate around the nodal point of the lens, so there's a bit of unwanted parallax between different images--especially on things near to the camera like the couch in the foreground and the bookshelf behind the camera.