Hi im trying to remove big object from a picture in openCV in python I found a way to do it remove small and it worked perfectly. How could I tweak the code to only keep object from a specific range of size.
Here How to remove small connected objects using OpenCV
But when I do it for big object I get this:
error:OpenCV(3.4.1) Error: Assertion failed (iDepth == 0 || iDepth == 1) in cv::connectedComponents_sub1, file C:\projects\opencv-python\opencv\modules\imgproc\src\connectedcomponents.cpp, line 3941 Traceback (most recent call last):