finding relative angles

General discussion about topics related to OpenMV.
krishnakumar77777
Posts: 41
Joined: Mon Oct 15, 2018 6:34 am

finding relative angles

Postby krishnakumar77777 » Tue Feb 26, 2019 11:13 pm

Hi,
Can i get the values of relative angle of objects in an image with respect to camera?
Can i make use of FOV and resolution to find the angle of object with respect to camera?
User avatar
kwagyeman
Posts: 3260
Joined: Sun May 24, 2015 2:10 pm

Re: finding relative angles

Postby kwagyeman » Wed Feb 27, 2019 12:41 am

This requires you have a pretty good understanding of what the object is. Can you put an AprilTag on the object? That does all the work for you. If not, then this is very hard.
Nyamekye,
krishnakumar77777
Posts: 41
Joined: Mon Oct 15, 2018 6:34 am

Re: finding relative angles

Postby krishnakumar77777 » Wed Feb 27, 2019 1:08 am

field of view of openmv is HFOV=70.8 degree and VFOV=55.6degree. for resolution of 320x240, the first pixel in x has (70.8/320)*1=0.22125degree of angle from center and first pixel in y has (55.6/240)*1=0.231666667degrees. if a object in image with centroid of cx of 20 and cy of 25 is detected, then the angle of the pixel in x is (0.22125*20)=4.425 degrees and angle in y is (25*0.231666667)=5.7916666675 degree.
Is the above calculation correct??
User avatar
kwagyeman
Posts: 3260
Joined: Sun May 24, 2015 2:10 pm

Re: finding relative angles

Postby kwagyeman » Wed Feb 27, 2019 1:59 am

We don't sell super exact lenses. If you want exact calculations for this type of stuff please buy lens from a company like Edmunds Optics. You will pay 10X the price for the lens but they have exact specs that you can use to do math like what you want.

I'd also recommend to measure everything in the visual system.
Nyamekye,
krishnakumar77777
Posts: 41
Joined: Mon Oct 15, 2018 6:34 am

Re: finding relative angles

Postby krishnakumar77777 » Wed Feb 27, 2019 2:08 am

i dont need exact values. but approximated one is enough.
User avatar
kwagyeman
Posts: 3260
Joined: Sun May 24, 2015 2:10 pm

Re: finding relative angles

Postby kwagyeman » Wed Feb 27, 2019 2:45 am

Okay, um, I see what you are trying to do in regards to the pixel position. Um, your approach is fine. However, I'd measure the actual angle. Given that the focal length needs to change depending on what you want to see the calculations I state on the web page aren't actually exactly what you need. Set the lens to the point you think everything is good and then find where the object is and measure of everything and test. You'll be able to plot a trend line of data positions and then you can derive the formula that best fits what you want.

If you try to start from a formula first versus experimenting then you'll have problems.
Nyamekye,
krishnakumar77777
Posts: 41
Joined: Mon Oct 15, 2018 6:34 am

Re: finding relative angles

Postby krishnakumar77777 » Wed Feb 27, 2019 4:06 am

ok thank you.
I got the point that i can make an experiment by fixing the lens by adjusting it at needed view and then measure actual angle and what shows in openmv and then derive a formula.is it right?
User avatar
kwagyeman
Posts: 3260
Joined: Sun May 24, 2015 2:10 pm

Re: finding relative angles

Postby kwagyeman » Thu Feb 28, 2019 1:32 am

Yeah, I recommend using Microsoft Excel to keep track of the data as it has tools to automatically fit lines and curves to data. Google might have that too. Using this approach makes your job really easy and you can do it in one sitting.
Nyamekye,
Dominik
Posts: 1
Joined: Sat Mar 16, 2019 4:39 pm

Re: finding relative angles

Postby Dominik » Sat Mar 16, 2019 4:52 pm

Nice, I am attempting the same thing right now. Want to navigate my robotic arm to point on an item.

What is CV good for when there is no link to the real world? Considering how important this is, I find the lack of the details of the camera quite surprising.

Numbers I have come up with from my experiments (in QVGA, dunno if res affects it) are 68 x 74 deg. So probably ~70x70, my measuring methods were far from perfect :)
I suspect the chip is square so it makes sense that the numbers are close and the wide resolution just distorts it. I highly doubt it is 71 x 56.

Kwabena, I understand this is a big project for such a small team and you are doing a great work with that. But not even checking, let alone documenting what the camera actually does, and claiming 115 deg FOV when it is 70, is very sloppy. So please, try to fix that.
User avatar
kwagyeman
Posts: 3260
Joined: Sun May 24, 2015 2:10 pm

Re: finding relative angles

Postby kwagyeman » Sat Mar 16, 2019 6:43 pm

Hi, I originally had the FoV values for the lenses from our manufacturer on the website. Then some said those don't make sense given actually FoV calculations. So, I updated all the FoV values using FoV calculations based on the chip array size and the focal length of the lenses. So it was already updated. I'm not sure what else you'd like me to do...

It says this on the camera documentation:

Lens InfoFocal Length: 2.8mm
Aperture: F2.0
Format: 1/3"
HFOV = 70.8°, VFOV = 55.6°
Mount: M12*0.5
IR Cut Filter: 650nm (removable)

Are you looking at old documentation?
Nyamekye,
krishnakumar77777
Posts: 41
Joined: Mon Oct 15, 2018 6:34 am

Re: finding relative angles

Postby krishnakumar77777 » Tue Jun 11, 2019 4:14 am

Hi dominik,
Have you found the way to do that?That in the sense,making your robotic arm to point towards object?


Last bumped by krishnakumar77777 on Tue Jun 11, 2019 4:14 am.

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 5 guests