Skip to content Skip to sidebar Skip to footer

How To Crop Image Based On Contents (python & Opencv)?

Well currently I'm working on a personal project which is the identification of products in a scanned image taken from a store catalog. As you may see in the image there's no line

Solution 1:

The problem you have is usually called background removal, or alternatively foreground extraction. In this example, it might actually be relatively easy, as the background is mostly in shades of the same color - my recommendation would be to look at the GrabCut algorithm which is described here: https://docs.opencv.org/3.4.3/d8/d83/tutorial_py_grabcut.html


Post a Comment for "How To Crop Image Based On Contents (python & Opencv)?"