Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def checkRedPointsToArray(self, img_x, img_y, image,):
- a = np.empty([img_x,img_y])
- high_red_px_color=0
- high_red_px_value=0
- #check for heigth
- for i in range(1,img_y):
- #check for width
- for j in range(1,img_x):
- px_red = image[i,j,2]
- if (high_red_px_color < px_red and px_red > 60):
- high_red_px_color = px_red
- high_red_px_value = j
- np.insert(a,high_red_px_value,i)
- high_red_px_color = 0
- high_red_px_value = 0
- return a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement