Setting up bottom vision

171 views
Skip to first unread message

vespaman

unread,
Mar 28, 2023, 10:55:51 AM3/28/23
to OpenPnP
Hi guys,


So I'm trying to follow this guide https://github.com/openpnp/openpnp/wiki/Bottom-Vision, in order to get my bottom vision working, or work better.

I guess the docs are not updated to the version that I am running, because when I orient myself to "Machine Setup -> Vision -> Bottom Vision", I am presented with a ui like this instead (or maybe the UI has changed since my last update a week ago?)

Screenshot_20230328_161812.png

So, no biggie I have another tab instead. But there's nothing I can do on the next tab, apart from "optimize" or "Test alignment";
Screenshot_20230328_161746.png

So I instead, without any clue what I was doing, I started to look at the main "Vision" tab instead. Here there are two "Stock and Rectlinear" that also cannot be edited, I suppose these are some kind of fixed defaults.

Screenshot_20230328_161923.png

But the ones called 0603 can be edited, so I tried to understand those, I guess I must have accidentally created them on some occasion, of if they followed some machine.xml.
But anyway, when I did try to do that, I had no part on my nozzle, so I decided to move the head out side the up looking camera for some reason that I have forgotten, and broken yet another nozzle since it was below safe Z. [note to self; always buy 502 nozzles in packs of 10].
Fortunately I have one more green 502, so I can continue, but now I think it is better to do things in the proper order instead of just trying to figure out things randomly... :-)

So I guess, the question number one is; how can I follow the Bottom Vision docs, or are there any other place I can read about bottom vision setup? Is there something in my setup that makes the setting greyed out?

 - Micael

Jan

unread,
Mar 29, 2023, 3:01:10 AM3/29/23
to ope...@googlegroups.com
Hi Micael!
I'm not a vision expert myself but will try to explain what I've
learned so far and how I'm understanding the (new) setup.
The vision part in the machine tree is the old representation which is
superseded be the "Vision" tab you found. The two vision pipelines
starting with a "- " you see are part of the stock OpenPnP setup. They
are read-only and serve as starting points to create more specific
pipelines. "- Rectlinear Symmetry Bottom Vision Settings -" is assigned
to "Bottom Vision", which means, its the default for all parts/packages
that do not have more specific settings. On my setup "Bottom Vision" is
assigned to a pipeline named "- Default Machine Bottom Vision -" which
is derived from "- Rectlinear Symmetry Bottom Vision Settings -" (I
checked the pipeline stages to find out) and can be edited. I used this
to configure the defaults to work for most of my parts.
Once you're satisfied with the default and find, that some part or
package is not handled well, you can go to that part or package and
change its "Bottom Vision Settings" using the tab by the same name.
You'll see the same information as in the Vision tab. In addition you'll
see the name of the Vision Setting, that is used for that part/package
and have two bottoms (in the line "Manage Settings") to specialize the
settings or revert them to the default. If you use the "specialize"
button, a copy of the current setting will be generated and assigned to
that part/package. If you now change any of the settings, they will be
specific to that package/part only. This feature is very helpful because
you can - whenever a bottom vision operation failed - check why and then
make the required adjustments, either to a pipeline, that might be
shared with other parts/packages or just to that specific part/package.
Internally the "Specialize for x" and "Reset to Default" bottom will
create or remove an entry from the table on the Vision tab and update
the corresponding "assigned to" fields. That's why I would recommend to
manage bottom vision settings using their tab on the parts/packages tab.
There is a third button in "Manage Settings" line which allows you to
generalize a setting you created for part to all parts using the same
package.
Unfortunately I don't remember how my "- Default Machine Bottom Vision
-" was created. I guess you could specialize the setting (which shall
create a editable new set of settings) and then (on the Vision tab)
rename it as you like and assign it to "Bottom Vision". Then you shall
have editable default settings.

Jan

On 28.03.2023 16:55, vespaman wrote:
> Hi guys,
>
>
> So I'm trying to follow this guide
> https://github.com/openpnp/openpnp/wiki/Bottom-Vision, in order to get
> my bottom vision working, or work better.
>
> I guess the docs are not updated to the version that I am running,
> because when I orient myself to "Machine Setup -> Vision -> Bottom
> Vision", I am presented with a ui like this instead (or maybe the UI has
> changed since my last update a week ago?)
>
> Screenshot_20230328_161812.png
>
> So, no biggie I have another tab instead. But there's nothing I can do
> on the next tab, apart from "optimize" or "Test alignment";
> Screenshot_20230328_161746.png
>
> So I instead, without any clue what I was doing, I started to look at
> the main "Vision" tab instead. Here there are two "Stock and Rectlinear"
> that also cannot be edited, I suppose these are some kind of fixed defaults.
>
> Screenshot_20230328_161923.png
>
> But the ones called 0603 can be edited, so I tried to understand those,
> I guess I must have accidentally created them on some occasion, of if
> they followed some machine.xml.
> But anyway, when I did try to do that, I had no part on my nozzle, so I
> decided to move the head out side the up looking camera for some reason
> that I have forgotten, and broken yet another nozzle since it was below
> safe Z. [note to self; always buy 502 nozzles in packs of 10].
> Fortunately I have one more green 502, so I can continue, but now I
> think it is better to do things in the proper order instead of just
> trying to figure out things randomly... :-)
>
> So I guess, the question number one is; how can I follow the Bottom
> Vision docs, or are there any other place I can read about bottom vision
> setup? Is there something in my setup that makes the setting greyed out?
>
>  - Micael
>
> --
> 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>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Jan

unread,
Mar 29, 2023, 3:01:13 AM3/29/23
to ope...@googlegroups.com
> Hi guys,
>
>
> So I'm trying to follow this guide
> https://github.com/openpnp/openpnp/wiki/Bottom-Vision, in order to get
> my bottom vision working, or work better.
>
> I guess the docs are not updated to the version that I am running,
> because when I orient myself to "Machine Setup -> Vision -> Bottom
> Vision", I am presented with a ui like this instead (or maybe the UI has
> changed since my last update a week ago?)
>
> Screenshot_20230328_161812.png
>
> So, no biggie I have another tab instead. But there's nothing I can do
> on the next tab, apart from "optimize" or "Test alignment";
> Screenshot_20230328_161746.png
>
> So I instead, without any clue what I was doing, I started to look at
> the main "Vision" tab instead. Here there are two "Stock and Rectlinear"
> that also cannot be edited, I suppose these are some kind of fixed defaults.
>
> Screenshot_20230328_161923.png
>
> But the ones called 0603 can be edited, so I tried to understand those,
> I guess I must have accidentally created them on some occasion, of if
> they followed some machine.xml.
> But anyway, when I did try to do that, I had no part on my nozzle, so I
> decided to move the head out side the up looking camera for some reason
> that I have forgotten, and broken yet another nozzle since it was below
> safe Z. [note to self; always buy 502 nozzles in packs of 10].
> Fortunately I have one more green 502, so I can continue, but now I
> think it is better to do things in the proper order instead of just
> trying to figure out things randomly... :-)
>
> So I guess, the question number one is; how can I follow the Bottom
> Vision docs, or are there any other place I can read about bottom vision
> setup? Is there something in my setup that makes the setting greyed out?
>
>  - Micael
>

vespaman

unread,
Mar 29, 2023, 3:45:05 AM3/29/23
to OpenPnP
Thank you very much, Jan, for that write up!

This is exactly what I needed to get some overview, a proper starting point, and a understanding on how it is all meant to work.

 - Micael

mark maker

unread,
Mar 29, 2023, 5:12:02 AM3/29/23
to ope...@googlegroups.com

Hi,

Finally, I more or less rewrote the Wiki on that:

https://github.com/openpnp/openpnp/wiki/Bottom-Vision

Tell me what you think, contributions always welcome.

Side remark: Jan is using the Rectlinear Symmetry variety as his default (that in itself is not the OpenPnP factory default). Rectlinear Symmetry  is of course a powerful option (and I had high hopes for it), but it turned out to have huge computation demands, so unless you have a very fast computer, I'd say stick to the Stock pipeline now explained in the Wiki. The Stock pipeline also has the advantage of being compatible with Multi-Shot Vision, e.g. for aligning parts larger than the camera view, which Rectlinear Symmetry is not (yet).

Hint to all:

If your Bottom Vision does not work like in the following animation, you are missing out:

Parametric-Pipeline

_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/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com.

Jan

unread,
Mar 29, 2023, 9:33:56 AM3/29/23
to ope...@googlegroups.com
Hi Mark!
Many thanks for updating the Wiki. The page is much better now. Would
you please have a look again onto the screenshot Micael posted as part
of his question. In the list of Bottom Visions Settings he seems not to
have a "- Default Machine Bottom Vision -" entry and his "- Rectlinear
Symmetry Bottom Vision Settings -" seems to reference "Bottm Vision" and
itself. Recovering "- Default Machine Bottom Vision -" is not covered by
the Wiki yet. I think that would be only needed if Micael's situation is
something that a normal user can run into. If e.g. "- Default Machine
Bottom Vision -" can not be deleted anymore, this is likely somethine he
has to solve manually.

Jan

On 29.03.2023 11:11, mark maker wrote:
> Hi,
>
> Finally, I more or less rewrote the Wiki on that:
>
> https://github.com/openpnp/openpnp/wiki/Bottom-Vision
>
> Tell me what you think, contributions always welcome.
>
> *Side remark: *Jan is using the *Rectlinear Symmetry* variety as his
> default (that in itself is *not* the OpenPnP factory default).
> *Rectlinear Symmetry*  is of course a powerful option (and I had high
> hopes for it), but it turned out to have huge computation demands, so
> unless you have a very fast computer, I'd say stick to the *Stock*
> pipeline now explained in the Wiki. The *Stock* pipeline also has the
> advantage of being compatible with *Multi-Shot Vision*, e.g. for
> aligning parts larger than the camera view, which *Rectlinear Symmetry*
> is not (yet)*.
> *
>
> *Hint to all: *
>
> If your Bottom Vision does not work like in the following animation, you
> are missing out:
>
> Parametric-Pipeline
>
> _Mark
>
>
> On 3/28/23 16:55, vespaman wrote:
>> Hi guys,
>>
>>
>> So I'm trying to follow this guide
>> https://github.com/openpnp/openpnp/wiki/Bottom-Vision, in order to get
>> my bottom vision working, or work better.
>>
>> I guess the docs are not updated to the version that I am running,
>> because when I orient myself to "Machine Setup -> Vision -> Bottom
>> Vision", I am presented with a ui like this instead (or maybe the UI
>> has changed since my last update a week ago?)
>>
>> Screenshot_20230328_161812.png
>>
>> So, no biggie I have another tab instead. But there's nothing I can do
>> on the next tab, apart from "optimize" or "Test alignment";
>> Screenshot_20230328_161746.png
>>
>> So I instead, without any clue what I was doing, I started to look at
>> the main "Vision" tab instead. Here there are two "Stock and
>> Rectlinear" that also cannot be edited, I suppose these are some kind
>> of fixed defaults.
>>
>> Screenshot_20230328_161923.png
>>
>> But the ones called 0603 can be edited, so I tried to understand
>> those, I guess I must have accidentally created them on some occasion,
>> of if they followed some machine.xml.
>> But anyway, when I did try to do that, I had no part on my nozzle, so
>> I decided to move the head out side the up looking camera for some
>> reason that I have forgotten, and broken yet another nozzle since it
>> was below safe Z. [note to self; always buy 502 nozzles in packs of 10].
>> Fortunately I have one more green 502, so I can continue, but now I
>> think it is better to do things in the proper order instead of just
>> trying to figure out things randomly... :-)
>>
>> So I guess, the question number one is; how can I follow the Bottom
>> Vision docs, or are there any other place I can read about bottom
>> vision setup? Is there something in my setup that makes the setting
>> greyed out?
>>
>>  - Micael
>> --
>> 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/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/1edc681a-7efa-1da1-b8b5-3837b6cd164c%40makr.zone <https://groups.google.com/d/msgid/openpnp/1edc681a-7efa-1da1-b8b5-3837b6cd164c%40makr.zone?utm_medium=email&utm_source=footer>.

Jan

unread,
Mar 29, 2023, 9:34:18 AM3/29/23
to ope...@googlegroups.com
Hi Mark!
Many thanks for updating the Wiki. The page is much better now. Would
you please have a look again onto the screenshot Micael posted as part
of his question. In the list of Bottom Visions Settings he seems not to
have a "- Default Machine Bottom Vision -" entry and his "- Rectlinear
Symmetry Bottom Vision Settings -" seems to reference "Bottom Vision"
and itself. Recovering "- Default Machine Bottom Vision -" is not
covered by the Wiki yet. I think that would be only needed if Micael's
situation is something that a normal user can run into. If e.g. "-
Default Machine Bottom Vision -" can not be deleted anymore, this is
likely something he has to solve manually.

Jan

On 29.03.2023 11:11, mark maker wrote:
> Hi,
>
> Finally, I more or less rewrote the Wiki on that:
>
> https://github.com/openpnp/openpnp/wiki/Bottom-Vision
>
> Tell me what you think, contributions always welcome.
>
> *Side remark: *Jan is using the *Rectlinear Symmetry* variety as his
> default (that in itself is *not* the OpenPnP factory default).
> *Rectlinear Symmetry*  is of course a powerful option (and I had high
> hopes for it), but it turned out to have huge computation demands, so
> unless you have a very fast computer, I'd say stick to the *Stock*
> pipeline now explained in the Wiki. The *Stock* pipeline also has the
> advantage of being compatible with *Multi-Shot Vision*, e.g. for
> aligning parts larger than the camera view, which *Rectlinear Symmetry*
> is not (yet)*.
> *
>
> *Hint to all: *
>
> If your Bottom Vision does not work like in the following animation, you
> are missing out:
>
> Parametric-Pipeline
>
> _Mark
>
>
> On 3/28/23 16:55, vespaman wrote:
>> Hi guys,
>>
>>
>> So I'm trying to follow this guide
>> https://github.com/openpnp/openpnp/wiki/Bottom-Vision, in order to get
>> my bottom vision working, or work better.
>>
>> I guess the docs are not updated to the version that I am running,
>> because when I orient myself to "Machine Setup -> Vision -> Bottom
>> Vision", I am presented with a ui like this instead (or maybe the UI
>> has changed since my last update a week ago?)
>>
>> Screenshot_20230328_161812.png
>>
>> So, no biggie I have another tab instead. But there's nothing I can do
>> on the next tab, apart from "optimize" or "Test alignment";
>> Screenshot_20230328_161746.png
>>
>> So I instead, without any clue what I was doing, I started to look at
>> the main "Vision" tab instead. Here there are two "Stock and
>> Rectlinear" that also cannot be edited, I suppose these are some kind
>> of fixed defaults.
>>
>> Screenshot_20230328_161923.png
>>
>> But the ones called 0603 can be edited, so I tried to understand
>> those, I guess I must have accidentally created them on some occasion,
>> of if they followed some machine.xml.
>> But anyway, when I did try to do that, I had no part on my nozzle, so
>> I decided to move the head out side the up looking camera for some
>> reason that I have forgotten, and broken yet another nozzle since it
>> was below safe Z. [note to self; always buy 502 nozzles in packs of 10].
>> Fortunately I have one more green 502, so I can continue, but now I
>> think it is better to do things in the proper order instead of just
>> trying to figure out things randomly... :-)
>>
>> So I guess, the question number one is; how can I follow the Bottom
>> Vision docs, or are there any other place I can read about bottom
>> vision setup? Is there something in my setup that makes the setting
>> greyed out?
>>
>>  - Micael
>> --
>> 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/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/1edc681a-7efa-1da1-b8b5-3837b6cd164c%40makr.zone <https://groups.google.com/d/msgid/openpnp/1edc681a-7efa-1da1-b8b5-3837b6cd164c%40makr.zone?utm_medium=email&utm_source=footer>.

mark maker

unread,
Mar 29, 2023, 10:25:12 AM3/29/23
to ope...@googlegroups.com

Hi Jan,

For the understanding: "- Default Machine Bottom Vision - " (unlike the others with the "-") is not a factory setting, but simply the default vision setting that was found in the configuration when the system upgraded OpenPnP to the Vision Settings system. For new configurations it is identical to the Stock settings, but already cloned so it can be edited.

If yours is gone, simply go to the Vision tab, select the Stock (or other) settings, press Copy and press Paste:

Then you can rename the Copy as you like in the table cell (F2) and assign it in Machine Setup / Vision / Bottom Vision.


Is this needed in the Wiki? 

I considered this rather generic OpenPnP GUI usage, but certainly my "developer viewpoint" is not to be trusted  😅

In the Wiki, it is always a balance between too much information, where you lose your readers before they went through the important stuff, and too little 😎

_Mark

vespaman

unread,
Mar 29, 2023, 11:28:02 AM3/29/23
to OpenPnP
So, a day progress, thanks to the both of you! :-)

I have done a few parts now, and it looks rather nice.

Mark, here's a few input from me, that may be in the doc, but I have missed, or misread;

1. I have all my packages with footprint and composition (I did them before, when importing the board data). This seems to have great input to the result of the bottom vision, and I guess I had not (still haven't, for sure!) understood exactly everything correctly in that part of the package setup. If not mentioned in the bottom vision text (and I have missed it), maybe it would be good to mention that it also is part of the equation.

2. I realize the problem with keeping the docs both updated, as well as keeping the old parts, but it is still rather easy to "read through" into the old, obsolete part.
Not sure what the solution is here, but perhaps put a different colour background on the older part? Anyway, maybe this is part of something bigger.

3. If the machine setup->vision is still needed, (which I guess it might be after all given your response to Jan, with pictures and all!) (I happily went along with Jans suggestion that it was superseded by the top vision tab, and have not used it so far today).
Anyway, the https://github.com/openpnp/openpnp/wiki/Bottom-Vision#global-configuration does not reflect how it is now, but how it was, before (my guess).



 - Micael

vespaman

unread,
Mar 29, 2023, 11:55:11 AM3/29/23
to OpenPnP

With my days progress, I have done a lot of parts, and the simpler ones (0402 etc) I used the stock bottom, as suggested by you Mark.

But then I also toyed with the rectlinear on some parts - it does not _seem_ slow at all to me, perhaps even the contrary. Is there a way to measure/compare between the two?
The rectlinear, seems _much_ more forgiving when it comes to the tweaking - almost regardless of what I do, it will work. :-)

I have seen some strange thing about an error message saying that the height of the component was wrong, but for the life of me, I cannot find the height that it says is nominal, in my part data. I had to disable the size check on that in the end. (** See below, last section!)

But now, I am kind of stuck on a SOT23. I have seen messages in this mailinglist before regarding the SOT23, so I guess it is a "baddie". The problem is not actually detecting the pins, but the angle of it. The setting of package composition is influencing, but when I put Method None, it seems most consistent.Screenshot_20230329_173722.pngScreenshot_20230329_173751.png

With the settings above, I typically gets this kind of result;

Screenshot_20230329_173843.png



Any suggestions on how to deal with the SOT23 greatly appreciated!

I will probably avoid SOT23 going forward, new designs, it is an ancient package, that is nice to hand solder, but that's about it.


Actually, while I was grabbing screenshots, I also activated part size check on this part, and got the same issues with height (height on this package is set to 1.000);
What am I missing? Is height actually height, or is it "Body length" (which incidentally is 1.300 on this package)?

Screenshot_20230329_174526.png
 


 - Micael

mark maker

unread,
Mar 29, 2023, 12:03:55 PM3/29/23
to ope...@googlegroups.com

Thanks Micael,

I have made some adjustments re your 1.

https://github.com/openpnp/openpnp/wiki/Bottom-Vision#parts-too-big-for-camera

and also this:

https://github.com/openpnp/openpnp/wiki/Bottom-Vision#troubleshooting

Re your 3.

https://github.com/openpnp/openpnp/wiki/Bottom-Vision#global-configuration

But I agree this is still (and always will be) incompletely revised, not only here but elsewhere too.

Re your 2. there is talk about a new documentations system that (if I understand correctly) is versioned, so we can revise everything without regard to old OpenPnP version. Users/readers can still go back to the older Wiki version.

https://github.com/openpnp/openpnp/issues/1537

As always: contribution are welcome!!

_Mark

mark maker

unread,
Mar 29, 2023, 12:18:31 PM3/29/23
to ope...@googlegroups.com

> Is there a way to measure/compare between the two?

If you edit the pipeline, each stage shows its computation time. The computations time is largely dependent on the search range (from the nozzle tip pick tolerance) and mask diameter (from the nozzle tip max. part diameter). If you set both tight (which is easy for 0402) then it will be no problem.

> The rectlinear, seems _much_ more forgiving when it comes to the tweaking - almost regardless of what I do, it will work. :-)

That was the intention. Robust, self-tuning. 😎

But there were still some tough nuts I could not make rock solid. One example is exactly the three-legged SOT23 with roundish pads you mention.

Then I made the Vision Compositing / Multi-Shot and this gives you an alternative for SOT23 and the likes.

Watch the video linked below, but .... unfortunately, I was very tired when I recorded that and kept stuttering about it. The idea is to isolate the pins on each side separately (two shots), and then align the part from the composited geometry. We need to make the pick tolerance very small, so it can reduce the mask to such a small circle that only one side of the part is visible in each shot:

https://youtu.be/P-ZudS7QQeE?t=298

https://github.com/openpnp/openpnp/wiki/Vision-Compositing

_Mark

vespaman

unread,
Mar 29, 2023, 1:49:20 PM3/29/23
to OpenPnP
>Watch the video linked below,
Stuttering or not, this exact solution - when I put it into my machine, it swallowed the SOT23 right away.


After a day in front of my machine, I am all done - that vacuum pump is horrendous. It has to go sooner rather than later. I will probably dream about that noise tonight.

Cheers,
 - Micael

Jan

