Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Finding an item's position

Subject: Finding an item's position

From: Eric

Date: 10 Jun, 2013 19:11:09

Message: 1 of 5

I need to find the position of an item within +- .005 inches. The item is a 2D, hollow square, about 7 inches on each side, about .5 inches thick with chamffered and filleted corners, and is black with white-ish background. I need to find both the position and rotation.

So far, my thoughts are this: I can use two cameras, one on each of adjacent corners, to do edge detection. I'd be nice if I could get a set up that will allow me to have 1 pixel = .001 inches, but I'm not sure how to do this yet. For now, I'm just assuming it can be done and worrying about the software first.

So if I have 1 pixel = .001 inches using a 1080p camera that will give me a 1.98x1.08 box around both corners. From there, I was thinking that I would find the four edges in each corner, find the equation of each of these four lines, and use those equations to find what would be the inside and outside corner since the square is hollow and the corners are chamffered/filleted.

Once I do this for two corners I should be able to use those points to find the rotation of the square and the position as long as I know the position of the camera, right?

Please let me know if you think this approach will work, or if you think there might be a better way to go about doing this. Thanks!

Subject: Finding an item's position

From: dpb

Date: 11 Jun, 2013 05:38:36

Message: 2 of 5

On 6/10/2013 2:11 PM, Eric wrote:
> I need to find the position of an item within +- .005 inches. The item
> is a 2D, hollow square, about 7 inches on each side, about .5 inches
> thick with chamffered and filleted corners, and is black with white-ish
> background. I need to find both the position and rotation.
>
> So far, my thoughts are this: I can use two cameras, one on each of
> adjacent corners, to do edge detection. I'd be nice if I could get a set
> up that will allow me to have 1 pixel = .001 inches, but I'm not sure
> how to do this yet. For now, I'm just assuming it can be done and
> worrying about the software first.
>
...

Be easier if could put the camera above...

--

Subject: Finding an item's position

From: Eric

Date: 11 Jun, 2013 12:37:10

Message: 3 of 5

Yes it would, but I can't get a camera with a high enough resolution to still give me the kind of accuracy I need. I need to position the item within +- .005 inches, so I need to have at least 200 pixel/inch. Ideally, I'd like to set up the camera to get 1000 pixel/inch. For the current item (7.672"x7.672"), that would mean a roughly 59 MP camera. However, I'm supposed to make this system handle up to a 15"x10" piece. Something this size would need a 150 MP camera to be able to see the whole thing at 1000 pixels/inch. I guess if I lowered the number of pixels/inch it might be okay, but it would be nice if I didn't have to.

Even if I could get a camera with this high of resolution, I think it would just be easier in terms of processing time to use two smaller pictures, one on each of two corners, but I'm open to suggestions if you think there is another way to do this.

Let me know if you know of cameras that could meet these MP needs, and thanks for the feedback.

Subject: Finding an item's position

From: dpb

Date: 11 Jun, 2013 12:45:32

Message: 4 of 5

On 6/11/2013 7:37 AM, Eric wrote:
> Yes it would, but I can't get a camera with a high enough resolution to
> still give me the kind of accuracy I need. I need to position the item
> within +- .005 inches, so I need to have at least 200 pixel/inch.
> Ideally, I'd like to set up the camera to get 1000 pixel/inch. For the
> current item (7.672"x7.672"), that would mean a roughly 59 MP camera.
> However, I'm supposed to make this system handle up to a 15"x10" piece.
> Something this size would need a 150 MP camera to be able to see the
> whole thing at 1000 pixels/inch. I guess if I lowered the number of
> pixels/inch it might be okay, but it would be nice if I didn't have to.
>
> Even if I could get a camera with this high of resolution, I think it
> would just be easier in terms of processing time to use two smaller
> pictures, one on each of two corners, but I'm open to suggestions if you
> think there is another way to do this.
>
> Let me know if you know of cameras that could meet these MP needs, and
> thanks for the feedback.

I "know nuthink'" of any specifics, sorry. Just thinking of the
geometry and some other controls work have done.

Why not top and still two images? Does the positioning have to be done
solely from the imaging--can you not have reference lines available to
compare to?

--

Subject: Finding an item's position

From: Eric

Date: 11 Jun, 2013 13:00:22

Message: 5 of 5

This item is basically a sticker, so I can't do anything like laser range finding on the edges to get the x,y position. Also, the manufacturer of the pieces doesn't do a good job of making sure the edges of the sticker backing are square with each other. They do, however, do a great job of making the actual sticker part to accurate dimensions. Therefore, I was thinking about adding a QR code of sorts to the layout of the sticker. I could use one camera on this to get position and rotation as long as the manufacturer does a good job of making everything to the right dimensions.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us