Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I played around with a few more colorspaces in OpenCV

LAB and YUV gave a nice shape of the square object(the square object was actually red in color)

Here's the result, both the LAB and YUV results were same.

image description

Performed pixel wise operation using numpy.where in axis=2 and remove all the color pixels outside the interested square shaped object to [0,0,0] or black

This is the final result.

image description

Hope it helps someone