Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Remove buttons from their background so I can re-use button image

How to use OpenCV (Python script) to remove the background from these button images so that only the button remains. I wish to be able to re-use the button image to place it onto a different background and not sure what OpenV methods to use. Here are some example button images:

image description

image description

image description

Here is a zip file with many button images to try: http://www.orsa-studio.com/buttons.zip

Note that buttons have the following properties.

  1. Their background may not be completely flat with one color, it may be a pattern or a gradient.
  2. They have a corner, the corner may have a radius or it may be square.
  3. The button will take up most of the image, at least more than 1/2 the width and height of the image.

Remove buttons from their background so I can re-use button image

How to use OpenCV (Python script) to remove the background from these button images so that only the button remains. remains? I wish to be able to re-use the button image to place it onto a different background and not sure what OpenV methods to use. Here are some example button images:

image description

image description

image description

Here is a zip file with many button images to try: http://www.orsa-studio.com/buttons.zip

Note that buttons have the following properties.

  1. Their background may not be completely flat with one color, it may be a pattern or a gradient.
  2. They have a corner, the corner may have a radius or it may be square.
  3. The button will take up most of the image, at least more than 1/2 the width and height of the image.

Remove buttons from their background so I can re-use button image

How to use OpenCV (Python script) to remove the background from these button images so that only the button remains? I wish to be able to re-use the button image to place it onto a different background and not sure what OpenV OpenCV methods to use. Here are some example button images:

image description

image description

image description

Here is a zip file with many button images to try: http://www.orsa-studio.com/buttons.zip

Note that buttons have the following properties.

  1. Their background may not be completely flat with one color, it may be a pattern or a gradient.
  2. They have a corner, the corner may have a radius or it may be square.
  3. The button will take up most of the image, at least more than 1/2 the width and height of the image.