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

Pages: [1] 2 3
1
General / cant open software
« on: February 22, 2021, 08:28:34 AM »
Hi:
Just want to open the psx file as normal, but then stuck in a white screen. Thought it should be a version upgrade problem, upgraded, still the same.

This is the first time I encounter the problem. :'(

2
Python and Java API / Re: exportRaster with jpeg compression
« on: November 04, 2020, 10:31:20 AM »
Any updates on this?
Hi:
If fine resolution is not really in consideration, coarsing the resolution is a solution.
Just check if the orthomosaic dimension is oversized for jpg compressor or not.

Code: [Select]
psize = chunk.orthomosaic.resolution
mapdim = [chunk.orthomosaic.width,  chunk.orthomosaic.height]
if max(mapdim)>65500:
                #define a new variable just in case the original resolution is needed
                psize_r = max(mapdim)/65500*psize
            else:
                psize_r = psize
chunk.exportRaster('.tif', resolution = psize)


3
Python and Java API / How to cut the 3d model and tile models
« on: November 04, 2020, 10:23:55 AM »
Hi all:
I have lots of tilted aerial urban images, the 3d tile model of which is very bad on the four edges.
I want to cut them out by some means. Is there someway to do this? Such as defining an area of interest  or  resetting the bounding box through geographic coordinates.
much obliged  :D

4
General / What is the encoding format for .obj and other 3D models
« on: October 30, 2020, 12:18:25 PM »
Hi:
The 3d visulization software I use requires the 3d model encoding format.
THKs

5
Python and Java API / Orthomosaic translation
« on: September 01, 2020, 05:09:17 AM »
Hi
After orthomosaic computation, I want to export an orthomosaic with translated latitude and lontitude.
Theres nothing wrong with the orthomosaic computation or image position, its just I need a map translated in a certain way.
Somthing like
Code: [Select]
o = chunk.orthomosaic
o.left = o.left + 0.0001
o.right = o.left + 0.0001
o.top=o.left - 0.0001
o.bottom = o.bottom - 0.0001
But the objects in Metashape is not writable. Is there someway I can do this?

6
Python and Java API / Re: exportRaster with jpeg compression
« on: August 25, 2020, 07:45:44 AM »
Please provide the screenshot of the Export Orthomosaic dialog with the parameters used and the output from the Console pane corresponding to the related export operation.
After comparison, it seems that the manual export skiped the last level of the tile pyramid, thus evading the 655300 pixel limitation.

7
Python and Java API / Re: exportRaster with jpeg compression
« on: August 12, 2020, 11:54:20 AM »
Please provide the screenshot of the Export Orthomosaic dialog with the parameters used and the output from the Console pane corresponding to the related export operation.

Code: [Select]
2020-08-12 15:55:01 LoadProject: path = E:/Agisoftprojects/20200717.psx
2020-08-12 15:55:01 Loading project...
2020-08-12 15:55:03 loaded project in 1.604 sec
2020-08-12 15:55:03 Finished processing in 1.613 sec (exit code 1)
2020-08-12 15:57:36 ExportOrthomosaic: block_height = 1080, block_width = 3840, clip_to_boundary = off, image_format = TIFF, path = E:/test.tif, projection = WGS 84, resolution_x = 1.14766e-06, resolution_y = 9.8963300000000008e-07, save_alpha = off
2020-08-12 15:57:36 Exporting orthomosaic...
2020-08-12 15:57:36 generating 90919 x 91168 raster in 1 x 1 tiles
2020-08-12 16:05:46 Finished processing in 489.236 sec (exit code 1)
>>>

8
Python and Java API / Re: exportRaster with jpeg compression
« on: July 21, 2020, 04:49:33 AM »
Hello saduka,

JPEG format doesn't support images with the dimensions greater than 65535 by any size, so you cannot use JPEG export format or JPEG compression option, if the orthomosaic exceeds these limits.

Hi Alexey, thanks for the answer. Thats very helpful.
But when I manually export the orthomosaic through your graphic UI,  an 8 bit depth jpeg compressed raster of  a tile larger than 65536 x 65536(90000+ x 90000+) can be exported. I am wondering how is this achieved through python?

9
Python and Java API / Re: exportRaster with jpeg compression
« on: July 10, 2020, 09:03:37 AM »
Hello saduka,

Can you please provide the full output related to the exportRaster operation?

Actually, I want to report this as a general bug for python scripting. The script runs fine for small projects. Manual compression output through graphic interface works also fine.
However, when a project contains more than 3000 cameras, and the orthomosaic tile scale is larger than 80000x80000,  the error jumps out.
The following error report is just one case, which has been the same for all of our large aerial map compression output.

