loading
 
Is Partial Shap Matching possible?
Anonymous
16 year
I have filtered out all the background noise and created a black and white image of my hand. I wish for the shape matching module to regonize just the top part of my hand (so that it can be centered on) since the arm length will vary. Is there any way for the shape matching module will regonize just the top part of my hand?
Anonymous 16 year
You cannot partially match using the shape matching module. But what you can do is to reduce the shape down to a more canonical view that should work better with the shape matching module. In the following technique we assume that the arm/hand is protruding from the bottom of the screen towards the top, i.e. someone has their hand stretched up. If this requirement fails there are other ways based on what we describe that can compensate for this.

If you ever notice how artists begin to draw hands you will notice they first draw a circle where the hand is to approximately go. We use this same technique to calculate an inscribed circle i.e. what is the biggest circle that you can draw within the bounds of the object (at this time it is both a hand and arm).

Starting with your image (thresholded due to jpeg introduced artifacts), all holes filled (needed for shape matching to work correctly) and adding in the blob replace module we get



We then detect the lowest point of this circle using the point location module. This identifies a point as such:



Note the green X.

Which is then finally the y axis where we will crop the image to produce



which should look similar enough each time the hand is detected to do a shape match.

The main point here is to use the inscribed circle as a way to identify the center of the hand and then remove pixels according to their position in relation to the hand. Another technique could be expanding that circle by 2x its radius and then masking the resulting image ... you'd get a bit of the arm in that but it should also be adequate to match against. We'll leave that technique for another day.

Try the robofile below. Note this assumes your already preprocessed image is loaded.

STeven.







program.robo

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index