why the code below is not running? Can you please fix it? #include #include #include using namespace std; // Define the size of the images const int M = 6; const int N = 6; // Define a function to compute the joint entropy given a co-occurrence matrix double computeJointEntropy(vector>& coocMatrix) { double jointEntropy = 0.0; double sum = 0.0; for (int k = 0; k < 2; k++) { for (int l = 0; l < 2; l++) { double pkl = coocMatrix[k][l]; if (pkl > 0) { jointEntropy -= pkl * log2(pkl); sum += pkl; } } } if (sum < 1.0) { jointEntropy = 1.0; } return jointEntropy; } // Define a function to compute the similarity measure given a joint entropy value double computeSimilarity(double jointEntropy, double maxJointEntropy) { return 1.0 - jointEntropy / maxJointEntropy; } int main() { // Define the reference image A int A[M][N] = { {1, 1, 1, 0, 0, 0}, {1, 1, 1, 0, 0, 0}, {1, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 1}, {0, 0, 0, 1, 1, 1}, {0, 0, 0, 1, 1, 1} }; // Define the database of binary images B int B[10][M][N] = { // Image 0 { {1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1} }, // Image 1 { {0, 1, 1, 0, 0, 0}, {0, 1, 1, 0, 0, 0}, {0, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 0}, {0, 0, 0, 1, 1, 0}, {0, 0, 0, 1, 1, 0} }, // Image 2 { {1, 1, 0, 0, 0, 1}, {1, 1, 0, 0, 0, 1}, {1, 1, 0, 0, 0, 1}, {0, 0, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 0}, #include #include #define M 6 // number of rows #define N 6 // number of columns #define NUM_IMAGES 10 // number of images in database using namespace std; int main() { // Load reference image A and database images B(s) // TODO: implement reading images from Excel file // Initialize co-occurrence matrix C int C[2][2] = {0}; // Compute co-occurrence matrix for reference image A for (int i = 0; i < M; i++) { for (int j = 0; j < N; j++) { int K = /* TODO: compute intensity value of pixel (i,j) in image A */; int L = /* TODO: compute intensity value of pixel (i,j) in image B(s) */; C[K][L]++; } } // Compute co-occurrence probability matrix P double P[2][2] = {0}; for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { P[i][j] = (double) C[i][j] / (M * N); } } // Convert P to 1-D array and compute co-occurrence entropies H(s) double H[NUM_IMAGES] = {0}; for (int s = 0; s < NUM_IMAGES; s++) { // TODO: compute co-occurrence probability matrix for image B(s) // TODO: convert P to 1-D array for (int i = 0; i < 4; i++) { double p = /* TODO: get i-th element of P 1-D array */; if (p > 0) { H[s] -= p * log2(p); } } } // Compute similarity measures rho(s) double rho[NUM_IMAGES] = {0}; double max_H = *max_element(H, H + NUM_IMAGES); for (int s = 0; s < NUM_IMAGES; s++) { rho[s] = 1 - H[s] / max_H; } // Find index s_max of image B(s) that is most similar to reference image A double max_rho = -1; int s_max = -1; for (int s = 0; s < NUM_IMAGES; s++) { if (rho[s] > max_rho) { max_rho = rho[s]; s_max = s; } } // Output results cout << "Co-occurrence probability matrix for a sample image f.