Forums > Jitter

### Line Detection and 3-D endpoint recognition (cv.jit)

Jun 03 2014 | 8:58 am

Dear all,

What do you think is the best approach to find the 3-D endpoints of a line given two videos shot 90° perpendicular?

Here is what is happening: we’re marking a violin bow with el-wire, and shooting a studio performance in order to create a long-exposure video (see vimeo.com/thenightbears/ for more information, and photo, attached).

Since we can do a 2-camera shoot, it seems likely we can extract 3-D data from the videos, and thereby add some openGL love to the project. I’m just a bit stumped as to how to start. I’m assuming I’ll need cv.jit to recognize the lines in the first place, and I’m sure there is some handy math that allows two 2-D projections of a line to be converted into 3-D endpoint coordinates, but, please, I need a push in the right direction.

This does not need to be done in real-time; the performance will be recorded in the studio with a click-track, and the final long-exposure-video will be played back in concert. The current patch that creates the basic long-exposure video is very much non-real-time (despite using Gen…).

John

###### Attachments:
1. elwire.jpg

Jun 03 2014 | 9:25 am

not an answer, but have you considered using kinect? seems a hell of a lot easier.

Jun 03 2014 | 9:34 am

Hi Rob,

Unfortunately, the video is being shot in Vilnius, Lithuania. I’ll receive it here in Osaka, Japan; so Kinect is not an option in this case ;<

Also, I’m curious about this problem conceptually — this is the kind of 3-D vector stuff I’d like to get under by belt…

Hope you are very well!

John

Jun 09 2014 | 10:20 am

Ok — I just figured this one out. It is ridiculously simple:

The output of cv.jit.lines from the front camera gives me x1,y1f and x2,y2f

The output of cv.jit.lines from the side camera gives me z1,y1s and z2,y2s

I’m solving for x1,y1,z1 and x2,y2,z2

If the cameras are equidistant, y1f=y1s=y1, and y2f=y2s=y1 (allowing for a little variation due to perspective distortion)

So, the answer is in the question. Love it when that happens.

Jun 09 2014 | 10:32 am

Although, if the perspective distortion does end up being a problem, any ideas about what to use to compensate? Is it the square law? Hmm.

Viewing 5 posts - 1 through 5 (of 5 total)

Forums > Jitter