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 - Wizyza

Pages: [1] 2
1
Hi Alexey,

Do I need Metashape.app.quit() at the end of my script? I need it to stop the process, correct?

The message when I open the project in the GUI is just a minor nuisance, but I wish I knew why it was happening.

I assume that a workaround if I wanted to re-open the project via CLI is that I could pass the argument telling Metashape to ignore the lock status when opening the project.

Thank you again for your help.

2
Hi Alexey,

In order to get the error, I have to pass the coordinates of the point and the pixel coordinates of the point, correct?

I'm guessing from code you provided that the code will provide me with the pixel coordinates of the point? Do I need all three of the values in the vector returned, or just the first two?

How do I go about getting the coordinates of the point?

Thank you again for your help.

3
Hi Alexey,

What I would like to do is reduce the mean projection error associated with each marker. To do this, I would start with a target threshold value, say 0.3 px or 0.4 px. If the mean error for a given marker is over that threshold, remove the projection for that marker with the highest error value. If the mean error for the marker remains above the target value, once again, from the remaining projections, remove the projection with the highest error. Continue this process until the mean error for the marker is at or below the target value.

I would then repeat this process for each marker.

I usually do this manually through the GUI, but would like to automate this through scripting.

Thank you again for your help.

4
Python and Java API / Re: Access script path from inside GUI?
« on: April 11, 2024, 05:24:27 PM »
Hi everyone,

You can disregard this post. This turns out to not be a Metashape issue.

I wasn't aware of using the __file__ variable in Python. My script can now access files outside of itself.

5
Python and Java API / Adjusting marker projection errors via Python
« on: April 11, 2024, 12:02:26 AM »
Hi everyone,

After detecting markers, I like to go through the markers and remove the more erroneous projections, trying to reach an average error of 0.3 to 0.4 pix per marker. Up to now though, I've only been able to make these adjustments using the GUI.

Is it possible to make these adjustments through the Python API?

Thanks!

6
Python and Java API / Access script path from inside GUI?
« on: April 10, 2024, 11:51:37 PM »
Hi everyone,

If you are running a script from inside the GUI (using Tools > Run script, or Ctrl + R), is it possible to access the path to the script you are using?

I have another file I want to access that is in the same folder as the script.

Thanks!


7
Hi Alexey,

I also want to add that when I run my script from within the GUI and Metashape.app.quit() executes from within the GUI, terminating the application, when I reload the project, I do not get the message.

This seems to only happen when Metashape.app.quit() is executed through the CLI.

8
Feature Requests / Re: AprilTag
« on: April 10, 2024, 07:07:34 PM »
I know I'm resurrecting a old thread.

But, l also would like to see AprilTag support implemented in Metashape.

9
Hi Alexey,

Sorry, I didn't realize you responded.

Just in case I wasn't clear in my initial post, I wrote a script to handle my processing from the CLI. If I then open the project file in the GUI, I get the read-only mode message box. It seems that using Metashape.app.quit() at the end of my script does not properly close the project.

Closing the project through the GUI, by clicking on the 'X', does not produce this issue.

I am currently running version 2.1.1.17821 on Windows 11 23H2.

10
Hello,

Is it possible to prevent a read-only lock on a project when closing Metashape using Metashape.app.quit()? I always receive a pop-up when opening a project using the GUI following processing using a script.

Thanks!

11
Python and Java API / Selectively export textures?
« on: February 21, 2024, 10:33:44 PM »
Hello,

Assuming that I create all of the texture types for my model, is it possible to only have a subset of those textures included when exporting my model?

Thanks!

12
Bug Reports / Error during mesh edit following save after mesh edit
« on: January 22, 2024, 10:11:17 PM »
Hello,

When I'm editing a mesh, such as selecting and deleting faces or closing holes, I save my changes before continuing with further editing. However, following saving, when I attempt to perform additional editing, the mesh disappears from view and the following errors appear in the console:

Error: Bad local file header signature
Error: Can't unpack file

I'm currently running version 2.1.0 build 17532 on Windows 11 22H2.

Fortunately, I'm able to close out of Metashape, discarding the last changes, and I'm able to reopen and continue from before the errors occurred.

Thanks for the help.

13
General / Re: OSError: file used by another process
« on: January 22, 2024, 09:40:37 PM »
Thank you, Alexey.

My images are stored on a network drive,but my project files are stored locally. Would the remote storage of the images be the source of the problem?

Thanks again.

14
General / OSError: file used by another process
« on: January 08, 2024, 07:34:12 PM »
Hello everyone,

I've been running into an issue while running my automated workflow. Occasionally, processing will halt and the following error will show up in the console:

OSError: Can't replace file or directory: The process cannot access the file because it is being used by another process (32): PathToProject/ProjectName.files/99/0/depth_maps/data_unfiltered1.zip

I'm running Windows 11 22H2. I think I started having this issue with Metashape v.2.0.4. Has anyone else run into this problem? I've been using the same computer for some time with the same script and no other applications are running on the computer during processing. Metashape and the project files are local.

Thanks!

15
Python and Java API / Recording logs and console output using Python
« on: October 23, 2023, 07:54:50 PM »
Hello,

I'm running into some unwanted behavior when saving log/console output when running a script from within the GUI.

I have my script set up to enable logging at the start of the script. I then disable logging in the last line of my script so Metashape does not write to the previous log file the next time the application starts up. However, doing this seemingly prevents the last few lines of the console output from being recorded.

I figured a way around this would be to save the entire console text (Metashape.app.console_pane_contents) after the rest of the script has executed. However, I can't figure out how to do this through Python scripting. I want to save the output as a TXT file.

Thanks!

Pages: [1] 2