ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How do I detect a black or almost black layer?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

bmesser

United Kingdom
234 Posts

Posted - Nov 12 2012 :  13:17:44  Show Profile  Reply
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.

klausdoege

Germany
389 Posts

Posted - Nov 13 2012 :  09:36:44  Show Profile  Reply
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
Go to Top of Page

bmesser

United Kingdom
234 Posts

Posted - Nov 13 2012 :  09:57:02  Show Profile  Reply
Thanks Klaus that's just what I wanted!
TImageEn is such a wonderful component!!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: