Forum

Author Topic: replace photo  (Read 5484 times)

viper_0711

  • Newbie
  • *
  • Posts: 23
    • View Profile
replace photo
« on: April 29, 2015, 10:14:47 PM »
hi

im scanning human
i have been trying and searching but i can't seem to find the right python to do the "replace path" GUI function that i needed to replace photos with projection to photos with clean texture

code:

for i in range (len(chunk.cameras)):
      camera = chunk.cameras
      camera.photo.open( camera.photo.path.replace( chunkNum_proj, chunkNum_calTex) )

chunkNum_proj and chunkNum_calTex is before/after folder names

the above code runs but then the texture is black and when i double click on any of the photos to check if it's replaced, it pops up a dialog "can't load image:" { path of new image}   (but the path is correct)


any advice/ sample code appreciated!
« Last Edit: April 29, 2015, 10:34:21 PM by viper_0711 »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15469
    • View Profile
Re: replace photo
« Reply #1 on: April 29, 2015, 11:00:50 PM »
Hello viper_0711,

And have you tried just changing camera.photo.path string?
Best regards,
Alexey Pasumansky,
Agisoft LLC