I had a "some what" similar project for an internship and in the end the internship was never finished because we all ran out of time (3 months, and no money for anything).
But anyway in the end what we were going to do was to take a large grid paper then point the camera at it so then we could map out the lens' characteristics and use that to tweak the pictures that came out of the camera.
Secondly we were going to put in a "well known/understood" object next/on each wall and use that to interpolate the size (length/height) of each wall.
Now this method would require more "time" to setup because you would need to place the object on each wall and then take picture of each wall with a bit of overlap so that latter you could be able to snitch it together. Then the user would then tell the program where each "corner/edge" was located so the program would know the "general shape" of the room then it would use the object placed on the wall to interpolate the length/height of each wall.
Now keep in mind this would be an relatively manual process, but with a well designed software/process it could be relatively quick. By this I mean the slowest manual steps would be placing the object on the wall, then taking the "panorama" of the room. Once the pictures has been uploaded into the computer, it could take care of pre-processing, snitching it together, then pop up an picture with some "line tools" in which you could use to tell the program where the corner/etc were and then it would do the calculation/adjustment/sizing/etc...