Author Topic: How can I detect color with a webcam with OpenCV?  (Read 171 times)

Offline Francis

  • 1
  • Newbie
  • *
  • Posts: 0
  • Karma: +0/-0
    • View Profile
How can I detect color with a webcam with OpenCV?
« on: November 17, 2016, 07:04:54 PM »
Hi all, I would like to ask you a big question for those who do medicine, how can i detect color with a webcam with opencv? I thank you for giving me your answer as soon as possible, Thank you in advance.



Offline Tom

  • 1
  • Newbie
  • *
  • Posts: 0
  • Karma: +0/-0
    • View Profile
Re: color with a webcam with OpenCV?
« Reply #1 on: January 09, 2018, 06:16:04 PM »
Every image is represented as a matrix. If it is a grayscale image each element of the matrix represents a gray-scale intensity from 0 to 255.

If it is an RBG image, each element is a tuple representing the intensity of Red, Blue and Green colors. E.g. (255, 255,255) is white, (0,0,0) is gray.

First identify your region of interest, and then you can check the matrix elements in that area.


 

Sitemap 1 2 3 4 5 6 7 8 9