threshold

Find out how much of a rectangle is filled with a color using OpenCV

Find out how much of a rectangle is filled with a color using OpenCV Question: I am using a webcam to segment a green piece of paper. I have tried different results using inRange and thresholding but have gotten a pretty good result so far. I now have a rectangle in the middle of the …

Total answers: 1

Adding threshold lines in financial plots in plotly in python

Adding threshold lines in financial plots in plotly in python Question: I am plotting financial subplots in Plotly in python which I am able to successfully. But I need threshold lines (horizontal lines) to be plotted in the second sub plot but not able to d the same. But I am able to plot threshold …

Total answers: 2

Identify black dots on lemon

Identify black dots on lemon Question: I’m trying to identify black dots on a lemon I’ve had several attempts. I have problem of differentiating black shadows with the actual black stains on the lemon. I’ve tried to use InRange and converting the image to HSV with no success and honestly I’m quite lost and would …

Total answers: 2

Efficient thresholding filter of an array with numpy

Efficient thresholding filter of an array with numpy Question: I need to filter an array to remove the elements that are lower than a certain threshold. My current code is like this: threshold = 5 a = numpy.array(range(10)) # testing data b = numpy.array(filter(lambda x: x >= threshold, a)) The problem is that this creates …

Total answers: 2