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

Pages: [1]
1
General / Re: Hughe issues to align pictures
« on: March 14, 2021, 06:02:47 PM »
Hi GrinGEO,

Lately, I have had quite big problems with aligning photos above only-grass areas with quite bad light conditions. After trying different approaches I was able to align most of the photos with Medium quality, Generic preselection ON and Reference preselection OFF.
I also had some GCP marked on pictures already before the alignment process.
Maby that would work for you too.

BR

2
Bug Reports / Re: Invalid shape - polygonal
« on: March 04, 2021, 01:35:22 AM »
Hi Damian,

I've tried to look into the issue and downloaded your kml files and imported them to Metashape. It seems that these two files have a different structure - one is imported as one layer with multiple objects and the second is imported as multiple layers (each containing one object) - but I was still able to import them and set boundary type on each polygon without any problems.

I'm not sure what you mean by using them for exporting shapes with the proper file name. Do you want to export each polygon as a separate file? Or you want to use each polygon as a boundary for your ortho/dem/point cloud export? 

3
Bug Reports / Re: Generate Ortho - Big Tiff Error
« on: March 04, 2021, 12:58:12 AM »
Alexey,

Unfortunately no. With 20 pictures enabled orthomosaic was generated without any problems.

4
Bug Reports / Re: Generate Ortho - Big Tiff Error
« on: March 01, 2021, 04:09:28 AM »
Hi Alexey,

Orthomosaic was build on DEM surface, blending mode Mosaic, hole filling enabled, default pixel size (~0,03cm) and I didn't specify boundaries.
Source images are 6000x4000.

I've tried with 100 pictures and orthomosaic was generated without problems.
I've also tested the cloud processing with bigger dataset and it also went fine. 

5
Bug Reports / Re: Generate Ortho - Big Tiff Error
« on: February 26, 2021, 05:02:46 PM »
Hi,

It is a quite old thread, but I just had similar error when generating orthomosaic on version 1.7.1 build 11797 (64 bit).
Can it be related to the quite big size of the orthomosaic and maby PC not powerful enough?
The processing already lasted for a few hours, and I don't know if I should restart it. 
Please take a look at the part of log from console

Code: [Select]
2021-02-26 14:44:47 boundaries extracted in 0.055 sec
2021-02-26 14:44:50 13 images blended in 3.127 sec
2021-02-26 14:44:51 loaded partition in 0.306 sec
2021-02-26 14:44:51 boundaries extracted in 0.056 sec
2021-02-26 14:44:52 image key: 12
2021-02-26 14:44:52 region overflow: reading [-1, 76] - [62, 80] from 186x145 image
2021-02-26 14:44:52 libtiff error: 4294967168: Col out of range, max 185
2021-02-26 14:44:58 Finished processing in 9911.1 sec (exit code 0)
2021-02-26 14:44:58 Error: TIFFReadTile: unexpected error: memory stream

6
Hi Paulo,

Thaks for reply, I used your code and seems to work really well, so thank you!
But I think it was my rookie mistake... I got the min max vertices wrong, it should be
   
Code: [Select]
t_min = tile.vertices[3]
t_max = tile.vertices[1]

With that even my code works.
I just noticed it now when checking your proposal, so you helped me a lot :)
Also thanks for the compression advice.

7
Ok, now I tried the code with different project (with the same shape type for blocks) and the script seemed to work fine... The Python console showed generating multiple rasters with correct names, and size of one block, but... the output folder is empty. What happened here?

And still the same code does not work with the main project..   Python console says that one big raster is being exported (size way bigger than size of one block)

8
Hi,
I have an ortomosaic that I need to split by blocks and the in the filename of each exported block I need to have shape label.

I am trying to proceed with Python script, but I must say I am only a beginner in Python scripting, so maby I am doing something wrong.

I have rewieved some topics that already mention this problem but it did not help me.
One of the problems I have that wasn's menton i those topics is that I can't use the shape with blocks as Outer Boundary - I am already using differenet shape for that as I need two boundaries - it is a network project with buffer along the line, so I need to set the buffer as my Outer Boundary.

I was trying to go the following way - for each block in my shapes layer I try to export orthomosaic that would have the region set to the block's extent. But I must do somerhing wrog there, as each time whole orthomosaic is being exported, like the boundaries were not set at all. I tried setting the boundaries in different ways, but non of it worked.
At lest the file name is correct..

Below is part of the code that I use
Code: [Select]
import Metashape
#compression
compression = Metashape.ImageCompression()
compression.tiff_compression = Metashape.ImageCompression.TiffCompressionLZW
compression.jpeg_quality = 95
compression.tiff_big = False
compression.tiff_compression = True
compression.tiff_overviews = True

#export
chunk = Metashape.app.document.chunk
ortho = chunk.orthomosaic
ortho_projection = ortho.projection

tiles =[]
for shp in chunk.shapes:
if shp.selected == True:
tiles.append(shp)

for tile in tiles:
       t_min = tile.vertices[1]
       t_max = tile.vertices[3]
       tile_region = Metashape.BBox()
       tile_region.min = Metashape.Vector(t_min)
       tile_region.max = Metashape.Vector(t_max)
       tile_label = tile.label
       chunk.exportRaster(path = out_path + line_name + '_'+tile_label+'.tif', projection = ortho_projection, region = tile_region, resolution_x = pixel_size_x_m,  resolution_y = pixel_size_y_m, image_compression=compression, save_world = True, white_background = False,)

When I call tile_region i get Metashape.BBox at 0x288af34ea90 which does't tell me nothing about the actual boundaries.
I also tried to use something like
 
Code: [Select]
       tile_region = Metashape.BBox(tile.vertices)

which also returned some bounding box (different than in the code above), but didnt do the job.

Can anyone point at what am I doing wrong with my code?
It is very easy to set correct boundaries in orthomosaic export dialog box in the Setup Boundaries section, but then i dont get correct names for my files.
   

Edit:
Sorry i messed up the code when posting here, now it is like I tried it.



Pages: [1]