OpenCV: Finding the color intensity
<p>I want to write a program to see whether the red <strong>color intensity</strong> is the <strong>dominant color</strong>. If the brown color intensity is <strong>greater than the threshold</strong>. Then the program will print out "Detected".</p>

<p><a href="https://i.stack.imgur.com/6Syfz.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Syfz.jpg" alt="enter image description here"></a></p>

<p>For example, the red color in the photo is the dominant color, so the program should print out "Detected"!.</p>

<p>I have written somethings like this:</p>

<pre><code>lower_red = np.array([110, 50, 50], dtype=np.uint8)
upper_red = np.array([130,255,255], dtype=np.uint8)
mask = cv2.inRange(hsv, lower_red, upper_red)
res = cv2.bitwise_and(frame,frame, mask= mask)
</code></pre>

<p>However, it only converts the color of the image, but the giving the intensity. How can I get the Boolean value that the image has more red color or not?</p>