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


2
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

3
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

4
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.

5
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

6
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

7
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

8
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

9
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()

10

Hi ,

From the micasense support page what I understand is to mosaic the 10 band cameras we need to choose chunk.addfolder not the addphoto. The works when using the GUI version.

https://support.micasense.com/hc/en-us/articles/360002693373-Process-MicaSense-sensor-data-in-Agisoft-Metashape

I am trying to work on the python script to mosaic 10 band camera.  but chunk has no method to addFolder only I see add photos (version 1.5.5).  Likewise,  for 10 band camera raw images are store in two camera folders 1-5 on camera 1  and  6-10 other camera folder.

Do we need to put the image together in the same folder before mosaic?

Bit confusion when working on a python script to load and mosaic 10 band cameras images.


Thanks
Paras

 

11
When mosaicing larger field around 100 acre of area (1700 camera shot mica sense image ). The orthomosaic mosaicblending is creating strip noise pattern when images are reflectance corrected. if a small area is selected for mosaic those strips are not observed. Not sure why this is happening. Is there an issue with mosaic blending?

Is any one haveing such issue or I am missing some thing.


Thanks

12
When I mosaic the image with reflectance panel / sun senor correction I am seeing an artifact, a strip line in the mosaic image.  I feel these strips might correspond to images coming from the flight line. I am looking into color correction if possible to remove these artifacts. Could someone suggest how to apply these color correction? Should I need to apply these color correction on orthomosaic output or prior outputs? Or there are some ways to remove these.

I am not seeing those strip pattern when I mosaic the images without applying reflectance and sun sensor data correction.

Thanks

13
Hi,
I see the problem in orthomosaic result when my surface is concave in nature. The orthomosaic image is stretch. Because the flight lines are straight but between each camera shot there is a change in altitude. I am seeing the resulting orthomosaic is stretched. So is there a way to correct geo location in such case surface with concave nature.

Thanks,
ppant

14
In photoscan when we do multispectral mosiac by default master band is set to band 1, for example, In micasense rededge camera data defult master band will be blue. I want to change that to red-edge as it is the middle band in five cameras. This can be easily done is gui. But I am not able to figure is it possible with python script too.


Thanks
ppant

15
I am exporting a mbtiles with following piece of code.
Code: [Select]
chunk.exportOrthomosaic('c:\\tmp\\test.mbtiles',format=PhotoScan.RasterFormatMBTiles,image_format=PhotoScan.ImageFormatPNG,min_zoom_level=10, max_zoom_level=20,white_background=False,write_alpha=False)

When I choose
Code: [Select]
image_format= PhotoScan.ImageFormatJPEG

and export tiles in QGIS I can only see gray scale image.
When I change the image format to "PNG" I am seeing nothing in QGIS. Could someone explain to me how to export the colorized mbtiles for example from (CIR images ).

Thanks 

Pages: [1] 2