Using opencv, how to remove non-object in transparent image?

Viewed 2904

I'm a newbie in image processing.

I'm trying to resize the rectangle/frame bound my object in transparent image.

enter image description here

But i don't know how to make it.

Please help me.

Thank a lot. P/s: It doesn't duplicate with crop. In crop you have fix a tuple (Crop from x, y, w, h). But in my picture, I don't know where to crop. We need to detect minimize rectangle that contain my object(sunglass) first and crop then.

1 Answers
Related