unread,
Mar 30, 2023, 5:25:47 AM3/30/23
to ope...@googlegroups.com
Hi Mark!
Many thanks for your comprehensive response!

On 29.03.2023 16:25, mark maker wrote:
> Hi Jan,
>
> For the understanding: *"- Default Machine Bottom Vision - "* (unlike
> the others with the "-") is *not *a factory setting, but simply the
> default vision setting that was found in the configuration when the
> system upgraded OpenPnP to the Vision Settings system. For new
> configurations it is identical to the Stock settings, but already cloned
> so it can be edited.
>
>
I wasn't aware of that and thought by looking at the pattern and the
name, that it's some type of factory setting...
I just verified (by removing vision-settings.xml) that "- Default
Machine Bottom Vision -" is automatically created as clone of "- Stock
Bottom Vision Settings -", so it actually *is* some type of factory
setting...

[...]
> Is this needed in the Wiki?
>
No, I don't think so. There must have happened something special to
Micael so that his vision settings are kind of screwed up. From a new
users perspective this all looks conclusive to me. Just the "Reset to
Default" button may be disabled as long as there are no changes. This
would indicate that nothing has changed and one shall not expect any
improvements my reverting to the Default.

Jan

[...]
> https://groups.google.com/d/msgid/openpnp/6398fcd5-dc78-e318-610f-a43004c12eab%40makr.zone <https://groups.google.com/d/msgid/openpnp/6398fcd5-dc78-e318-610f-a43004c12eab%40makr.zone?utm_medium=email&utm_source=footer>.

Jan

unread,
Mar 30, 2023, 5:54:27 AM3/30/23
to ope...@googlegroups.com
Hi Micael!

