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.


Topics - wyowill

Pages: [1]
1
General / psx won't open following crash (missing xml file)
« on: January 02, 2020, 08:07:38 PM »
Hello,

The psx file I was working on when MetaShape (v.1.5.3) crashed won't open.  The message I receive:

       ! Can't open archive: mypath/filename.files/0/0/frame.zip

I can confirm that 'frame.zip' is present in the specified location, but has no content. By contrast, companion folders seeming to belong to other chunks (e.g. filename.files/1/0/frames.zip) all contain doc.xml files which contain photo information.

MetaShape will open and I can run other psx files I used yesterday, just not the one that was open at time of crash.

At the time of the crash I was getting weird (Windows) memory errors I've never seen previously and had already restarted MetaShape once.  The timing of the errors was particularly strange because I was only georeferencing photos at the time.  My PC has 32GB of RAM and I regularly run alignments on "highest" and even dense clouds on "high" (albeit slowly) without incident.

Any suggestions greatly appreciated.

Cheers,
Will

#####  UPDATE #####

the 'doc.xml' file in filename.files\0\chunk.zip  contains some common information with the missing xml file.  It's formatted differently, but I've at least been able to recover image names and enabled status (which saves me from revisiting 5-6 hours of manual image review & selection).

##### UPDATE 2 #####

I created a new psx file and read images from the extracted list to ~replicate the corrupt chunk. I created the same number of chunks (albeit empty) as the original psx file. Then copied the "1", "2", and "3" folders from the parent directory (filename.files) associated with the original psx file into filename.files associated with the new psx file.  I lost the alignment from the main chunk, but was able to recover everything else.

2
General / move disabled cameras with Python? (not remove)
« on: December 19, 2019, 02:39:53 AM »
Is there a way to (non-manually) either:

1) select disabled cameras, or
2) select disabled cameras and move to another chunk

#2 isn't a big deal as it's just a few mouse clicks to move cameras once selected.

This post comes close to what I'm looking for:
https://www.agisoft.com/forum/index.php?topic=10829.msg48926#msg48926

But I don't want to remove from the psx file entirely.  My searches of the Python Reference Manual (for v1.5.0) didn't find select or move functionality.

Cheers,
W

3
General / export list of complete camera paths to csv?
« on: December 17, 2019, 08:30:52 AM »
I'm looking to generate a csv file of camera paths and enabled/disabled status.  I've sorted the following and have it running from the console...


Code: [Select]
import Metashape as ms
import csv

def get_camera_names(chunk):

    camera_lst = []
    enabled_lst = []
    for c in chunk.cameras[:10]:
        p = c.photo.meta["path"]
        if c.enabled == True:
            en = "True"
        else:
            en = "False"
        camera_lst.append(p)
        enabled_lst.append(en)
                       
    return (camera_lst, enabled_lst)

doc = ms.app.document
print(doc)
chunk = doc.chunk
print(chunk)

print(get_camera_names(chunk))

out_file = "J:\\MyDrive\\MyCode\\TestFile.txt"
with open(out_file, 'w', newline='') as myfile:
     wr = csv.writer(myfile, quoting=csv.QUOTE_ALL)
     wr.writerow(get_camera_names(chunk))

However, variable 'p' returns a bunch of unwanted characters in the string without the full path or extension.  For example:

    ...,<Camera 'DJI_0735_Mission4X_nadir'>,<Camera 'DJI_0736_Mission4X_nadir'>,...

Unless the above is needed for subsequent import into a different .psx file, I'd like:

   ...,'C:/MyDrive/DJI_0735_Mission4X_nadir.jpg','C:/MyDrive/DJI_0736_Mission4X_nadir.jpg',...

Cheers
W

[my ultimate aim is to add the identical suite of cameras and their enabled/disabled status into a completely different psx file]

4
General / updating GCP/marker coordinates?
« on: December 17, 2019, 04:22:09 AM »
What's the best way to update coordinate values for markers/referencing?

Initially, I processed a ground-controlled model all the way through to orthomosaic using what turned-out to be preliminary coordinate values.

Subsequently, I was able to recover GCP data I'd thought was lost to a device failure and able to generate more precise coordinate values.

Using the same source images, I'd like to generate a model with updated coordinates but am not keen to re-digitise marker projections (N > 40 markers each with > 10 projections) nor individually copy/paste XYZ values. 

I'd appreciate any recommendations for:

1) updating in bulk (e.g. importing new values to existing markers), and/or
2) need to reset camera alignments[/li][/list]

Cheers

5
General / marker symbology in "model" pane
« on: December 09, 2019, 08:43:00 PM »
Is there a setting to have different symbologies for markers that "checked" vs "unchecked" in the rEference pane?

I'd like an at-a-glance view in the model pane of the distribution of my control vs check points.

Cheers

6
Bug Reports / navigation & selection keyboard shortcuts not working
« on: June 27, 2019, 11:44:42 PM »
v, m, l are not toggling their various functions as they did in PhotoScan.

behaviour observed in:
v1.5.2
v1.5.3

running Windows 7 64-bit

Cheers,
Will

7
Hello,

When resetting camera alignment on a selection of photos, the pop-up window (that asks for confirmation) frequently indicates a greater number of photos to be reset.

For example, I select 6 photos (e.g. by shift-click) > right-click > reset camera alignment > the pop-up window asks: "Reset alignment for 18 cameras"

If I click "Yes", does it really reset the alignment of the 6 photos I want + 12 other unknown photos or is there a bug in the counter?


A bit of background on the problem:

I'm using Metashape 1.5.2 in Windows 10 64-bit

When cleaning sparse point cloud, I:
- select bad points in model view based on visual inspection
- right-click selected points > Filter Photos by Tie Points
- the number of Photos appear appearing in the "Photos" pane is refined to X
- I select the photos (e.g. via shift-click)
- right-click "Reset Camera Alignment"
- pop-up windows asks if I want to reset alignment for Y cameras
    - sometimes Y = X
    - sometimes Y is >> X
    - Y is never < X\
    - the value of Y seems to increase if I do a series of these select-reset operations

Cheers,
Will



8
General / importing camera referencing (marker projections?)
« on: May 17, 2019, 10:19:38 PM »
Is there a way to import camera referencing / projection info with markers?

I have two psx files with the same images.

File1 (exporting markers) and File2 (receiving markers) have the same coordinate system (= geodetic referencing of both files is the same).

File1 and File2 contain exactly the same images with names unchanged.  Image dimensions are identical in both files (= marker placement on an image of a given name has identical coordinates in both files).

It seems this should be straightforward, but I haven't been able to sort it out via the GUI/menu structure.  Can it be done via scripting?

Cheers,
Will

9
General / Select all cameras that have masks?
« on: May 07, 2018, 07:05:56 AM »
Is there a tool that would produce a multiselect or list of all cameras within a chunk that have an associated mask?

If not, any hints on how to script (assuming it's possible)?

Cheers,
Will

10
For all chunks in a workspace, I'm looking to:

- estimate image quality for all cameras
- disable cameras with a value < 0.7
- perform a medium alignment

Does anyone have any code to share? I can edit code reasonably well, but still something of a novice when it comes to writing from scratch. 

Any help is greatly appreciated.

Cheers!
Will

11
Feature Requests / masks - copy/paste & interactive drag/nudge
« on: October 02, 2017, 12:13:16 AM »
Hello,

It would be exceedingly helpful to be able to copy mask polygon(s) from one image and paste into others. 

It would also be nice to be able to select (including multi-select) and nudge masks with the arrow keys.

My primary application is for dealing with raindrops and sunspots, which are typically the same size and shape but not typically in the exact same location (image coordinates) from one image to the next (thus, not a good candidate for automation).

Cheers,
Will

12
The following hotkeys would be greatly appreciated:

- fit to frame (i.e. zoom to all)
- zoom to previous
- 1:1

I am working my way through a about 17,000 images with a fair bit of masking and over 1,000 photos with ground control points. Having the above shortcuts would easily speed things up by 15-20%...even more over a (slow) VPN.

Cheers,

Will

P.S. Would like to see these shortcuts for both photo and model panes.

Pages: [1]