Code: [Select]
2020-07-10 13:39:10 LoadProject: path = E:/Agisoftprojects/20200526.psx
2020-07-10 13:39:10 Loading project...
2020-07-10 13:39:11 loaded project in 1.746 sec
2020-07-10 13:39:11 Finished processing in 1.755 sec (exit code 1)
2020-07-10 13:39:15 ExportRaster: image_format = JPEG, path = E:/test.tif, projection = WGS 84, save_alpha = off, white_background = off
2020-07-10 13:39:15 generating 91272 x 92998 raster in 1 x 1 tiles
2020-07-10 13:39:15 Exporting orthomosaic...
2020-07-10 13:39:15 Finished processing in 0.01 sec (exit code 0)
2020-07-10 13:39:15 Traceback (most recent call last):
2020-07-10 13:39:15   File "E:/lingang_project/test.py", line 19, in <module>
2020-07-10 13:39:15     projection = d_projection)
2020-07-10 13:39:15 RuntimeError: Can't create image: E:/test.tif
2020-07-10 13:39:15 Error: Can't create image: E:/test.tif
2020-07-10 13:40:29 Found 2 GPUs in 0.407 sec (CUDA: 0.323 sec, OpenCL: 0.084 sec)

10
Python and Java API / Re: exportRaster with jpeg compression
« on: July 05, 2020, 12:56:59 PM »
Hi Alexey:
This is the error output. I am quite confused at this problem. The script worked perfect for a small orthomosaic, but not for a larger scale.

2020-07-05 17:48:30 Traceback (most recent call last):
2020-07-05 17:48:30   File "E:/test.py", line 19, in <module>
2020-07-05 17:48:30     projection = d_projection)
2020-07-05 17:48:30 RuntimeError: Can't create image: E:/test.tif
2020-07-05 17:48:30 Error: Can't create image: E:/test.tif

11
Python and Java API / exportRaster with jpeg compression
« on: June 14, 2020, 05:45:49 AM »
Hi, I want to export a quite large orthomosaic with the jpeg compression to reduce the size.
I used the following script, but it reported an error "cant write image".

Code: [Select]
import Metashape
chunk = Metashape.app.document.chunk
d_projection = Metashape.OrthoProjection()
d_projection.crs = Metashape.CoordinateSystem("EPSG::4326")
compression = Metashape.ImageCompression()
compression.tiff_compression = Metashape.ImageCompression.TiffCompressionJPEG
compression.jpeg_quality = 20
compression.tiff_big = True
compression.tiff_compression = True

chunk.exportRaster("C:/data/test.tif",
                    format = Metashape.RasterFormatTiles,
                    image_format = Metashape.ImageFormat.ImageFormatJPEG,
    image_compression = compression,
                    save_alpha = False,
                    white_background = False,
                    save_kml = False,
                    description =  " ",
                    projection = d_projection)

12
Python and Java API / Re: Enable Metashape by floating license in Spyder
« on: October 25, 2019, 10:27:35 AM »
Hello saduka,

You can define an environment variable agisoft_LICENSE in the following format to use the floating license with Metashape application of stand-alone module:
Code: [Select]
port@address

Hi Alexey:
Is the address in the form of  HOST 127.0.0.1 any 5053  in my computer operating system environment?

13
Python and Java API / Enable Metashape by floating license in Spyder
« on: October 23, 2019, 01:42:20 PM »
Halo:
I am trying to run the Metashape in the Spyder .
I have bunches of self-defined libraries, so it is not convenient to install them all again in the Metashape's python environment.

I am following the instructions in this link.
https://www.agisoft.com/forum/index.php?topic=10647.0

But the instructions only showed direct license key, while our department runs the floating license.
How can I activate Metashape in spyder in this case?


14
Hello saduka,

By default "adjust location" flag for the slave sensors is unchecked, which means that Metashape is considering that all the images are acquired from the same location (the difference between the sensor location can be neglected). If you want to estimate the location offsets, you need to check on "adjust location" option (either prior to the alignment or after the alignment is completed, but before the optimization procedure).
Thank you very much.
If I understand this correctly in python api, that means I have to flag the "sensor.fixed_location" to "False" 

15
General / Why adjusted sensor location is zero after multilayer alignment
« on: September 26, 2019, 02:44:08 PM »
Halo:
I have 8 cameras organized as "multilayer" into the chunk with the GPS coordinates.
I hope to get the calibration values from the sparse alignment for further use to speed up the process.
But it seems the "adjusted location" field is always empty. What is the problem here, do I need to enable something?


Pages: [1] 2 3