home

Topics Topics Edit Profile Profile Help/Instructions Help Register Register  
Search Last 1 | 3 | 7 Days Search Search Tree View Tree View  

Wrong number of images

The Panorama Factory Forum » The Panorama Factory FAQ » Wrong number of images « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

David Richardson
New member
Username: Customdavid

Post Number: 3
Registered: 1-2006
Posted on Saturday, July 08, 2006 - 5:23 pm:   Edit PostDelete Post

First I want to say how much I like this program, the results I am getting are fantastic. The problem I have is with the batch file version. I am getting the following error message:

Wrong number of images, expected 12

I created a master template with 12 images. The template is using the same focal length, camera and other settings as the one I am trying run in batch. All images were made with a level tripod with each image at the same rotation.

Here is my batch file.

Line 1:
CD "L:\test\0002"

Line 2:
"C:\Program Files\Smoky City Design\The Panorama Factory V4\PFBatch.exe" "L:\test\master.pfp" *.jpg /w:"0002.jpg"

Here is the list of images in that directory:
L:\test\0002>dir *.jpg /b
STA_1702.JPG
STB_1703.JPG
STC_1704.JPG
STD_1705.JPG
STE_1706.JPG
STF_1707.JPG
STG_1708.JPG
STH_1709.JPG
STI_1710.JPG
STJ_1711.JPG
STK_1712.JPG
STL_1713.JPG

If I manually add each image:

Line 2:
"C:\Program Files\Smoky City Design\The Panorama Factory V4\PFBatch.exe" "L:\test\master.pfp" STA_1702.JPG STB_1703.JPG STC_1704.JPG STD_1705.JPG STE_1706.JPG STF_1707.JPG STG_1708.JPG STH_1709.JPG STI_1710.JPG STJ_1711.JPG STK_1712.JPG STL_1713.JPG /w:"0002.jpg"

I get the following error:
Could not open STA_1702.JPG

I have tried running this directly from Panorama Factory (not using batch) with no problems.

I have created new project files, using different images (still sets of 12), I have tried different image directories, I even created a new project for the images above and then ran the batch file against the same set of images with the same error being displayed.

I am sure that I am missing something,

Any advice would be appreciated,

David
Top of pagePrevious messageNext messageBottom of page Link to this message

John Strait
Moderator
Username: Jstrait

Post Number: 261
Registered: 5-2001
Posted on Sunday, July 09, 2006 - 8:37 am:   Edit PostDelete Post

I can't be certain without sitting in front of your computer, but I think the problem may be that the JPG files are on a different drive letter from the batch file. Your images are on L: and I suspect your batch file is on C:.

The Windows CD command normally changes the current directory for a specific drive without changing the current drive (each drive has its own current directory). By default the current drive for a Windows batch file is the drive that the batch file itself is on.

Don't ask me why Windows works this way. I don't think it really makes sense either!

Historically, you would change the current drive by just typing the drive letter and a ":" like this:

Line 0:
L:

However, starting with Windows 2000 (and therefore also in Windows XP) you can change the drive and directory at the same time by using the /D switch on the CD command. So I think your batch file will work better if you change to:

Line 1:
CD /D "L:\test\0002"

Give it a try and let me know!



BTW, I'm a little concerned about the first version of Line 2.

Line 2:
"C:\Program Files\Smoky City Design\The Panorama Factory V4\PFBatch.exe" "L:\test\master.pfp" *.jpg /w:"0002.jpg"

This writes the 0002.jpg into the same directory as the 12 original images. This means that if you run this command a second time, "*.jpg" will give it 13 files as input. Maybe you should try "ST*.jpg" instead.

Hope this helps!

Top of pagePrevious messageNext messageBottom of page Link to this message

David Richardson
New member
Username: Customdavid

Post Number: 4
Registered: 1-2006
Posted on Sunday, July 09, 2006 - 5:48 pm:   Edit PostDelete Post

John, Thanks so much for your help.

Stupid, stupid user! It turned out to be the drive letter as you mentioned. I should have caught that.

I changed my batch file to a more traditional 3 line (drive, then directory, then command). I did correct for the st*.jpg (thanks). My normal result has been to create .mov files but I tried to pair this one down to a very simple example. I really spent all of my time looking at line 2 and did not even think about line 1 (dumb mistake). I have corrected my program to resolve this and added an option to have it pause after running, to allow the user to see error messages. The latest, v. 1.02 can be downloaded: at http://www.panoramashots.com/wizard/

Thanks again for quickly setting me straight!

David

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image

Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Administration Administration Log Out Log Out   Previous Page Previous Page Next Page Next Page