Given this image:
How can I extract the 'rectangle' my arm is holding up? I know about closing, dilation and erosion etc but I still manage to get artefacts of my hand included after filtering.
The size of that rectangle can vary due to varying distance if the camera.
I am using emgucv:
CvInvoke.Threshold(MyImage, MyImage, 10d, 255, ThresholdType.Binary); var element = CvInvoke.GetStructuringElement( ElementShape.Cross, new Size( 3, 3 ), new Point( -1, -1 ) ); CvInvoke.Erode( Threshold, Threshold, element, new Point( -1, -1 ), 1, BorderType.Reflect, default(MCvScalar) );
... and I would like image to 'roughly' look like this: