Forum

Author Topic: Using scalebar based on known camera distance  (Read 4725 times)

3dmij

  • Newbie
  • *
  • Posts: 30
  • I make raspberry pi 3d Scanners
    • View Profile
    • pi3dscan
Using scalebar based on known camera distance
« on: December 02, 2014, 01:36:44 AM »
Hi,
I am trying to workout how I can easily calibrate my environment. I have a fixed setup of 19 poles with 100 cameras on them.

I know the exact distance between all my cameras and I get easily get the location from each camera after camera calibration.

Can I use the scalebar to set the real distance between 2 cameras to calibrate the entire environment? The documentation is a bit thin on the scalebar functionality :-(

Hope someone can help.
Richard

James

  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Using scalebar based on known camera distance
« Reply #1 on: December 02, 2014, 12:38:39 PM »
In the reference pane, you can select two cameras, right click and 'create scale bar'!

In pre-release build 1985 anyway...

Sorry just noticed this is a python question... i learned something new anyway!

James

  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Using scalebar based on known camera distance
« Reply #2 on: December 02, 2014, 01:09:57 PM »
This works for me, although i still have to click the update button in the GUI to see the effect. chunk.updateTransform, or app.update don't seem to do it.

Code: [Select]
import PhotoScan
chunk = PhotoScan.app.document.chunk
sb = chunk.addScalebar(chunk.cameras[1],chunk.cameras[3])
sb.reference.distance = 10

3dmij

  • Newbie
  • *
  • Posts: 30
  • I make raspberry pi 3d Scanners
    • View Profile
    • pi3dscan
Re: Using scalebar based on known camera distance
« Reply #3 on: December 02, 2014, 11:03:19 PM »
Thanks james! that seems to work :-)

I guess the update from python is still a bug for the 1.1 release.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13913
    • View Profile
Re: Using scalebar based on known camera distance
« Reply #4 on: December 03, 2014, 07:32:23 PM »
Hi,

PhotoScan.app.update() update the GUI information and doesn't apply reference pane changes. To do that you need to use chunk.updateTransform() method.
Best regards,
Alexey Pasumansky,
Agisoft LLC