简体   繁体   中英

EmguCV Skin Detection

I'm doing a skin detection method in c# using EmguCV. For skin detection I'm referring this article . I'm new in EmguCV. I just want to know how to get or set every pixel value of image that is capturing via webcam. If skin pixel matched it become white else black. I just want RGB value of pixel without degrading the performance of application.

to get or set every pixel value of image you do it easily as following

 Image<Bgr, Byte> img = ....

 for (i = 0; i < img.Height; i++)
 {
     for (k = 0; k < img.Width; k++)
     {
         // Get 
         // Color ( R, G, B, alpha) 
         Color c = img[i, k];

         // Set 
         img[i,k] = new Bgr();
      }
 }

it will be write inplace

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM