Forum

Author Topic: Automatic Masking - Solved  (Read 19783 times)

Exhale

  • Full Member
  • ***
  • Posts: 141
    • View Profile
Automatic Masking - Solved
« on: January 31, 2014, 09:40:00 PM »
Hi All,

I could do with some help here,

As Alexey said before,
"  PhotoScan has mask-by-background
feature, that allows automasking for fixed cameras, providing that "empty" shots for every
camera are taken without the present of the object of interest. The background should be
kept unchanged during object shooting;  "

So is there any tutorial about this? I have 42 fixed cameras but having difficulties.
What are the steps for automasking ?

Also Shall I have stereo pairs?   what do you recommend for camera placement and zone overlap.

Thanks
« Last Edit: April 14, 2014, 01:31:27 PM by Exhale »

picoprinter

  • Newbie
  • *
  • Posts: 5
  • Mid life crisis
    • View Profile
    • 3d Pico Printing
Re: Automatic Masking
« Reply #1 on: February 01, 2014, 07:11:24 AM »
This is a great question and I am looking forward to the answer.  I would add, is there a procedural difference between automasking and calibrating the camera locations?  From what I can tell, you can do a calibration sequence of photos with printed targets to generate a 'camera placement template' for all future object scanning.  Assuming the cameras are fixed position.  But how can this help in automasking?  I would assume a calibration run less an object at the center can also act as an automask?  I realize this is for a specific use case as described above.
Going 4 it.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Automatic Masking
« Reply #2 on: February 04, 2014, 02:17:09 PM »
Masking from the background requires the set of images taken from exactly the same camera positions but without the object of interest. Thus for full body capture you'll need to take images of the person, then ask him to step aside and take images of the empty scene. Important thing is to keep the same naming convention for the "empty" shots as original images do. So both images (with and without the object) should have similar file names. Like Camera0001A.jpg and Camera0001A_bg.jpg.

Then open new PhotoScan project file and add photos (with object) to the chunk, go to Tools Menu -> Import Masks -> From Background and specify the template for the files with the background. For the example given above it will be the following:
{filename}_bg.{fileext}

Then click OK and browse to the folder containing the background images. Click OK and wait until difference masks are created.
Best regards,
Alexey Pasumansky,
Agisoft LLC

picoprinter

  • Newbie
  • *
  • Posts: 5
  • Mid life crisis
    • View Profile
    • 3d Pico Printing
Re: Automatic Masking
« Reply #3 on: February 04, 2014, 06:43:34 PM »
If I have a stationary rigging of cameras.  As long as their positions never change (with some small factor of drift, but ability to re-aim/target manually).  If I have a stable naming convention, I can ALWAYS use auto masking for awesome scanning goodness.

Second question, I have on my next step list, something titled "Photoscan Coded Targets and Scale Bars" where I was going to try and print some targets and such.  With the method described above, are the coded targets still necessary, or only for scale?

Thanks.
Going 4 it.

David Cockey

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: Automatic Masking
« Reply #4 on: February 05, 2014, 07:14:02 AM »
Coded targets are not needed to create a mask from the background.

phangster

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Automatic Masking
« Reply #5 on: February 08, 2014, 08:30:18 PM »
Dear Exhale,

May i ask if you have a system on your 42 camera setup to wire or wirelessly transfer the images taken into your computer?

Cheers!

Exhale

  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: Automatic Masking
« Reply #6 on: February 09, 2014, 10:21:49 AM »
Hi phangster,

I use wired transfer. Never looked up for wireless one.
Is there any solution like this? if so, how much will it cost ?  ;)
« Last Edit: February 09, 2014, 07:47:05 PM by Exhale »

phangster

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Automatic Masking
« Reply #7 on: February 09, 2014, 08:39:45 PM »
Hey Exhale,

i have no idea... i'm trying to find that out too! :)

Even if its wired, how's the setup like? you bring your laptop to individual camera or is it x camera to 1 computer?

I'm using  5 camera single point with a turntable and removing 5 SD cards is already quite a hassle. Not to mention, i'm not getting good results with a turntable, too much noise...

Exhale

  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: Automatic Masking
« Reply #8 on: February 10, 2014, 04:54:58 PM »
Hi buddy,

Please have a look at this topic.
http://www.agisoft.ru/forum/index.php?topic=1920.msg10264#msg10264

Thanks

Exhale

  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: Automatic Masking
« Reply #9 on: February 11, 2014, 05:45:26 PM »
There is problem with SmartShooter.
It changes the name of the photos.  ones you snap photos for masking,  in the second snap  the same frames being snapped with different names and it makes finding mask photos harder..  Is there any way to do so?    Also Why agisoft doesnt select masks photos by pixels automatically ?  :)

EMULAT3D

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Automatic Masking
« Reply #10 on: February 11, 2014, 06:16:38 PM »
Hey Exhale,

I use SmartShooter as well and what I do is this:

1) Take pictures like normal in SmartShooter. Just make sure you use camera name somewhere in your renaming settings, this will ensure pictures are in the same order.
2) Manually copy the original (with subject) into a folder and the ones used for masking in another folder.
3) Using a renaming tool of your choice (I personally use rename in XnView), rename the images in both folders. Just make sure they are renaming incrementally. I generally do 001.xxx, 002.xxx, etc.
4) Now you have two sets of images, in the proper order, named the same.

Hope this is some help! ;)

Thanks,
Corey

phangster

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Automatic Masking
« Reply #11 on: February 11, 2014, 11:05:58 PM »
Thanks guys! Really helpful! :D

Exhale

  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: Automatic Masking
« Reply #12 on: February 11, 2014, 11:17:43 PM »
Hey EMULAT3D,

Thx for your help indeed.... 
I will give a go ;)

Exhale

  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: Automatic Masking
« Reply #13 on: February 14, 2014, 12:29:12 AM »
EMULAT3D

XnView is simple but cool program :D
Thx.

tommyboy

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Automatic Masking
« Reply #14 on: March 03, 2014, 10:03:16 AM »
We name our photos with the following convention: [D]/[B4]/[C], then you just load the subject and mask images from the respective batch directories.  I will often rename the batch directory to something more descriptive, then the same name + "_bg" for the mask images.

This does mean that we often have to "reset batch number" via the options screen when cameras fail to fire, it's a little annoying but keeps things pretty well-organized.  I will probably script up the reset one day and make it more easily accessible. Francis from the SS team, has also said he will move this function to a higher menu level soon.