On 29.03.2023 17:55, vespaman wrote:
[...]
> But now, I am kind of stuck on a SOT23. I have seen messages in this
> mailinglist before regarding the SOT23, so I guess it is a "baddie". The
> problem is not actually detecting the pins, but the angle of it. The
> setting of package composition is influencing, but when I put Method
> None, it seems most
> consistent.Screenshot_20230329_173722.pngScreenshot_20230329_173751.png
>
To my knowledge, there is no good/robust way to handle SOT23 and other
asymmetric parts yet.
- MinAreaRect will fit a rotated rectangular to three points, which
obviously does not converge well.
- DetectRectlinearSymmetry fails from time to time as well, as you have
to configure it to search for symmetries in one direction only.
- MatchTemplate only does half of the job because it can not detect
rotation errors.
- Multi-Shot vision can be setup as Mark suggested. I have not tried
that. Unfortunately it will make the process slower because it requires
two pictures at different positions. Maybe this is compensated by not
having to fix missrotations later.
I'm using MinAreaRect, which I think works best.
A better solution for SOT23 and alike would be to implement rotated
pattern matching (maybe using the footprint as reference). To my
understanding, that's the only thing the big guys are using (with image
templates). By searching the Web I found ready made implementation in
C++ (https://github.com/DennisLiu1993/Fastest_Image_Pattern_Matching)
and Python
(https://github.com/cozheyuanzhangde/Invariant-TemplateMatching). But
unfortunately I'm not an expert in integrating thus into Java. (Maybe I
can peek how Mark implemented DetectRectlinearSymmetry when I ever will
have time for that...)

Jan

[...]
> onsdag 29 mars 2023 kl. 17:28:02 UTC+2 skrev vespaman:
>
> So, a day progress, thanks to the both of you! :-)
>
> I have done a few parts now, and it looks rather nice.
>
> Mark, here's a few input from me, that may be in the doc, but I have
> missed, or misread;
>
> 1. I have all my packages with footprint and composition (I did them
> before, when importing the board data). This seems to have great
> input to the result of the bottom vision, and I guess I had not
> (still haven't, for sure!) understood exactly everything correctly
> in that part of the package setup. If not mentioned in the bottom
> vision text (and I have missed it), maybe it would be good to
> mention that it also is part of the equation.
>
> 2. I realize the problem with keeping the docs both updated, as well
> as keeping the old parts, but it is still rather easy to "read
> through" into the old, obsolete part.
> Not sure what the solution is here, but perhaps put a different
> colour background on the older part? Anyway, maybe this is part of
> something bigger.
>
> 3. If the machine setup->vision is still needed, (which I guess it
> might be after all given your response to Jan, with pictures and
> all!) (I happily went along with Jans suggestion that it was
> superseded by the top vision tab, and have not used it so far today).
> Anyway, the
> https://github.com/openpnp/openpnp/wiki/Bottom-Vision#global-configuration <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#global-configuration> does not reflect how it is now, but how it was, before (my guess).
>
>
>
>  - Micael
>
>
> onsdag 29 mars 2023 kl. 16:25:12 UTC+2 skrev ma...@makr.zone:
>
> Hi Jan,
>
> For the understanding: *"- Default Machine Bottom Vision - "*
> (unlike the others with the "-") is *not *a factory setting, but
> simply the default vision setting that was found in the
> configuration when the system upgraded OpenPnP to the Vision
> Settings system. For new configurations it is identical to the
> Stock settings, but already cloned so it can be edited.
>
> If yours is gone, simply go to the *Vision* tab, select the
> Stock (or other) settings, press *Copy* and press *Paste*:
>
> Then you can rename the Copy as you like in the table cell (F2)
> and assign it in *Machine Setup / Vision / Bottom Vision*.
>
>
> Is this needed in the Wiki?
>
> I considered this rather generic OpenPnP GUI usage, but
> certainly my "developer viewpoint" is not to be trusted  😅
>
> In the Wiki, it is always a balance between /too much
> information/, where you lose your readers before they went
> through the important stuff, and /too little/ 😎
>>>> <https://github.com/openpnp/openpnp/wiki/Bottom-Vision>, in
>>>> https://groups.google.com/d/msgid/openpnp/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com> <https://groups.google.com/d/msgid/openpnp/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/openpnp/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>>
>>> --
>>> 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>.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/openpnp/1edc681a-7efa-1da1-b8b5-3837b6cd164c%40makr.zone <https://groups.google.com/d/msgid/openpnp/1edc681a-7efa-1da1-b8b5-3837b6cd164c%40makr.zone> <https://groups.google.com/d/msgid/openpnp/1edc681a-7efa-1da1-b8b5-3837b6cd164c%40makr.zone?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/openpnp/1edc681a-7efa-1da1-b8b5-3837b6cd164c%40makr.zone?utm_medium=email&utm_source=footer>.
>>
> --
> 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>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/83f5315d-29b7-4c8e-84bf-8791cf192e15n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/83f5315d-29b7-4c8e-84bf-8791cf192e15n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Jan

unread,
Mar 30, 2023, 6:05:59 AM3/30/23
to ope...@googlegroups.com
Hi Micael!

On 29.03.2023 17:55, vespaman wrote:
[...]
> Actually, while I was grabbing screenshots, I also activated part size
> check on this part, and got the same issues with height (height on this
> package is set to 1.000);
> What am I missing? Is height actually height, or is it "Body length"
> (which incidentally is 1.300 on this package)?
> Please keep in mind, that the part size (width and height) you provide
as part of the footprint of the package are compared against the image
you have after all image processing has been done. Usually you then only
have the pins visible. I'm using the "Part size check" method
"PadExtents" with the default tolerance of 20%.

Jan

> onsdag 29 mars 2023 kl. 17:28:02 UTC+2 skrev vespaman:
>
> So, a day progress, thanks to the both of you! :-)
>
> I have done a few parts now, and it looks rather nice.
>
> Mark, here's a few input from me, that may be in the doc, but I have
> missed, or misread;
>
> 1. I have all my packages with footprint and composition (I did them
> before, when importing the board data). This seems to have great
> input to the result of the bottom vision, and I guess I had not
> (still haven't, for sure!) understood exactly everything correctly
> in that part of the package setup. If not mentioned in the bottom
> vision text (and I have missed it), maybe it would be good to
> mention that it also is part of the equation.
>
> 2. I realize the problem with keeping the docs both updated, as well
> as keeping the old parts, but it is still rather easy to "read
> through" into the old, obsolete part.
> Not sure what the solution is here, but perhaps put a different
> colour background on the older part? Anyway, maybe this is part of
> something bigger.
>
> 3. If the machine setup->vision is still needed, (which I guess it
> might be after all given your response to Jan, with pictures and
> all!) (I happily went along with Jans suggestion that it was
> superseded by the top vision tab, and have not used it so far today).
> Anyway, the
> https://github.com/openpnp/openpnp/wiki/Bottom-Vision#global-configuration <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#global-configuration> does not reflect how it is now, but how it was, before (my guess).
>
>
>
>  - Micael
>
>
> onsdag 29 mars 2023 kl. 16:25:12 UTC+2 skrev ma...@makr.zone:
>
> Hi Jan,
>
> For the understanding: *"- Default Machine Bottom Vision - "*
> (unlike the others with the "-") is *not *a factory setting, but
> simply the default vision setting that was found in the
> configuration when the system upgraded OpenPnP to the Vision
> Settings system. For new configurations it is identical to the
> Stock settings, but already cloned so it can be edited.
>
> If yours is gone, simply go to the *Vision* tab, select the
> Stock (or other) settings, press *Copy* and press *Paste*:
>
> Then you can rename the Copy as you like in the table cell (F2)
> and assign it in *Machine Setup / Vision / Bottom Vision*.
>
>
> Is this needed in the Wiki?
>
> I considered this rather generic OpenPnP GUI usage, but
> certainly my "developer viewpoint" is not to be trusted  😅
>
> In the Wiki, it is always a balance between /too much
> information/, where you lose your readers before they went
> through the important stuff, and /too little/ 😎
>>>> <https://github.com/openpnp/openpnp/wiki/Bottom-Vision>, in
>>>> https://groups.google.com/d/msgid/openpnp/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com> <https://groups.google.com/d/msgid/openpnp/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/openpnp/8210f71d-7e12-466f-9800-210296195a75n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>>
>>> --
>>> 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>.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/openpnp/1edc681a-7efa-1da1-b8b5-3837b6cd164c%40makr.zone <https://groups.google.com/d/msgid/openpnp/1edc681a-7efa-1da1-b8b5-3837b6cd164c%40makr.zone> <https://groups.google.com/d/msgid/openpnp/1edc681a-7efa-1da1-b8b5-3837b6cd164c%40makr.zone?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/openpnp/1edc681a-7efa-1da1-b8b5-3837b6cd164c%40makr.zone?utm_medium=email&utm_source=footer>.
>>
> --
> 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>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/83f5315d-29b7-4c8e-84bf-8791cf192e15n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/83f5315d-29b7-4c8e-84bf-8791cf192e15n%40googlegroups.com?utm_medium=email&utm_source=footer>.

mark maker

unread,
Mar 30, 2023, 6:40:34 AM3/30/23
to ope...@googlegroups.com

> Unfortunately it will make the process slower because it requires two pictures at different positions.

True, but because the move is very short, I expect it to be quite fast for that not-so-large SOT23, not much more than any normal vision iteration. It would be nice if Micael could actually provide his log, so we see how much time it costs.

On the other hand: some SOT23 are huge with 1.9 millimeter pitch and often generous solder pads, are you sure you need bottom vision at all? AFAIK, reflow aligns such parts nicely.

> A better solution for SOT23 and alike would be to implement rotated pattern matching

Yeah image or even just footprint pattern matching would solve it. But unfortunately there is no "Match Template With Rotation" OpenCV routine, otherwise I would probably have implemented it a long time ago.

The DetectRectlinearSymmetry computation time problem actually warned me off trying in java (for now). I am toying with some ideas...

_Mark

vespaman

unread,
Mar 30, 2023, 9:04:07 AM3/30/23
to OpenPnP

Hi Jan,
[...]
> Actually, while I was grabbing screenshots, I also activated part size
> check on this part, and got the same issues with height (height on this
> package is set to 1.000);
> What am I missing? Is height actually height, or is it "Body length"
> (which incidentally is 1.300 on this package)?
Please keep in mind, that the part size (width and height) you provide
as part of the footprint of the package are compared against the image
you have after all image processing has been done. Usually you then only
have the pins visible. I'm using the "Part size check" method
"PadExtents" with the default tolerance of 20%.


But if it is actually using the dimensions from the footprint page, it should be width and length, right? Height (Z) is something else.
In this case, the error message has a flaw.

The height on e.g. the SOT23 is set to 1.00mm, not 1.3 which indicates to me, that the dialog should say "The length is ..."

Or?

 - Micael

vespaman

unread,
Mar 30, 2023, 9:16:40 AM3/30/23
to OpenPnP
Hi Mark,

I will do some tests with and without rectlinear for sure, and different settings - this is interesting, and present here, but I couldn't find the time to sit down with my machine today. Hopefully tomorrow!
And:- you are probably right, that maybe bottom vision is not needed for some components, but I'm starting off with vision on everything, if not for anything else, then to learn.

 - Micael

mark maker

unread,
Mar 30, 2023, 9:53:22 AM3/30/23
to ope...@googlegroups.com

> But if it is actually using the dimensions from the footprint page, it should be width and length, right? Height (Z) is something else.
> In this case, the error message has a flaw.


True. Changed it. Will be part of an upcoming PR.

_Mark

vespaman

unread,
Mar 30, 2023, 2:02:30 PM3/30/23
to OpenPnP
So I had some time, to do a little more test on the SOT23.

Unfortunately, I was already rather tired when I started, so I'm not sure I did test everything correctly, but the first file is a log where I had the SOT23 loaded on the nozzle, standing over the camera position (I had done a couple of tests before).
There's two parts; one with None as compositing, and the second part Auto.
Everything else is the same (includes "Center after test").


Then, I tired as I was, did some reset of the pipeline, and then after this, I could not get the stock + vision compositing auto to work properly (align the component). Maybe this did not work before, either but it just looked like it, because it was already aligned without the compositing? I don't remember. But now, anyway, the result, if I move the component a bit on the nozzle, and run "Test Alignment", it looks like this;
Screenshot_20230330_193341.png

If I set it back to "None", it aligns well. So not a problem for me, but it would be interesting to know why it does not work well with compositing auto.

The exact log for the pic above (not that I think it will make anyone wiser) is the "log_no_go.txt".

LOL! Just now, when I am about to post, I realize, looking at the picture, that the part is upside down! I'm sure that will not make it easier...

 - Micael
log_no_go.txt
log_both.txt

mark maker

unread,
Mar 31, 2023, 2:53:38 AM3/31/23
to ope...@googlegroups.com

Please send a native camera snapsot file and your camera Units per Pixel.

_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.

vespaman

unread,
Mar 31, 2023, 3:12:10 AM3/31/23
to OpenPnP
Thanks!

I am not sure if the example above is good, since the part was upside down, but to keep the thread consistent, I have attached the pictures from yesterday evening here. (2+2 set).
The units per pixel, well all of the perhaps relevant data;
Screenshot_20230331_090610.png


 - Micael
bv_result_1680197615263171258.png
bv_result_1680197615595888106.png
bv_source_1680197615558193022.png
bv_source_1680197615229232996.png

vespaman

unread,
Apr 1, 2023, 8:50:07 AM4/1/23
to OpenPnP
So I did some more tests, just for fun, and in my setup, a QFN16 seems seems to be about as fast, regardless if rectlinear or stock is used. I simply checked the time in the log, so the complete time. Maybe rectlinear gets slower with larger parts? I'll be testing that later.

Both works fine, but, what I noticed on rectlinear, is that it often picks the belly pad on on QFN and similar;
e.g. on a VSON10;
bv_result_1680351622526491654.pngbv_source_1680351622746089165.png

I am a bit on the fence with this; maybe it does not matter - i.e. the belly pad is as good as the package outline, but if not for anything else, of course the part size test fails.

Is there any way around this on rectlinear?


 - Micael

vespaman

unread,
Apr 3, 2023, 8:36:18 AM4/3/23
to OpenPnP
OK, so I have finally stumbled on a part that I have not been able to place. I kind of always knew this would be a tough nut to crack, so I have been pushing it forward all the time.

It is a 70 pole df40 connector. I have tried all combinations I can think of, but I am never really satisfied. Some times, I can get it OK-ish, but then the next time, it is really bad.

The size of the thing is the problem, for sure. But maybe also my small green "screen", and most likely some settings are also not optimal. I don't really understand the multi shots, they are all over the place.

Is it a lost cause? Do I have to fix the green background issue first, or is there any obvious settings wrong in my setup? I shall see if I can come up with a screen that does not collide with the other nozzle, yet covers the area..



 - Micael



bv_result_1680523932324988047.png
bv_result_1680523928140701563.png
machine.xml
df40_log.txt
bv_result_1680523930268513728.png
bv_result_1680523931409357977.png
bv_result_1680523929267209453.png

Mike Menci

unread,
Apr 3, 2023, 10:15:18 AM4/3/23
to OpenPnP
Hi 
Can you take a picture of the part in centre of your nozzle and with 70 pole df40 connector in horizontal view ? can you see all gold plated pins in this view?
Can you adjust your up-looking camera to view wider angle ?
Mike

Mike Menci

unread,
Apr 3, 2023, 10:21:54 AM4/3/23
to OpenPnP
Actually not wider angle by adjusting lens but by Image Transforms: 
Try to play with this values that you have in Image transform to see a bit more in your up- looking camera: 

Image Transforms - OpenPnP.png

mark maker

unread,
Apr 3, 2023, 10:40:30 AM4/3/23
to ope...@googlegroups.com

This should work using a Stock pipeline, and multi-shot bottom vision. You need to generate the footprint which is easy.

Best watch the whole video:

https://youtu.be/P-ZudS7QQeE

_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.

vespaman

unread,
Apr 3, 2023, 11:13:46 AM4/3/23
to OpenPnP
Hi Mike,

So, I can barely fit it if I manually move it into center. But I suspect because the pick location is not visual (had to revert to tray type of feeder, since I could not get strip feeder to recognize the holes (probably partly because it is a clear plastic tape, and the holes are very remote in the picture, or perhaps also because the area of looking for the holes are so big).
Maybe there's a better feeder for this job, and that will make the pick a bit better.

I have cropped my image to 1080x1080 in the transform dialog, if I tried the full 1920 in X, I got terrible residual errors, I guess because the lens is causing this. Whenever I redo the calibration the next time, I will move my bottom camera further away, and also invest in a better fixed focus lens.

Screenshot_20230403_165806.png




vespaman

unread,
Apr 3, 2023, 11:22:04 AM4/3/23
to OpenPnP
This should work using a Stock pipeline, and multi-shot bottom vision. You need to generate the footprint which is easy.

Best watch the whole video:

Yes, this is what I hoped. And you are probably right that I miss something in the video. I must have seen it at least 10 times by now. :-)
Could it be the background that is messing it up? I don't understand why it moves around in such a strange way (out of the actual picture of the component). Could it be that the tray feeder, which does not seem to have a "rotation in tape" setting is part of the problem?
I will test to rotate the "tray" (a 3d printed stripfeeder, chmt does not have a native 32mm feeder) after sending this mail.
 

 - Micael

vespaman

unread,
Apr 3, 2023, 11:31:01 AM4/3/23
to OpenPnP
OK, so I am totally blind. Of course it has rotation in tape, just only called "rotation". OK, will test a bit with that...

 -  Micael

mark maker

unread,
Apr 3, 2023, 11:35:59 AM4/3/23
to ope...@googlegroups.com

> Could it be that the tray feeder, which does not seem to have a "rotation in tape" setting is part of the problem?

Yes that was my initial guess when I saw your image, because you already had the bracket rectangle but from the wrong side. But then you did not mention multi-shot, so I thought I was mistaken.

Also check the max. part diameter on the nozzle tip. With the bracketing going out so far, I guess it is too large.

Also: I always recommend cropping the camera image to "only valid pixels" in Advanced Camera Calibration (slider all the way). So the black margins go away. They fool Multi-shot into thinking it can use this margin area, when in fact it is partly black. 

(if it was for me, I would make this the default, or even remove that slider).

_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.

vespaman

unread,
Apr 3, 2023, 12:28:57 PM4/3/23
to OpenPnP

> Could it be that the tray feeder, which does not seem to have a "rotation in tape" setting is part of the problem?

After fixing this, the algo seems to work!

Also check the max. part diameter on the nozzle tip. With the bracketing going out so far, I guess it is too large.

It is set to 20, this part is about 18 (diagonal), so I guess it should be ok?
 

Also: I always recommend cropping the camera image to "only valid pixels" in Advanced Camera Calibration (slider all the way). So the black margins go away. They fool Multi-shot into thinking it can use this margin area, when in fact it is partly black. 

Not sure if that helped the algo's, but at least it helped me! :-) Now I can easier count the pins.

So, it is better, but not good enough. I would not try to place it on a real board. I _think_ this may be because the pins are not flat, so the reflection of them is different depending on the camera angle. So there's always some minor rotation on the part, and sometimes also the longitudinal (correct word?) error is too much as well. ie the placement would be between the pads in the length direction.

Mind you, I have not changed anything manually in the pipeline yet. But it looked rather daunting, so..

 - Micael

mark maker

unread,
Apr 3, 2023, 12:40:56 PM4/3/23
to ope...@googlegroups.com

> It is set to 20, this part is about 18 (diagonal), so I guess it should be ok?

It is for parts that fit inside the camera view. For larger parts and multi-shot it controls the max mask diameter of the corner/bracket shots.

But if you set the camera to "only valid pixels" it does not matter if you set it too large, OpenPnP will always reduce it to the smaller camera dimension.

> So, it is better, but not good enough. I would not try to place it on a real board. I _think_ this may be because the pins are not flat, so the reflection of them is different depending on the camera angle

Yes the pins are very thin, rounded and angled, so reflection is bad. Maybe a larger/bowl shaped diffuser would help, so strong light comes from a wider range of angles.

You have played with the Threshold and Min. Detail Size sliders, right?

_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.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages