Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

how do I convert a point in an image to standard co-ordinate in python

0 votes
Hi,

I have modified python sandbox to detect vertical lines, now trying to convert a point in the image to standard co-ordinates.

I have looked at the code for the C++ and expected to use

x, y = jevois.imgToStd(x1,y1,image)

where x1,y1 is the start point of a line and image is the default image size

I have also tried

width = image.shape[0]

height = image.shape[1]

x, y =jevois.imgToStd(x1,y1, width, height, 0.2)

whatever I try I get an error python arguements does not match C++ signature

Have tried adding float(x1) etc and various other combinations.

has anyone got a simple example they could show, at the moment I can't see the wood for the trees!

thanks

Steve
asked Jan 27, 2019 in Programmer Questions by windy54 (230 points)

1 Answer

+1 vote
good question, we are looking into this, the problem likely comes from the way we pass x and y read-write (as non-const references) which Python cannot do.

In the meantime, I would recommend just implementing your own img2std in python: the code/formula is here:

http://jevois.org/doc/Coordinates_8C_source.html

and JEVOIS_CAMERA_ASPECT is (4.0 / 3.0)
answered Jan 29, 2019 by JeVois (46,580 points)
...