.net - How to identify black or dark images in C#? -


How to recognize black / dark image in C #. Is there an API to see the image visibility or the ratio of the darkness? In my application, while copying images, I want to see each image and discard black pictures.

How to get any Idea?

Image can be an idea to get dark / brightness:

  Bitmap bitmap = // bitmap var color = new list & lt; Color & gt; (); For (int x = 0; x & lt; bitmap.Size.Width; x ++) {for (int y = 0; y & lt; bitmap.Size.Height; y ++) {colors.Add (bitmap) .GetPixel (x, y)); }} Float Image Brightness = Color Avg (color = & gt; color.getbightness ());  

It is possible that dark images should be considered as bright colors at least 0.1 (or relevant to any other value)


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -