[ create a new paste ] login | about

Link: http://codepad.org/KlBj0lpe    [ raw code | output | fork ]

C++, pasted on Apr 17:
void DibContrasteBase(CDib& dib)
{
	int low,high;
	int indexI, indexJ;
	int w= dib.GetWidth();
	int h= dib.GetHeight();

	float histo[256];
	DibHistogram(dib,histo);
	double cBaseHisto[256]={0.0};

	
	BYTE** ptr = dib.GetPtr();
	/* Initializing the Base LUT  to 0's*/
	for(int i =0;i<255;i++)
		{
			cBaseHisto[i]=0;
		}
	

	for(int i =255;i>0;i--)
	{
		if(histo[i]>histo[high])
		{
			high =i;
		}
	}

	low = high;
	for (int i =0;i<255;i++)
	{
		if(histo[i]<histo[low] && histo[i] != 0)
		{
		   low = i;
		}
	}


	for(int i=0;i<255;i++)
	{
		cBaseHisto[i]=limit( (histo[i] - low)/(high - low) )*255;
	}

	for(indexI =0;indexI<indexI<w ;indexI++)
	{
		for(indexJ =0;indexJ<h;indexJ++)
		{
			ptr[indexI][indexJ] = limit(cBaseHisto[ptr[indexI][indexJ] ]) ;
			

	    }
	}
	
}


Output:
1
2
Line 1: error: variable or field 'DibContrasteBase' declared void
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: