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

Pages: [1] 2
1
I am looking at a RGBD image mosaic and when only RGB image is passed for mosaic the dense point cloud visually looked correct but the scale of an object is not correct. Is there a way to use the depth image to properly scale the point cloud?

Thanks

2
Hey I have a issue. I am collected couple of 360 geo tag image from iPhone and the mosaic result is sometime coming inverted. But something its coming upright.  not sure  what is causing those.

Thanks

Ppant

3
Python and Java API / How to get optimized camera position
« on: September 16, 2022, 03:50:54 PM »
Hello
When we add geo tag image in the metashape and run Align Photos process Camera position is optimized.  If possible How to get the optimized camera position after alignment?

That will be helpful. I would like to compare the geolocation before and after optimization. 

Thanks

ppant


4
Python and Java API / iPhone 13 pro RGB and depth image processing
« on: August 30, 2022, 12:34:35 AM »
Could anyone shade a light on this topic,
I have seen that in the latest release there is the possibility to load the depth image.   
Code: [Select]
Metashape.app.document.chunk.importLaserScans(filenames = ["/path/to/depth/image-1"], color_filenames = ["/path/to/corresponding/color/image-1"], image_path = "/path/to/destination/folder/{filename}.tif"); 

Now I have a question, the new iPhone 13 pro saves RGB images and depth map files from its lidar sensor. My RGB images are geo tag . When I load the images using the above line of code. I observed in the destination folder file is created but all the geotag and roll yaw pitch orientation in the image is lost. Furthermore, iPhone RGB and depth image resolution are different. How it's going to work.    Furthermore when I tried to export the mosaic dense pointcloud. there is no ability to export the geo rectified pointcloud.

Am I missing something? In this process or it is just an experimental feature.   

Thanks

5
Python and Java API / Metashape cesium viewer float in the air
« on: August 11, 2022, 12:15:16 AM »
I generate the Dense point cloud and export it in the correct projection. Then generated the 3D tiles using entwine. Now my point cloud are hanging in the air. Around 30-40 m above. not even close to the ground. Where is the problem not sure how to correct those Z offsets.

6
Hi,
I am doing some test. I add the geotag info in an image using exiftool. But when I load those image in the metashape and check exif 
Code: [Select]
[code]chunk.cameras[0].photo.meta['Exif/GPSLongitude'][/code] I am getting string return like ''81,0.10788288W' this. But with I tried some other image I am getting  return link ''-80.9804473374' . Not sure was it trigger by exif update I did. But When I load the same exif update image in gui. and look at the reference  the tag is readie[/font][/size]d like ''-80.9804473374' . Not sure where is the source of error or further forming in need. [/font][/size]

7
I processed the data in metasape and save the point cloud in the correct UTM zone. Then use entwine to generate the 3D tiles. When loaded in the viewer point cloud are floating in the air. Not sure how to add the high offset inside metashape.  When I read more it looks like what metashape is doing, z is just the altitude geotag not further correction applied when I export data to correct UTM zone. Is there a way to correct those and bring data to the ground? Via a script

Thanks 


8
Python and Java API / Rgb depth data procesing
« on: April 05, 2022, 06:19:47 PM »

Hey I have a question. I am trying to process the image collected with Iphone with depth data.  Based on the information provided in this link https://agisoft.freshdesk.com/support/solutions/articles/31000162212-smart-cameras-with-depth-sensor-data-processing I load the depth image and color image into the project. The processed image generated after loading the color image and depth image using this methods
Code: [Select]
Metashape.app.document.chunk.importLaserScans. I am not seeing any change in image just observed the color image geo tag is lost in process image . I thought thats ok then I continue the normal work flow to align image, generate dense point cloud. My result are bad, Not sure what I am missing.  The result are bad such that with out using depth info point cloud are coming good ehough.

P

9
Trying to export the vegetation index band
from python script and ran into this issue  RuntimeError: Unsupported format: .tif

Code: [Select]

vegetation_image = 'D:/orthomosaic_rdvi.tif'
chunk.raster_transform.formula = ["(B10-B6)/sqrt(B10+B6)"]
chunk.raster_transform.calibrateRange()
chunk.raster_transform.enabled = True
chunk.exportRaster(vegetation_image, image_format= Metashape.ImageFormatTIFF, raster_transform=Metashape.RasterTransformValue,
                                save_alpha=False)


Thanks

10
Python and Java API / Coded Marker and local coordinate
« on: December 10, 2020, 10:03:53 PM »
I am mosaicing a 360 image of an object . I place a 12bit  coded marker on the ground.  I wrote a python script routine to load images, detect makers add scalebar, align image, and generate a point cloud model.  That works fine. Now I have a question I want to set the coded marker 'target_1', as my (0,0,0) coordinate. If possible How I can adjust the coordinate system.  Such that target 1 will be my 0,0,0  coodiante point in a point cloud.

11
Bug Reports / In consistence image mosaic for 360 pictures
« on: October 30, 2020, 08:03:33 PM »
Hello I am try to mosaic the 360 image and get the dense point cloud.  For that I am taking a video going around the plant and get a frame out of that. In my background enclosed wall I have add a 12 bit coded targets  and checker pattern. With the help of 12 bit coded target I also wan to add the scale in point cloud. My results are different when I follow these two different steps in the process.

First process
1.   Load video frame
2.   Detect marker (and add scale bar)
3.   Align image
4.   Generate point cloud and export.
In this case, In the point cloud result I am seeing an artifact but I can measured the distance between coded marke  and its correct. See the attached image with image with artifact at

Second Process
1.   Load video frame
2.   Align image
3.   Detect marker (and add scale bar)
4.   Generate point cloud and export.
The image are align correctly (see attached good image) no artifact at the trunk area. But the scale bar is not set correctly the distance between the coded marker are every where.

Looks like some bug why marker scale back is not added in the second process.

Thanks

12
Hello
I am trying to see scale value in the export dense point cloud. In my imaging setup, With two cameras I am going around the object and collecting videos.  Although multiple cameras is used I think is better to put two cameras image (frame) together and align. I follow two approaches in the image mosaic But seen something strange. First,  I follow these steps load image, detect marker, add scalebar, align images, generate a point cloud.  In this case, the image is not aligned correctly. 

Second, I follow these steps  Load image, align images, detect marker, add scalebar image, and generate the point cloud. Here images are aligned but the scale bar is wrong.  Now sure what is happening



Thanks

13
In gui I can select the region and crop the dense point cloud. Is there a way to crop the dense point cloud with python script such that markers are placed at four corner of the object and use those marker corner as a region to crop.

Thanks

14
Hello
I am trying to align the turn table pictures. I  place a marker (12bit circular targets),
Code: [Select]
chunk.detectMarkers(Metashape.TargetType.CircularTarget12bit, 50) this code is detecting the markers.

When scalebars between markers  hard code. My 360 image alignments are coming  as expected.
Code: [Select]
scalebars = chunk.addScalebar(chunk.markers[0], chunk.markers[1])
scalebars.reference.accuracy = accuracy
scalebars.reference.distance = 0.1765

scalebars = chunk.addScalebar(chunk.markers[1], chunk.markers[2])
scalebars.reference.accuracy = accuracy
scalebars.reference.distance = 0.1765

scalebars = chunk.addScalebar(chunk.markers[2], chunk.markers[3])
scalebars.reference.accuracy = accuracy
scalebars.reference.distance = 0.1765


Instate of hard coding i try to make this addition bit dynamic  like below. My image aligments if going every where. Not sure why this is happening. Or what I am doing wrong. 
Code: [Select]

accuracy = 0.0001
pairings = ['1_2','2_3','3_4']
scale_values = {
'1_2': 0.1765, '2_3': 0.1765, '3_4': 0.1765}
markers_name = {}
for marker in chunk.markers:
markers_name.update({marker.label.replace('target ',''): marker})

print(markers_name)
for pair in pairings:
    a, b = pair.split('_')
    if (a in markers_name.keys()) and b in markers_name.keys():
        scalebars = chunk.addScalebar(chunk.markers[int(a)-1],chunk.markers[int(b)-1])
        scalebars.reference.accuracy = accuracy
        scalebars.reference.distance = scale_values[pair]

Thanks

15
Hi,
I am having a problem on mosaic and generating models when the cameras position is fix and object is paced on turn table. With the metashape gui i am able to see result.  But I follow exact same process  with python script. I am getting wired result. All cameras are not aligned.  Not sure what am I missing in script. Any help Below is my script

Code: [Select]

import Metashape
import os
import glob

Metashape.app.console.clear()

# construct the document class
doc = Metashape.app.document
# doc = Metashape.Document()
output_file_path = './mosaic_result'
project_name = 'object.psx'
output_name = 'object.laz'

file_path = './image/'

psxfile = os.path.join(output_file_path, project_name)
doc.save(psxfile)
chunk = doc.addChunk()
doc.save()

image_path = glob.glob(file_path + '*.jpg')
dir_name = file_path + '/mask'

point_cloud_quality = Metashape.HighQuality

chunk.addPhotos(image_path)
chunk.importMasks(path=dir_name + '/' + '{filename}_mask.png', source=Metashape.MaskSourceFile,
                  operation=Metashape.MaskOperationReplacement)

calib_file = 'lens_calibration.xml'
calibration = Metashape.Calibration()
calibration.load(calib_file, format='xml')
for sensor in chunk.sensors:
    sensor.user_calib = calibration
    sensor.fixed = True


chunk.matchPhotos(accuracy=Metashape.HighAccuracy, preselection=Metashape.GenericPreselection,
                  generic_preselection=True, reference_preselection=False, mask_tiepoints=True,
                  keypoint_limit=40000, tiepoint_limit=4000)

chunk.alignCameras(adaptive_fitting=True)

aligned = list()
not_aligned = list()
for camera in chunk.cameras:
    if camera.transform:
        aligned.append(camera)
    elif camera.enabled:
        not_aligned.append(camera)
        camera.transform = None
if len(not_aligned)>0:
    chunk.alignCameras(cameras = not_aligned, adaptive_fitting=True)

chunk.buildDepthMaps(quality=point_cloud_quality, filter=Metashape.AggressiveFiltering, reuse_depth=True)
chunk.buildDenseCloud(point_colors=True)

pointcloud_filename = os.path.join(output_file_path, output_name)
chunk.exportPoints(pointcloud_filename, colors=True, colors_rgb_8bit=True)

doc.save()

Pages: [1] 2