Forum

Author Topic: Fisheye sensor - setting type  (Read 4716 times)

osima

  • Newbie
  • *
  • Posts: 16
    • View Profile
Fisheye sensor - setting type
« on: January 29, 2015, 05:01:18 PM »
Hi All,

I need to write a simple script to automate data processing: image alignment, dense points cloud creation, meshing, etc. The one shown in page 5 of the Python API Reference works well for a frame camera, what about a fisheye sensor?
Anyone knows how to set the sensor to Fisheye?

best regards,

Ola

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Fisheye sensor - setting type
« Reply #1 on: January 29, 2015, 05:21:32 PM »
Hello Ola,

You need to switch type of all sensors in chunk related to the Fisheye images from Frame to Fisheye:
Code: [Select]
sensor.type = PhotoScan.Sensor.Type.Fisheye
Best regards,
Alexey Pasumansky,
Agisoft LLC

mcstieg

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: Fisheye sensor - setting type
« Reply #2 on: December 20, 2017, 06:50:55 PM »
Hello Alexey!

Sorry, but I don't understand how to fix this problem eventhough you wrote
Code: [Select]
"sensor.type = PhotoScan.Sensor.Type.Fisheye"If I add this code in my skript I get:
Code: [Select]
[i] ...line 9, in <module>
2017-12-20 16:44:07     sensor.type = PhotoScan.Sensor.Type.Fisheye
2017-12-20 16:44:07 NameError: name 'sensor' is not defined[/i]

Can you give me a full example code for changing the sensor type to fisheye (if the camera name is GoPro)?
Thank you!!!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Fisheye sensor - setting type
« Reply #3 on: December 20, 2017, 07:36:44 PM »
Hello mcstieg,

Assuming that you have only fisheye images in the project:

Code: [Select]
import PhotoScan
chunk = PhotoScan.app.document.chunk
for sensor in chunk.sensors:
    sensor.type = PhotoScan.Sensor.Type.Fisheye
Best regards,
Alexey Pasumansky,
Agisoft LLC

geodet1994

  • Newbie
  • *
  • Posts: 4
    • View Profile
Fisheye sensor - setting type
« Reply #4 on: September 25, 2021, 09:19:00 PM »
Hello,
I need one help. I am attaching a script in the attachment that works on the photo frame. I would like the script to work on fisheye photos.
Thanks for the help

geodet1994

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Fisheye sensor - setting type
« Reply #5 on: September 25, 2021, 09:41:40 PM »
Hello,

i have the same problem. I would like to enable a fisheye lens in the attached script.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Fisheye sensor - setting type
« Reply #6 on: September 27, 2021, 04:23:19 PM »
Hello geodet1994,

If you need to set all sensors (calibration groups) to Fisheye, then you should replace line 73 from the provided script by the following lines:
Code: [Select]
for sensor in chunk.sensors:
    sensor.type = Metashape.Sensor.Type.Fisheye

As a side comment, if you are using guided image matching mode, then you should use keypoint_limit_per_mpx argument in matchPhotos line instead of keypoint_limit, as the latter one will not be applied in this mode.
Best regards,
Alexey Pasumansky,
Agisoft LLC

geomasa

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Fisheye sensor - setting type
« Reply #7 on: September 28, 2021, 12:27:38 AM »
Hello,

thank you very much for your help and response.