Forum

Author Topic: Exporting Undistorted Cameras  (Read 11330 times)

Aleksei

  • Newbie
  • *
  • Posts: 9
    • View Profile
Exporting Undistorted Cameras
« on: December 06, 2014, 03:14:55 AM »
[coderemoved]

Hello, all. I found this script in an old thread on the forums and have been trying to edit it to make it work. When I try using it, my Photoscan client lags for a few minutes, prints that it's done, and exports the UNDISTORTED photos.

When I try and export undistorted cameras through the GUI, the console reports that it is unable to open the photos:
Code: [Select]
Undistorting photos...
Can't open image: [image path removed]
...
Finished processing in 0.002 sec (exit code 1)

Does anyone have a solution? Thanks! Programmatic method preferred, but at this point all information is appreciated.
« Last Edit: December 20, 2014, 03:51:11 AM by Aleksei »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15321
    • View Profile
Re: Exporting Undistorted Cameras
« Reply #1 on: December 08, 2014, 01:13:19 PM »
Hello Aleksei,

So do I understand correctly that image undistort works correctly using Python scripting but fails for GUI option for the same project?

If so, then could you please provide the project file and a couple of images from the set?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Aleksei

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Exporting Undistorted Cameras
« Reply #2 on: December 09, 2014, 08:31:45 AM »
Hello, sorry for unclear thread. My problems are two:

1) My script does not export the undistorted photos. But PhotoScan is doing the undistort, because the model that you make with the improved cameras does not have severe distortion any more.

2) When undistorting through the GUI, PhotoScan is unable to read the images.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15321
    • View Profile
Re: Exporting Undistorted Cameras
« Reply #3 on: December 09, 2014, 12:12:53 PM »
Hello Aleksei,

1) Is it possible that export paths are incorrect?
I suggest to change counter = uimage.save(export_path + label) to
counter = uimage.save(export_path + "\\" + label)

2) Could you please post the screenshot of Undistort dialog and specify if double clicking on any image opens it correctly in Photos pane?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Aleksei

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Exporting Undistorted Cameras
« Reply #4 on: December 12, 2014, 10:21:55 AM »
1) It is not a path export problem. I'm aware that it right now it's exporting the photos to the original directory of the photos with a suffix tacked on in an awkward way. However, PhotoScan is either not undistorting the images, or is exporting the wrong (original) images.

2)
« Last Edit: December 12, 2014, 10:26:07 AM by Aleksei »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15321
    • View Profile
Re: Exporting Undistorted Cameras
« Reply #5 on: December 12, 2014, 12:27:36 PM »
Hello Aleksei,

And have you checked if the original images can be opened directly in Photos pane of PhotoScan window?

Maybe you can send the project file with a couple of source images to support@agisoft.com for our internal tests.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Aleksei

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Exporting Undistorted Cameras
« Reply #6 on: December 12, 2014, 09:34:42 PM »
The images can be viewed directly in the PhotoScan window.

I will reprocess the images into a new sparse cloud and sent the project file and source images. Thank you for your help.

BaptM

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Exporting Undistorted Cameras
« Reply #7 on: October 22, 2015, 05:28:26 PM »
Hi Aleksei,

Did you manage to solve your problem? I'm stuck in a similar situation... My exported "undistorts" are exactly the same photos as the imported ones.
Also, I'm only using the GUI, couldn't find the script you mentioned in your post.
Any help would be appreciated!  :)
Cheers