Alignment using bottom camera issue

239 views
Skip to first unread message

Jim Young

unread,
Apr 24, 2022, 7:29:59 PM4/24/22
to OpenPnP
Now that I have pick and place working, I'm on to my next issue :-)

I want to use bottom vision to correct the alignment of part placement, but I'm running into some issues. I'm working with a 0603 resistor and when using bottom vision the part is being place with the wrong orientation at somewhat random angles, usually between 20 and 45 degrees off, sometime clockwise other time counter-clockwise.  If I don't use bottom vision I actually get a better placement, but there is no correction being done for part pickup angle or feeder strip offset.

I started to look into what the pipeline is seeing and attached is what the pipeline is interpreting after pickup the part. The black and white image is the result of the MinAreaRect step.

I am assuming that the red square is how the pipeline sees the orientation of the part and will rotate to match. Clearly this is wrong. What should I adjust in the pipeline to correct the part outline detection? 
0603-BottomCamera-Pipeline.png

0603-BottomCamera-Pipeline-results.png

tonyl...@gmail.com

unread,
Apr 24, 2022, 10:58:34 PM4/24/22
to OpenPnP
The red rectangle should fit snugly around the part's leads.  It is clearly way bigger than that.  Without seeing your pipeline, all I can say is you need to adjust the threshold so that only the leads are visible to the MinAreaRect step.

Tony

Jim Young

unread,
Apr 25, 2022, 12:08:38 AM4/25/22
to OpenPnP
So the rectangle should basically follow the outline of the resistor? 

Is the initial pipeline the same for every part and they all need tweaking?

mark maker

unread,
Apr 25, 2022, 2:31:57 AM4/25/22
to ope...@googlegroups.com

Hi Jim

Are you using the newest testing version and the new stock pipeline? You should get the pipeline parameters exposed, see the GIF animation below:

Parametric-Pipeline

https://github.com/openpnp/openpnp/wiki/Exposed-Pipeline-Parameters

To enable the stock pipeline:

https://github.com/openpnp/openpnp/wiki/Computer-Vision#using-new-stock-pipelines

Also, check out the new background calibration:

https://github.com/openpnp/openpnp/wiki/Nozzle-Tip-Background-Calibration

_Mark

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/463bd727-9b15-4f15-9f10-f47e2dfc98e3n%40googlegroups.com.

Jan

unread,
Apr 25, 2022, 2:37:37 AM4/25/22
to ope...@googlegroups.com
Yes and Yes. However, every part is initially assigned to the same
default pipeline. So you have to only tweak this pipeline once and you
should be good for almost any part. If this pipeline does not work for a
specific part, you can assign just this part a different pipeline.

Jan
> 0603-BottomCamera-Pipeline.png
>
> 0603-BottomCamera-Pipeline-results.png
>
> --
> You received this message because you are subscribed to the Google
> Groups "OpenPnP" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openpnp+u...@googlegroups.com
> <mailto:openpnp+u...@googlegroups.com>.
> <https://groups.google.com/d/msgid/openpnp/463bd727-9b15-4f15-9f10-f47e2dfc98e3n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Jim Young

unread,
Apr 25, 2022, 11:56:52 AM4/25/22
to OpenPnP
This morning I updated to the latest test build (at least I believe I did) and I am not seeing the same interface your post shows. There are no sliders for adjusting the pipeline and the pipeline editor still opens in a separate window.
Here's the version of OpenPnP I am running:
OpenPnPVersion.png

Jim Young

unread,
Apr 25, 2022, 12:03:41 PM4/25/22
to OpenPnP
I guess it would help if I actually read your post in detail. I found the way to enable the exposed parameters. 

Jim Young

unread,
Apr 25, 2022, 12:06:10 PM4/25/22
to OpenPnP
This is what I was looking for ;-)

0603-BottomCamera-Pipeline-Corrected.png

Reply all
Reply to author
Forward
0 new messages