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

Pages: [1]
1
Hello everyone,

I'm using split_chunks script to process my models. We all know if chunk region is empty we are going to face Zero Resolution error.  I've tried to skip empty chunks but it leads to incorrect mesh generation, like a total disaster. What is the correct way to handle empty chunks so they don't screw final mesh?

2
Python and Java API / Get fail logs from Metashape with python script?
« on: April 10, 2019, 08:28:18 PM »
Hello!
I was wondering if there is any way to get logs from Metashape if the process failed or terminated with an error or smth like that?
If it's not such a way - how logs are stored in Metashape?
Thanks!

3
Does anyone solve this Zero resolution problem after splitting in chunks?

4
Bug Reports / Re: Is it a bug o feature?
« on: January 25, 2019, 12:07:22 AM »
Hello godszerg,

Please check the similar script in the following thread:
https://www.agisoft.com/forum/index.php?topic=10102.msg46135#msg46135
It estimates the limiting coordinates for X and Y according to the estimated cameras locations and then generates the box fitting these values. Basically, instead of these values you can use any numbers (coordinates of points), but not that the box may not perfectly fit four points, if they do not form the rectangle.

Tried that script, got an error:
unsupported operand type(s) for /: 'float' and 'NoneType'

Code: [Select]
new_size = ((100 + BUFFER) / 100) * Metashape.Vector([side2g.norm()/s, side1g.norm()/s, 3*side3g.norm() / s]) ##
s is None

5
Other Languages / Re: Вопрос по Vector в python
« on: January 24, 2019, 11:50:19 PM »
Спасибо! Я извлекаю ее так сейчас.

Code: [Select]
R = Metashape.Matrix([[0.99756, -0.02948, -0.06322,0],
[0.00000, 0.90631 ,-0.42262,0],
[0.06976, 0.42159 ,0.90410,0],
[0.0,0.0,0.0,1.0]]).rotation()

Да ее верхняя часть 3х3 то что мне нужно.

6
Bug Reports / Re: Is it a bug o feature?
« on: January 24, 2019, 07:35:14 PM »
Thanks for the answer!

I wonder if there is a way to set region by 4 vertexes? just providing X,Y and z of each vertex?

7
Other Languages / Почему bounding box за камерами?
« on: January 24, 2019, 12:39:43 AM »
На прикрепленном рисунке дата сет с офф сайта.
Камеры расположены вокруг монумента, но почему бокс за пределами и огромный захватывает не нужные точки. В других датасетах бокс внутри кольца камер. А тут нет. Я конечно понимаю что можно отредактировать, но как то лишнее это?

Почему так происходит? Где то настройка есть или процесс который может улучшить это?

Спасибо.

8
Bug Reports / Re: Is it a bug o feature?
« on: January 23, 2019, 08:15:28 PM »
Here what I did:

1. Created a blank project.
2. Add photos from dataset from Agisoft page.
3. Workflow -> Align Photos.
then run the script to check the size of the bounding box.

That is it.

Here is a full script:
Code: [Select]
import Metashape

doc = Metashape.app.document
chunk = doc.chunks[0]
print("Size - X: ",chunk.region.size.x, "Y: ",chunk.region.size.y, "Z: ",chunk.region.size.z)


To be more clear here is the goal I try to achieve.

I want to import point cloud to unity.
Edit bounding box.
Adjust bounding box in Metashape with python to new position and size.

I played with different photo sets and it turns out that every time different axes are mixed up.

I case of doll X and Y mixed up, in case of building set Z and Y.

Is there any way to set the coordinate system to be exactly the same every time?

9
Bug Reports / Is it a bug o feature?
« on: January 23, 2019, 05:41:39 PM »
In the attached image you can see my project, where Y axis goes vertically. But running script to get the size of the bounding box mixes X and Y axes.
 
The second image is from unity which detects bounds size correctly.

ps

Script i run is just printing X,Y,Z of size vector of the bounding box:

Code: [Select]
print("Size - X: ",chunk.size.x, "Y: ",chunk.size.y, "Z: ",chunk.size.z)

10
Other Languages / Re: Вопрос по Vector в python
« on: January 22, 2019, 06:39:13 PM »
Проект еще в сыром виде. Как допилю пришлю.

С координатами разобрался. Спасибо.

Подскажите последнюю вещь: Вращение.

у меня есть матрица вращения в юнити 4х4.
Как создать новую матрицу вразения в MetaShape из этой матрицы. и приминиеть ее к региону(bounding box) ?

Спасибо.

11
Other Languages / Re: Вопрос по Vector в python
« on: January 18, 2019, 10:30:19 PM »
Далее вопрос в том, какая задача стоит перед Вами. Если хочется, зная локальные координаты, создать маркер, то это можно сделать так:
Code: [Select]
T = chunk.transform.matrix
chunk.addMarker(T.inv().mulp(Metashape.Vector([1.6, -7.7, 2.2])))

А можно как то всю систему координат чанка инвертировать?

12
Other Languages / Re: Вопрос по Vector в python
« on: January 18, 2019, 10:18:45 PM »
Спасибо за ответ! Задача такая. Хочу наладить связь между проектом в Unity 3D и Metashape. Координаты из Unity передать в Metashpe и зменить допустим размер и положение (наклон в том числе) region (bounding box)

Для проверки я добавил маркер в ручную в программе с координатами из юнити и положение маркера совпало с точкой в юнити. А вот если я добавил маркер через скрипт в этот же проект получил результат выше и другое положение маркера.

13
Other Languages / Вопрос по Vector в python
« on: January 17, 2019, 06:26:22 PM »
Здравствуйте, обьясните пожалуйста систему Векторов в скрипте и приложении. Ну или где почитать про это в документации.

Почему спрашиваю

в скрипте добовляю маркер со след координатами
Code: [Select]
chunk.addMarker([1.6,-7.7,2.2],visibility=True)
Во вкладке Reference у маркера совсем другие координаты.
X 0.852 Y 4.410 Z 6.819

PS

Тестирую скрипты на проекте с сайта https://www.agisoft.com/datasets/doll.zip

Pages: [1]