Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » tif image 16 bit. autolevel
Re: tif image 16 bit. autolevel [message #32232 is a reply to message #32229] Mon, 02 May 2011 12:03 Go to previous messageGo to previous message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

OK, Now I'm able to print the histogram!

before autolevel:
index.php?t=getfile&id=3210&private=0

and after autolevel:
index.php?t=getfile&id=3211&private=0

and the algorithm:
	
	Vector<XY> hist_data;
	for(int i=0;i<256;++i)
		hist_data << XY(i, 0);
	
	const RGBA *s = ~img;
	const RGBA *e = s + img.GetLength();
	while(s < e) {
		v_curr_value = (s->r+s->g+s->b)/3;
		hist_data[v_curr_value].y++;
		if(hist_data[v_curr_value].y>v_max_y)
			v_max_y = hist_data[v_curr_value].y;
		s++;
	}


The easy way remain how to compute the autolevel algorithm in base of histogram!
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Printing a Layout
Next Topic: new! ANTI VIRUS FALSE POSITIVE with Upp (GUI MT FileSel)
Goto Forum:
  


Current Time: Fri Jul 18 08:09:54 CEST 2025

Total time taken to generate the page: 0.04257 seconds