ReferenceStripFeeder Improvements

314 views
Skip to first unread message

Richard Sim

unread,
Aug 29, 2017, 1:09:44 PM8/29/17
to OpenPnP
Hi all,

Some pretty big changes have just gone in for ReferenceStripFeeder, to address the shortcomings of the Auto Setup behaviour and improve tape strip detection. Once you get the latest build with these changes, you should reset all of your ReferenceStripFeeder vision pipelines back to the (new) default to get the full benefits of change, and then re-apply any pipeline changes that your particular hardware/setup require (if still necessary).
  • Added auto-thresholding to the default CvPipeline for ReferenceStripFeeder to better detect tape holes and eliminate false-positives in noisy camera images.
  • Auto Setup for ReferenceStripFeeder is now a lot smarter, more accurate, and is able to catch common setup issues.
  • Fixed issue where strips with 2mm part pitch could result in the reference holes being detected flipped depending on where on the two parts the user clicked.
  • Fixed issue where part pitch was calculated in the units of the camera, not necessarily millimeters.
  • User is notified if they selected parts in the wrong order for the orientation of the strip.
  • Tightened the max distance from a component center to the feed hole centers to accurately reflect the spacing as defined in the EIA-481 standard and thus reduce false-positives for adjacent strips.
  • Multiple, full lines of consecutive strip holes are detected and grouped appropriately, and only the correct line of holes are used for the selected parts/strip (some spacing is still required between adjacent strips, but it is much reduced and more reliable).
Implemented in PR https://github.com/openpnp/openpnp/pull/628

Original issue: https://github.com/openpnp/openpnp/issues/411

Please try this change out and let me know if there are any issues (and remember to reset your vision pipelines first!). This is a pretty massive change to the ReferenceStripFeeder logic so there's always the potential for some things to come up, but so far testing has shown huge improvements in the reliability and usability. Michael G, I'm especially interested in hearing how it goes for you as you've been struggling with ReferenceStripFeeder lately, and your new 3D printed strip-jigs look like a great test of the improved detection algorithm!


-Richard

Michael G.

unread,
Aug 29, 2017, 4:21:14 PM8/29/17
to OpenPnP
Hi Richard,

just loaded the new version and tried my new feeders. Unfortunately some error messages occur further, see attached.

Am Dienstag, 29. August 2017 19:09:44 UTC+2 schrieb Richard Sim:
Hi all,


Once you get the latest build with these changes, you should reset all of your ReferenceStripFeeder vision pipelines back to the (new) default to get the full benefits of change, and then re-apply any pipeline changes that your particular hardware/setup require (if still necessary).

Done. Created a new feeder with the new pipeline.
  • Added auto-thresholding to the default CvPipeline for ReferenceStripFeeder to better detect tape holes and eliminate false-positives in noisy camera images.
Not sure whether the thresholding improves it for me or makes it worse - at least in the current default pipeline. Please compare pipeline3.png with pipeline_changedBlurAndThreshold_stageResults.png. Is the latter one not cleaner or does the noise in the holes in pipeline3.png not bother the hole detection?

  • User is notified if they selected parts in the wrong order for the orientation of the strip.

OK, tested and works :)



Michael G, I'm especially interested in hearing how it goes for you as you've been struggling with ReferenceStripFeeder lately, and your new 3D printed strip-jigs look like a great test of the improved detection algorithm!

With the new pipeline I got out of the box many false positives so that the autosetup did not work very well leading to error messages and holes detected where is nothing.
So I have made three sets of pipelines to test and post some pictures coming from my machine for you to have a look at:
Pipeline-Set #1 (just the new default one):




so quite many false positives and jumping around.

Pipeline-Set #2 (change the stage blur and threshold):


here no false positives and the detected holes are quite, seems to work good with autosetup (for me). think the stage results looks much clearer than with the default pipeline. how does that change work in your setup?

Pipeline-Set #3 (removed threshold and set blur to 25):

Result here is pretty much the same to pipeline-set #2.

Think I will go for pipeline-set #2 or #3 for further testing...
Will keep reporting whether I get it to work stable

One further question on autosetup: What is the tape type option about? Can't see any effect by changing the type.
error2.png
error1.PNG

Jason von Nieda

unread,
Aug 29, 2017, 4:34:18 PM8/29/17
to OpenPnP
The tape type option was added when I first wrote this code cause I figured I would use it to change what thresholding algorithm we used, but it never ended up getting used. I'll likely remove it in the next day or so to reduce confusion. 

The rest I'll leave to Richard :)

Jason


--
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/7b2693a7-49fc-4bba-afb0-377dca678bd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yaddatrance

unread,
Aug 29, 2017, 11:21:34 PM8/29/17
to OpenPnP
Richard: Your option 3 looks nicer than 2 for registering on the center of the holes. Would you mind posting your pipeline so I can use that as a start to tuning mine?

My pnp is apart while I'm wedging in polarizing filters to the vision, but I'm looking forward to trying this version! 

Richard Sim

unread,
Aug 30, 2017, 1:58:35 AM8/30/17
to OpenPnP
Hey Michael,

Thanks for taking it for a spin!

Could you give this pipeline a go and let me know how it works out? Testing with a trimmed version of your camera image appears to detect the circles quite well, though it would be advantageous to improve your lighting setup in the long-run. There is an additional change I could make on the code-side that eliminates a few of the last false-positive circles, but the new ReferenceStripFeeder logic should be able to handle those so it shouldn't be an issue.

<cv-pipeline>
   <stages>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ImageCapture" name="original" enabled="true" settle-first="true"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.BlurMedian" name="cleanup-noise" enabled="true" kernel-size="5"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ConvertColor" name="gray" enabled="true" conversion="Bgr2Gray"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ThresholdAdaptive" name="threshold" enabled="true" adaptive-method="Gaussian" invert="false" block-size="9" c-parm="0"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.BlurGaussian" name="predetect" enabled="true" kernel-size="5"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.DetectFixedCirclesHough" name="results" enabled="true"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ImageRecall" name="recalled" enabled="true" image-stage-name="original"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.DrawCircles" name="display" enabled="true" circles-stage-name="results" thickness="1">
         <color r="255" g="0" b="0" a="255"/>
      </cv-stage>
   </stages>
</cv-pipeline>


-Richard

Michael G.

unread,
Aug 30, 2017, 3:07:01 AM8/30/17
to OpenPnP
Hello yaddatrance,

you mean me, don't you?

It's the default pipeline (https://github.com/openpnp/openpnp/blob/f9a53f0f1d9754460a29c17ee49ebc0521ce08e5/src/main/resources/org/openpnp/machine/reference/feeder/ReferenceStripFeeder-DefaultPipeline.xml) but no threshold and blur set to 25
So it would be:

<cv-pipeline>
<stages>
<cv-stage class="org.openpnp.vision.pipeline.stages.ImageCapture" name="original" enabled="true" settle-first="true"/>
<cv-stage class="org.openpnp.vision.pipeline.stages.ConvertColor" name="gray" enabled="true" conversion="Bgr2Gray"/>
<cv-stage class="org.openpnp.vision.pipeline.stages.Threshold" name="threshold" enabled="false" threshold="100" auto="true" invert="false"/>
<cv-stage class="org.openpnp.vision.pipeline.stages.BlurGaussian" name="predetect" enabled="true" kernel-size="25"/>
<cv-stage class="org.openpnp.vision.pipeline.stages.DetectFixedCirclesHough" name="results" enabled="true"/>
<cv-stage class="org.openpnp.vision.pipeline.stages.ImageRecall" name="recalled" enabled="true" image-stage-name="original"/>
<cv-stage class="org.openpnp.vision.pipeline.stages.DrawCircles" name="display" enabled="true" circles-stage-name="results" thickness="1">
<color r="255" g="0" b="0" a="255"/>
</cv-stage>
</stages>
</cv-pipeline>


Michael G.

unread,
Aug 30, 2017, 3:20:18 AM8/30/17
to OpenPnP
Hi Richard,




Am Mittwoch, 30. August 2017 07:58:35 UTC+2 schrieb Richard Sim:
Thanks for taking it for a spin!

Thanks for supporting me!
 
Testing with a trimmed version of your camera image appears to detect the circles quite well, though it would be advantageous to improve your lighting setup in the long-run.

OK, thought my lighting is not ideal but still usable. See picture. Round my camera I have a 3d printed diffusor in transparent plasic which holds warmwhite led-stripes. Designed it that way not to have too much reflections on pcbs as with direct lighting. Unfortunately I have no photo of the head available but maybe you get the idea. Do you have a concrete improvement in mind? You think direct lighting would be better? Or brighter? Could modify the fixed exposure time of the camera...



Could you give this pipeline a go and let me know how it works out? There is an additional change I could make on the code-side that eliminates a few of the last false-positive circles, but the new ReferenceStripFeeder logic should be able to handle those so it shouldn't be an issue.

<cv-pipeline>
   <stages>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ImageCapture" name="original" enabled="true" settle-first="true"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.BlurMedian" name="cleanup-noise" enabled="true" kernel-size="5"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ConvertColor" name="gray" enabled="true" conversion="Bgr2Gray"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ThresholdAdaptive" name="threshold" enabled="true" adaptive-method="Gaussian" invert="false" block-size="9" c-parm="0"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.BlurGaussian" name="predetect" enabled="true" kernel-size="5"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.DetectFixedCirclesHough" name="results" enabled="true"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ImageRecall" name="recalled" enabled="true" image-stage-name="original"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.DrawCircles" name="display" enabled="true" circles-stage-name="results" thickness="1">
         <color r="255" g="0" b="0" a="255"/>
      </cv-stage>
   </stages>
</cv-pipeline>


Will try the pipeline this evening and report, thank you!

Michael G.

unread,
Aug 30, 2017, 5:09:41 AM8/30/17
to OpenPnP
Additionally I got a question regarding the stage DetectFixedCirclesHough. From my understanding the stage is very much like DetectCirclesHough, except it gets the desired diameter of the holes automagically from somewhere. Looking into the code assured my assumption. So for DetectCirclesHough I have parameters like thresholds, which are fixed in the DetectFixedCirclesHough. Are these fixed values valid for every setup? Maybe they should be configurable? To test that: Can I just replace DetectFixedCirclesHough by DetectCirclesHough with properly set min/max diameter parameters or am I missing something?


Am Mittwoch, 30. August 2017 07:58:35 UTC+2 schrieb Richard Sim:
[...]

yaddatrance

unread,
Aug 30, 2017, 12:31:21 PM8/30/17
to OpenPnP
Lol sorry, I knew that bu It was staring at Richard's name when I was typing.

phon...@gmail.com

unread,
Aug 30, 2017, 1:40:18 PM8/30/17
to OpenPnP
Michael, you should check if the illumination problem is from vignetting or if it's really from illumination. If from vignetting because cheaper optic is present you must reduce to HD format.

Michael G.

unread,
Aug 30, 2017, 1:57:07 PM8/30/17
to OpenPnP
Hi, thank you for advise. Maybe I got both: vignetting from illumination and a cheap optic (ELP 8mm lens). Attached a snapshot of a white paper. looks good to me, but after applying histogramequalize, there is a clear spot to be seen... Maybe I can fix this, but is this a real problem or is my illumination not that bad? Could try a 3d printed dome next...
histogram_equalize.PNG
DownlookingCam_2017-08-30_19.48.10.472.png
dome.png

Michael G.

unread,
Aug 30, 2017, 2:21:43 PM8/30/17
to OpenPnP
Tested your suggested pipeline, see attached result. additionally i attached a full snapshot of the camera view. the holes are all detected, but there are many other false positives jumping around... Will tinker around with my lighting and pipelines and try to get it to work for me.


Am Mittwoch, 30. August 2017 07:58:35 UTC+2 schrieb Richard Sim:
pipeline_test.PNG
DownlookingCam_2017-08-30_20.18.58.975.png

phon...@gmail.com

unread,
Aug 30, 2017, 2:26:01 PM8/30/17
to OpenPnP
I think there are both.. Further it seems the led are too bright and need to be dimmed. As the optical error is big, you should compensate for it.
If possible you should deactivate the AGC. It is possible that you don't have downlight enabled all the time ? 
If that is the case, you need wait 10 frames for the AGC to settle.

phon...@gmail.com

unread,
Aug 30, 2017, 2:46:25 PM8/30/17
to OpenPnP

Use Canny and not threshold.

<cv-pipeline>
   <stages>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ImageRead" name="S0" enabled="true" file="C:\Users\xxx\Downloads\DownlookingCam_2017-08-30_20.18.58.975.png"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ImageCapture" name="original" enabled="true" settle-first="true"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.BlurGaussian" name="S1" enabled="true" kernel-size="5"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ConvertColor" name="gray" enabled="true" conversion="Bgr2Gray"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.BlurGaussian" name="S2" enabled="true" kernel-size="21"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.DetectEdgesCanny" name="S3" enabled="true" threshold-1="40.0" threshold-2="180.0"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.BlurGaussian" name="predetect" enabled="true" kernel-size="5"/> 

phon...@gmail.com

unread,
Aug 30, 2017, 2:48:25 PM8/30/17
to OpenPnP
Forget to post image.
<cv-pipeline>
   <stages>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ImageCapture" name="original" enabled="true" settle-first="true"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.BlurGaussian" name="S1" enabled="true" kernel-size="5"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ConvertColor" name="gray" enabled="true" conversion="Bgr2Gray"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.BlurGaussian" name="S2" enabled="true" kernel-size="21"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.DetectEdgesCanny" name="S3" enabled="true" threshold-1="40.0" threshold-2="180.0"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.BlurGaussian" name="predetect" enabled="true" kernel-size="5"/> 
      <cv-stage class="org.openpnp.vision.pipeline.stages.DetectFixedCirclesHough" name="results" enabled="true"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ImageRecall" name="recalled" enabled="true" image-stage-name="original"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.DrawCircles" name="display" enabled="true" circles-stage-name="results" thickness="1">
         <color r="255" g="0" b="0" a="255"/>
      </cv-stage>
   </stages>
</cv-pipeline>

 

Richard Sim

unread,
Aug 30, 2017, 3:47:04 PM8/30/17
to OpenPnP
Hey Michael,

Sorry will try and get to your questions later today - but that image of the white paper looks good. Like Cri said, it's the vignetting that I was primarily concerned about and that photo doesn't show as much as previous ones did (maybe it is an AGC/non-constantly-on lighting issue?).

It's a bit counter-intuitive, but having false positives in the pipeline is fine and actually somewhat desirable. If the pipeline was totally strict, there's a lot of potential to miss some holes for differing setups and tape types. The ReferenceStripFeeder algorithm should reject the false-positives now. Let me know how the Auto Setup goes with the pipeline I posted.

DetectEdgesCanny shouldn't be required, as that's actually an internal part of the Hough circle detector; it's already doing Canny edge detection.


-Richard

Michael G.

unread,
Aug 30, 2017, 5:05:55 PM8/30/17
to OpenPnP
That stage looks quite well on that image. It seems not intuitive (at least to me), but reasonable to blur after canny again: center of the hole is detected more accurate it seems. will try tomorrow that pipeline as well as richards posted pipeline live in autosetup.
additionally i tinkered with another cam and some leds. darkfield-lighting lighting seems to be good as there are less reflections on pcbs and I expect less vignetting. designed a holder (attached) for led stripes and install it tomorrow.

I set the exposure to manual (value is -9). my downlight is enabled all the time currently.
darkfield-lighting.PNG

Michael G.

unread,
Aug 30, 2017, 5:14:11 PM8/30/17
to OpenPnP


Am Mittwoch, 30. August 2017 21:47:04 UTC+2 schrieb Richard Sim:
Sorry will try and get to your questions later today - but that image of the white paper looks good. Like Cri said, it's the vignetting that I was primarily concerned about and that photo doesn't show as much as previous ones did (maybe it is an AGC/non-constantly-on lighting issue?).

I changed nothing to lighting but I changed the white balance because it was way off. Exposure is manual at -9 (ELP-camera).
 

It's a bit counter-intuitive, but having false positives in the pipeline is fine and actually somewhat desirable.

OK, that is good to know: Until now I was optimizing for stable hole detection AND less false positives. Will disregard the latter from now. In live camera view the detected holes seem to "breath" a bit and so have slightly variing detected center points. maybe the stage posted by cri improves this unintended behaviour. will see tomorrow.
 
Let me know how the Auto Setup goes with the pipeline I posted.

will report tomorrow.
 

DetectEdgesCanny shouldn't be required, as that's actually an internal part of the Hough circle detector; it's already doing Canny edge detection.

Ah, sorry, meant to use DetectCirclesHough to have all parameters (that are handed over to the internally used canny) at the hand.

Richard Sim

unread,
Aug 31, 2017, 12:52:33 AM8/31/17
to OpenPnP
Hey Michael,

I tested the changes on your full-resolution camera image and it seems to detect them sufficiently well. I'm interested in seeing how they go in a real-world test!

I've made a PR here with the pipeline and code changes (if your testing goes well, we can merge this and get a new build with it as the default pipeline): https://github.com/openpnp/openpnp/pull/633

That PR also includes the changes for exposing the dp/param1/param2 parameters of DetectFixedCirclesHough; if you have the ability to build the code I'd be very interested if you could do some testing of the whole PR (and resetting your CV pipelines to the updated defaults).


-Richard

Michael G.

unread,
Aug 31, 2017, 11:50:10 AM8/31/17
to OpenPnP
Hi Richard,

made some tests with the pipeline defined in the pull request. That one doesn't work at all unfortunately. If using it, I get 100% fail of autosetup and some new error messages, see attached. The direction of clicking parts doesn't matter, always quits with "wrong directions" message. additionally two snapshots of the autosetup proc. the one posted by cri works, but still having some holes detected wrong even though the camera view shows correctly detected holes. something strange must happen while the machine moves to the clicked location I think, can't explain else...

Maybe I will setup eclipse on the weekend to compile the latest version and test that...
error_msg.PNG
DownlookingCam_2017-08-31_17.39.31.928.png
DownlookingCam_2017-08-31_17.39.36.127.png
autosetup_providedPipeline.PNG

Cri S

unread,
Aug 31, 2017, 1:41:48 PM8/31/17
to ope...@googlegroups.com
try to add a bigger blur, canny, and blur before hough processing.
Why you don't post orginal color source message ?
> --
> 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/be14b814-8c68-4e3d-a921-32bdc17c37e9%40googlegroups.com.

Michael G.

unread,
Sep 2, 2017, 4:05:01 PM9/2/17
to OpenPnP
Hi Cri S,

have already tried that, like you recommended before. That brings pretty good results in the pipeline-editor. Nevertheless, there seems to be something else preventing the autosetup from working correct, but I can't figure out what. I still got the feeling its something related to timing or a lag while grabbing the video signal from camera. sometimes the camera view looks like in the attached picture. Had somebody seen such a camera view before (just a cross in it)? Further there were some odd error messages posted some days earlier by me here.
One original snapshot attached, too.

kind regards

michael
DownlookingCam_2017-09-02_21.56.37.438.png
preview-window_while autosetup.png

phon...@gmail.com

unread,
Sep 2, 2017, 4:40:00 PM9/2/17
to OpenPnP
This is a clear indication of camera problems, overheating, cable, interference, memory, ... .
As this is frequent, there is code to hide that and it's successful if it only occurs sporadically. At the same time it hides the problem if the problem is a issue that really need to be resolved.


Michael G.

unread,
Sep 2, 2017, 4:52:15 PM9/2/17
to OpenPnP
Don't know how to investigate further into this to resolve. The camera works well except while performing autosetup. Had luck to hit the print screen button at the time it happened. Only have seen that in combination with autosetup. Memory is 8GB, CPU AMD with 4 kernels. Will try the old version without the pipeline next to see if it was working there reliable and its a newly introduced bug. Any other ideas?

Cri S

unread,
Sep 2, 2017, 4:58:32 PM9/2/17
to ope...@googlegroups.com
Then it's memory.
I had advised that problem before merging, instead of inserting the line there preferred to writa a bug report #641 


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

Cri S

unread,
Sep 2, 2017, 5:03:16 PM9/2/17
to ope...@googlegroups.com
Bug #631

Cri S

unread,
Sep 2, 2017, 5:33:09 PM9/2/17
to ope...@googlegroups.com
insert

pipeline.release();

before line:
ReferenceStripFeeder.java : 305
ReferenceStripFeeder.java : 291
ReferenceStripFeederWizard.java : 622
ReferenceStripFeederWizard.java : 586
ReferenceStripFeederWizard.java : 576

and memory problem is away.

2017-09-02 23:03 GMT+02:00, Cri S <phon...@gmail.com>:
> Bug #631
>
>
> Il sabato 2 settembre 2017, Cri S <phon...@gmail.com> ha scritto:
>
>> Then it's memory.
>> I had advised that problem before merging, instead of inserting the line
>> there preferred to writa a bug report #641
>>
>>
>> Il sabato 2 settembre 2017, Michael G. <mic...@groene.de
>> <javascript:_e(%7B%7D,'cvml','mic...@groene.de');>> ha scritto:
>>
>>> Don't know how to investigate further into this to resolve. The camera
>>> works well except while performing autosetup. Had luck to hit the print
>>> screen button at the time it happened. Only have seen that in
>>> combination
>>> with autosetup. Memory is 8GB, CPU AMD with 4 kernels. Will try the old
>>> version without the pipeline next to see if it was working there
>>> reliable
>>> and its a newly introduced bug. Any other ideas?
>>>
>>> Am Samstag, 2. September 2017 22:40:00 UTC+2 schrieb phon...@gmail.com:
>>>>
>>>> This is a clear indication of camera problems, overheating, cable,
>>>> interference, memory, ... .
>>>> As this is frequent, there is code to hide that and it's successful if
>>>> it only occurs sporadically. At the same time it hides the problem if
>>>> the
>>>> problem is a issue that really need to be resolved.
>>>>
>>>>
>>>> --
>>> 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/ms
>>> gid/openpnp/ac61e6dc-d820-41c6-b81d-ab84e066c6bb%40googlegroups.com
>>> <https://groups.google.com/d/msgid/openpnp/ac61e6dc-d820-41c6-b81d-ab84e066c6bb%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .

Cri S

unread,
Sep 2, 2017, 5:35:50 PM9/2/17
to ope...@googlegroups.com
It is not possible to use finally as suggested inside error report as
finally is executed
before catch and inside catch access to pipeline data is mostly needed
in order to
give correct error messages for knowing the real reason.
If accessing the data inside catch on previously disposed memory on finally,
core dump inside opencv is the result, on mac it could be different.

Jason von Nieda

unread,
Sep 2, 2017, 5:49:51 PM9/2/17
to ope...@googlegroups.com
This is incorrect. finally executes after everything in try and everything in catch (if an exception is thrown). 

Example:

public class Finally {
    public static void main(String[] args) {
        try {
            System.out.println("try");
            throw new Exception();
        }
        catch (Exception e) {
            System.out.println("catch");
        }
        finally {
            System.out.println("finally");
        }
    }
}

Output:
try
catch
finally



Your suggestion will still leak memory if the exception is thrown on ReferenceStripFeeder:288. 

This is the reason I suggested using finally. It is designed specifically for cleaning up resources after they are used in an situation where an exception may be thrown.

Jason


Michael G.

unread,
Sep 2, 2017, 5:57:22 PM9/2/17
to OpenPnP
Hello Jason,

what would you suggest? Shall I try to setup eclipse(?) and put some code somewhere to confirm whether it improves the situation for me? Or maybe you have other ideas?
I wonder, why nobody else runs into this problem except me?

