Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mcstieg

Pages: [1] 2 3 ... 6
1
Python and Java API / Pyarmor - script obfuscation
« on: April 27, 2024, 02:51:16 PM »
Hello everybody,

i was loading obfuscated scripts into metashape for years until the obf.-software "pyarmor" did an update.
Now, when loading the script, Metashape console says:

Traceback (most recent call last):
2024-04-27 13:44:52   File "C:/Users/XXXXX/AppData/Local/Agisoft/Metashape Pro/scripts/XXXXX.py", line 3, in <module>
2024-04-27 13:44:52     from pyarmor_runtime_00XXXX import __pyarmor__
2024-04-27 13:44:52   File "C:\Users\XXXXX\AppData\Local\Agisoft\Metashape Pro\scripts\pyarmor_runtime_00XXXX\__init__.py", line 2, in <module>
2024-04-27 13:44:52     from .pyarmor_runtime import __pyarmor__
2024-04-27 13:44:52 ImportError: DLL load failed while importing pyarmor_runtime: Das angegebene Modul wurde nicht gefunden. (module not found)


What is the correct version of python in Metashape? 3.8? 3.8.10? ...

Please help  :)

2
Python and Java API / Manipulate photo exif data with python
« on: March 06, 2024, 03:21:36 PM »
Hello Alexey and everybody else,

I'd like to manipulate exif data of my photo set. Is this possible via python script?

I'm able to read data in a for loop. But how can I wrtie new data to the .jpg file?

If I do it like this, the data is overwritten in Metashape. But the original file doesn't change...
Code: [Select]
cameras[0].photo.meta["Exif/Make"]="test"

3
General / Re: FOV in model view & distance to object
« on: August 24, 2023, 10:20:56 PM »
Hopefully he will respond. 😊

4
General / FOV in model view & distance to object
« on: August 23, 2023, 10:24:05 AM »
Hello Alexey!

Hope you're doing well!

Would you please explain how  the perspective "FOV" in the model view is calculated?
I'm trying to suggest the distance from a scanned object in a photograph...

For example:
  • if you have a face scan...
  • FOV 70: you can see the ears from the front
  • FOV 30 to 0 : you can't see them

It's the same then stepping back and forth - changing the distance to the object. Hopefully you can help me out!

THANK YOU VERY MUCH!

 

5
Hello Alexey,

hopefully it will be a good new year for you!

Can you please tell me the currently best way to fully clear an alignment when duplicating a chunk? Still having problems some times when doing this.
Is it necessary to remove tiepoints, keypoints... or should "tranform=none" do the job?

Thank you very much!

6
Feature Requests / Re: Edit size of 'Show Cameras' rectangles
« on: May 16, 2022, 10:43:24 PM »
Hello Alexey!

Is there anything new to say to my question?
Thank you!

Hello everybody!

Is there a way to set/change the default size of the camera rectangle?
In my case they are always too big.

It would be best to have
  • an option in GUI
  • or tweak
  • or python function
...maybe in the next version?  ;)

By the way ... is there a python code to disable "show cameras"?

Thank you!  :)

7
Feature Requests / Re: Edit size of 'Show Cameras' rectangles
« on: December 03, 2021, 10:36:52 AM »
Hello everybody!

Is there a way to set/change the default size of the camera rectangle?
In my case they are always too big.

It would be best to have
  • an option in GUI
  • or tweak
  • or python function
...maybe in the next version?  ;)

By the way ... is there a python code to disable "show cameras"?

Thank you!  :)   

8
Hello Alexey,

for a code that
  • duplicates a chunk for
  • testing several match and
  • alignment parameters
I need your help.

I'm duplicating a chunk to use my photos and masks again in some other chunks to test different parameters. But  I recognized, that the alignment results of my code are worse than using the same parameters in a new chunk (or via GUI), where I load the photos and masks manually.
So what am I doing wrong?

To make it short:   
Code: [Select]
chunk = chunk.copy(keypoints=False)
for camera in chunk.cameras:
                camera.transform = None
chunk.point_cloud.removeKeypoints()
chunk.point_cloud = None
chunk.remove(chunk.markers)
Then I match and align photos (reset matches = True).


Thank you!!!  :)
 

9
Python and Java API / Re: Metashape.Viepoint not writeable
« on: October 04, 2021, 07:14:20 AM »
Dear Alexey,

can you please give me an advice how to solve the task?
How can I "zoom" automatically, so that all the mesh faces are shown?

Thank you!

10
Python and Java API / Re: Show a picture in PySide2 Qt Gui
« on: August 26, 2021, 08:05:08 AM »
Found the mistake ... path had \ instead of /.
Thanks!

11
Python and Java API / Show a picture in PySide2 Qt Gui
« on: August 26, 2021, 07:36:16 AM »
Hello everybody,

can someone please tell me how to show a small picture in a GUI?
I made some GUIs with PySide2 but I don't know how to load a fixed picture to them.

It must have to do with QPixmap ?!

Code: [Select]
from PySide2 import QtCore, QtGui, QtWidgets

class ref_korr_gui(QtWidgets.QDialog):

    def __init__ (self, parent):
        QtWidgets.QDialog.__init__(self, parent)
        doc = Metashape.app.document
        chunk = doc.chunk   
        self.setWindowTitle("Ref.-Korr.")
               
        image_path = "D:\Dropbox\Showreel\16 Markerplatten\Zusatzsoftware\Korrektur.jpg"

        picture = QtGui.QPixmap(image_path)
        self.label = QtWidgets.QLabel()
        self.label.setPixmap(picture)
        self.label.setGeometry(QtCore.QRect(10, 40, picture.width(), picture.height()))
        ...
        layout = QtWidgets.QGridLayout()
        layout.addWidget(self.label,           11,1)
        self.setLayout(layout)
        self.exec()

If I print(picture.width()) it is "0" ... But why?

12
Python and Java API / Re: Metashape.Viepoint not writeable
« on: August 26, 2021, 07:32:22 AM »
up  :)

13
Python and Java API / Re: Metashape.Viepoint not writeable
« on: August 17, 2021, 10:03:16 PM »
Yes, that's what I try.
I hope to find a way to find a perfect fit for the pane automatically.

14
Python and Java API / Re: Metashape.Viepoint not writeable
« on: August 17, 2021, 05:04:54 PM »
Thank you very much! Works perfectly for me!  ;D

The last challenge is to "zoom" in/out so that the model fits the size of the model pane ("mouse wheel function") (fov=0)

Do you have any idea how solve this?   
I'm searching for a way to find out it a point on my mesh is visible in the model pane or not.

Thanks again

15
Python and Java API / Re: Update view and bounding box for each chunk
« on: July 25, 2021, 03:40:35 PM »
Is it possible to change the viewpoints center?

Pages: [1] 2 3 ... 6