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

Pages: [1]
Python and Java API / rotation bounding box and model if given 3 point
« on: February 23, 2023, 04:26:21 PM »
Good afternoon.

Please tell me if it is possible to write a script like this:

I have 3 points on the model (point 1, point 2, point 3). Is it possible, if i have these three points (which form a plane), to rotate the model and the bounding box to the xz plane direction?

In my understanding, it is necessary to form a plane from points p1 p2 p3, place it parallel to the plane YZ, but I can’t understand how to attach the reconstruction area to them.

I added the picture for visual understanding.

Thank you.

Python and Java API / renderImage Camera position
« on: September 08, 2020, 10:41:17 AM »
Добрый день. Использую скрипт, который нашел в одной из тем. Но есть один нюанс: конечное изображение почему то всегда получается под разным углом (примеры Как подправить скрипт, что бы виртуальная камера постоянно смотрела на центр области реконструкции (как то так Буду очень благодарен за помощь.
Code: [Select]
import Metashape

chunk =
T = * chunk.transform.matrix

location = + chunk.region.rot * chunk.region.size
direction = ( - location).normalized()
vertical = T.inv().mulv(Metashape.Vector([0, 0, 1]))
horizontal = Metashape.Vector.cross(direction, vertical).normalized()
vertical = Metashape.Vector.cross(direction, horizontal).normalized()
R = Metashape.Matrix([horizontal, vertical, direction])

cameraT = Metashape.Matrix().Translation(location) * Metashape.Matrix().Rotation(R.t())

image = chunk.model.renderImage(cameraT, chunk.sensors[0].calibration)"c://Work//render2.jpg")

Добрый день. Я работаю с full body scans. Сейчас возникла необходимость подгонять их к одному размеру (точнее, что бы они были все одного роста). А так же выставить модель в 0 точку. Можете подсказать скрипты, куда смотреть и, что почитать, что бы решить эту задачу средствами python.

Python and Java API / ANIMATION
« on: November 29, 2018, 11:35:41 AM »
Can somebody give sample script how to great animation and take avi file???? VERY important.

Python and Java API / Example for rotation region and animation
« on: November 28, 2018, 11:56:27 AM »
Can somebody write some examples which explain how rotate bounding box region (need that read area will be down). And I need some of code example, which explain how to do animation.

General / Change photo
« on: January 16, 2018, 12:27:39 PM »
In 1.3.4 i use script for change photo
Code: [Select]
for i in range(len(chunk.cameras)):
camera = chunk.cameras[i]
photo =
photo.path = firstdir + camera.label = photo
Now in 1.4 I have an error:
Error: Can't open file: No such file or directory (2): d:/FTP/1516031537175/firstdir/1

Can you help me?

Face and Body Scanning / Error
« on: August 18, 2017, 11:24:13 PM »
When i try save project, I have an error "Invalid marker id" .  And then when i open this project again it is empty. Can you help?.

Python and Java API / Bounding box
« on: July 31, 2017, 03:17:49 PM »
I need help with the question. I'm using scripting on the alignment and on bounding box which I took from the post:

But the height of the "bounding box" does not suit me. When I try to change it with boxheight, it makes the reconstruction area smaller, but not at the top, and bottom (it turns out to cut some of the model). Is it possible to change the area of ​​reconstruction in such a way that the script cuts it from top, not from bottom?

And another question: is it possible to write the script that checks if the cameras are align? If yes,  where can I look information on this issue.


Pages: [1]