Note that there are some explanatory texts on larger screens.

plurals
  1. POdetecting contact of a hand and an object in Kinec pictures C++
    primarykey
    data
    text
    <p>First of all: I am quite new in programming Kinec via MS Visual Studio ... so sorry if my question is a little bit stupid.</p> <p>I want to detect if my hand contacts the upper part of a quadrant; for that I programm:</p> <pre><code>Image&lt;Gray, Byte&gt; HandImage = GetThresholdedImage(ref bgrImage, (int)hueHand); Image&lt;Gray, Byte&gt; depthImageBin = depthImage.ThresholdBinary(new Gray(30), new Gray(255)); List&lt;MCvBox2D&gt; DangerAreas = new List&lt;MCvBox2D&gt;(); List&lt;MCvBox2D&gt; HandAreas = new List&lt;MCvBox2D&gt;(); // build list of object rectangles DangerAreas = ProcessObjectContours(bgrImage, contoursDepthObjects, contoursHand, objectSize); // build list of hand rectangles HandAreas = ProcessHandContours(bgrImage, contoursHand, contoursDepthObjects, handSize); </code></pre> <p>whereby the values <code>objectSize</code> and <code>handSize</code> define the minimum-limit of the objects.</p> <p>so far all works well, I see the shapes on the display. If the two contures match, they merging.</p> <p>But I want that the software annouce when my hand (<code>HandAreas</code>) touch the object (<code>DangerAreas</code>) at a defined region.</p> <p>I tried to solve the problem with <code>MatchShapes</code>:</p> <pre><code>contoursDepthObjects.MatchShapes(contoursDepthObjects[0], contoursHand[0], Emgu.CV.CvEnum.MATCH_CONTOUR_TREE_METHOD.CONTOUR_TREES_MATCH_I1, 2); </code></pre> <p>but in this form <code>MatchShapes</code> is not accepted, because of errors. So two questions: is this the right way to detect when my hand touch the danger area, and if yes how is it correct handling of method <code>MatchShapes</code>?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload