Bottom camera with SOT23

374 views
Skip to first unread message

Bernd Walter

unread,
Jan 24, 2018, 3:33:29 AM1/24/18
to OpenPnP
Yesterday I'd placed a bunch of SOT23 transistors (3 pin).
Bottom camera didn't work because the square it uses wasn't defined very well with the 3 pins.
Occasionally the square was draw with a straight line over pin 3, instead of pin 1 to pin 2.
I had to disable the camera for this part.
Now I wonder how this is supposed to work with such devices.

Cri S

unread,
Jan 24, 2018, 4:52:45 AM1/24/18
to ope...@googlegroups.com
For this cases you have to change the pipeline. 
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/be095199-507c-4a57-b6e3-466a39a24d6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marek T.

unread,
Jan 24, 2018, 9:57:47 AM1/24/18
to OpenPnP
I can send you tomorrow the pipeline that we use for SOT23.
Maybe is not ideal but mistakes are 1/200 no more.

Marek T.

unread,
Jan 24, 2018, 10:16:58 AM1/24/18
to OpenPnP
Just have found my machine on the pedrive. Nothing special but works.

                           <cv-stage class="org.openpnp.vision.pipeline.stages.ImageCapture" name="0" enabled="true" settle-first="true"/>
                           <cv-stage class="org.openpnp.vision.pipeline.stages.ImageWriteDebug" name="13" enabled="false" prefix="bv_source_" suffix=".png"/>
                           <cv-stage class="org.openpnp.vision.pipeline.stages.BlurGaussian" name="10" enabled="true" kernel-size="3"/>
                           <cv-stage class="org.openpnp.vision.pipeline.stages.MaskCircle" name="4" enabled="true" diameter="200"/>
                           <cv-stage class="org.openpnp.vision.pipeline.stages.ConvertColor" name="1" enabled="true" conversion="Rgb2Gray"/>
                           <cv-stage class="org.openpnp.vision.pipeline.stages.Normalize" name="2" enabled="false"/>
                           <cv-stage class="org.openpnp.vision.pipeline.stages.Threshold" name="12" enabled="true" threshold="190" auto="false" invert="false"/>
                           <cv-stage class="org.openpnp.vision.pipeline.stages.BlurGaussian" name="17" enabled="false" kernel-size="7"/>
                           <cv-stage class="org.openpnp.vision.pipeline.stages.Threshold" name="18" enabled="false" threshold="150" auto="false" invert="false"/>
                           <cv-stage class="org.openpnp.vision.pipeline.stages.MinAreaRect" name="result" enabled="true" threshold-min="150" threshold-max="255"/>
                           <cv-stage class="org.openpnp.vision.pipeline.stages.ImageRecall" name="14" enabled="true" image-stage-name="0"/>
                           <cv-stage class="org.openpnp.vision.pipeline.stages.DrawRotatedRects" name="8" enabled="true" rotated-rects-stage-name="result" thickness="1" draw-rect-center="false" rect-center-radius="135" show-orientation="false"/>
                           <cv-stage class="org.openpnp.vision.pipeline.stages.ImageWriteDebug" name="15" enabled="false" prefix="bv_result_" suffix=".png"/>
     or                      
                        <cv-stage class="org.openpnp.vision.pipeline.stages.CreateFootprintTemplateImage" name="template" enabled="true"/>
                        <cv-stage class="org.openpnp.vision.pipeline.stages.ImageWriteDebug" name="debug_template" enabled="true" prefix="fidloc_template_" suffix=".png"/>
                        <cv-stage class="org.openpnp.vision.pipeline.stages.ConvertColor" name="template_gray" enabled="true" conversion="Bgr2Gray"/>
                        <cv-stage class="org.openpnp.vision.pipeline.stages.ImageCapture" name="image" enabled="true" settle-first="true"/>
                        <cv-stage class="org.openpnp.vision.pipeline.stages.ConvertColor" name="image_gray" enabled="true" conversion="Bgr2Gray"/>
                        <cv-stage class="org.openpnp.vision.pipeline.stages.ImageWriteDebug" name="debug_original" enabled="true" prefix="fidloc_original_" suffix=".png"/>
                        <cv-stage class="org.openpnp.vision.pipeline.stages.MatchTemplate" name="match_template" enabled="true" template-stage-name="template_gray" threshold="0.699999988079071" corr="0.8500000238418579" normalize="true"/>
                        <cv-stage class="org.openpnp.vision.pipeline.stages.ImageRecall" name="recall_image" enabled="true" image-stage-name="image"/>
                        <cv-stage class="org.openpnp.vision.pipeline.stages.DrawTemplateMatches" name="draw_matches" enabled="true" template-matches-stage-name="match_template"/>
                        <cv-stage class="org.openpnp.vision.pipeline.stages.ConvertModelToKeyPoints" name="results" enabled="true" model-stage-name="match_template"/>
                        <cv-stage class="org.openpnp.vision.pipeline.stages.DrawKeyPoints" name="draw_keypoints" enabled="true" key-points-stage-name="results"/>
                        <cv-stage class="org.openpnp.vision.pipeline.stages.ImageWriteDebug" name="debug_results" enabled="true" prefix="fidloc_results_" suffix=".png"/>

Cri S

unread,
Jan 24, 2018, 11:00:34 AM1/24/18
to ope...@googlegroups.com
This is the difference about wrong and correct pipeline, the stages
are the same, just
one settings is different. Sort of fine tuning of pipeline.
The first pipeline from @Marek works after changing some settings.
Just most pipeline works if optimizing settings if one have understood
what is wrong
or how it should be.
sot23_0.png
sot23_1.png

Marek T.

unread,
Jan 24, 2018, 11:27:07 AM1/24/18
to OpenPnP
Just the effect like @Cri shows on pic_0 I get 1/200.
Maybe it can be optimized but I've had bigger problems do improve, and it is really so occasional that not disturbing at all.

Bernd Walter

unread,
Jan 27, 2018, 7:22:08 AM1/27/18
to OpenPnP


On Wednesday, January 24, 2018 at 5:27:07 PM UTC+1, Marek T. wrote:
Just the effect like @Cri shows on pic_0 I get 1/200.
Maybe it can be optimized but I've had bigger problems do improve, and it is really so occasional that not disturbing at all.

Yes - that's exactly what I got in 5 of 12 cases.
I'm using the default pipeline as basis for my setup.
Some testing with images showed that in FindCountours seting retrievalMode to FloodFill helped.
No experience with that change on the actual machine yet.
However, my understanding is that the pipeline has no idea about the expected object rotation.
So with an SOT23 it depends on a very good pin detection to not fail.
I wonder if there is an option to measure the part with a reference picture.

Marek T.

unread,
Jan 27, 2018, 7:54:01 AM1/27/18
to OpenPnP
"pipeline has no idea". I've got from Cri the script to recognize the size of part to be added as stage of pipeline, didn't tested it yet. It's to prevent to place the wrong taken parts i.e. by their edge (then part have smaller size as should to be). Not sure if it may help in this case but you can test if you want. Do you want?

Cri S

unread,
Jan 27, 2018, 12:36:11 PM1/27/18
to ope...@googlegroups.com
if you post several sample images and pipeline, i can look over it.
> --
> 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 post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/39419880-9a52-48b9-a7a5-e975c678e705%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages