T O P I C R E V I E W |
bmesser |
Posted - Nov 12 2012 : 13:17:44 Hi
Is there any way that I could detect a black or almost black layer I download from the internet?
What I am trying to do is animate a series of visual satellite images that come in during the day. Obviously early and late they come in black and some semi-black with the earths terminator crossing it at dawn and dusk.
Would it be possible in some way to count the dark/black pixels and say if there was more than say 80% to remove the layer?
Bruce. |
2 L A T E S T R E P L I E S (Newest First) |
bmesser |
Posted - Nov 13 2012 : 09:57:02 Thanks Klaus that's just what I wanted! TImageEn is such a wonderful component!! |
klausdoege |
Posted - Nov 13 2012 : 09:36:44 Hello, maybe, that helps!
TImageEnProc.GetDominantColor Declaration function GetDominantColor(var Color:TRGB):double; Description GetDominantColor returns the dominant (most used) color in the image. Color will contain the dominant color, and the returned result will contain the percentage of the dominant color.
Example
Percentage := ImageEnView.Proc.GetDominantColor(cl); If Percentage=100 then ShowMessage('the image is blank!');
Klaus www.klausdoege.de |