#include "threshold.h"
using namespace std;

void threshold(double **imgBinary, double **img, double T, const int IMG_H, const int IMG_W)
{
	for (int i = 0; i < IMG_H; i++)
	{
		for (int j = 0; j < IMG_W; j++)
		{
			if (img[i][j] >= T)
			{
				imgBinary[i][j] = 1;
			}
			else
			{
				imgBinary[i][j] = 0;
			}
		}
	}
}