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

Pages: [1]
1
Python and Java API / pairs in Metashape.Tasks.MatchPhotos doesn't work
« on: December 04, 2024, 06:44:16 PM »
Hi
I am trying to use custom pairs for imagr matching, and use the latest 2.1.3 version.
It works if simply run script with the following code,

 
Code: [Select]


doc = Metashape.app.document
chunk = doc.chunk
cameras = [camera for camera in chunk.cameras if camera.reference.location is not None]
pairs = []
for i, cam1 in enumerate(cameras):
        for j, cam2 in enumerate(cameras):
            if i >= j:
                continue
           
                pairs.append((cam1, cam2))


chunk.matchPhotos(pairs=pairs, keypoint_limit=3000, tiepoint_limit=3000, generic_preselection=False, reference_preselection=False)




However, when I try to utilize network processing, it only works if pairs is not assigned.
Paris are as same as locol processing.
I do monitor the processing output, and found that only keypoints of first photo are detected.

can you help to debug it ? 

2024-12-04 23:34:04 Using device: NVIDIA GeForce RTX 4070 Ti SUPER, 66 compute units, free memory: 15079/16375 MB, compute capability 8.9
2024-12-04 23:34:04   driver/runtime CUDA: 12050/10010
2024-12-04 23:34:04   max work group size 1024
2024-12-04 23:34:04   max work item sizes [1024, 1024, 64]
2024-12-04 23:34:04 [GPU] photo 0: 3000 points
2024-12-04 23:34:04 points detected in 0.532 sec
2024-12-04 23:34:04 processing finished in 0.682 sec


Code: [Select]
pairs = custom_pairs(chunk) 
         
match_photos_task = Metashape.Tasks.MatchPhotos()
match_photos_task.keypoint_limit = 3000
match_photos_task.tiepoint_limit = 3000
match_photos_task.downscale = 1
match_photos_task.generic_preselection = False
match_photos_task.reference_preselection = False
match_photos_task.pairs = pairs
match_photos_task.filter_mask = True
match_photos_task.mask_tiepoints = False
match_photos_task.filter_stationary_points = False
match_photos_task.guided_matching = False
match_photos_task.reset_matches = True

         
network_task = match_photos_task.toNetworkTask(chunk)
           
tasks.append(network_task)

project_path = doc.path 
batch_id = network_client.createBatch(project_path, tasks)
   

network_client.setBatchPaused(batch_id, False)


2
Python and Java API / Split filegroups
« on: January 07, 2023, 11:38:51 AM »
Hi

Since my camera rig is not very stable, I have to consider each group of images are different in order to obtain more accurate results. I am wondering is there anyway that I can split filegroups when importing photos from python, otherwise I have to do it in the GUI. 

Thanks.

3
General / Setting capture distance doesn't find the matched image pairs
« on: January 03, 2023, 10:28:28 AM »
Hi

I have images that have inital pitch angle between 20-25 degrees, where roll angle is approximate 0 and yaw amgle is obtained from GPS info.

During image matching stage, I can find correct image pairs if  reference preselection is unchceked. I understand this setting will seek matches between all possible image pairs, but really time consuming.

However, when I used source in reference preselection, while rotation angles and capture distance are also given, it cannot find matches on above sucessful matched pairs.

Attatched show the significant differences, I am wondering are there something wrong in my setting. Otherwise, I have to manually add markers to correct the misalignment.

Thanks


4
Hi

I am using a rolling shutter camera and check the compensation to increase the alignment accuracy

However, I find that the compensation in ver 1.8 does not corret all rolling shutter parameters and results in image measurement errors of markers, while 1.6 does.

Are there bugs in 1.8 ?

Please see attchement for details.

5
Hi

I am working on a project for pavement inspection, where two six-lens 360 spherical camera is mounted on a car for street view image collection. I use original unstitched images obtained from each lens, and import them as a multicamera system (the rig are calibrated in advance) for photo alignamet and pavement dense cloud generation.

Each project contains 10000 groups of images (total of 80000 images), and each group is equaly extracted in 1 m distance. It takes several hours for alignment, but I have encountered a problem in the processing of depth maps generation.

I understand that depth map generation is to use selected neighbor points (default is 100, and I modifed it to -1) that obtained from valid matches in overlapped area. 

However, since this is a close-range enviorment project, what I am interest is the pavement area and the overlap images are limit, i.e. neghbioring 5 groups, there is no necessary to process depth maps that from two groups of images at distance longer than 5 meters, even they are overlapped and have valid matches on buildings.

Therefore, I am wondering is there a way that I can select a group of images for depth map generation instead of using matches, as seaking all possible image pairs for depth generation is really time consuming. Though adjusting the tweaks may help, but is still not a good solution as the vaild matchs are also varied scene by scene, it is hard to chose a proper value.

The 100 default value is very quik, but resulting in missing points in the pavement and the confidence is too low, whiel -1 value gets complete and more confident dense points on pavement but the processing time is at least 10 times longer. 

As my project scene is stable, hope there is a option for me to process depth map in only a certain distance range.

Attatched are some of my results.


Pages: [1]