Forum

Author Topic: Background masking process  (Read 12838 times)

markyboy

  • Newbie
  • *
  • Posts: 26
    • View Profile
Background masking process
« on: March 24, 2014, 01:00:32 PM »
Hi all

How do I load background masks for each image in photoscan without clicking on each individual image and loading its background mask which is what I was doing last night and took forever. I can get it to

I have smartshooter renaming all my photos as its takes them off the cameras. Currently using this format [camera number][batch number].cr2 so I end up with filenames that look like this 01_01.cr2, 02_01.cr2

Is there a way in photoscan I can get it working with these filenames?

Thanks Mark.
« Last Edit: March 24, 2014, 01:06:39 PM by markyboy »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14854
    • View Profile
Re: Background masking process
« Reply #1 on: March 24, 2014, 03:06:59 PM »
Hello Mark,

If you have the folder with the background images you can use template for import mask filename like {filename}_background.{fileext} - such option will help PhotoScan to find, lets say, 01_01_background.cr2 background image for 01_01.cr2 file in the user defined folder (if Apply to chunk option is used).

Another unrelated comment is to convert CR2 files to TIFFs to prevent any color issues, since RAW images are not officially supported by PhotoScan.
Best regards,
Alexey Pasumansky,
Agisoft LLC

markyboy

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Background masking process
« Reply #2 on: March 25, 2014, 02:22:15 PM »
Hi sounds good. Yes my images are in tif format, they come of smart shooter as .cr2 files. Forgot to mention that a have a turntable setup where I need to use background images for a range of photos. For example, camera 1 would take image as as follows:

01_01.tif, 01_02.tif, 01_03.tif, 01_04.tif

camera 2

02_01.tif, 02_02.tif, 02_03.tif .........

And so on. So how would I tell photoscan to apply 01_01_background.tif to all images that camera 1 has taken ? and not to touch camera 2s images.

Thanks Mark.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14854
    • View Profile
Re: Background masking process
« Reply #3 on: March 25, 2014, 02:25:15 PM »
Hello Mark,

The easiest way is to load images taken from different cameras to different chunk and then to apply background masking for each chunk separately. Then just drag and drop images to the single chunk in the Workspace pane.

More complicated way is to write short script to perform the operation.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Rowland

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Background masking process
« Reply #4 on: May 10, 2014, 12:07:05 PM »
I am also trying to figure out an easy way to automatically match the background images for the mask. Is there any scripts? I am using fixed angle with 60 cameras using smartshooter. Thanks.

Lambo

  • Full Member
  • ***
  • Posts: 167
    • View Profile
Re: Background masking process
« Reply #5 on: May 13, 2014, 01:59:03 AM »
I simply use a renamer software (plenty free ones online) and rename the background images as I need (normally the same as the main images plus-mask at the end.
It takes me 5 minutes to rename them all and then I load them with tools/import/import masks and use method from background
Leo

Rowland

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Background masking process
« Reply #6 on: May 13, 2014, 11:26:38 AM »
the thing is, when I shoot 60 cameras simultaneously, the order of the photos coming in to the computer is random. Therefore it takes me a long time to match all the corresponding background images... Is there any way out of this situation?

Lambo

  • Full Member
  • ***
  • Posts: 167
    • View Profile
Re: Background masking process
« Reply #7 on: May 16, 2014, 01:11:47 AM »
The solution is to name the cameras in Smart Shooter first ;)
Give every camera a name or number and set on the parameters of smart shooter to include that name (or number) in the picture name.
That way you get pictures like: Subject_001_5427.jpg  and for the mask: Subject_001_9685.jpg
(this is a sample of the many variation of names that you can get form Smart shooter depending on how you configure it)
The last number should be the one that is kind of random but since you know which pictures are from the background, you put them into its own folder and rename them to match the main pictures (retaining the Subject_001 part and just adding -mask at the end.
If the explanation was too confusing, I can explain it better with some pictures and real names from my camera setup :)
Leo