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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How do I detect a black or almost black layer?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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