T O P I C R E V I E W |
yogiyang |
Posted - Aug 06 2015 : 04:48:35 Are there any possibilities to detecting whether an image is light or dark using Histogram features of ImageEn?
What I need to do is find out whether an image loaded by user is light or dark and the perform some settings accordingly.
Can I find this out? If yes how?
It is possible to know as to how dark or light an image is?
TIA
Yogi Yang
Yogi Yang |
3 L A T E S T R E P L I E S (Newest First) |
xequte |
Posted - Aug 09 2015 : 05:13:53 Hi Yogi
Yes, I think that sounds like a good way to handle it.
Have a look at a sample of images and compare the histograms. This will give you an idea of what you should be looking for.
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
yogiyang |
Posted - Aug 07 2015 : 09:17:16 I tried that but still cannot get to know whether an Image is lighter or darker.
If I calculate total pixels in a Historgram Gray channel it seems I am probably getting somewhere but I don't know as how accurate this may be.
What I am doing is calculating total pixels in all levels from 0 to 128 as these are generally dark and then calculating total pixels in all levels from 129 to 255 as these are Light.
Am I going in the right direction?
TIA
Yogi Yang |
xequte |
Posted - Aug 06 2015 : 16:41:54 Hi Yogi
There is no automated way to do this. You would need to analyze the histogram to determine whether it is weighted more towards 0 (dark) or 255 (light).
You could also try just getting the average color of the image:
http://www.imageen.com/help/TImageEnProc.CalcAverageRGB.html
Nigel Xequte Software www.xequte.com nigel@xequte.com |