Ask Your Question

memooo's profile - activity

2016-10-30 13:35:13 -0600 received badge  Famous Question (source)
2016-10-30 13:35:13 -0600 received badge  Notable Question (source)
2016-01-30 03:48:24 -0600 received badge  Popular Question (source)
2013-11-29 08:42:10 -0600 received badge  Editor (source)
2013-11-29 08:37:25 -0600 asked a question setero 3d image

hello there, I need to write program to read left and right image and find the position of the spots and calculate their angel. I am very confusing I do not know how to start. any one help me????? the images is black and the spots is in red yellow green blue colour

2013-11-04 02:26:06 -0600 commented answer counting blue pixels in image python

Thanks for your help . However when i have ran this program the result is always zero i need to calculate the blue pixel in any image and if image does not has blue pixel then the result is zero

2013-11-01 11:06:44 -0600 asked a question counting blue pixels in image python

hello I am try to calculate blue pixels in image every time I run the code I got zero so anyone help me this is my code

    import cv2
import numpy as np

img = cv2.imread("mm.jpg")
BLUE_MIN = np.array([0, 0, 200], np.uint8)
BLUE_MAX = np.array([255, 50, 50], np.uint8)

dst = cv2.inRange(img, BLUE_MIN, BLUE_MAX)
no_blue = cv2.countNonZero(dst)
print('The number of blue pixels is: ' + str(no_blue))
cv2.namedWindow("opencv")
cv2.imshow("opencv",img)
cv2.waitKey(0)