ADC Home > Reference Library > Technical Notes > Legacy Documents > QuickTime >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
A Method for Estimating the Minimum RAM
MPW is by far the tool that needs the most RAM. Typically, a QTVR project requires that you allocate at least 30 MB to execute the QTVR tools that MPW calls, specifically stitch, which takes up the lion's share of memory. The other MPW tools, such as p2mv, are not significant in terms of the maximum or total amount of memory you need.
p2mv (PICT to movie) is a tool that dices the panorama PICT which has been stitched into equally-sized tiles and then packages them as a QuickTime Movie. The msnm tool (make single node movie) takes the diced QuickTime Movie and adds the extra parameters that QuickTime VR needs to complete the panorama movie.
The stitcher, running under MPW, requires enough RAM to buffer 3 copies of a panorama in order to stitch, rotate and crop the image.
Because a panorama is technically a series of flat images wrapped into a cylinder, the surface of the cylinder is what determines the amount of memory your project needs.
Steps To Estimate RAM Requirements
To estimate roughly the minimum amount of RAM you'll need, follow these steps:
Steps one through five outline the procedures you need to follow in order to determine the variables in the RAM requirements equation.
Here are the factors you need to calculate the RAM requirements equation:
Two Sample Calculations
Example #1: If your 18mm lens in portrait format has about 65 of horizontal field of view, and you take 6 images to make a complete rotation, using the 768 x 512 resolution PhotoCD images, your cylinder size will be:
Therefore, you'll need a minimum of 31 MB of RAM for MPW.
Example #2: Using the standard QuickTake 150 digital camera in portrait mode requires a minimum of 14 images to complete a 360 degree panorama.
The irony is that the QuickTake camera, which is perceived as a low-end solution, actually requires more RAM than the 18mm SLR. However, if you use landscape mode with your QuickTake camera, the buffers will only need 38 MB.
Setting the MPW Memory Partition
You can set MPW's Minimum and Preferred size in the Get Info dialog from the Finder.
Unless you have lots of extra memory, you should quit all other applications before launching MPW. A typical Macintosh 7.5 System will need 5-10 MB of RAM -- more if you have extra extensions installed. If you install only a basic system, it's possible to reduce its memory needs to less than 5 MB.
QuickTime loads into the system heap, so you need to make sure there is at least 1 MB for the system to grow when it loads QuickTime. Not having this free space may cause unexpected errors. If you get errors while stitching, use About This Macintosh in the Apple menu to confirm that MPW has enough RAM and that there is still 1 MB of free space.
Calculating Total RAM
After figuring the amount of RAM needed for MPW, add the following to your subtotal:
A Practical Configuration: A Personal Example
My camera system with an 18mm lens requires a minimum of 31+11 = 42 MB of RAM. Fortunately, I have 72 MB in my Power Macintosh 8100, and this allows me to stitch images captured with my second camera: the QuickTake 150. This also lets me run multiple tools concurrently, which saves me the time of relaunching whenever I change tasks.
Other Variables That Affect Memory Requirements
These calculations should only be considered estimates. A number of other factors may cause the stitcher to require more memory in order to build a panorama. For example, a hand-held panorama often requires a larger image border to accommodate the "stair-stepping" that occurs when the images are skewed and poorly aligned. To insure proper stitching, you may need to add another 20% memory to handle these worse-case situations.
Increasing or Reducing the Amount of RAM
If you want to increase or reduce the amount of RAM you need, there are three important variables you must take into account:
As an example, I prefer to work with lo-res PhotoCD images. When I'm proofing my work I may use a half-size image, which dramatically speeds up the time it takes to build a panorama and also uses four times less RAM.
Memory Requirements for Other QTVR Tools
Although the QTVR dicer (the p2mv MPW tool) requires a lot of memory, it is always proportionally less than the stitcher.
A common problem encountered by QTVR developers is not increasing the partition size of HyperCard to 20 MB required by the Scene Editor.
Object movies require only as much RAM as needed for the Video Capture tools. Five megabytes of free space should be sufficient for most cases.
Using Virtual Memory
If you want to work with images requiring more RAM than you have, you can do so by turning on virtual memory. Virtual memory, however, really slows things down, often by as much as a factor of 10. But it may allow you to accomplish things that would otherwise require lots of expensive RAM. Plan on using virtual memory as an exception rather than the rule for your QTVR projects.
A Bench Test
One weekend I ran some timing tests, stitching large panoramas with virtual memory on. The reason I performed the tests was to see if I could push the limits of how large a panorama QuickTime VR could stitch.
I used a Nikon N90, 18mm lens, Kaidan universal pan head to take 12 portrait shots per node. I shot the scene indoors with fluorescent lights. The negatives were scanned onto a PhotoCD and then stitched on a PowerPC 8100/80 with 72 MB of RAM. I ran a benchmark with virtual memory turned off, and then the others with virtual memory set to 480 MB!
I stitched them first in an MPW partition that used all but 10 MB of free space. All Easy Install Macintosh 7.5.1 system extensions were enabled.
For the largest size, I played it safe and turned off the -outWidth, -outHeight parameters and resized the panorama.srcPict with Adobe Photoshop. I thought I could dice it with less virtual memory, but eventually diced them all with 300MB of virtual memory. I wanted to use less than 480 MB because speed was a consideration.
Timing Results from the Experiment
Table 1 shows the timing results from the experiment. Note that all times are in Hours: Minutes: Seconds, rounded off.
You can stitch 100MB panoramas if you have lots of time (as I did, for example -- 3 days!) The resulting movie I made was 8.7 MB, so it was not exactly practical for the World Wide Web and displayed about 2 frames/second on the PowerPC 8100, which was unacceptably choppy.
If you have more time than money, it's possible to use virtual memory rather than add RAM and still build big panoramas, with lots of detail.
It's possible to estimate your project's RAM requirements using the formula provided in this Technote. Note that these are minimum estimates. The most common problems are caused by not having enough RAM. The choice is clear: invest in the purchase of sufficient RAM to meet your QTVR development needs.
QTVR Authoring Tool Suite