Coordinate conversion of vision sensor pixel coordinates and world coordinates

Typically: "How do I... ", "How can I... " questions
Post Reply
jiuling
Posts: 9
Joined: 17 Dec 2024, 04:23

Coordinate conversion of vision sensor pixel coordinates and world coordinates

Post by jiuling »

I want to know how to convert the pixel coordinates in the vision sensor to the world coordinate system, I tried to implement it using the python API, but it failed, and the problem mainly occurred in obtaining the internal parameters of the vision sensor.
For example, In my sim.py, it has a def like:
def simxGetObjectFloatParam(clientID, objectHandle, parameterID, operationMode):
'''
Please have a look at the function description/documentation in the CoppeliaSim user manual
'''

parameterValue = ct.c_float()
return c_GetObjectFloatParam(clientID, objectHandle, parameterID, ct.byref(parameterValue), operationMode), parameterValue.value

I cannot find what is the parameterID,and how can I find it.
I don't find a function that does the coordinate conversion directly.
My code is all made of python,waiting for your reply.
coppelia
Site Admin
Posts: 10747
Joined: 14 Dec 2012, 00:25

Re: Coordinate conversion of vision sensor pixel coordinates and world coordinates

Post by coppelia »

Have a look at my reply to your other similar post.

Additionally, do not use the legacy remote API anymore, it is deprecated, slow and not flexible enough. Instead use the ZeroMQ remote API.

Cheers
jiuling
Posts: 9
Joined: 17 Dec 2024, 04:23

Re: Coordinate conversion of vision sensor pixel coordinates and world coordinates

Post by jiuling »

Thank you for your reply and reminder
jiuling
Posts: 9
Joined: 17 Dec 2024, 04:23

Re: Coordinate conversion of vision sensor pixel coordinates and world coordinates

Post by jiuling »

Thank you for your immediate reply, but the demo file is a 3D point cloud method, I have now obtained the RGB-D 3D coordinate data, can it be converted, and how to obtain the focal length and light point of the vision sensor? Because I now only need to simply grab a point, instead of doing a 3D reconstruction, I need color information.

I'm afraid you didn't see it, so I sent it again. I'm sorry for taking up your time because I'm in a hurry to solve this problem.Thanks again.
jiuling
Posts: 9
Joined: 17 Dec 2024, 04:23

Re: Coordinate conversion of vision sensor pixel coordinates and world coordinates

Post by jiuling »

jiuling wrote: 18 Dec 2024, 11:24 Thank you for your immediate reply, but the demo file is a 3D point cloud method, I have now obtained the RGB-D 3D coordinate data, can it be converted, and how to obtain the focal length and light point of the vision sensor? Because I now only need to simply grab a point, instead of doing a 3D reconstruction, I need color information.

I'm afraid you didn't see it, so I sent it again. I'm sorry for taking up your time because I'm in a hurry to solve this problem.Thanks again.
In other words, does COPPELIASIM have built-in tools or functions such as visual sensor calibration and checkerboard calibration board in advance, thank you in advance for your reply.
Post Reply