thank you
>>> <javascript:_e(%7B%7D,'cvml','micgroene.de');>> ha scritto:

Jason von Nieda

unread,
Sep 2, 2017, 5:59:49 PM9/2/17
to OpenPnP
Hi Michael,

I'm fixing the issue now, will have it released in an hour or so. The new code does use more memory, so it's possible that's the issue but I think it's unlikely. If you were running out of memory I'd expect the program to die, not just the images to fail. But this an easy fix so we might as well rule it out.

Jason


Michael Gröne

unread,
Sep 2, 2017, 6:20:44 PM9/2/17
to ope...@googlegroups.com
Hi,

okay, will try the next release then. Indeed I ran into the problem,
that the whole program was standing still for some time (more than 10
seconds). I think two times I had to kill the process, the other times
(maybe up to 2-3 times) it went back to normal.
The freezing occured while editing the pipeline of the feeders, but I'm
not sure whether it was always then.
Did you see the screenshot in the message from 2017-08-31 17:50
GMT+02:00? Maybe its related?


Michael
> <http://40googlegroups.com>
> >>>>
> <https://groups.google.com/d/msgid/openpnp/ac61e6dc-d820-41c6-b81d-ab84e066c6bb%40googlegroups.com?utm_medium=email&utm_source=footer>
> >>>> .
> >>>> For more options, visit
> https://groups.google.com/d/optout.
> >>>>
> >>>
> >>
> >
>
> --
> 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/CAJGcfUgBvo9jB5o%3Ds0Nou75CJrEqunQiv1mgq9NkmJrKFuDk%2Bw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/1479af22-d5f3-4c37-b5c4-aed42669ceba%40googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/1479af22-d5f3-4c37-b5c4-aed42669ceba%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "OpenPnP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/openpnp/y-2pXo0roj4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> openpnp+u...@googlegroups.com
> <mailto:openpnp+u...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/CA%2BQw0jyCEku%3DYw2GHhwyOeVj2_LYOuAxqXv_SnSq5UVbfAwcUw%40mail.gmail.com
> <https://groups.google.com/d/msgid/openpnp/CA%2BQw0jyCEku%3DYw2GHhwyOeVj2_LYOuAxqXv_SnSq5UVbfAwcUw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Cri S

unread,
Sep 2, 2017, 6:35:16 PM9/2/17
to ope...@googlegroups.com
2017-09-02 23:49 GMT+02:00, Jason von Nieda <ja...@vonnieda.org>:
> This is incorrect. finally executes after everything in try and everything
> in catch (if an exception is thrown).

Actually there are some (partially resolved, but merged into 9 release
and not 8) bugs
that afflict this topic. I'm speak for java general, not only limited
to oracle java, and even
that is not without side effects.

>
> Example:
>
> public class Finally {
> public static void main(String[] args) {
> try {
> System.out.println("try");
> throw new Exception();
> }
> catch (Exception e) {
> System.out.println("catch");
> }
> finally {
> System.out.println("finally");
> }
> }
> }
>
> Output:
> try
> catch
> finally
>
>
> See
> https://docs.oracle.com/javase/tutorial/essential/exceptions/finally.html
> for
> more info.
>
> Your suggestion will still leak memory if the exception is thrown on
> ReferenceStripFeeder:288.
>

I know, but in that case the pipeline fail always because wrong return
type or stage
used.
The normal uses cases are addressed with the suggested modifications.

Jason von Nieda

unread,
Sep 2, 2017, 6:38:48 PM9/2/17
to ope...@googlegroups.com
Actually there are some (partially resolved, but merged into 9 release
and not 8) bugs
that afflict this topic. I'm speak for java general, not only limited
to oracle java, and even
that is not without side effects.


Do you have any references for this?

Jason

Jason von Nieda

unread,
Sep 2, 2017, 6:40:54 PM9/2/17
to ope...@googlegroups.com
Okay, new release is up. Let me know if this helps. If not, please repost the screenshots, or any new ones you have and send them as attachments. The ones you sent are too small to read.

Jason


Michael Gröne

unread,
Sep 3, 2017, 1:15:41 PM9/3/17
to ope...@googlegroups.com
Ok, just tried the new release. Got no luck with the autosetup, the
procedure quits every time with different errors (see attached
screenshots, hopefully readable this time?).

Additionally I attached a screenshot of the CPU load. It is at 33.3% and
seems limited there as there would be more power available. RAM usage
was readout by me as following:
20s after start: 661MB
1,5min after start: 900MB
2min after start: 1100MB
3min after start: 1160MB
4min after start: 1200MB

Is this considered to be normal?

Maybe through limited to 33.3% by whatever, the openpnp process doesn't
catch up with the camera?
> <mailto:phon...@gmail.com>> wrote:
> >
> >             It is not possible to use finally as suggested inside
> error
> >             report as
> >             finally is executed
> >             before catch and inside catch access to pipeline data is
> >             mostly needed
> >             in order to
> >             give correct error messages for knowing the real reason.
> >             If accessing the data inside catch on previously disposed
> >             memory on finally,
> >             core dump inside opencv is the result, on mac it could be
> >             different.
> >
> >             2017-09-02 23:33 GMT+02:00, Cri S <phon...@gmail.com
> <mailto:phon...@gmail.com>>:
> >              > insert
> >              >
> >              > pipeline.release();
> >              >
> >              > before line:
> >              > ReferenceStripFeeder.java : 305
> >              > ReferenceStripFeeder.java : 291
> >              > ReferenceStripFeederWizard.java :  622
> >              > ReferenceStripFeederWizard.java :  586
> >              > ReferenceStripFeederWizard.java :  576
> >              >
> >              > and memory problem is away.
> >              >
> >              > 2017-09-02 23:03 GMT+02:00, Cri S
> <phon...@gmail.com <mailto:phon...@gmail.com>>:
> >              >> Bug #631
> >              >>
> >              >>
> >              >> Il sabato 2 settembre 2017, Cri S
> <phon...@gmail.com <mailto:phon...@gmail.com>> ha
> >             scritto:
> >              >>
> >              >>> Then it's memory.
> >              >>> I had advised that problem before merging,
> instead of
> >             inserting the line
> >              >>> there preferred to writa a bug report #641
> >              >>>
> >              >>>
> >
> >              >>> Il sabato 2 settembre 2017, Michael G.
> <mic...@groene.de <mailto:mic...@groene.de>
> >              >>> <javascript:_e(%7B%7D,'cvml','micgroene.de
> <http://micgroene.de>');>> ha scritto:
> >
> >
> >              >>>
> >              >>>> Don't know how to investigate further into this to
> >             resolve. The camera
> >              >>>> works well except while performing autosetup.
> Had luck
> >             to hit the print
> >              >>>> screen button at the time it happened. Only
> have seen
> >             that in
> >              >>>> combination
> >              >>>> with autosetup. Memory is 8GB, CPU AMD with 4
> kernels.
> >             Will try the old
> >              >>>> version without the pipeline next to see if it was
> >             working there
> >              >>>> reliable
> >              >>>> and its a newly introduced bug. Any other ideas?
> >              >>>>
> >              >>>> Am Samstag, 2. September 2017 22:40:00 UTC+2
> schrieb
> > phon...@gmail.com <mailto:phon...@gmail.com>:
> >              >>>>>
> >              >>>>> This is a clear indication of camera problems,
> >             overheating, cable,
> >              >>>>> interference, memory, ... .
> >              >>>>> As this is frequent, there is code to hide
> that and
> >             it's successful if
> >              >>>>> it only occurs sporadically. At the same time it
> >             hides the problem if
> >              >>>>> the
> >              >>>>> problem is a issue that really need to be
> resolved.
> >              >>>>>
> >              >>>>>
> >              >>>>> --
> >              >>>> 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%2Bu...@googlegroups.com>.
> >              >>>> To post to this group, send email to
> > ope...@googlegroups.com <mailto:ope...@googlegroups.com>.
> >
> >
> >              >>>> To view this discussion on the web visit
> > https://groups.google.com/d/ms
> >              >>>>
> >
>  gid/openpnp/ac61e6dc-d820-41c6-b81d-ab84e066c6bb%40googlegroups.com <http://40googlegroups.com>
> >             <http://40googlegroups.com>
> >              >>>>
> >
>  <https://groups.google.com/d/msgid/openpnp/ac61e6dc-d820-41c6-b81d-ab84e066c6bb%40googlegroups.com?utm_medium=email&utm_source=footer>
> >              >>>> .
> >              >>>> For more options, visit
> > https://groups.google.com/d/optout.
> >              >>>>
> >              >>>
> >              >>
> >              >
> >
> >             --
> >             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%2Bu...@googlegroups.com>.
> >             To post to this group, send email to
> ope...@googlegroups.com <mailto:ope...@googlegroups.com>.
> >
> >
> >             To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/openpnp/CAJGcfUgBvo9jB5o%3Ds0Nou75CJrEqunQiv1mgq9NkmJrKFuDk%2Bw%40mail.gmail.com.
> >             For more options, visit
> https://groups.google.com/d/optout.
> >
> >     --
> >     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%2Bunsu...@googlegroups.com>
> >     <mailto:openpnp+u...@googlegroups.com
> <mailto:openpnp%2Bunsu...@googlegroups.com>>.
> >     To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>
> >     <mailto:ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>>.
> >     To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/openpnp/1479af22-d5f3-4c37-b5c4-aed42669ceba%40googlegroups.com
> >
>  <https://groups.google.com/d/msgid/openpnp/1479af22-d5f3-4c37-b5c4-aed42669ceba%40googlegroups.com?utm_medium=email&utm_source=footer>.
> >     For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to a topic
> in the
> > Google Groups "OpenPnP" group.
> > To unsubscribe from this topic, visit
> > https://groups.google.com/d/topic/openpnp/y-2pXo0roj4/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> > openpnp+u...@googlegroups.com
> <mailto:openpnp%2Bunsu...@googlegroups.com>
> > <mailto:openpnp+u...@googlegroups.com
> <mailto:openpnp%2Bunsu...@googlegroups.com>>.
> > To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>
> > <mailto:ope...@googlegroups.com <mailto:ope...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/openpnp/CA%2BQw0jyCEku%3DYw2GHhwyOeVj2_LYOuAxqXv_SnSq5UVbfAwcUw%40mail.gmail.com
> >
> <https://groups.google.com/d/msgid/openpnp/CA%2BQw0jyCEku%3DYw2GHhwyOeVj2_LYOuAxqXv_SnSq5UVbfAwcUw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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%2Bunsu...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> To view this discussion on the web visit
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "OpenPnP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/openpnp/y-2pXo0roj4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> openpnp+u...@googlegroups.com
> <mailto:openpnp+u...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/CA%2BQw0jyBF8mjxLLL05ZXr0UgZCzXYVY3HvHcEn7cMtsPhyUzZw%40mail.gmail.com
> <https://groups.google.com/d/msgid/openpnp/CA%2BQw0jyBF8mjxLLL05ZXr0UgZCzXYVY3HvHcEn7cMtsPhyUzZw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
err_msg_2.png
err_msg_3.png
openPnP_cpu.png
err_msg_while autosetup.png

Jason von Nieda

unread,
Sep 3, 2017, 1:17:53 PM9/3/17
to ope...@googlegroups.com
Thanks Michael, that seems to point to a couple problems. Can guy also send your machine.xml and I will have a close look at this when I get home in a bit.
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/cb65fee8-8dd9-9cc0-ed8f-122a745480a1%40groene.de.

Michael Gröne

unread,
Sep 3, 2017, 1:29:09 PM9/3/17
to ope...@googlegroups.com
Sure I can, it's attached.

Let me know if I shall test something else or you need more details.
> >     <mailto:phon...@gmail.com <mailto:phon...@gmail.com>>> wrote:
> >      >
> >      >             It is not possible to use finally as suggested
> inside
> >     error
> >      >             report as
> >      >             finally is executed
> >      >             before catch and inside catch access to
> pipeline data is
> >      >             mostly needed
> >      >             in order to
> >      >             give correct error messages for knowing the
> real reason.
> >      >             If accessing the data inside catch on
> previously disposed
> >      >             memory on finally,
> >      >             core dump inside opencv is the result, on mac
> it could be
> >      >             different.
> >      >
> >      >             2017-09-02 23:33 GMT+02:00, Cri S
> <phon...@gmail.com <mailto:phon...@gmail.com>
> >     <mailto:phon...@gmail.com <mailto:phon...@gmail.com>>>:
> >      >              > insert
> >      >              >
> >      >              > pipeline.release();
> >      >              >
> >      >              > before line:
> >      >              > ReferenceStripFeeder.java : 305
> >      >              > ReferenceStripFeeder.java : 291
> >      >              > ReferenceStripFeederWizard.java :  622
> >      >              > ReferenceStripFeederWizard.java :  586
> >      >              > ReferenceStripFeederWizard.java :  576
> >      >              >
> >      >              > and memory problem is away.
> >      >              >
> >      >              > 2017-09-02 23:03 GMT+02:00, Cri S
> >     <phon...@gmail.com <mailto:phon...@gmail.com>
> <mailto:phon...@gmail.com <mailto:phon...@gmail.com>>>:
> >      >              >> Bug #631
> >      >              >>
> >      >              >>
> >      >              >> Il sabato 2 settembre 2017, Cri S
> >     <phon...@gmail.com <mailto:phon...@gmail.com>
> <mailto:phon...@gmail.com <mailto:phon...@gmail.com>>> ha
> >      >             scritto:
> >      >              >>
> >      >              >>> Then it's memory.
> >      >              >>> I had advised that problem before merging,
> >     instead of
> >      >             inserting the line
> >      >              >>> there preferred to writa a bug report #641
> >      >              >>>
> >      >              >>>
> >      >
> >      >              >>> Il sabato 2 settembre 2017, Michael G.
> >     <mic...@groene.de <mailto:mic...@groene.de>
> <mailto:mic...@groene.de <mailto:mic...@groene.de>>
> <mailto:phon...@gmail.com <mailto:phon...@gmail.com>>:
> >     <mailto:openpnp%2Bu...@googlegroups.com
> <mailto:openpnp%252Bu...@googlegroups.com>>.
> >      >              >>>> To post to this group, send email to
> >      > ope...@googlegroups.com <mailto:ope...@googlegroups.com>
> <mailto:ope...@googlegroups.com <mailto:ope...@googlegroups.com>>.
> >      >
> >      >
> >      >              >>>> To view this discussion on the web visit
> >      > https://groups.google.com/d/ms
> >      >              >>>>
> >      >
> >
>  gid/openpnp/ac61e6dc-d820-41c6-b81d-ab84e066c6bb%40googlegroups.com <http://40googlegroups.com> <http://40googlegroups.com>
> >      >             <http://40googlegroups.com>
> >      >              >>>>
> >      >
> >
>  <https://groups.google.com/d/msgid/openpnp/ac61e6dc-d820-41c6-b81d-ab84e066c6bb%40googlegroups.com?utm_medium=email&utm_source=footer>
> >      >              >>>> .
> >      >              >>>> For more options, visit
> >      > https://groups.google.com/d/optout.
> >      >              >>>>
> >      >              >>>
> >      >              >>
> >      >              >
> >      >
> >      >             --
> >      >             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%2Bu...@googlegroups.com>
> <mailto:openpnp%2Bu...@googlegroups.com
> <mailto:openpnp%252Bu...@googlegroups.com>>.
> >      >             To post to this group, send email to
> > ope...@googlegroups.com <mailto:ope...@googlegroups.com>
> <mailto:ope...@googlegroups.com <mailto:ope...@googlegroups.com>>.
> >      >
> >      >
> >      >             To view this discussion on the web visit
> >      >
> >
> https://groups.google.com/d/msgid/openpnp/CAJGcfUgBvo9jB5o%3Ds0Nou75CJrEqunQiv1mgq9NkmJrKFuDk%2Bw%40mail.gmail.com.
> >      >             For more options, visit
> > https://groups.google.com/d/optout.
> >      >
> >      >     --
> >      >     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%2Bunsu...@googlegroups.com>
> >     <mailto:openpnp%2Bunsu...@googlegroups.com
> <mailto:openpnp%252Buns...@googlegroups.com>>
> >      >     <mailto:openpnp+u...@googlegroups.com
> <mailto:openpnp%2Bunsu...@googlegroups.com>
> >     <mailto:openpnp%2Bunsu...@googlegroups.com
> <mailto:openpnp%252Buns...@googlegroups.com>>>.
> >      >     To post to this group, send email to
> ope...@googlegroups.com <mailto:ope...@googlegroups.com>
> >     <mailto:ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>>
> >      >     <mailto:ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>
> >     <mailto:ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>>>.
> >      >     To view this discussion on the web visit
> >      >
> >
> https://groups.google.com/d/msgid/openpnp/1479af22-d5f3-4c37-b5c4-aed42669ceba%40googlegroups.com
> >      >
> >
>  <https://groups.google.com/d/msgid/openpnp/1479af22-d5f3-4c37-b5c4-aed42669ceba%40googlegroups.com?utm_medium=email&utm_source=footer>.
> >      >     For more options, visit
> https://groups.google.com/d/optout.
> >      >
> >      > --
> >      > You received this message because you are subscribed to a
> topic
> >     in the
> >      > Google Groups "OpenPnP" group.
> >      > To unsubscribe from this topic, visit
> >      >
> https://groups.google.com/d/topic/openpnp/y-2pXo0roj4/unsubscribe.
> >      > To unsubscribe from this group and all its topics, send an
> email to
> >      > openpnp+u...@googlegroups.com
> <mailto:openpnp%2Bunsu...@googlegroups.com>
> >     <mailto:openpnp%2Bunsu...@googlegroups.com
> <mailto:openpnp%252Buns...@googlegroups.com>>
> >      > <mailto:openpnp+u...@googlegroups.com
> <mailto:openpnp%2Bunsu...@googlegroups.com>
> >     <mailto:openpnp%2Bunsu...@googlegroups.com
> <mailto:openpnp%252Buns...@googlegroups.com>>>.
> >      > To post to this group, send email to
> ope...@googlegroups.com <mailto:ope...@googlegroups.com>
> >     <mailto:ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>>
> >      > <mailto:ope...@googlegroups.com
> <mailto:ope...@googlegroups.com> <mailto:ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>>>.
> >      > To view this discussion on the web visit
> >      >
> >
> https://groups.google.com/d/msgid/openpnp/CA%2BQw0jyCEku%3DYw2GHhwyOeVj2_LYOuAxqXv_SnSq5UVbfAwcUw%40mail.gmail.com
> >      >
> >
>  <https://groups.google.com/d/msgid/openpnp/CA%2BQw0jyCEku%3DYw2GHhwyOeVj2_LYOuAxqXv_SnSq5UVbfAwcUw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> >      > For more options, visit https://groups.google.com/d/optout.
> >
> >     --
> >     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%2Bunsu...@googlegroups.com>
> >     <mailto:openpnp%2Bunsu...@googlegroups.com
> <mailto:openpnp%252Buns...@googlegroups.com>>.
> >     To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>
> >     <mailto:ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>>.
> >     To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/openpnp/11c49e05-19f5-c454-37b4-3e514c44ca2b%40groene.de.
> >     For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to a topic
> in the
> > Google Groups "OpenPnP" group.
> > To unsubscribe from this topic, visit
> > https://groups.google.com/d/topic/openpnp/y-2pXo0roj4/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> > openpnp+u...@googlegroups.com
> <mailto:openpnp%2Bunsu...@googlegroups.com>
> > <mailto:openpnp+u...@googlegroups.com
> <mailto:openpnp%2Bunsu...@googlegroups.com>>.
> > To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>
> > <mailto:ope...@googlegroups.com <mailto:ope...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/openpnp/CA%2BQw0jyBF8mjxLLL05ZXr0UgZCzXYVY3HvHcEn7cMtsPhyUzZw%40mail.gmail.com
> >
> <https://groups.google.com/d/msgid/openpnp/CA%2BQw0jyBF8mjxLLL05ZXr0UgZCzXYVY3HvHcEn7cMtsPhyUzZw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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%2Bunsu...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> To view this discussion on the web visit
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "OpenPnP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/openpnp/y-2pXo0roj4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> openpnp+u...@googlegroups.com
> <mailto:openpnp+u...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/CA%2BQw0jzJREOqZ5_j5aaORj-RCo0pCShDJcLTJXzHEBwVgf9xFQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/openpnp/CA%2BQw0jzJREOqZ5_j5aaORj-RCo0pCShDJcLTJXzHEBwVgf9xFQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
machine.xml

Jason von Nieda

unread,
Sep 3, 2017, 3:23:04 PM9/3/17
to ope...@googlegroups.com
Hi Michael,

I think I have an idea of what is going on, but it will help if you can provide a bit more detail. Could you describe the steps that take place when you get these error messages? Do they just suddenly pop up randomly, or does it always happen in response to an action on your part? If you could record a screen capture video that would be ideal.

In the meantime, I've found some code that could potentially cause the error you are seeing, so I am working on a fix for that, but your description or video will help me know if I'm on the right track.

Jason


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/07fe73cc-cee2-129a-cde6-8a1d3faffff0%40groene.de.

Jason von Nieda

unread,
Sep 3, 2017, 3:56:08 PM9/3/17
to ope...@googlegroups.com
Hi Michael,

I've just pushed a new release that I hope will solve all of this for you. In addition to trying this, I'd like to ask you to turn down the FPS for your cameras from 15 to maybe 5. That is part of the reason you are seeing this and other people aren't, and also accounts for the high memory usage. That's not the only reason, though. There was a serious concurrency issue in the new code that is now fixed, but lowering the FPS will help with performance in general and won't cause any issues. OpenPnP doesn't need a high frame rate, it just needs an image when it asks for one.

Going forward, we developers are going to have to take a hard look at concurrency in OpenPnP and see if changes need to be made. We've been a bit lax and it's going to start biting us as the vision algorithms get more complex, take more memory and are slower to process.

Jason

Michael Gröne

unread,
Sep 3, 2017, 5:37:23 PM9/3/17
to ope...@googlegroups.com
Hello Jason,

now tried the new version: Much better now! Tried serveral times and got
no real error messages like before. Just the message "no tape holes
found" I get regularly. This message I could bring away with a higher
settletime of testwise chosen 800ms. In addition it seems, the accuracy
of the detected hole centers is better at a higher settle time.
But 800ms is really long. Used 250ms before as many others do(?). May it
be, there is a lag in processing while doing autosetup and showing the
live-pipeline-view?

anyway, thank you very much for fixing so far!




Am 03.09.2017 um 21:55 schrieb Jason von Nieda:
> Hi Michael,
>

Cri S

unread,
Sep 3, 2017, 7:43:50 PM9/3/17
to ope...@googlegroups.com
Yes, there is a lag, this is systematic on that coding.
To avoid the lag, i have introduces lastCapture() into camera spi in
order to avoid that.
That spi change was judged not useful at that time of proposal.
> --
> 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/b38d94ff-9d24-b1c5-69c1-a55dc07332f7%40groene.de.

Richard Sim

unread,
Sep 4, 2017, 4:27:39 AM9/4/17
to OpenPnP
Michael, I've got a PR open for some more pretty big changes to the Auto Setup code and pipeline. If you've set up Eclipse I'd love to hear how it goes for you (and if you do try it, please include updated screenshots of any issues that come up).


Hopefully it'll be merged shortly for a new release (there may be some issues that'll delay it however), but until then any testing that can be done would be much appreciated!
Reply all
Reply to author
Forward
0 new messages