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 - ivan.mdn

Pages: [1]
1
Python and Java API / Re: Model rotated when exporting as .obj
« on: November 03, 2014, 05:55:00 PM »
I'm sorry Alexey, indeed I sounded a little confusing. I am actually modelling human faces. The three points I mentioned are placed on the tip of the nose (wich I am using as the origin) and the external corner of each eye. What I want is to be able to rotate the model so that the z axis is pointing towards the face, the x axis is pointing up (to the forehead) and the y axis is pointing to the right ear (model's left ear). And also I would need for the imaginary line connecting the two points on the eyes to be parallel to the y axis. This way I could guarantee that no matter what were the positions of the cameras used to create the model, the result of the exportation process would always show up the same way, or in other words, the model would always be facing foward when you look at it on the screen.
Below I attached a picture for ilustration purposes:

2
Python and Java API / Re: Model rotated when exporting as .obj
« on: November 03, 2014, 04:25:29 PM »
jeremyeastwood, what Alexey has mentioned is exactly what was happening to me. It seems that Blender imports the model with a different axis orientation, but you can set it to match PhotoScan's orientation like Alexey said.

But since you raised the question, I am actually needing something similiar to what you asked, but a little more sofisticated:
I have three markers set on my model: the first I am using as the origin of the local coordinate system (using the shift option when exporting) and I would like to rotate the model so that when exporting it I could guarantee that the other two points (wich are aligned on the xy plane) have positive x, y, and z values. Is this possible to do throught the python API ?

3
Python and Java API / Re: Model rotated when exporting as .obj
« on: October 31, 2014, 05:22:35 PM »
I'm really sorry Alexey, but it was actually a problem when loading the model on the other software. It had nothing to do with photoScan. But anyways, thank you for you quick answer.

4
Python and Java API / Model rotated when exporting as .obj
« on: October 31, 2014, 03:53:51 PM »
I'm trying to export a model through the python API using the following code:
Code: [Select]
crs = PhotoScan.CoordinateSystem('LOCAL_CS["Local CS",LOCAL_DATUM["Local Datum",0],UNIT["metre",1]]')
chunk.exportModel(arqExpModel, format='obj',projection=crs):
But when I try to open the .obj file on another 3d software (like Blender) is appears rotated 90ยบ around the x axis. How can i fix this? It only happens with the .obj format, but unfortunately I can not use a different one on this particular project.

5
Is it still possible to do this on photoScan 1.1.0? Because i tried creating a local coord. system like that and this is what i got:
Code: [Select]
>>> crs = PhotoScan.CoordinateSystem()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ValueError: wrong crs definition string

6
Python and Java API / Re: Marker projections
« on: October 22, 2014, 10:35:26 PM »
Thank you for your support Alexey, the code worked perfectly for what I needed.

7
Python and Java API / Re: Marker projections
« on: October 22, 2014, 03:53:37 PM »
Could you give some specifics about how i could do this through the api, given that the model has already been generated? I am just starting in 3d modeling and by looking through the api documentation I wasn't able to come up with a way to do that.
About taking longer than through the GUI, its not really an issue for me. I am more interested in automating the process than on its speed.

8
Python and Java API / Marker projections
« on: October 22, 2014, 12:21:35 AM »
I am creating a marker using a python script and setting its projection on one of the photos using the following:
Code: [Select]
chunk.markers[j].projections[chunk.cameras[i]] = (x,y)I would like to see the marker on the 3d model (already generated) but i dont have the coordinates of the marker on the others photos. Is there a way to generate them automatically through the python api?
I am asking this because when I add the marker through the gui (right click on the photo -> create marker) it automatically projects the marker on the others photos.

9
General / Coordinates of a point from the 2d photo on the 3d model
« on: October 17, 2014, 09:39:05 PM »
Is there a tool to get the coordinates from the model (x,y,z) given a coordinate (x,y) from one of the 2d photos used to generate it?

Pages: [1]